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

feature: support orphan transactions in the mempool #8777

Open
conradoplg opened this issue Aug 20, 2024 · 1 comment · May be fixed by #8857
Open

feature: support orphan transactions in the mempool #8777

conradoplg opened this issue Aug 20, 2024 · 1 comment · May be fixed by #8857
Assignees
Labels
A-mempool Area: Memory pool transactions A-rpc Area: Remote Procedure Call interfaces C-enhancement Category: This is an improvement P-Medium ⚡

Comments

@conradoplg
Copy link
Contributor

Motivation

We don't allow orphan txs in the mempool. However, supporting them can be useful, in particular for the tex address support which creates two transactions, one z->t and another t->t and submits them sequentially. Currently the second one is rejected in zebrad because of the unknown input since the first one wasn't mined yet.

Specifications

No spec for the mempool 🥲

Complex Code or Requirements

We need to consider that this changes the mempool criteria from "any txs that could be mined on their own" to "a collection of txs that possibly need to be mined together" and check if this has unintended consequences. (In particular I think this will stop #5674 from being implementable)

Testing

Probably trying to submit two txs where the second spends something from the first

Related Work

See discussion in https://discord.com/channels/809218587167293450/809251029673312267/1275193366740602993

@conradoplg conradoplg added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Aug 20, 2024
@arya2 arya2 self-assigned this Aug 28, 2024
@arya2 arya2 added P-Medium ⚡ A-rpc Area: Remote Procedure Call interfaces A-mempool Area: Memory pool transactions and removed S-needs-triage Status: A bug report needs triage labels Aug 28, 2024
@arya2
Copy link
Contributor

arya2 commented Aug 30, 2024

It looks like shielded inputs must already be mined, so allowing spends from utxos in the mempool when verifying mempool transactions will be enough, though that may still be tricky, the PendingUtxos struct in the state service could be useful here.

(In particular I think this will stop #5674 from being implementable)

It'll complicate it a bit for mempool transactions that depend on other mempool transactions, but it should still be implementable.

Update: We need to track transaction dependencies to ensure that Zebra produces valid block templates anyway, so, the block verifier could send all of a block's ordered transactions' ids to the mempool in a single request to see which ones have been verified and are still valid if some of them were verified with a dependency.

@arya2 arya2 linked a pull request Sep 9, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mempool Area: Memory pool transactions A-rpc Area: Remote Procedure Call interfaces C-enhancement Category: This is an improvement P-Medium ⚡
Projects
Status: Review/QA
Development

Successfully merging a pull request may close this issue.

2 participants