Skip to content

Conversation

@brech1
Copy link
Contributor

@brech1 brech1 commented May 15, 2025

Description

This PR adds a nodes method to the LeanIMT struct, exposing the internal nodes structure as a slice (&[Vec<[u8; N]>]).

It also fixes minor clippy warnings by allowing manual_div_ceil and reformat the example in lib.rs.

  • What kind of change? Feature addition
  • Current behavior: No method exists to access the internal nodes structure of LeanIMT.
  • New behavior: The nodes method returns a reference to the internal nodes, allowing read-only access.
  • Breaking change? No.

Related Issue(s)

Resolves #76

Other information

The change is minimal and does not affect existing functionality. No new tests were added as the method is a simple accessor, but existing tests pass.

Checklist

  • I have read and understand the contributor guidelines and code of conduct.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • I have run cargo fmt without getting any errors.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@brech1 brech1 requested a review from vplasencia as a code owner May 15, 2025 19:23
@brech1 brech1 changed the title feat: expose nodes feat: nodes accessor for LeanIMT May 15, 2025
@brech1 brech1 changed the title feat: nodes accessor for LeanIMT feat: nodes accessor for lean-imt May 15, 2025
@vplasencia vplasencia merged commit 1d475e4 into zk-kit:main May 16, 2025
5 checks passed
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.

Add nodes method to LeanIMT

2 participants