Skip to content

Commit

Permalink
mini validium udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Jun 10, 2024
1 parent 0ab3f10 commit 4f06270
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion contracts/v2/PolygonRollupManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ contract PolygonRollupManager is
);

/**
* @dev Emitted when an aggregator verifies batches
* @dev Emitted when rollback batches
*/
event RollbackBatches(
uint32 indexed rollupID,
Expand Down
13 changes: 1 addition & 12 deletions contracts/v2/consensus/validium/PolygonValidiumEtrog.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
// Store in a temporal variable, for avoid access again the storage slot
uint64 initLastForceBatchSequenced = currentLastForceBatchSequenced;

// Accumulated sequenced transaction hash to verify them afterward against the dataAvailabilityProtocol
bytes32 accumulatedNonForcedTransactionsHash = bytes32(0);

for (uint256 i = 0; i < batchesNum; i++) {
// Load current sequence
ValidiumBatchData memory currentBatch = batches[i];
Expand Down Expand Up @@ -174,14 +171,6 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
// Delete forceBatch data since won't be used anymore
delete forcedBatches[currentLastForceBatchSequenced];
} else {
// Accumulate non forced transactions hash
accumulatedNonForcedTransactionsHash = keccak256(
abi.encodePacked(
accumulatedNonForcedTransactionsHash,
currentBatch.transactionsHash
)
);

// Note that forcedGlobalExitRoot and forcedBlockHashL1 remain unused and unchecked in this path
// The synchronizer should be aware of that

Expand Down Expand Up @@ -237,7 +226,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium {
// Validate that the data availability protocol accepts the dataAvailabilityMessage
// note This is a view function, so there's not much risk even if this contract was vulnerable to reentrant attacks
dataAvailabilityProtocol.verifyMessage(
accumulatedNonForcedTransactionsHash,
expectedFinalAccInputHash,
dataAvailabilityMessage
);
}
Expand Down

0 comments on commit 4f06270

Please sign in to comment.