Skip to content

Commit

Permalink
maxBlocksPerBatch: 2048
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed Jan 10, 2025
1 parent bfb6ba9 commit 8738c90
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/protocol/contracts/layer1/based/ITaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ interface ITaikoInbox {
uint16 provingWindow;
/// @notice The maximum number of signals to be received by TaikoL2.
uint8 maxSignalsToReceive;
/// @notice The maximum number of blocks per batch.
uint16 maxBlocksPerBatch;
/// @notice Historical heights of the forks.
ForkHeights forkHeights;
}
Expand Down
9 changes: 7 additions & 2 deletions packages/protocol/contracts/layer1/based/TaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ abstract contract TaikoInbox is EssentialContract, ITaikoInbox, ITaiko {
}

updatedParams = _validateBatchParams(
_batchParams, config.maxAnchorHeightOffset, config.maxSignalsToReceive, parentBatch
_batchParams,
config.maxAnchorHeightOffset,
config.maxSignalsToReceive,
config.maxBlocksPerBatch,
parentBatch
);

// This section constructs the metadata for the proposed batch, which is crucial for
Expand Down Expand Up @@ -567,6 +571,7 @@ abstract contract TaikoInbox is EssentialContract, ITaikoInbox, ITaiko {
BatchParams calldata _params,
uint64 _maxAnchorHeightOffset,
uint8 _maxSignalsToReceive,
uint16 _maxBlocksPerBatch,
Batch memory _parentBatch
)
private
Expand Down Expand Up @@ -625,7 +630,7 @@ abstract contract TaikoInbox is EssentialContract, ITaikoInbox, ITaiko {
}

require(
_params.blocks.length != 0 && _params.blocks.length <= type(uint8).max,
_params.blocks.length != 0 && _params.blocks.length <= _maxBlocksPerBatch,
InvalidSubBlocks()
);
}
Expand Down
1 change: 1 addition & 0 deletions packages/protocol/contracts/layer1/devnet/DevnetInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ contract DevnetInbox is TaikoInbox {
}),
provingWindow: 2 hours,
maxSignalsToReceive: 16,
maxBlocksPerBatch: 2048,
forkHeights: ITaikoInbox.ForkHeights({ ontake: 0, pacaya: 0 })
});
}
Expand Down
1 change: 1 addition & 0 deletions packages/protocol/contracts/layer1/hekla/HeklaInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ contract HeklaInbox is TaikoInbox {
}),
provingWindow: 2 hours,
maxSignalsToReceive: 16,
maxBlocksPerBatch: 2048,
forkHeights: ITaikoInbox.ForkHeights({
ontake: 840_512,
pacaya: 840_512 * 10 // TODO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ contract MainnetInbox is TaikoInbox {
}),
provingWindow: 2 hours,
maxSignalsToReceive: 16,
maxBlocksPerBatch: 2048,
forkHeights: ITaikoInbox.ForkHeights({
ontake: 538_304,
pacaya: 538_304 * 10 // TODO
Expand Down

0 comments on commit 8738c90

Please sign in to comment.