From 5d5475584823575ad66a5e9bda9b89223cff9faf Mon Sep 17 00:00:00 2001 From: Ignasi Date: Tue, 20 Aug 2024 15:52:45 +0200 Subject: [PATCH] Refactor indexL1InfoRoot to l1InfoRootLeafcount --- .../v2/consensus/validium/PolygonValidiumEtrog.sol | 12 ++++++------ contracts/v2/lib/PolygonRollupBaseEtrog.sol | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol b/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol index 0d86a692b..fe714516a 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 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 @@ -90,7 +90,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { */ function sequenceBatchesValidium( ValidiumBatchData[] calldata batches, - uint32 indexL1InfoRoot, + uint32 l1InfoRootLeafcount, uint64 maxSequenceTimestamp, bytes32 expectedFinalAccInputHash, address l2Coinbase, @@ -117,7 +117,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { // Get global batch variables bytes32 l1InfoRoot = globalExitRootManager.l1InfoRootMap( - indexL1InfoRoot + l1InfoRootLeafcount ); 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 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 @@ -257,7 +257,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { */ function sequenceBatches( BatchData[] calldata batches, - uint32 indexL1InfoRoot, + uint32 l1InfoRootLeafcount, uint64 maxSequenceTimestamp, bytes32 expectedFinalAccInputHash, address l2Coinbase @@ -267,7 +267,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { } super.sequenceBatches( batches, - indexL1InfoRoot, + l1InfoRootLeafcount, maxSequenceTimestamp, expectedFinalAccInputHash, l2Coinbase diff --git a/contracts/v2/lib/PolygonRollupBaseEtrog.sol b/contracts/v2/lib/PolygonRollupBaseEtrog.sol index 3de17abaa..bab0c0e07 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 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 @@ -324,7 +324,7 @@ abstract contract PolygonRollupBaseEtrog is */ function sequenceBatches( BatchData[] calldata batches, - uint32 indexL1InfoRoot, + uint32 l1InfoRootLeafcount, uint64 maxSequenceTimestamp, bytes32 expectedFinalAccInputHash, address l2Coinbase @@ -350,7 +350,7 @@ abstract contract PolygonRollupBaseEtrog is // Get global batch variables bytes32 l1InfoRoot = globalExitRootManager.l1InfoRootMap( - indexL1InfoRoot + l1InfoRootLeafcount ); if (l1InfoRoot == bytes32(0)) {