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

fix: publish ChainUndelegate event #389

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

j75689
Copy link
Collaborator

@j75689 j75689 commented Mar 1, 2024

Description

E[2024-03-01|08:41:26.665] CONSENSUS FAILURE!!!                         module=consensus err="interface conversion: interface {} is nil, not string" stack="goroutine 282 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine.func2()\n\tgithub.com/tendermint/[email protected]/consensus/state.go:614 +0x46\npanic({0x161dac0?, 0xc003bbfdd0?})\n\truntime/panic.go:914 +0x21f\ngithub.com/cosmos/cosmos-sdk/x/stake.handleMsgSideChainUndelegate({{0x1ca1da0, 0x2a86680}, {0x1cac1d0, 0xc019920dc0}, {{0xa, 0x0, {}, {0x0, 0x0, 0x0}, ...}, ...}, ...}, ...)\n\tgithub.com/cosmos/[email protected]/x/stake/handler_sidechain.go:473 +0xef0\ngithub.com/cosmos/cosmos-sdk/x/stake.handleRefundStake({{0x1ca1da0, 0x2a86680}, {0x1cac1d0, 0xc019920dc0}, {{0xa, 0x0, {}, {0x0, 0x0, 0x0}, ...}, ...}, ...}, ...)\n\tgithub.com/cosmos/[email protected]/x/stake/endblock.go:306 +0x8bb\ngithub.com/cosmos/cosmos-sdk/x/stake.EndBlocker({{0x1ca1da0, 0x2a86680}, {0x1cac1d0, 0xc019920dc0}, {{0xa, 0x0, {}, {0x0, 0x0, 0x0}, ...}, ...}, ...}, ...)\n\tgithub.com/cosmos/[email protected]/x/stake/endblock.go:45 +0xe5b\ngithub.com/bnb-chain/node/app.(*BNBBeaconChain).EndBlocker(_, {{0x1ca1da0, 0x2a86680}, {0x1cac1d0, 0xc019920dc0}, {{0xa, 0x0, {}, {0x0, 0x0, ...}, ...}, ...}, ...}, ...)\n\tgithub.com/bnb-chain/node/app/app.go:965 +0x121b\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).EndBlock(0xc000c7e690, {0x3f813, {}, {0x0, 0x0, 0x0}, 0x0})\n\tgithub.com/cosmos/[email protected]/baseapp/baseapp.go:934 +0x1bd\ngithub.com/cosmos/cosmos-sdk/server/concurrent.(*asyncLocalClient).EndBlockSync(0xc000600a50, {0x3f813, {}, {0x0, 0x0, 0x0}, 0x0})\n\tgithub.com/cosmos/[email protected]/server/concurrent/async_local_client.go:408 +0x246\ngithub.com/tendermint/tendermint/proxy.(*appConnConsensus).EndBlockSync(0xc003b8dee0?, {0x3f813, {}, {0x0, 0x0, 0x0}, 0x0})\n\tgithub.com/tendermint/[email protected]/proxy/app_conn.go:115 +0x48\ngithub.com/tendermint/tendermint/state.execBlockOnProxyApp({0x1ca2388, 0xc000d93460}, {0x1ca9740, 0xc0025bb760}, 0xc01ea6e5a0, 0x14?, {0x1cad928, 0xc0142e82f0})\n\tgithub.com/tendermint/[email protected]/state/execution.go:298 +0x6b9\ngithub.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(_, {{{0xa, 0x0}, {0xc006ba7b50, 0x6}}, {0xc001babd40, 0x14}, 0x3f812, 0x10f, {{0xc003036e40, ...}, ...}, ...}, ...)\n\tgithub.com/tendermint/[email protected]/state/execution.go:128 +0x189\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).finalizeCommit(0xc0025d8380, 0x3f813)\n\tgithub.com/tendermint/[email protected]/consensus/state.go:1380 +0x93e\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).tryFinalizeCommit(0xc0025d8380, 0x3f813)\n\tgithub.com/tendermint/[email protected]/consensus/state.go:1308 +0x2f8\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).enterCommit.func1()\n\tgithub.com/tendermint/[email protected]/consensus/state.go:1253 +0x88\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).enterCommit(0xc0025d8380, 0x3f813, 0x0)\n\tgithub.com/tendermint/[email protected]/consensus/state.go:1285 +0xacb\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).addVote(0xc0025d8380, 0xc0030f1860, {0xc01eb7bf50, 0x28})\n\tgithub.com/tendermint/[email protected]/consensus/state.go:1737 +0x731\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote(0xc0025d8380, 0xc0030f1860, {0xc01eb7bf50?, 0x2a4bd01?})\n\tgithub.com/tendermint/[email protected]/consensus/state.go:1567 +0x26\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg(0xc0025d8380, {{0x1c8f400, 0xc01ea8fb90}, {0xc01eb7bf50, 0x28}})\n\tgithub.com/tendermint/[email protected]/consensus/state.go:703 +0x2fe\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine(0xc0025d8380, 0x0)\n\tgithub.com/tendermint/[email protected]/consensus/state.go:645 +0x325\ncreated by github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart in goroutine 191\n\tgithub.com/tendermint/[email protected]/consensus/state.go:346 +0x40f\n"

Rationale

After SecondSunsetFork the delegation will be returned by EndBlock function.
It's not called by tx, so the txHash will be nil.

@j75689 j75689 force-pushed the fix/panic_issue_in_publish_undelegate_event branch from 57c2ca3 to ff03d39 Compare March 1, 2024 11:48
@j75689 j75689 changed the title fix: publish ChainUndelegateEvent fix: publish ChainUndelegate event Mar 1, 2024
forcodedancing
forcodedancing previously approved these changes Mar 1, 2024
@codecov-commenter
Copy link

Codecov Report

Merging #389 (16e1d71) into master (eeced6c) will decrease coverage by 0.04%.
Report is 1 commits behind head on master.
The diff coverage is 0.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #389      +/-   ##
==========================================
- Coverage   45.11%   45.08%   -0.04%     
==========================================
  Files         249      249              
  Lines       24675    24692      +17     
==========================================
  Hits        11132    11132              
- Misses      12871    12888      +17     
  Partials      672      672              

@unclezoro unclezoro merged commit cf3ab19 into master Mar 5, 2024
2 checks passed
Copy link

@colorado392 colorado392 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants