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 The location where the block data was submitted.
11
-
/// @param Blobs - the block data was submitted as 4844 blobs. the `submitBlock` calldata contains `blobIndices` which can be used to pull the blobs / blob hashes.
12
-
/// @param Calldata - the block data was submitted directly via the `submitBlock` calldata.
13
-
enum DataLocation {
14
-
Blobs,
15
-
Calldata
16
-
}
17
10
/// @notice Block header information for the rollup block, signed by the sequencer.
18
11
/// @param rollupChainId - the chainId of the rollup chain. Any chainId is accepted by the contract.
19
12
/// @param sequence - the sequence number of the rollup block. Must be monotonically increasing. Enforced by the contract.
20
13
/// @param confirmBy - the timestamp by which the block must be submitted. Enforced by the contract.
21
14
/// @param gasLimit - the gas limit for the rollup block. Ignored by the contract; enforced by the Node.
22
15
/// @param rewardAddress - the address to receive the rollup block reward. Ignored by the contract; enforced by the Node.
23
-
24
16
struct BlockHeader {
25
17
uint256 rollupChainId;
26
18
uint256 sequence;
@@ -50,17 +42,13 @@ contract Zenith is HostPassage, AccessControlDefaultAdminRules {
50
42
error BadSignature(addressderivedSequencer);
51
43
52
44
/// @notice Emitted when a new rollup block is successfully submitted.
53
-
/// @param location - the location where the block data was submitted.
54
45
/// @param sequencer - the address of the sequencer that signed the block.
55
46
/// @param header - the block header information for the block.
/// @dev Blocks are submitted by Builders, with an attestation to the block data signed by a Sequencer.
107
61
/// @param header - the header information for the rollup block.
108
-
/// @param blockCommit - the hashes `blockCommitment` signed by the Sequencer.
109
-
/// @param v - the v component of the Sequencer's ECSDA signature over the block commitment.
110
-
/// @param r - the r component of the Sequencer's ECSDA signature over the block commitment.
111
-
/// @param s - the s component of the Sequencer's ECSDA signature over the block commitment.
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 v - the v component of the Sequencer's ECSDA signature over the block header.
64
+
/// @param r - the r component of the Sequencer's ECSDA signature over the block header.
65
+
/// @param s - the s component of the Sequencer's ECSDA signature over the block header.
112
66
/// @custom:reverts BadSequence if the sequence number is not the next block for the given rollup chainId.
113
67
/// @custom:reverts BlockExpired if the confirmBy time has passed.
114
68
/// @custom:reverts BadSignature if the signer is not a permissioned sequencer,
115
-
/// OR if the signature provided commits to different block data.
69
+
/// OR if the signature provided commits to a different header.
70
+
/// @custom:reverts OneRollupBlockPerHostBlock if attempting to submit a second rollup block within one host block.
116
71
/// @custom:emits BlockSubmitted if the block is successfully submitted.
117
-
function _submitBlock(
118
-
DataLocation location,
119
-
BlockHeader memoryheader,
120
-
bytes32blockCommit,
121
-
uint8v,
122
-
bytes32r,
123
-
bytes32s
124
-
) internal {
72
+
/// @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);
75
+
emitBlockData(blockData);
76
+
}
77
+
78
+
function _submitBlock(BlockHeader memoryheader, uint8v, bytes32r, bytes32s) internal {
125
79
// assert that the sequence number is valid and increment it
0 commit comments