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

ThreadStaker creating an invalid block after transferdomain mess up #2584

Closed
kuegi opened this issue Oct 14, 2023 · 3 comments · Fixed by #2592
Closed

ThreadStaker creating an invalid block after transferdomain mess up #2584

kuegi opened this issue Oct 14, 2023 · 3 comments · Fixed by #2592
Labels

Comments

@kuegi
Copy link
Contributor

kuegi commented Oct 14, 2023

Summary

To fund testing addresses I am "spaming" the node with 60 transferdomain txs per block. sometimes it fails and I have to start over which messes up the utxo chains. Usually this leads to errors like "input already spent" when sending it in.

This time I managed to get it in and my own MN seem to have created an invalid block. I got rejected by the network, so all good, but still shouldn't happen.
Not able to reproduce it yet, just opening the issue for further reference if it happens again.

Error I got:

2023-10-14T18:27:00Z ERROR: ConnectBlock: Consensus::CheckTxInputs: a2ce886e9e44a9dcb2b1879827182cc69dd687b86fe3788b40023315c254fa63, bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)
2023-10-14T18:27:00Z ThreadStaker: (CreateNewBlock: TestBlockValidity failed: bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)) runtime error: 15e47661f17aa8c59a3a9e856368429c3691bef8
2023-10-14T18:27:26Z new proof-of-stake block found hash: 7e2d59a8ff84104909686538a61a4d0f32897968900f3e223169d373a5827f2d

when creating this (afterwards invalid) tx it was the AUTO_AUTH of a TD:

2023-10-14T18:25:07Z [changi] Fee Calculation: Fee:10640 Bytes:532 Needed:10640 Tgt:20 (requested 20) Reason:"Fallback fee" Decay 0.96200: Estimation: (-1 - -1) nan% 0.0/(0.0 0 mem 0.0 out) Fail: (0 - 1e+99) 19.49% 13.1/(13.1 0 mem 54.0 out)
2023-10-14T18:25:07Z [changi] AddToWallet a2ce886e9e44a9dcb2b1879827182cc69dd687b86fe3788b40023315c254fa63  new
2023-10-14T18:25:07Z [changi] AddToWallet 984d7a44e1b5a10e611135971fa63ce8cc0648e2e422ef4b3c0418eff58f9aca  new
2023-10-14T18:25:07Z [changi] keypool added 1 keys (1 internal), size=2000 (1000 internal)
2023-10-14T18:25:07Z [changi] keypool reserve 8149
2023-10-14T18:25:07Z [changi] keypool keep 8149

in between the creation and the block I got quite some rebuildAccountsView: Remove conflicting TX: but of course this tx was not among them.

Environment

  • Node Version: 4.0.0 beta15
@kuegi kuegi added the bug label Oct 14, 2023
@sieniven
Copy link
Contributor

sieniven commented Oct 16, 2023

@kuegi could i get some clarity on what you meant by in between the creation and the block. Do you mean in between create block and connect block?

@kuegi
Copy link
Contributor Author

kuegi commented Oct 16, 2023

@kuegi could i get some clarity on what you meant by in between the creation and the block. Do you mean in between create block and connect block?

@sieniven i meant between creation of the tx and the block. let me add a timeline for clarification:

  1. 60 TD txs added to mempool (many needing AUTO_AUTH)
  2. some don't go in/had some issues -> clear mempool
  3. new round of 60 TD txs added to the mempool (again with AUTO_AUTH)
  4. blocks from outside coming in with some of the TDs from 1. (likely leading to rebuildAccountsView: Remove conflicting TX:. But I didn't check if the removed txs were from my blocks thou. but the later invalid one was not part of them)
  5. my MN finds the invalid block (As far as I can tell there was no issue during creation of the block)

@sieniven
Copy link
Contributor

Thanks for the spot for this. Havent been able to recreate the issue, but based on the information you provided it is likely due to a bug in the mempool accounts view state that was causing a mismatch from the chainstate tip. The PR #2592 should hopefully resolve the issue. Will close the issue once the PR is merged, but if you notice the same bug appearing again after that the PR is in, please re-open the issue. Many thanks.

@sieniven sieniven linked a pull request Oct 17, 2023 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants