Skip to content

Commit

Permalink
Merge pull request #312 from 0xPolygonHermez/feature/renaming
Browse files Browse the repository at this point in the history
Refactor indexL1InfoRoot to l1InfoTreeLeafCount
  • Loading branch information
invocamanman authored Aug 29, 2024
2 parents 2de7a15 + abaf24c commit 47b8920
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 l1InfoTreeLeafCount Count of the L1InfoTree 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 l1InfoTreeLeafCount,
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
l1InfoTreeLeafCount
);

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 l1InfoTreeLeafCount Count of the L1InfoTree 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 l1InfoTreeLeafCount,
uint64 maxSequenceTimestamp,
bytes32 expectedFinalAccInputHash,
address l2Coinbase
Expand All @@ -267,7 +267,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
}
super.sequenceBatches(
batches,
indexL1InfoRoot,
l1InfoTreeLeafCount,
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 l1InfoTreeLeafCount Count of the L1InfoTree 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 l1InfoTreeLeafCount,
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
l1InfoTreeLeafCount
);

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

0 comments on commit 47b8920

Please sign in to comment.