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

popm: exclude tx outputs that would be dust #186

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

joshuasing
Copy link
Contributor

@joshuasing joshuasing commented Jul 17, 2024

Summary
Avoid "dust" errors when broadcasting PoP transactions to Bitcoin by checking if the transaction output would be considered dust with a relay tx fee of 10,000.

If the transaction output would be considered dust, then don't include the output and instead leave the remaining to be included as a fee.

Fixes #183

Changes

  • Don't add a change transaction output when creating a transaction if the transaction output is dust.

Avoid "dust" errors when broadcasting PoP transactions to Bitcoin by
checking if the transaction output would be considered dust with a relay
tx fee of 10,000.

If the transaction output would be considered dust, then don't include
the output and instead leave the remaining to be included as a fee.
@joshuasing joshuasing added type: enhancement This improves existing functionality size: S This change is small (+/- <80) labels Jul 17, 2024
@joshuasing joshuasing requested a review from a team as a code owner July 17, 2024 18:23
@github-actions github-actions bot added the area: popm This is a change to popm (PoP Miner) label Jul 17, 2024
@ClaytonNorthey92
Copy link
Contributor

hey @joshuasing (and maybe @marcopeereboom or @max-sanchez could answer this) why did we choose 10,000 for the minRelayTxFee? The bitcoind default looks to be 1000.. Are these values different? Or are we handling for something outside of the default?

@joshuasing joshuasing merged commit 5c764a0 into main Jul 19, 2024
7 checks passed
@joshuasing joshuasing deleted the joshua/popm/exclude-dust-outputs branch July 19, 2024 16:42
web3cryptoguy pushed a commit to web3cryptoguy/heminetwork that referenced this pull request Nov 1, 2024
Avoid "dust" errors when broadcasting PoP transactions to Bitcoin by
checking if the transaction output would be considered dust with a relay
tx fee of 10,000.

If the transaction output would be considered dust, then don't include
the output and instead leave the remaining to be included as a fee.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: popm This is a change to popm (PoP Miner) size: S This change is small (+/- <80) type: enhancement This improves existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure that we don't generate dust
3 participants