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

chain: Handle txpool conflicts properly #120

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Conversation

lukechampine
Copy link
Member

This PR changes the txpool to reject transactions that conflict with transactions already in the pool. As a result, the set of transactions in the pool should always be mutually valid (albeit possibly too large to fit in one block). Previously, conflicting transactions were allowed to coexist; siad does this intentionally, but in coreutils it was accidental, leading to surprising and confusing behavior.

Note that there is currently no "replace-by-fee" mechanism for clearing stuck transactions from the pool. This is a somewhat contentious topic, so I'm punting on it for now. Longer term, I expect we'll want at least a basic child-pays-for-parent scheme; see the comment at the top of revalidatePool.

Also fixed a bug in revalidatePool where low-fee v2 transactions were not removed.

wallet/wallet_test.go Outdated Show resolved Hide resolved
wallet/wallet_test.go Outdated Show resolved Hide resolved
chain/manager.go Show resolved Hide resolved
chain/manager.go Show resolved Hide resolved
@n8maninger n8maninger merged commit ac0cf88 into master Dec 3, 2024
9 checks passed
@n8maninger n8maninger deleted the txpool-conflict branch December 3, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants