Skip to content

GoS Upgrade 2 Halt Stacktrace #3187

Closed
@hendrikhofstadt

Description

Someone double signed but all slashing periods, which are normally set to the bonding height, had been deleted in the export logic.

Here the original state is set:

slashingPeriod := ValidatorSlashingPeriod{
ValidatorAddr: address,
StartHeight: ctx.BlockHeight(),
EndHeight: 0,
SlashedSoFar: sdk.ZeroDec(),
}

Here they the SlashingPeriods are deleted in the for zero height export:

app.slashingKeeper.DeleteValidatorSlashingPeriods(ctx)

We should rather reset them to the initial state.

Thanks @leoluk for the reference in the comments.

expected to find slashing period for validator cosmosvalcons14smgy0408lwaejglhe7txywwyvaq9ht5v0qsdy before height 76, but none was found" stack="goroutine 128 [running]:
runtime/debug.Stack(0xc0073ee380, 0xf02340, 0xc0047e7e10)
	/usr/lib/golang/src/runtime/debug/stack.go:24 +0xa7
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine.func2(0xc005cb4380, 0x1231910)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:576 +0x57
panic(0xf02340, 0xc0047e7e10)
	/usr/lib/golang/src/runtime/panic.go:513 +0x1b9
github.com/cosmos/cosmos-sdk/x/slashing.Keeper.getValidatorSlashingPeriodForHeight(0x1328760, 0xc000197110, 0xc000104690, 0x133c0c0, 0xc000afa790, 0xc000104690, 0x1328760, 0xc000197140, 0x13287a0, 0xc000197150, ...)
	/go/src/github.com/cosmos/cosmos-sdk/x/slashing/slashing_period.go:48 +0x4b4
github.com/cosmos/cosmos-sdk/x/slashing.Keeper.capBySlashingPeriod(0x1328760, 0xc000197110, 0xc000104690, 0x133c0c0, 0xc000afa790, 0xc000104690, 0x1328760, 0xc000197140, 0x13287a0, 0xc000197150, ...)
	/go/src/github.com/cosmos/cosmos-sdk/x/slashing/slashing_period.go:15 +0xd5
github.com/cosmos/cosmos-sdk/x/slashing.Keeper.handleDoubleSign(0x1328760, 0xc000197110, 0xc000104690, 0x133c0c0, 0xc000afa790, 0xc000104690, 0x1328760, 0xc000197140, 0x13287a0, 0xc000197150, ...)
	/go/src/github.com/cosmos/cosmos-sdk/x/slashing/keeper.go:78 +0x6cc
github.com/cosmos/cosmos-sdk/x/slashing.BeginBlocker(0x13327e0, 0xc003dbb7a0, 0xc005c6f8c0, 0xd, 0xc007874960, 0x20, 0x20, 0x8, 0x0, 0x0, ...)
	/go/src/github.com/cosmos/cosmos-sdk/x/slashing/tick.go:34 +0x6ef
github.com/cosmos/cosmos-sdk/cmd/gaia/app.(*GaiaApp).BeginBlocker(0xc000161200, 0x13327e0, 0xc003dbb7a0, 0xc005c6f8c0, 0xd, 0xc007874960, 0x20, 0x20, 0x8, 0x0, ...)
	/go/src/github.com/cosmos/cosmos-sdk/cmd/gaia/app/app.go:208 +0x1be
github.com/cosmos/cosmos-sdk/cmd/gaia/app.(*GaiaApp).BeginBlocker-fm(0x13327e0, 0xc003dbb7a0, 0xc005c6f8c0, 0xd, 0xc007874960, 0x20, 0x20, 0x8, 0x0, 0x0, ...)
	/go/src/github.com/cosmos/cosmos-sdk/cmd/gaia/app/app.go:165 +0xba
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).BeginBlock(0xc000180b00, 0xc007874960, 0x20, 0x20, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cosmos/cosmos-sdk/baseapp/baseapp.go:507 +0x311
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/abci/client.(*localClient).BeginBlockSync(0xc0001937a0, 0xc007874960, 0x20, 0x20, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/abci/client/local_client.go:231 +0xe6
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/proxy.(*appConnConsensus).BeginBlockSync(0xc000b44da0, 0xc007874960, 0x20, 0x20, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/proxy/app_conn.go:69 +0x6b
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/state.execBlockOnProxyApp(0x1333660, 0xc005db8a60, 0x13387c0, 0xc000b44da0, 0xc0001f83c0, 0xc003dbaf60, 0x133d340, 0xc00000e330, 0x78, 0xc005440b20, ...)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/state/execution.go:245 +0x47f
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(0xc00523ce70, 0x8, 0x0, 0xc005233880, 0x6, 0xc0052338a0, 0x10, 0x4c, 0x78, 0xc005440b20, ...)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/state/execution.go:96 +0x15f
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).finalizeCommit(0xc005cb4380, 0x4d)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:1290 +0xa8c
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).tryFinalizeCommit(0xc005cb4380, 0x4d)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:1221 +0x451
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).enterCommit.func1(0xc005cb4380, 0x1, 0x4d)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:1167 +0x90
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).enterCommit(0xc005cb4380, 0x4d, 0x1)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:1198 +0x6b8
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).addVote(0xc005cb4380, 0xc0024b0aa0, 0xc0046ba780, 0x28, 0x1232bd0, 0x10a, 0xc000a61ad0)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:1622 +0xc03
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote(0xc005cb4380, 0xc0024b0aa0, 0xc0046ba780, 0x28, 0xc003e0b9e0, 0x10a, 0x10a)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:1469 +0x59
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg(0xc005cb4380, 0x1324e80, 0xc0059bb608, 0xc0046ba780, 0x28)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:650 +0x696
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine(0xc005cb4380, 0x0)
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:607 +0x670
created by github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart
	/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/consensus/state.go:300 +0x132

Happy holidays


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions