crypto-org-chain / crypto-org-chain/cronos

Overflow related to voting power.

Open
#1,157 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
336
Forks
299
Avg merge
2d 17h
Merged PRs (30d)
4

Description

Hello,
We had success in migration of genesis.json with your help and used your source code for GenesisL1 upgrade, thank you!
However faced some issue:
after ~71% of updated voting power went online, block production ended with error:
`INF received proposal module=consensus proposal={"Type":32,"block_id":{"hash":"FA39B16C041A8FD631784A9CC19EB5F4F0FE4FD8824226175ED201FCE76FA3B8","parts":{"hash
":"85BA0BC72B40D89610F688B70AC47D3D07B56D3A672B456CB91A453F84227452","total":1}},"height":6751391,"pol_round":-1,"round":1,"signature":"zzMzxlERtfDtUyRmu3d3LJTPP9u7Fx
B72GN77vcAKVguYS0r8FvliUIcJXPN8PBUohWKAbSO0QXj2abz8KPYBQ==","timestamp":"2023-09-07T19:04:44.225325519Z"} server=node
3:04PM INF received complete proposal block hash=FA39B16C041A8FD631784A9CC19EB5F4F0FE4FD8824226175ED201FCE76FA3B8 height=6751391 module=consensus server=node
3:04PM INF finalizing commit of block hash={} height=6751391 module=consensus num_txs=0 root=E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 server=n
ode
3:04PM INF minted coins from module account amount=2684871870626760975el1 from=mint module=x/bank
3:04PM INF executed block height=6751391 module=state num_invalid_txs=0 num_valid_txs=0 server=node
3:04PM ERR CONSENSUS FAILURE!!! err="failed to apply block; error commit failed for application: error changing validator set: total voting power of resulting valset
exceeds max 1152921504606846975" module=consensus server=node stack="goroutine 138 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/te
ndermint/tendermint/consensus.(*State).receiveRoutine.func2()\n\tgithub.com/tendermint/tendermint@v0.34.29/consensus/state.go:732 +0x4c\npanic({0x26c4320, 0xc001db119
0})\n\truntime/panic.go:884 +0x213\ngithub.com/tendermint/tendermint/consensus.(*State).finalizeCommit(0xc0001f9880, 0x67049f)\n\tgithub.com/tendermint/tendermint@v0.
34.29/consensus/state.go:1670 +0xfab\ngithub.com/tendermint/tendermint/consensus.(*State).tryFinalizeCommit(0xc0001f9880, 0x67049f)\n\tgithub.com/tendermint/tendermin
t@v0.34.29/consensus/state.go:1570 +0x2ff\ngithub.com/tendermint/tendermint/consensus.(*State).enterCommit.func1()\n\tgithub.com/tendermint/tendermint@v0.34.29/consen
sus/state.go:1505 +0xaa\ngithub.com/tendermint/tendermint/consensus.(*State).enterCommit(0xc0001f9880, 0x67049f, 0x1)\n\tgithub.com/tendermint/tendermint@v0.34.29/con
sensus/state.go:1543 +0xccf\ngithub.com/tendermint/tendermint/consensus.(*State).addVote(0xc0001f9880, 0xc001d5c140, {0xc0912c2ed0, 0x28})\n\tgithub.com/tendermint/te
ndermint@v0.34.29/consensus/state.go:2164 +0x18dc\ngithub.com/tendermint/tendermint/consensus.(*State).tryAddVote(0xc0001f9880, 0xc001d5c140, {0xc0912c2ed0?, 0xc004ef
dc08?})\n\tgithub.com/tendermint/tendermint@v0.34.29/consensus/state.go:1962 +0x2c\ngithub.com/tendermint/tendermint/consensus.(*State).handleMsg(0xc0001f9880, {{0x3c
77020, 0xc00291b500}, {0xc0912c2ed0, 0x28}})\n\tgithub.com/tendermint/tendermint@v0.34.29/consensus/state.go:861 +0x3ff\ngithub.com/tendermint/tendermint/consensus.(*
State).receiveRoutine(0xc0001f9880, 0x0)\n\tgithub.com/tendermint/tendermint@v0.34.29/consensus/state.go:768 +0x3f0\ncreated by github.com/tendermint/tendermint/conse
nsus.(*State).OnStart\n\tgithub.com/tendermint/tendermint@v0.34.29/consensus/state.go:379 +0x12d\n"
3:04PM INF service stop impl={"Logger":{}} module=consensus msg={} server=node wal=/root/.genesisd/data/cs.wal/wal
3:04PM INF service stop impl={"Dir":"/root/.genesisd/data/cs.wal","Head":{"ID":"aFqa318hpH7x:/root/.genesisd/data/cs.wal/wal","Path":"/root/.genesisd/data/cs.wal/wal"
},"ID":"group:aFqa318hpH7x:/root/.genesisd/data/cs.wal/wal","Logger":{}} module=consensus msg={} server=node wal=/root/.genesisd/data/cs.wal/wal`

It looks like there is some miscalculation of voting power somewhere, maybe related to denomination.
Can you please point where it can be?
Thank you

Contributor guide

Open the contributing guide

Research direction

Start with the reported failure in github.com/tendermint/tendermint/consensus/state.go, especially finalizeCommit, and compare it with the voting-power migration from genesis.json used for the GenesisL1 upgrade. Trace how the resulting validator set reaches the stated maximum and reproduce the failure around block 6751391. Done means the migration no longer causes the validator-set overflow and block production continues.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.