Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements a space efficient merkle tree data structure and merkle proof functions as stand alone contracts which will be incorporated into the fastBridgeReceiver and fastBridgeSender.
Contrary to the name of the branch, the merkle tree is not actually implemented in a library.
On rollups, there is no contract size limit, and duplicating the merkle tree data structure and merkle proof functions directly into the fast bridge will save gas.
The leaves of the merkle tree are hashed with a different hash function (sha256) than the interior leaves to prevent a so-called '2nd pre-image attack'
https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/