You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// @notice Emit the entire block data for easy visibility
50
51
event BlockData(bytesblockData);
@@ -59,23 +60,32 @@ contract Zenith is HostPassage, AccessControlDefaultAdminRules {
59
60
/// @notice Submit a rollup block with block data submitted via calldata.
60
61
/// @dev Blocks are submitted by Builders, with an attestation to the block data signed by a Sequencer.
61
62
/// @param header - the header information for the rollup block.
62
-
/// @param blockData - block data information. could be blob hashes / indices, or direct rlp-encoded transctions. blockData is ignored by the contract logic.
63
+
/// @param blockDataHash - keccak256(blockData). the Node will discard the block if the hash doens't match.
64
+
/// @dev including blockDataHash allows the sequencer to sign over finalized block data, without needing to calldatacopy the `blockData` param.
63
65
/// @param v - the v component of the Sequencer's ECSDA signature over the block header.
64
66
/// @param r - the r component of the Sequencer's ECSDA signature over the block header.
65
67
/// @param s - the s component of the Sequencer's ECSDA signature over the block header.
68
+
/// @param blockData - block data information. could be packed blob hashes, or direct rlp-encoded transctions. blockData is ignored by the contract logic.
66
69
/// @custom:reverts BadSequence if the sequence number is not the next block for the given rollup chainId.
67
70
/// @custom:reverts BlockExpired if the confirmBy time has passed.
68
71
/// @custom:reverts BadSignature if the signer is not a permissioned sequencer,
69
72
/// OR if the signature provided commits to a different header.
70
73
/// @custom:reverts OneRollupBlockPerHostBlock if attempting to submit a second rollup block within one host block.
71
74
/// @custom:emits BlockSubmitted if the block is successfully submitted.
72
75
/// @custom:emits BlockData to expose the block calldata; as a convenience until calldata tracing is implemented in the Node.
73
-
function submitBlock(BlockHeader memoryheader, uint8v, bytes32r, bytes32s, bytescalldatablockData) external {
74
-
_submitBlock(header, v, r, s);
76
+
function submitBlock(
77
+
BlockHeader memoryheader,
78
+
bytes32blockDataHash,
79
+
uint8v,
80
+
bytes32r,
81
+
bytes32s,
82
+
bytescalldatablockData
83
+
) external {
84
+
_submitBlock(header, blockDataHash, v, r, s);
75
85
emitBlockData(blockData);
76
86
}
77
87
78
-
function _submitBlock(BlockHeader memoryheader, uint8v, bytes32r, bytes32s) internal {
88
+
function _submitBlock(BlockHeader memoryheader, bytes32blockDataHash, uint8v, bytes32r, bytes32s) internal {
79
89
// assert that the sequence number is valid and increment it
0 commit comments