-
Notifications
You must be signed in to change notification settings - Fork 123
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
feature: Added PreviewTransactionV2
#1980
Conversation
Docker tags |
PreviewTransactionIntentV2
PreviewTransactionIntentV2
Benchmark for 052893bClick to view benchmark
|
PreviewTransactionIntentV2
PreviewTransactionV2
.iter() | ||
.zip(non_root_subintent_signatures) | ||
.enumerate() | ||
{ |
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.
We're not validating the length of signatures
?
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.
This happens on line 1394 inside add_non_root
because it's shared logic - and I believe there are existing tests that cover this.
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.
If there aren't explicit tests for subintent signatures, I'll add them 👍
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 vaguely remember that I added such a test.
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.
too_many_signatures_should_be_rejected
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.
We missed a test on signature count on the root manifest, so I've added that.
.located(TransactionValidationErrorLocation::AcrossTransaction), | ||
); | ||
} | ||
for (index, (subintent, signatures)) in non_root_subintents |
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.
Minor: signatures
=> public_keys
Summary
Adds support for a
PreviewTransactionV2
, and the preview API in the node will use its payload bytes (a slight pivot from V1 where the preview model was taken in JSON). It can be created from theTransactionV2Builder
.This PR also includes various refactors to the
TransactionValidator
as part of enabling validation ofPreviewTransactionV2
s:And also took on another small refactor:
assert_matches!(..)
macro so we get better test output on failure for lots of tests.Testing
preview_v2.rs