Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Extend AdviceProvider trait #987

Merged
merged 1 commit into from
Jul 4, 2023
Merged

feat: Extend AdviceProvider trait #987

merged 1 commit into from
Jul 4, 2023

Conversation

frisitano
Copy link
Contributor

@frisitano frisitano commented Jun 30, 2023

This PR introduces get_mapped_values(..) and get_store_subset(..) methods on the AdviceProvider trait and implements the methods for BaseAdviceProvider, MemAdviceProvider and RecAdviceProvider.

@frisitano frisitano force-pushed the frisitano-tx-result branch 3 times, most recently from 2317779 to 5176881 Compare July 4, 2023 13:55
@frisitano frisitano changed the title Frisitano tx result feat: Extend AdviceProvider trait Jul 4, 2023
@frisitano frisitano requested a review from bobbinth July 4, 2023 15:10
@frisitano frisitano marked this pull request as ready for review July 4, 2023 15:11
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a couple of comments inline. Once these are addressed, we can merge.

core/Cargo.toml Outdated
@@ -21,7 +21,7 @@ std = ["math/std", "winter-utils/std"]

[dependencies]
math = { package = "winter-math", version = "0.6", default-features = false }
crypto = { package = "miden-crypto", version = "0.6", default-features = false }
crypto = { package = "miden-crypto", git = "https://github.com/0xPolygonMiden/crypto.git", branch = "frisitano-tx-result", default-features = false }
Copy link
Contributor

Choose a reason for hiding this comment

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

I might have missed it - but seems like the changes in this PR should work fine with v0.6. If so, let's revert back here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct however I needed to have consistent versions of crypto for my work in miden-base. It's not a blocker for this PR. I will revert v0.6, merge and then restore the branch and continue using it for downstream (miden-base) dev.

// TODO: Do we want to return a generic MerkleStore instead of a SimpleMerkleMap?
fn get_store_subset<I, R>(&self, roots: I) -> MerkleStore
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't thought about it much. Seems like returning MerkleStore (the way it is now) is a bit clearer - but I don't really have a strong preference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets leave it as is as theres no obvious reason to make it generic at this point.

@frisitano frisitano merged commit 7cfaaec into next Jul 4, 2023
15 checks passed
@frisitano frisitano deleted the frisitano-tx-result branch July 4, 2023 15:59
@frisitano frisitano restored the frisitano-tx-result branch July 4, 2023 15:59
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