Commit 1c633aa7 authored by clabby's avatar clabby Committed by GitHub

Add clarifying comment about the maximum leaf limit (#9172)

ppr
parent 18a2a781
......@@ -1096,10 +1096,10 @@
"impact": "Medium",
"confidence": "Medium",
"check": "uninitialized-local",
"description": "PreimageOracle.challengeFirstLPP(address,uint256,PreimageOracle.Leaf,bytes32[]).stateMatrix (src/cannon/PreimageOracle.sol#444) is a local variable never initialized\n",
"description": "PreimageOracle.challengeFirstLPP(address,uint256,PreimageOracle.Leaf,bytes32[]).stateMatrix (src/cannon/PreimageOracle.sol#446) is a local variable never initialized\n",
"type": "variable",
"name": "stateMatrix",
"start": 20524,
"start": 20750,
"length": 40,
"filename_relative": "src/cannon/PreimageOracle.sol"
},
......
......@@ -366,7 +366,9 @@ contract PreimageOracle is IPreimageOracle {
}
}
// Do not allow for posting preimages larger than the merkle tree can support.
// Do not allow for posting preimages larger than the merkle tree can support. The incremental merkle tree
// algorithm only supports 2**height - 1 leaves, the right most leaf must always be kept empty.
// Reference: https://daejunpark.github.io/papers/deposit.pdf - Page 10, Section 5.1.
if (blocksProcessed > MAX_LEAF_COUNT) revert TreeSizeOverflow();
// Update the proposal metadata to include the number of blocks processed and total bytes processed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment