Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix state_diff_hash usage #2960

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

perekopskiy
Copy link
Contributor

What ❔

  • squashes some migration (there is no need for them to be separate)
  • makes state_diff_hash, local_root, aggregated_root optional in L1BatchMetadata
  • metadata.state_diff_hash is used for new batches, system log is used for old batches
  • removes pre boojum code from proof_data_handler

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

@perekopskiy perekopskiy changed the title fix(sync-layer): fix state_diff_hash usage fix: fix state_diff_hash usage Sep 25, 2024
@@ -1,8 +1,8 @@
/// The key of the system log with value of the L2->L1 logs tree root hash
pub const L2_TO_L1_LOGS_TREE_ROOT_KEY: u32 = 0;

/// The key of the system log with value of the state diff hash
pub const STATE_DIFF_HASH_KEY: u32 = 2;
/// The key of the system log with value of the state diff hash for pre-gateway protocol versions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is in that slot AFTER gateway?
(did we move slot numbers or do we simply put empty data there)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've moved slots around, IIUC some were removed and some new were added. After gateway PREV_BATCH_HASH_KEY has key = 2

core/lib/types/src/commitment/mod.rs Show resolved Hide resolved
@perekopskiy
Copy link
Contributor Author

Merging cause I only added comments after approve. Feel free to leave additional comment, I can address them in next PR

@perekopskiy perekopskiy merged commit 3352655 into sync-layer-stable Sep 25, 2024
25 checks passed
@perekopskiy perekopskiy deleted the sync-layer-commiment-improvements branch September 25, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants