Skip to content

sync: Poll non-ephemeral transparent addresses for mined UTXOs #142

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

str4d
Copy link
Collaborator

@str4d str4d commented May 17, 2025

No description provided.

// TODO: Once Zaino has an index over the mempool, monitor it for changes to the
// unmined UTXO set (which we can't get directly from the stream without building
// an index because existing mempool txs can be spent within the mempool).
while mempool_stream.next().await.is_some() {}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I spent a significant amount of time adding logic to turn mempool tx outputs into mempool UTXOs, only to remember at the end that later mempool transactions can spend outputs of earlier ones. Due to transactions not being guaranteed to leave the mempool across chain tip changes (e.g. during high load), that means we can't use the mempool stream to get UTXOs, and instead need to build and maintain an index (which is Zaino's job).

Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

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

Looks good and it is working, i made some local regtests with this code with a miner address inserted manually into the database, transparent_received_outputs are populated as expected.

Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

utACK bf79a55

@nuttycom nuttycom merged commit d95617f into main May 20, 2025
16 of 19 checks passed
Copy link

@daira daira left a comment

Choose a reason for hiding this comment

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

Post-hoc ACK

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.

4 participants