Releases
v1.0.0
Breaking changes
Uses width
instead of the total size
of MMR for inclusion proof
Supports roll up function for optimistic roll up
Leaf hash method is changed
before:
function hashLeaf (uint256 index , bytes memory data ) public pure returns (bytes32 ) {
return keccak256 (abi.encodePacked (index, data));
}
after:
function hashLeaf (uint256 index , bytes32 memory hashedData ) public pure returns (bytes32 ) {
return keccak256 (abi.encodePacked (index, hashedData));
}
Data will be hashed before getting hashed with the index
Interface changes
hashLeaf
before:
function hashLeaf (uint256 index , bytes memory data ) public pure returns (bytes32 )
after:
function hashLeaf (uint256 index , bytes32 hashedData ) public pure returns (bytes32 )
getMerlkeProof()
before:
function getMerkleProof (uint256 index ) public view returns (
bytes32 root ,
uint256 size ,
bytes32 [] memory peakBagging ,
bytes32 [] memory siblings
)
after:
function getMerkleProof (uint256 index ) public view returns (
bytes32 root ,
uint256 width ,
bytes32 [] memory peakBagging ,
bytes32 [] memory siblings
)
inclusionProof
before:
function hashLeaf (uint256 index , bytes memory data ) public pure returns (bytes32 )
after:
function hashLeaf (uint256 index , bytes32 hashedData ) public pure returns (bytes32 )
getPeaks
-> getPeakIndexes
before:
function getPeaks (uint256 size ) public pure returns (uint256 [] memory peaks )
after:
function getPeakIndexes (uint256 width ) public pure returns (uint256 [] memory peakIndexes )
You can’t perform that action at this time.