Skip to content

Commit

Permalink
feat(protocol): add ITaikoInbox.Config to ITaikoInbox.BatchInfo (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Feb 27, 2025
1 parent fa63bb3 commit 6afec95
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/protocol/contracts/layer1/based/ITaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ interface ITaikoInbox {
// corresponds to the `_anchorStateRoot` parameter in the anchor transaction.
// The batch's validity proof shall verify the integrity of these two values.
bytes32 anchorBlockHash;
LibSharedData.BaseFeeConfig baseFeeConfig;
Config config;
}

/// @dev This struct holds batch metadata essential for proving the batch.
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/layer1/based/TaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ abstract contract TaikoInbox is EssentialContract, ITaikoInbox, IProposeBatch, I
// Data for the L2 anchor transaction, shared by all blocks in the batch
anchorBlockId: anchorBlockId,
anchorBlockHash: blockhash(anchorBlockId),
baseFeeConfig: config.baseFeeConfig
config: config
});

require(info_.anchorBlockHash != 0, ZeroAnchorBlockHash());
Expand Down
28 changes: 22 additions & 6 deletions packages/protocol/test/layer1/preconf/mocks/MockTaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,28 @@ contract MockTaikoInbox is EssentialContract {
anchorBlockId: params.anchorBlockId,
anchorBlockHash: bytes32(0), // Mock value
blocks: params.blocks,
baseFeeConfig: LibSharedData.BaseFeeConfig({
adjustmentQuotient: 0,
sharingPctg: 0,
gasIssuancePerSecond: 0,
minGasExcess: 0,
maxGasIssuancePerBlock: 0
config: ITaikoInbox.Config({
chainId: 0,
maxUnverifiedBatches: 0,
batchRingBufferSize: 0,
maxBatchesToVerify: 0,
blockMaxGasLimit: 0,
livenessBondBase: 0,
livenessBondPerBlock: 0,
stateRootSyncInternal: 0,
maxAnchorHeightOffset: 0,
baseFeeConfig: LibSharedData.BaseFeeConfig({
adjustmentQuotient: 0,
sharingPctg: 0,
gasIssuancePerSecond: 0,
minGasExcess: 0,
maxGasIssuancePerBlock: 0
}),
provingWindow: 0,
cooldownWindow: 0,
maxSignalsToReceive: 0,
maxBlocksPerBatch: 0,
forkHeights: ITaikoInbox.ForkHeights({ ontake: 0, pacaya: 0, shasta: 0, unzen: 0 })
})
});

Expand Down

0 comments on commit 6afec95

Please sign in to comment.