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

L2Block #1825

Open
wants to merge 46 commits into
base: nightly
Choose a base branch
from
Open

L2Block #1825

wants to merge 46 commits into from

Conversation

jfldde
Copy link
Contributor

@jfldde jfldde commented Feb 6, 2025

Description

  • Refactor SignedSoftConfirmation into L2Block. Extract txs out of block and follow a consistent header/tx split.
  • Remove blobs from L2Block and re-compute from txs when needed to keep backward compatibility
  • Add tx_merkle_root to header
  • Add migration logic to add tx_merkle_root to StoredSoftConfirmation
  • Add state root to header digest
  • Remove SoftConfirmationReceipt
  • Adds tx_merkle_root field to SoftConfirmationResponse

Linked Issues

@jfldde jfldde requested a review from eyusufatik as a code owner February 6, 2025 17:29
@auto-assign auto-assign bot requested a review from rakanalh February 6, 2025 17:29
@jfldde jfldde marked this pull request as draft February 6, 2025 17:29
bin/citrea/src/test_rpc.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@rakanalh rakanalh left a comment

Choose a reason for hiding this comment

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

Great PR


/// Signed L2 header
#[derive(PartialEq, Eq, BorshDeserialize, BorshSerialize, Serialize, Deserialize, Clone, Debug)]
pub struct SignedSoftConfirmationHeader {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just Header or L2Header

@jfldde jfldde marked this pull request as ready for review February 8, 2025 23:05
@auto-assign auto-assign bot requested a review from kpp February 8, 2025 23:05
Copy link
Member

@eyusufatik eyusufatik left a comment

Choose a reason for hiding this comment

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

overall looking good

crates/common/src/utils.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 67.22488% with 274 lines in your changes missing coverage. Please review.

Project coverage is 76.2%. Comparing base (796388e) to head (d4ca07e).
Report is 1 commits behind head on nightly.

Files with missing lines Patch % Lines
...p-interface/src/state_machine/soft_confirmation.rs 53.1% 88 Missing ⚠️
.../db_migrations/soft_confirmation_tx_merkle_root.rs 4.4% 65 Missing ⚠️
...module-system/sov-modules-stf-blueprint/src/lib.rs 53.6% 57 Missing ⚠️
crates/sequencer/src/runner.rs 81.4% 36 Missing ⚠️
crates/batch-prover/src/proving.rs 73.6% 5 Missing ⚠️
crates/common/src/utils.rs 72.2% 5 Missing ⚠️
...face/src/state_machine/zk/batch_proof/input/mod.rs 44.4% 5 Missing ⚠️
...reign-sdk/full-node/db/sov-db/src/ledger_db/mod.rs 88.8% 4 Missing ⚠️
...rface/src/state_machine/zk/batch_proof/input/v1.rs 0.0% 4 Missing ⚠️
...overeign-sdk/full-node/db/sov-schema-db/src/lib.rs 0.0% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
Files with missing lines Coverage Δ
bin/citrea/src/rollup/mod.rs 79.4% <ø> (ø)
bin/citrea/src/test_rpc.rs 99.5% <100.0%> (+<0.1%) ⬆️
crates/batch-prover/src/da_block_handler.rs 75.0% <100.0%> (-0.1%) ⬇️
crates/batch-prover/src/db_migrations/mod.rs 100.0% <100.0%> (ø)
crates/batch-prover/src/runner.rs 82.5% <100.0%> (-0.3%) ⬇️
crates/fullnode/src/da_block_handler.rs 72.9% <100.0%> (ø)
crates/fullnode/src/db_migrations/mod.rs 100.0% <100.0%> (ø)
crates/fullnode/src/runner.rs 89.0% <100.0%> (+<0.1%) ⬆️
crates/primitives/src/forks.rs 85.0% <ø> (ø)
crates/sequencer/src/db_migrations/mod.rs 100.0% <100.0%> (ø)
... and 20 more

... and 3 files with indirect coverage changes

@jfldde jfldde requested a review from eyusufatik February 11, 2025 10:38
@kpp kpp mentioned this pull request Feb 11, 2025
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.

Better L2 block representation
4 participants