-
Notifications
You must be signed in to change notification settings - Fork 87
feat: Integrate RPC with Validator for transaction validation #1457
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
Conversation
bobbinth
left a comment
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.
Looks good! Thank you! I left some comments inline - but they are pretty minor.
bobbinth
left a comment
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.
Looks good! Thank you! I left a couple of optional comments inline.
| pub async fn validate_transaction( | ||
| proven_tx: ProvenTransaction, | ||
| tx_inputs: TransactionInputs, | ||
| ) -> Result<(), TransactionValidationError> { |
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.
Returning () is fine for now, but I do think that we'll probably end up returning TransactionHeader from here so that we can store it in the validator's database.
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.
PhilippGackstatter
left a comment
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.
I reviewed only the CodeBuilder parts. Those LGTM.
| .unwrap() | ||
| .with_supported_type(AccountType::RegularAccountImmutableCode); | ||
| let account_component_code = CodeBuilder::default() | ||
| .compile_component_code("baz::interface", "export.baz push.3 end") |
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.
FYI: After 0xMiden/miden-base#2158 is merged, all exports will have to become pub proc.
Context
The RPC still performs transaction validation from a module in its server crate. Instead, it needs to use the Validator client to allow the Validator component to perform the transaction validation.
Relates to #1316.
Changes
Note: most of the changes are miscellaneous fixes to bring node up to date with miden-base