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

tx: Remove tx_broadcast transaction from the pool #4050

Merged
merged 5 commits into from
Apr 18, 2024
Merged

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented Apr 9, 2024

This PR ensures that broadcast future cleans-up the submitted extrinsic from the pool, iff the broadcast_stop operation has been called.

This effectively cleans-up transactions from the pool when the broadcast_stop is called.

cc @paritytech/subxt-team

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv added A0-needs_burnin Pull request needs to be tested on a live validator node before merge. DevOps is notified via matrix R0-silent Changes should not be mentioned in any release notes I5-enhancement An additional feature request. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. labels Apr 9, 2024
@lexnv lexnv self-assigned this Apr 9, 2024
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@@ -106,17 +108,19 @@ where
// The unique ID of this operation.
let id = self.generate_unique_id();

// There is nothing we could do with an extrinsic of invalid format.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe improve this comment to something like that spec states because this logic was not super obvious to me:

The JSON-RPC server might check whether the transaction is valid before broadcasting it. If it does so and if the transaction is invalid, the server should silently do nothing and the JSON-RPC client is not informed of the problem. Invalid transactions should still count towards the limit to the number of simultaneously broadcasted transactions.

lexnv and others added 2 commits April 18, 2024 16:31
@lexnv lexnv added this pull request to the merge queue Apr 18, 2024
Merged via the queue into master with commit c891fda Apr 18, 2024
133 of 137 checks passed
@lexnv lexnv deleted the lexnv/rem-tx-from-pool branch April 18, 2024 16:25
github-merge-queue bot pushed a commit that referenced this pull request Apr 19, 2024
This PR stabilizes the txBroadcast API to version 1.

Ideally needs:
- #4050
- #3772

cc @paritytech/subxt-team

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-needs_burnin Pull request needs to be tested on a live validator node before merge. DevOps is notified via matrix D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. I5-enhancement An additional feature request. R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants