Skip to content

Use custom txpool to workaround the invalid tx#3211

Merged
Kailai-Wang merged 3 commits intodevfrom
custom-txpool
Dec 18, 2024
Merged

Use custom txpool to workaround the invalid tx#3211
Kailai-Wang merged 3 commits intodevfrom
custom-txpool

Conversation

@Kailai-Wang
Copy link
Copy Markdown
Collaborator

Context

As topic.

A proper fix is using fork-aware txpool as done here: paritytech/polkadot-sdk#4639

However we are using stable2407 branch which means direct cherry-picking will result in many incompatible issues. I also tried ported versions from tanssi and it didn't work so well.

The workaround is taken from the comment in paritytech/polkadot-sdk#1202 (from Frequency) - in my tests it looked good without --delayed-best-block

@Kailai-Wang Kailai-Wang self-assigned this Dec 18, 2024
@Kailai-Wang Kailai-Wang requested review from a team, kziemianek and silva-fj December 18, 2024 09:07
Copy link
Copy Markdown
Collaborator

@BillyWooo BillyWooo left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM.

Copy link
Copy Markdown
Contributor

@silva-fj silva-fj left a comment

Choose a reason for hiding this comment

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

So, the workaround is not to call remove_invalid from the wrapped pool? Are invalid transactions removed at some point?

@silva-fj
Copy link
Copy Markdown
Contributor

So, the workaround is not to call remove_invalid from the wrapped pool? Are invalid transactions removed at some point?

nvm, I read the comments. They should be removed during revalidation

@Kailai-Wang
Copy link
Copy Markdown
Collaborator Author

Yes the tx is not lost tho, it's forked, so the client should still get valid response back

@Kailai-Wang Kailai-Wang enabled auto-merge (squash) December 18, 2024 10:09
@Kailai-Wang Kailai-Wang merged commit 07a5a23 into dev Dec 18, 2024
@Kailai-Wang Kailai-Wang deleted the custom-txpool branch December 18, 2024 10:28
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.

3 participants