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

Add custom tx pool #2196

Closed
wants to merge 1 commit into from
Closed

Conversation

bkchr
Copy link

@bkchr bkchr commented Oct 24, 2024

This should be used as a workaround for: paritytech/polkadot-sdk#1202

Goal

The goal of this PR is

Closes

Discussion

Checklist

  • Updated Pallet Readme?
  • Updated js/api-augment for Custom RPC OR Runtime API?
  • Design doc(s) updated?
  • Unit Tests added?
  • e2e Tests added?
  • Benchmarks added?
  • Spec version incremented?

This should be used as a workaround for: paritytech/polkadot-sdk#1202
@bkchr bkchr requested a review from wilwade as a code owner October 24, 2024 09:23

fn remove_invalid(&self, _: &[TxHash<Self>]) -> Vec<Arc<Self::InPoolTransaction>> {
// Don't do anything on purpose.
Vec::new()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for this! We tested something like this by forking the txpool crates here: #2186

It didn't work even with all collators running the code. (Was going to report back on the issue today).

Why? Here's my guess:

  1. Transaction C dependent on B dependent on A
  2. Txs A, B, C sent to the pool
  3. Tx A gets into a fork
  4. Txs B and C now stay in the pool (good!)
  5. Fork with Tx A goes away
  6. Tx A never gets re-added to the pool
  7. Txs B and C continue to be stuck

Might not be 100% correct in what is happening, but that's what it looked like from the tx pools.

We ended up using a slightly modified build of the omni-node with the fatxpool and that... might be working. Still verifying 100%.

Copy link
Author

Choose a reason for hiding this comment

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

6. Tx A never gets re-added to the pool

If the fork is not the best chain, it will get re-added to the pool. This is also the case with the old pool.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That did not appear to be true in tests, but perhaps something else was causing that issue.

@wilwade
Copy link
Collaborator

wilwade commented Oct 28, 2024

Using the omni-node is working for now. Thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants