Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
akcelero committed Feb 4, 2024
1 parent c7b719c commit d27af87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Using this library you can choose which hash function is used, default `keccak25
### How to collect proofs
Let's take example from above.
![Collecting proofs](images/collect_proofs.gif)
To collect proofs for specified value you have to find leaf with that value.
Once you found leaf, collect value from its sibling, later move to parent node.
To collect proofs for specified value you have to find leaf with that value.<br>
Once you found leaf, collect value from its sibling, later move to parent node.<br>
Now collect siblings value, go to parent and repeat this steps until root is achieved.

Proofs collected from siblings are proofs for given value.

Note 1: you can retrieve sibling's node number by doing `current_node_number ^ 1`
Note 1: you can retrieve sibling's node number by doing `current_node_number ^ 1`<br>
Note 2: you can retrieve parent's node number by doing `current_node_number // 2`

0 comments on commit d27af87

Please sign in to comment.