-
Notifications
You must be signed in to change notification settings - Fork 35
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: Use RPC to get MMR data for past blocks on note importing #337
Conversation
f9f23f7
to
8ba4405
Compare
8ba4405
to
3f9b2a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general looks good, I have a doubt regarding the merkle proof but once we figure that out we should be good to go. Other comments are very minor comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few more comments. Will test a bit with the CLI and come back with the results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally by creating a private p2id note, exporting it and imporing it in another client which had the target account. The information fetch was done properly and was able to consume the note!
…reated in past blocks
9cc98fc
to
486d203
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
this PR closed #306 |
* feat: Integrate next changes * fix: Back to next * Fix conflicts * Use node next * fix: Tetss * refactor: reuse function to create mocked client * fix: update swap note script root * fix: Generalize Authenticator * Merge fixes and refactors * Lints * docs: update docs from changes to CLI (#336) * feat: Utilize expected notes from `ExecutedTransaction` (#329) * feat: Use expected notes from TransactionResult * fix: Re-add output note check * Remove unused code * Lints * Fix tests * fix: Tetss * Stash * fix: Address reviews * fix: Tests * fix: Lints * fix: Lints * Try fix test * fix: Merge conflicts * Fix tests * docs: Address reviews * Lints * fix: New script root * Use 0.3 * fix: Correct genesis toml file * fix: test fix con cargo make start-node * fix: temp fix to rename config paths * fix: Correct miden-node toml * fix: Ship our own node config files * Migrate to node 0.3 * feat: Use incoming MMR proof to add block authentications for notes created in past blocks (#337) * test: Integration tests run with main node * fix: Remove std::cmp::max * refactor: git-like usage commands (#338) * Move new account creation to command * Flatten account command * Refactor `default` option * Separate new account commands * Refactor `notes` command * Refactor import comand to infer type * Remove intermediate sucommand for export * Flatten tags command * Separate tx new commands * Fix documentation * Join p2id and p2idr to send command * Remove trait * Change comment suggestions * Clarify new account help comments * Ask for storage path if not specified * Fixed problem with listing notes with no filter * Added a message for default account updates * Change suggestions * Remove prompt for store path * Added all NotesFilter * Fix merge * feat: enable swap notes (#324) * feature: add swap tx request and store swap payback note * feature: insert input note record from payback note details * feature: show message to user on how to track payback notes * fix: integration test compilation * make swap tx send the offered asset * fix: temporary fix for partial output notes * test: add skeleton for integration test * fix: lint issues * test: add test for onchain swap flow * test: add test for offchain swap flow * test: fix note minting for swap tests * test: fix compilation errors * fix: use all committed note ids to check transactions to commit * fix: fix tests checks * address review comments * docs: update CHANGELOG * docs: update CLI reference * address remaining comment * fix: clippy issues * fix: remove wrong check * refactor: store partial notes in relevant notes of transaction result * rephrase doc comment Co-authored-by: igamigo <[email protected]> * address review comments * fix: fix offchain swap test --------- Co-authored-by: igamigo <[email protected]> * docs: fix doc comments for swap clap command * feat: update cli-reference with new command structure (#342) * Update cli-reference with new command structure * Fix merge * Fix merge * Update cli-reference.md --------- Co-authored-by: igamigo <[email protected]> * Update README.md * CLI config.md --------- Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Tomas Rodriguez Dala <[email protected]>
* feat: Integrate next changes * fix: Back to next * Fix conflicts * Use node next * fix: Tetss * refactor: reuse function to create mocked client * fix: update swap note script root * fix: Generalize Authenticator * Merge fixes and refactors * Lints * docs: update docs from changes to CLI (#336) * feat: Utilize expected notes from `ExecutedTransaction` (#329) * feat: Use expected notes from TransactionResult * fix: Re-add output note check * Remove unused code * Lints * Fix tests * fix: Tetss * Stash * fix: Address reviews * fix: Tests * fix: Lints * fix: Lints * Try fix test * fix: Merge conflicts * Fix tests * docs: Address reviews * Lints * fix: New script root * Use 0.3 * fix: Correct genesis toml file * fix: test fix con cargo make start-node * fix: temp fix to rename config paths * fix: Correct miden-node toml * fix: Ship our own node config files * Migrate to node 0.3 * feat: Use incoming MMR proof to add block authentications for notes created in past blocks (#337) * test: Integration tests run with main node * fix: Remove std::cmp::max * refactor: git-like usage commands (#338) * Move new account creation to command * Flatten account command * Refactor `default` option * Separate new account commands * Refactor `notes` command * Refactor import comand to infer type * Remove intermediate sucommand for export * Flatten tags command * Separate tx new commands * Fix documentation * Join p2id and p2idr to send command * Remove trait * Change comment suggestions * Clarify new account help comments * Ask for storage path if not specified * Fixed problem with listing notes with no filter * Added a message for default account updates * Change suggestions * Remove prompt for store path * Added all NotesFilter * Fix merge * feat: enable swap notes (#324) * feature: add swap tx request and store swap payback note * feature: insert input note record from payback note details * feature: show message to user on how to track payback notes * fix: integration test compilation * make swap tx send the offered asset * fix: temporary fix for partial output notes * test: add skeleton for integration test * fix: lint issues * test: add test for onchain swap flow * test: add test for offchain swap flow * test: fix note minting for swap tests * test: fix compilation errors * fix: use all committed note ids to check transactions to commit * fix: fix tests checks * address review comments * docs: update CHANGELOG * docs: update CLI reference * address remaining comment * fix: clippy issues * fix: remove wrong check * refactor: store partial notes in relevant notes of transaction result * rephrase doc comment Co-authored-by: igamigo <[email protected]> * address review comments * fix: fix offchain swap test --------- Co-authored-by: igamigo <[email protected]> * docs: fix doc comments for swap clap command * feat: update cli-reference with new command structure (#342) * Update cli-reference with new command structure * Fix merge * Fix merge * Update cli-reference.md --------- Co-authored-by: igamigo <[email protected]> * Update README.md * CLI config.md --------- Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Tomas Rodriguez Dala <[email protected]>
This PR implements the new
GetBlockHeaderByNumber
RPC changes. We can now ask for authentication data for past blocks, so whenever we import a note withverify
, we can download the block header and authentication data as well.