carbonable-labs / merkle-tree-builder

0 stars 3 forks source link

[Rust] - Add Comprehensive Integration Tests for Rust Code #4

Open julienbrs opened 2 days ago

julienbrs commented 2 days ago

Description

Develop integration tests to validate the interoperability between allocation.rs, node.rs, and merkle_tree.rs under realistic scenarios. The goal is to simulate and test real-world use cases, such as creating a Merkle tree and verifying proofs.

Acceptance Criteria

Additional Context

[Medium Difficulty - Rust]

martinvibes commented 17 hours ago

Can I take care of this issue? i'm a frontend dev and a blockchain dev kindly assign :)

Gerson2102 commented 17 hours ago

Hey! I'm Gerson. 👋

I'm a member of Dojo Coding and have previously contributed to other projects like:

I'd like to work on this issue.

Check my OnlyDust profile for my contributions: Profile


Plan to Solve the Issue:

  1. Understand the Codebase:

    • Review allocation.rs, node.rs, and merkle_tree.rs to grasp their functionalities and interactions.
    • Familiarize myself with existing test setups and conventions.
  2. Set Up Test Environment:

    • Ensure all dependencies are installed.
    • Prepare mock data using mock_allocations_first_wave.json and mock_allocations_second_wave.json.
  3. Write Integration Tests for Merkle Tree Creation:

    • Use the mock data to create full Merkle trees.
    • Compare the generated root hashes with the expected values to validate correctness.
  4. Verify Proofs from build_address_calldata():

    • Write tests to validate proof correctness using known allocations.
    • Test with invalid allocations to ensure errors are handled gracefully.
  5. Simulate Merging Two Trees:

    • Combine allocations from the first and second waves.
    • Create a merged Merkle tree and validate the root hash and allocation integrity.
  6. Run and Validate Tests:

    • Execute all new and existing tests to ensure they pass.
    • Address any issues that arise during testing.
  7. Commit Changes with a clear message

  8. Open a Pull Request and await feedback.


CollinsC1O commented 17 hours ago

Is it okay if I take this?

julienbrs commented 16 hours ago

Hi, I'm assigning it to @martinvibes as he was the first one to ask, please tag me if needed. Please join TG to discuss about it if needed: https://t.me/carbonableOD Issue might be reassigned during ODHack if the contributor drops the issue.

petersdt commented 16 hours ago

May I pick this up?

Unickhub commented 16 hours ago

May I try my hand at this?

Supa-mega commented 16 hours ago

Can I work on this, please?

martinvibes commented 16 hours ago

Can I take care of this issue? i'm a frontend dev and a blockchain dev kindly assign :)

JoE11-y commented 16 hours ago

I'd like to handle this task.

Benjtalkshow commented 16 hours ago

Can I take this issue?

ryzen-xp commented 15 hours ago

Hi, I am proficient Blockchain developer expert in Cairo , Rust and Solidity and also in web development. I have contributed many Rust ,Cairo projects like chainevents , arkprojects , starknet etc . please /assign this issue . Thank You

DanielEmmanuel1 commented 15 hours ago

Could I grab this task? How I hope to tackle this

ETA: 48 hrs