-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add intent hash to the error code #1986
Conversation
Docker tags |
Benchmark for b8167e8Click to view benchmark
|
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.
Thanks!
@@ -540,7 +540,7 @@ impl<V: SystemCallbackObject> System<V> { | |||
|
|||
fn validate_intent_hash_uncosted<S: CommitableSubstateStore>( |
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.
What were your thoughts on that drive-by refactor to deduplicate the read of TransactionTrackerField::TransactionTracker
?
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.
My default position is always not to change unless there is a problem.
I'm not too sure if this will cause any performance issue as the duplicate reads will be from cache.
radix-engine/src/errors.rs
Outdated
@@ -65,14 +66,17 @@ pub enum RejectionReason { | |||
valid_to_exclusive: Instant, | |||
current_time: Instant, | |||
}, | |||
IntentHashPreviouslyCommitted, | |||
IntentHashPreviouslyCancelled, | |||
DeprecatedIntentHashPreviouslyCommitted, |
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 guess if it's not in the LocalTransactionExecution
/ persisted in node; and we no longer serialize transaction receipts, then we don't actually need this to be maintained over time, and could remove these after all?
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.
That's my initial thought. I kept it just in case Gateway is serializing rejection reason somewhere. Happy to remove them if that's not the case.
This reverts commit 306e461.
Summary
This PR adds intent hash to the rejection error code, so clients can know whether transaction intent hash or subintent hash was failing.