Skip to content

Commit

Permalink
Refactor indexL1InfoRoot to l1InfoRootLeafcount
Browse files Browse the repository at this point in the history
  • Loading branch information
ignasirv committed Aug 20, 2024
1 parent 2de7a15 commit 5d54755
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions contracts/v2/consensus/validium/PolygonValidiumEtrog.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
/**
* @notice Allows a sequencer to send multiple batches
* @param batches Struct array which holds the necessary data to append new batches to the sequence
* @param indexL1InfoRoot Index of the L1InfoRoot that will be used in this sequence
* @param l1InfoRootLeafcount Count of the L1InfoRoot leaf that will be used in this sequence
* @param maxSequenceTimestamp Max timestamp of the sequence. This timestamp must be inside a safety range (actual + 36 seconds).
* This timestamp should be equal or higher of the last block inside the sequence, otherwise this batch will be invalidated by circuit.
* @param expectedFinalAccInputHash This parameter must match the acc input hash after hash all the batch data
Expand All @@ -90,7 +90,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
*/
function sequenceBatchesValidium(
ValidiumBatchData[] calldata batches,
uint32 indexL1InfoRoot,
uint32 l1InfoRootLeafcount,
uint64 maxSequenceTimestamp,
bytes32 expectedFinalAccInputHash,
address l2Coinbase,
Expand All @@ -117,7 +117,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {

// Get global batch variables
bytes32 l1InfoRoot = globalExitRootManager.l1InfoRootMap(
indexL1InfoRoot
l1InfoRootLeafcount
);

if (l1InfoRoot == bytes32(0)) {
Expand Down Expand Up @@ -247,7 +247,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
/**
* @notice Allows a sequencer to send multiple batches
* @param batches Struct array which holds the necessary data to append new batches to the sequence
* @param indexL1InfoRoot Index of the L1InfoRoot that will be used in this sequence
* @param l1InfoRootLeafcount Count of the L1InfoRoot leaf that will be used in this sequence
* @param maxSequenceTimestamp Max timestamp of the sequence. This timestamp must be inside a safety range (actual + 36 seconds).
* This timestamp should be equal or higher of the last block inside the sequence, otherwise this batch will be invalidated by circuit.
* @param expectedFinalAccInputHash This parameter must match the acc input hash after hash all the batch data
Expand All @@ -257,7 +257,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
*/
function sequenceBatches(
BatchData[] calldata batches,
uint32 indexL1InfoRoot,
uint32 l1InfoRootLeafcount,
uint64 maxSequenceTimestamp,
bytes32 expectedFinalAccInputHash,
address l2Coinbase
Expand All @@ -267,7 +267,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
}
super.sequenceBatches(
batches,
indexL1InfoRoot,
l1InfoRootLeafcount,
maxSequenceTimestamp,
expectedFinalAccInputHash,
l2Coinbase
Expand Down
6 changes: 3 additions & 3 deletions contracts/v2/lib/PolygonRollupBaseEtrog.sol
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ abstract contract PolygonRollupBaseEtrog is
/**
* @notice Allows a sequencer to send multiple batches
* @param batches Struct array which holds the necessary data to append new batches to the sequence
* @param indexL1InfoRoot Index of the L1InfoRoot that will be used in this sequence
* @param l1InfoRootLeafcount Count of the L1InfoRoot leaf that will be used in this sequence
* @param maxSequenceTimestamp Max timestamp of the sequence. This timestamp must be inside a safety range (actual + 36 seconds).
* This timestamp should be equal or higher of the last block inside the sequence, otherwise this batch will be invalidated by circuit.
* @param expectedFinalAccInputHash This parameter must match the acc input hash after hash all the batch data
Expand All @@ -324,7 +324,7 @@ abstract contract PolygonRollupBaseEtrog is
*/
function sequenceBatches(
BatchData[] calldata batches,
uint32 indexL1InfoRoot,
uint32 l1InfoRootLeafcount,
uint64 maxSequenceTimestamp,
bytes32 expectedFinalAccInputHash,
address l2Coinbase
Expand All @@ -350,7 +350,7 @@ abstract contract PolygonRollupBaseEtrog is

// Get global batch variables
bytes32 l1InfoRoot = globalExitRootManager.l1InfoRootMap(
indexL1InfoRoot
l1InfoRootLeafcount
);

if (l1InfoRoot == bytes32(0)) {
Expand Down

0 comments on commit 5d54755

Please sign in to comment.