diff --git a/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol b/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol index 0d86a692b..ce68c10f9 100644 --- a/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol +++ b/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol @@ -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 @@ -90,7 +90,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { */ function sequenceBatchesValidium( ValidiumBatchData[] calldata batches, - uint32 indexL1InfoRoot, + uint32 l1InfoTreeLeafCount, uint64 maxSequenceTimestamp, bytes32 expectedFinalAccInputHash, address l2Coinbase, @@ -117,7 +117,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { // Get global batch variables bytes32 l1InfoRoot = globalExitRootManager.l1InfoRootMap( - indexL1InfoRoot + l1InfoTreeLeafCount ); if (l1InfoRoot == bytes32(0)) { @@ -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 @@ -257,7 +257,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { */ function sequenceBatches( BatchData[] calldata batches, - uint32 indexL1InfoRoot, + uint32 l1InfoTreeLeafCount, uint64 maxSequenceTimestamp, bytes32 expectedFinalAccInputHash, address l2Coinbase @@ -267,7 +267,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { } super.sequenceBatches( batches, - indexL1InfoRoot, + l1InfoTreeLeafCount, maxSequenceTimestamp, expectedFinalAccInputHash, l2Coinbase diff --git a/contracts/v2/lib/PolygonRollupBaseEtrog.sol b/contracts/v2/lib/PolygonRollupBaseEtrog.sol index 3de17abaa..5c35d7e96 100644 --- a/contracts/v2/lib/PolygonRollupBaseEtrog.sol +++ b/contracts/v2/lib/PolygonRollupBaseEtrog.sol @@ -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 @@ -324,7 +324,7 @@ abstract contract PolygonRollupBaseEtrog is */ function sequenceBatches( BatchData[] calldata batches, - uint32 indexL1InfoRoot, + uint32 l1InfoTreeLeafCount, uint64 maxSequenceTimestamp, bytes32 expectedFinalAccInputHash, address l2Coinbase @@ -350,7 +350,7 @@ abstract contract PolygonRollupBaseEtrog is // Get global batch variables bytes32 l1InfoRoot = globalExitRootManager.l1InfoRootMap( - indexL1InfoRoot + l1InfoTreeLeafCount ); if (l1InfoRoot == bytes32(0)) {