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

[Bug]: Chain halts after submitting provider parameter change proposal v5.1.0 #2021

Closed
1 task done
stana-miric opened this issue Jul 5, 2024 · 1 comment
Closed
1 task done
Labels
status: waiting-triage This issue/PR has not yet been triaged by the team. type: bug Issues that need priority attention -- something isn't working

Comments

@stana-miric
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

After a proposal for provider parameter change is submitted, chain halts because of the panic in begin blocker when tcalling GetSlashMeterAllowance->GetSlashMeterReplenishFraction because for some reason ReplenishFraction param is empty string, even though if previously called query for provider params returns the value.

Interchain Security Version

v5.1.0

How to reproduce?

  1. Start interchain-security-pd
  2. Query the provider params to make sure that the value is returned: ./interchain-security-pd q gov proposals
  3. Submit param change proposal: ./interchain-security-pd tx gov submit-proposal "/home/proposal.json" where proposal.json can look like this e.g.
    {
    "messages":[
    {
    "@type": "/interchain_security.ccv.provider.v1.MsgUpdateParams",
    "authority": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn",
    "params": {
    "blocks_per_epoch": "601"
    }
    }
    ],
    "deposit": "100000stake",
    "proposer": "sample proposer",
    "metadata": "sample metadata",
    "title": "blocks per epoch title",
    "summary": "blocks per epoch summary",
    "expedited": false
    }
  4. Deposit and vote for proposal to pass (voting period on chain should be minimized for testing purposes)
  5. After proposal passes, chain will halt on begin blocker with error:
    [1mCONSENSUS FAILURE!!!�[0m �[36merr=�[0m"decimal string cannot be empty" �[36mmodule=�[0mconsensus �[36mstack=�[0m"goroutine 265 [running]:\nruntime/debug.Stack()\n\t/home/stana/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:24 +0x5e\ngithub.com/cometbft/cometbft/consensus.(*State).receiveRoutine.func2()\n\t/home/stana/go/pkg/mod/github.com/cometbft/[email protected]/consensus/state.go:801 +0x46\npanic({0x2b3c580?, 0x5b59540?})\n\t/home/stana/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:770 +0x132\ncosmossdk.io/math.LegacyMustNewDecFromStr(...)\n\t/home/stana/go/pkg/mod/cosmossdk.io/[email protected]/dec.go:208\ngithub.com/cosmos/interchain-security/v5/x/ccv/provider/keeper.Keeper.GetSlashMeterAllowance({{0xc00118ed50, 0x2d}, {0x3f14420, 0xc0010facc0}, {0x3f587b0, 0xc0010fa7a0}, {0x3f1b480, 0xc0020c1310}, {0x3f45120, 0xc001d32460}, ...}, ...)\n\t/home/stana/go/src/cosmos/interchain-security/x/ccv/provider/keeper/throttle.go:110 +0x34e\ngithub.com/cosmos/interchain-security/v5/x/ccv/provider/keeper.Keeper.CheckForSlashMeterReplenishment({{0xc00118ed50, 0x2d}, {0x3f14420, 0xc0010facc0}, {0x3f587b0, 0xc0010fa7a0}, {0x3f1b480, 0xc0020c1310}, {0x3f45120, 0xc001d32460}, ...}, ...)\n\t/home/stana/go/src/cosmos/interchain-security/x/ccv/provider/keeper/throttle.go:64 +0x278\ngithub.com/cosmos/interchain-security/v5/x/ccv/provider/keeper.Keeper.BeginBlockCIS(...)\n\t/home/stana/go/src/cosmos/interchain-security/x/ccv/provider/keeper/relay.go:285\ngithub.com/cosmos/interchain-security/v5/x/ccv/provider.AppModule.BeginBlock({{}, 0xc0001857c0, {{0x3f587b0, 0xc0010fa7a0}, 0xc000206080, {0x3f14420, 0xc0010fac60}, {0x3f14448, 0xc0010fad40}, {0xc0014323c8, ...}, ...}}, ...)\n\t/home/stana/go/src/cosmos/interchain-security/x/ccv/provider/module.go:170
@stana-miric stana-miric added type: bug Issues that need priority attention -- something isn't working status: waiting-triage This issue/PR has not yet been triaged by the team. labels Jul 5, 2024
@github-project-automation github-project-automation bot moved this to 🩹 F1: Triage in Cosmos Hub Jul 5, 2024
@stana-miric
Copy link
Collaborator Author

Closing this issue since this is expected behavior. MsgUpdateParams contained only blocks_per_epoch, that's why the replenish fraction was not set after the proposal is accepted and executed. As doc says:
It is important to note that MsgUpdateParams requires all paramaters to be specified in the proposal message.

@github-project-automation github-project-automation bot moved this from 🩹 F1: Triage to 👍 F4: Assessment in Cosmos Hub Jul 8, 2024
@mpoke mpoke moved this from 👍 F4: Assessment to ✅ Done in Cosmos Hub Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-triage This issue/PR has not yet been triaged by the team. type: bug Issues that need priority attention -- something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant