DeFiCh / ain

DeFi Blockchain - enabling decentralized finance on Bitcoin
https://defichain.com
MIT License
401 stars 119 forks source link

Crash: validation.cpp:3177 amountToBurn > 0' failed stuck at #1430639 #959

Closed defijeff closed 2 years ago

defijeff commented 2 years ago

What happened:

defid 2.2.0 crashes

What you expected to happen:

find new block :)

How to reproduce it (as minimally and precisely as possible):

run node for a couple of minutes

What are your environment parameters:

-

Anything else we need to know?:

Related to node stuck at #1430639 crash log from foreground:

defid: validation.cpp:3177: auto CChainState::ProcessLoanEvents(const CBlockIndex *, CCustomCSView &, const CChainParams &)::(anonymous class)::operator()(const CVaultId &, const CAuctionData &) const: Assertion `amountToBurn > 0' failed.

defichain-bot commented 2 years ago

@defijeff: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/ain/blob/master/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot) repository.
supervolot commented 2 years ago

Chain down since 4 hours !!!

sandrich commented 2 years ago

U-Zyn Chua, [7 Dec 2021 at 19:06:07]: Hi all, need your help to play a part to fix things.

defi-cli invalidateblock 57d3a5c18c69baee59a36796cabe20267d692466f760fa481076af2692091eca
defi-cli reconsiderblock 7aaf9f94c2c8dfd7370c18037d5aac611ba4fb07db4f28b169face5e5159ee57

if you have a masternode, please do that

Reason:

  1. There's currently a bug that if an auction closes and the penalty is less than 1 satoshi, blockchain would stall.
  2. The current workaround is 1-block rollback, put the bid in, which it's already in with 7aaf9f94c2c8dfd7370c18037d5aac611ba4fb07db4f28b169face5e5159ee57.
  3. Now we need masternodes to mine longer chain.
defijeff commented 2 years ago

Problem here is that nodes tend to do this: 2021-12-07T18:53:21Z ThreadStaker: ... waiting init...

sandrich commented 2 years ago

have the same problem

defijeff commented 2 years ago

Looking at the various states of Status::initWaiting; in https://github.com/DeFiCh/ain/blob/5dd54ad271d7cf1f5da1e97ee5eeec2ff08587df/src/miner.cpp

maybe it's still doing mining and just logging but I cannot tell

bvbfan commented 2 years ago

We will inform you when new executable is ready.

defijeff commented 2 years ago

2.3.0 fixed this. If the actual crash error is not useful otherwise to fix other related bugs, I guess this could be closed.

McRange commented 2 years ago

whit the 2.3.0 i get this all the time: ThreadStaker: ... waiting init... ERROR: AcceptBlockHeader: block 37d51dae2b52628e498644719efd8da2dc50b2284ecf616ffec76816e0c19e21 is marked invalid

What have I done wrong?

Jouzo commented 2 years ago

Fixed by 2.3.0