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

测试网络cached pow出块同时在同一个高度连续校验不过导致全网高度停滞(偶现) #592

Open
ouyun opened this issue Jul 29, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@ouyun
Copy link
Contributor

ouyun commented Jul 29, 2020

supernode-verify-certtx-fail-log.tar.gz
3个节点组成一个测试网络:

  • bbcnode节点:配置成关注所有分支链,作为pow挖矿节点,与另外2个dposnode节点p2p连接;
  • dposnode1节点:配置成pow/dpos双挖,与另外2个节点连通;
  • dposnode2节点:配置成pow/dpos双挖,与另外2个节点连通;

从创世块启动后在高度为3时停滞,区块高度保持约有1个小时,强制手工退出;
附日志,可看出3个节点全部在高度4出cached pow块时卡住,出错信息均为:

2020-07-29 12:59:59.427957 : [CTxPool] <debug> {7fe760ffb700:powmaker} - ArrangeBlockTx: hashPrev is last block, target height: 4, new vtx size: 8, old vtx size: 4, view tx count: 8
2020-07-29 12:59:59.428498 : [CBlockChain] <info> {7fe760ffb700:powmaker} - VerifyBlockCertTx: not enough votes, votes: 0, dest: 20m0dfqskvwy26ckcz11kq60pssh3fvhd5ehfz8nb1pap2tqrc3ncez6w
2020-07-29 12:59:59.428541 : [bigbang] <info> {7fe760ffb700:powmaker} - <blockchain>VerifyPowBlock Verify Block Error(cert transaction quantity out of bounds) : 0000000480ad2456e9fad4e888ada64669961efee0bb77f3bec76d3978ea8634 
2020-07-29 12:59:59.428569 : [NetChannel] <error> {7fe760ffb700:powmaker} - AddCacheLocalPowBlock VerifyPowBlock fail: height: 4, block: 0000000480ad2456e9fad4e888ada64669961efee0bb77f3bec76d3978ea8634
2020-07-29 12:59:59.428580 : [CService] <error> {7fe760ffb700:powmaker} - SubmitWork: AddCacheLocalPowBlock fail

以上错误一直连续出现,导致所有节点中没有一个节点能成功生成区块,造成主网区块停滞,此issue并不必现。
跟踪错误,根源在:
CBlockChain::VerifyBlockCertTx

            if (mt == mapVote.end() || mt->second < nMinAmount)
            {
                StdLog("CBlockChain", "VerifyBlockCertTx: not enough votes, votes: %ld, dest: %s",
                       (mt == mapVote.end() ? 0 : mt->second), CAddress(dest).ToString().c_str());
                return false;
            }

失败造成。

@ouyun ouyun added the bug Something isn't working label Jul 29, 2020
@ouyun
Copy link
Contributor Author

ouyun commented Aug 12, 2020

这次复现在高度2:

stick-height-2-again.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant