-
Notifications
You must be signed in to change notification settings - Fork 5
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
SYS-3773 Bug fix to handle bad transaction hashes and various improvements #342
Conversation
assert_eq!((next_tx_id as u64).encode(), new_transaction_id_bytes); | ||
assert_eq!(expiry, 7200); |
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.
Why do we do this assert here? This forces the expiry to be a fixed constant, and in that case, why does it exist as a storage item?
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 is on state migration only
@@ -105,6 +105,12 @@ pub fn set_up_active_tx<T: Config>(req: SendRequestData) -> Result<(), Error<T>> | |||
} | |||
|
|||
pub fn replay_send_request<T: Config>(mut tx: ActiveTransactionData<T>) -> Result<(), Error<T>> { |
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 see this is called from finalize_state
, and that in turn is called from add_corroboration
. But I don't see any limit to how many times we retry, or why we want to retry if we know the transaction has already failed.
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 the sender is a malicious author, we retry until we find an honest author
Proposed changes
This PR fixes a bug where ethereum events gets stuck processing invalid transaction hashes. It also adds a new event to signal retries and automatically sets expiry period during a forkless upgrade.
Type of change/Merge
🚨What type of change is this PR?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR.Further comments