-
Notifications
You must be signed in to change notification settings - Fork 500
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
services/horizon: Remove Horizon Submission Queue #5039
services/horizon: Remove Horizon Submission Queue #5039
Conversation
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.
Loving that there's so much code going away 🥳 Left a couple of notes where I'm not sure about behavior.
Are there DB tables that can be dropped as a result of this PR?
I think ErrNoAccount can be removed since it seems to not be referenced anywhere |
I think we can simplify OpenSubmissionList by removing all the error return values from the function signatures. I noticed that none of the functions actually returned any errors except for |
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!
* Remove horizon submission queue - 1 * Update system.go * Update system.go * remove WaitUntilAccountSequence * Update system.go * Remove tests related to WaitUntilAccountSequence - 1 * Update system_test.go * Remove history_transactions_filtered_tmp - 1 * Fix failing tests in system_test.go * Revert "Remove history_transactions_filtered_tmp - 1" This reverts commit d1c6959. * Revert "Fix failing tests in system_test.go" This reverts commit 767a9f9. * Remove sequenceNumber from checkTxAlreadyExists * Undo removing waitUntilAccountSequence * Small change - 1 * Small changes - 2 * fix failing unit tests * Add some comments - 1 * Small changes - 3 * Small changes - 4 * Fix failing tests - 1 * Use defer for sys.finish * Revert "Use defer for sys.finish" This reverts commit b2321be. * Small changes - 5
Closes #4996
PR Checklist
PR Structure
otherwise).
services/friendbot
, orall
ordoc
if the changes are broad or impact manypackages.
Thoroughness
.md
files, etc... affected by this change). Take a look in the
docs
folder for a given service,like this one.
Release planning
needed with deprecations, added features, breaking changes, and DB schema changes.
semver, or if it's mainly a patch change. The PR is targeted at the next
release branch if it's not a patch change.
What
Horizon manages an internal submission queue. This intent of this is to protect/isolate clients from potentially receiving error messages on transaction submission when multiple transactions are submitted very quickly in succession. If transactions (from the same source account) are submitted with sequence numbers out-of-order, then this submission queue will hold those transactions in-memory so that it can re-order them in line with their sequence numbers, allowing all of them to succeed when they are actually submitted to core
This PR:
Why
Recently, core has released a change that prevents the submission of multiple transactions in a ledger for a given account. With this change, the Horizon submission queue is even less likely to provide any benefit to end-users, and if anything cause more confusion. Transactions would be queued up in-memory, only to have only one of them be able to be submitted when they were finally submitted to core.
Known limitations
N/A