Proposal: Add Merkle root example in MASM
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- documentation
Research direction
Look for existing MASM examples in the repository to understand the format and location. The example should be placed in a relevant directory, likely under examples/ or docs/. Test the provided code sketch in a Miden environment to ensure it works as described, then create a new file or add to an existing example collection.
Written by the indexing model from the issue text.
Description
Hi team, I'd like to add a simple Merkle root calculation example to demonstrate tree structures for state proofs. It uses stack operations to simulate hashing pairs of leaves.
Example code sketch:
begin
# Leaf values (4 leaf, push ke stack)
push.1
push.2
push.3
push.4
# Level 1: Hash leaf pairs (simulasi hash dengan mul + add)
dup.1 dup.3 mul add # hash leaf 1 & 2
dup.1 dup.3 mul add # hash leaf 3 & 4
drop.4 # drop leaf asli
# Level 2: Hash node pairs (root)
dup.1 dup.1 mul add # hash node 1 & 2
drop.2 # drop node intermediate
# Hasil root di stack atas
end
This could help builders learn about Miden's Merkle Patricia Trees. Feedback?
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 0xMiden/examples
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 40/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in 0xMiden/examples
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100