-
Notifications
You must be signed in to change notification settings - Fork 681
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
Miner commitment is spent when 'Failed to submit Bitcoin transaction' #2356
Comments
@MaksimalistT @friedger can you also include debug logs from stacks-node when this happens? |
I've also encountered this issue, and will dig out some logs as well. |
After looking at the logs, I don't think anything gets spent when you get that error message, you see a transaction for that block because the miner has successfully sent other transactions. See attempt 7 below. We should still fix this as the "best" commit was not successfully sent, but that's not always the last one where this happens.
|
Met code: -26 when attempt commit 11 times |
Here is the log after syncing the block.
|
this is not the same error, see #2347 |
We believe that the cause of this issue is that there's a race condition between the miner's attempt to replace-by-fee, and the bitcoin chain advancing by one block before the miner sees the new chain tip. I think the code should just try mining again once the view of the bitcoin chain gets refreshed (and take this error as a hint to refresh the bitcoin chain tip). |
I've managed to observe this in real-time - bitcoin chain advanced while my node was re-assembling the block and attempting a replace-by-fee when this error appeared. To confirm, there was no double spend although I may not have won as a result of the node not being able to submit its best commit and so the commit was essentially wasted |
Should be addressed with #2383 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
miner commitment per block is spent
when errors like this occur:
ERRO [1610808785.386308] [testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs:953] [relayer] Bitcoin RPC failure: transaction submission failed - Network("Bitcoin RPC: status(500) != success, body is 'Object({"error": Object({"code": Number(-25), "message": String("bad-txns-inputs-missingorspent")}), "id": String("stacks"), "result": Null})'")
WARN [1610808785.386393] [testnet/stacks-node/src/neon_node.rs:1638] [relayer] Failed to submit Bitcoin transaction
Steps To Reproduce
conf:
burn_fee_cap = 22000
satoshis_per_byte = 102
Expected behavior
miner commitment per block is NOT spent
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: