Skip to content

Conversation

@mmagician
Copy link
Contributor

As suggested here, we're getting to a stage with the AggLayer integration where we should check for compatibility with the Solidity implementation.

This PR adds a small foundry project inside the miden-agglayer crate:

  • forge commands to generate the test vectors. The vectors are generated by calling the Solidity functions of interest _addLeaf & getRoot
  • make generate-solidity-test-vectors command to locally re-generate the test files
  • Rust test which reads the test vector as a reference, and compares with the Rust implementation KeccakMmrFrontier32 (currently we're not comparing with the output of MASM, since we independently already have Rust<>MASM compatibility test, so by extension we have Solidity<>MASM compat)
  • for now, no CI job that re-generates the test vectors. If desirable, we can consider adding this later

To be done in a follow-up PR:

  • move miden-testing/agglayer code into miden-agglayer crate. Otherwise, the Rust compat test (located in miden-testing depends on the test vectors which are generated in a different crate (miden-agglayer)

@mmagician mmagician requested a review from Copilot January 19, 2026 15:32

This comment was marked as resolved.

@mmagician mmagician marked this pull request as ready for review January 19, 2026 15:56
miden-protocol = { features = ["std"], workspace = true }
primitive-types = { workspace = true }
rstest = { workspace = true }
serde = { features = ["derive"], version = "1.0" }
Copy link
Contributor Author

@mmagician mmagician Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: to be changed once #2313 lands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants