Skip to content

Releases: wanseob/solidity-mmr

v1.0.0

05 Jan 09:33
Compare
Choose a tag to compare

Breaking changes

  1. Uses width instead of the total size of MMR for inclusion proof
  2. Supports roll up function for optimistic roll up
  3. 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

  1. hashLeaf

    • before:
      function hashLeaf(uint256 index, bytes memory data) public pure returns (bytes32)
    • after:
      function hashLeaf(uint256 index, bytes32 hashedData) public pure returns (bytes32)
  2. 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
      )
  3. inclusionProof

    • before:
      function hashLeaf(uint256 index, bytes memory data) public pure returns (bytes32)
    • after:
      function hashLeaf(uint256 index, bytes32 hashedData) public pure returns (bytes32)
  4. getPeaks -> getPeakIndexes

    • before:
      function getPeaks(uint256 size) public pure returns (uint256[] memory peaks)
    • after:
      function getPeakIndexes(uint256 width) public pure returns (uint256[] memory peakIndexes)

v0.1.1

04 Jul 14:42
Compare
Choose a tag to compare
0.1.1

v0.1.0

04 Jul 13:00
Compare
Choose a tag to compare
0.1.0