Releases: wanseob/solidity-mmr
Releases · wanseob/solidity-mmr
v1.0.0
Breaking changes
- Uses
width
instead of the totalsize
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:
Data will be hashed before getting hashed with the index
function hashLeaf(uint256 index, bytes32 memory hashedData) public pure returns (bytes32) { return keccak256(abi.encodePacked(index, hashedData)); }
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)
- before:
-
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 )
- before:
-
inclusionProof
- before:
function hashLeaf(uint256 index, bytes memory data) public pure returns (bytes32)
- after:
function hashLeaf(uint256 index, bytes32 hashedData) public pure returns (bytes32)
- before:
-
getPeaks
->getPeakIndexes
- before:
function getPeaks(uint256 size) public pure returns (uint256[] memory peaks)
- after:
function getPeakIndexes(uint256 width) public pure returns (uint256[] memory peakIndexes)
- before: