Skip to content
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

Fix processing of transactions in expressLaneService #2850

Merged

Conversation

ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Dec 20, 2024

This PR changes how the expressLaneService handles transactions to be in sync with the behavior of sequencer. The controller would now get appropriate errors for the transactions they submit no matter in which order they submit them- if the transactions cant be processed, i.e their sequence numbers are not in sync with the round's global sequence count the txs will error after a timeout (2 * --execution.sequencer.queue-timeout).

Transaction that clears the initial validation process will get eventually submitted to the sequencer, in which case it ends up consuming the sequence number (i.e this sequence number can't be used for another transaction) irrespective of the transaction's result. These kind of accepted transactions would be given a detailed error starting with Accepted timeboost tx failed... string containing tx's sequence number, hash and the error (one of them being a timeout error). If a tx returns with a non-nil error that doesn't start with the above string then it implies that sequence number wasn't consumed and controller can use it to send another transaction.

Resolves NIT-3008

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Dec 20, 2024
Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I think this addresses the issue and my comments are mostly around checking my understanding of the change, and requesting clarifications in comments.

execution/gethexec/express_lane_service.go Outdated Show resolved Hide resolved
execution/gethexec/express_lane_service.go Outdated Show resolved Hide resolved
execution/gethexec/express_lane_service.go Outdated Show resolved Hide resolved
execution/gethexec/express_lane_service_test.go Outdated Show resolved Hide resolved
system_tests/timeboost_test.go Show resolved Hide resolved
Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please go ahead and merge it yourself after fixing the conflict.

@ganeshvanahalli ganeshvanahalli merged commit 2ac7fea into express-lane-timeboost Dec 30, 2024
9 of 10 checks passed
@ganeshvanahalli ganeshvanahalli deleted the fix-expresslaneservice-txprocessing branch December 30, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants