No funded issue found.
Check out the Issue Explorer
Be the OSS Funding you wish to see in the world.
Looking to fund some work? You can submit a new Funded Issue here .
Time left
Opened
Issue Type
Workers Auto Approve
Project Type
Time Commitment
Experience Level
Permissions
Accepted
Reserved For
extend key length from 64 to 160 bit in sparse merkle tree implementation
leapdao
Solidity, merkle-tree
# Bounty
A sparse Merkle tree (SMT) is a data structure useful for storing a key/value map which works as follows. An empty SMT is simply a Merkle tree with 2^256 leaves, where every leaf is a zero value. Because every element at the second level of the tree is the same z2=hash(0, 0), and every element at the third level is the same z3=hash(z2, z2) and so forth this can be trivially computed in 256 hashes. From there, we can add or remove values by modifying values in place in the sparse Merkle tree, eg. to add the value 42 at position 3, we modify the second value the second level to v2=hash(0, 42), the first value at the third level to v3=hash(0, v2), the first value at the fourth level to v2=hash(v3, z3) (since at this point, the left subtree represents keys 0…3 and the right subtree represents keys 4…7 which are still all empty), and so forth up to the top. [source](https://ethresear.ch/t/optimizing-sparse-merkle-trees/3751)
## Scope
- the [given contract](https://github.com/leapdao/leap-contracts/blob/master/contracts/SparseMerkleTree.sol) implements a key length of 64 bit. extend this to 160 bits, so we can use addresses as keys.
- extend the unit tests to cover read / update / delete for all edge cases.
- separate SparseMerkleTree contract into contract and lib.
## Deliverables
- code
- tests
## Gain for the project
- allow to store maps in [ERC1948](https://github.com/ethereum/EIPs/pull/1948)
## Roles
bounty gardener: @johannbarbie / 10%
bounty worker: @roleengineer / 75%
bounty reviewer: @johannbarbie / 15%
Setup your profile
Tell us a little about you:
Skills
No results found for [[search]] .
Type to search skills..
Bio Required
[[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Next
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Back
Next
Save
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email:
Email
Back
Save