Skip to content

Commit

Permalink
feat(protocol): allow local.params.parentMetaHash to remain as 0 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Nov 6, 2024
1 parent bfb0386 commit 94185fe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/protocol/contracts/layer1/based/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,10 @@ library LibProposing {

// Check if parent block has the right meta hash. This is to allow the proposer to make sure
// the block builds on the expected latest chain state.
if (local.params.parentMetaHash == 0) {
local.params.parentMetaHash = parentBlk.metaHash;
} else {
require(local.params.parentMetaHash == parentBlk.metaHash, L1_UNEXPECTED_PARENT());
}
require(
local.params.parentMetaHash == 0 || local.params.parentMetaHash == parentBlk.metaHash,
L1_UNEXPECTED_PARENT()
);

// Initialize metadata to compute a metaHash, which forms a part of the block data to be
// stored on-chain for future integrity checks. If we choose to persist all data fields in
Expand Down

0 comments on commit 94185fe

Please sign in to comment.