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 Submit a rollup block with block data stored in 4844 blobs.
60
+
/// @notice Submit a rollup block with block data submitted via calldata.
58
61
/// @dev Blocks are submitted by Builders, with an attestation to the block data signed by a Sequencer.
59
62
/// @param header - the header information for the rollup block.
60
-
/// @param blobIndices - the indices of the 4844 blob hashes for the block data.
61
-
/// @param v - the v component of the Sequencer's ECSDA signature over the block commitment.
62
-
/// @param r - the r component of the Sequencer's ECSDA signature over the block commitment.
63
-
/// @param s - the s component of the Sequencer's ECSDA signature over the block commitment.
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.
65
+
/// @param v - the v component of the Sequencer's ECSDA signature over the block header.
66
+
/// @param r - the r component of the Sequencer's ECSDA signature over the block header.
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.
64
69
/// @custom:reverts BadSequence if the sequence number is not the next block for the given rollup chainId.
65
70
/// @custom:reverts BlockExpired if the confirmBy time has passed.
66
-
/// @custom:reverts BadSignature if the signer is not a permissioned sequencer,
67
-
/// OR if the signature provided commits to different block data.
71
+
/// @custom:reverts BadSignature if the signer is not a permissioned sequencer,
72
+
/// OR if the signature provided commits to a different header.
73
+
/// @custom:reverts OneRollupBlockPerHostBlock if attempting to submit a second rollup block within one host block.
68
74
/// @custom:emits BlockSubmitted if the block is successfully submitted.
69
-
function submitBlock(BlockHeader memoryheader, uint32[] memoryblobIndices, uint8v, bytes32r, bytes32s)
70
-
external
71
-
{
75
+
/// @custom:emits BlockData to expose the block calldata; as a convenience until calldata tracing is implemented in the Node.
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);
85
+
emitBlockData(blockData);
86
+
}
87
+
88
+
function _submitBlock(BlockHeader memoryheader, bytes32blockDataHash, uint8v, bytes32r, bytes32s) internal {
72
89
// assert that the sequence number is valid and increment it
0 commit comments