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

Unable to delegate multiple times on vesting account #8812

Closed
4 tasks
erikgrinaker opened this issue Mar 7, 2021 · 10 comments · Fixed by #8865
Closed
4 tasks

Unable to delegate multiple times on vesting account #8812

erikgrinaker opened this issue Mar 7, 2021 · 10 comments · Fixed by #8865
Assignees
Milestone

Comments

@erikgrinaker
Copy link
Contributor

erikgrinaker commented Mar 7, 2021

Summary of Bug

I have a ContinuousVestingAccount on cosmoshub-4 with some vested ATOMs in it, as well as 1 free ATOM for fees. I wanted to delegate this to three validators in equal parts. After delegating to the first, all subsequent operations (delegations, claiming rewards, etc) return a panic via RPC:

panic message redacted to hide potentially sensitive system info: panic

After spinning up a full node and outputting the redacted panic I get this:

recovered: negative coin amount
stack:
goroutine 7529 [running]:
runtime/debug.Stack(0x18, 0x5647c40, 0xc00b539dc0)
	runtime/debug/stack.go:24 +0x9f
github.com/cosmos/cosmos-sdk/baseapp.newDefaultRecoveryMiddleware.func1(0x551ba00, 0x5bbc640, 0x0, 0xc00bd3c778)
	github.com/cosmos/[email protected]/baseapp/recovery.go:71 +0x26
github.com/cosmos/cosmos-sdk/baseapp.newRecoveryMiddleware.func1(0x551ba00, 0x5bbc640, 0x0, 0x0, 0xc000599200)
	github.com/cosmos/[email protected]/baseapp/recovery.go:39 +0x42
github.com/cosmos/cosmos-sdk/baseapp.processRecovery(0x551ba00, 0x5bbc640, 0xc000599200, 0x0, 0x0)
	github.com/cosmos/[email protected]/baseapp/recovery.go:28 +0x43
github.com/cosmos/cosmos-sdk/baseapp.processRecovery(0x551ba00, 0x5bbc640, 0xc00b539de0, 0x5c41240, 0xc00b0c4c40)
	github.com/cosmos/[email protected]/baseapp/recovery.go:33 +0x7e
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1(0xc00bd4ef00, 0xc00bd4f3b0, 0xc000129a00, 0xc00bd50af8, 0xc00bd50af0, 0xc00bd50ae0)
	github.com/cosmos/[email protected]/baseapp/baseapp.go:583 +0x170
panic(0x551ba00, 0x5bbc640)
	runtime/panic.go:969 +0x1b9
github.com/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle.func1(0x7e78e68, 0xc00b540fc0, 0xc00bd4dfa8, 0xc00bd4e1b8)
	github.com/cosmos/[email protected]/x/auth/ante/setup.go:59 +0x236
panic(0x551ba00, 0x5bbc640)
	runtime/panic.go:969 +0x1b9
github.com/cosmos/cosmos-sdk/types.Coin.Sub(0xc00bd021aa, 0x5, 0xc00b539d80, 0xc008fcf9f4, 0x5, 0xc00b5397e0, 0x5c2b860, 0xc000126008, 0x5c41240)
	github.com/cosmos/[email protected]/types/coin.go:112 +0xf1
github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseSendKeeper.SubtractCoins(0x5c418c0, 0xc000090b00, 0x5c0c4e0, 0xc000518f40, 0x5c439c0, 0xc0001446c0, 0x5c418c0, 0xc000090b00, 0x5c439c0, 0xc0001446c0, ...)
	github.com/cosmos/[email protected]/x/bank/keeper/send.go:189 +0x2d0
github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseSendKeeper.SendCoins(0x5c418c0, 0xc000090b00, 0x5c0c4e0, 0xc000518f40, 0x5c439c0, 0xc0001446c0, 0x5c418c0, 0xc000090b00, 0x5c439c0, 0xc0001446c0, ...)
	github.com/cosmos/[email protected]/x/bank/keeper/send.go:154 +0x55b
github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper.SendCoinsFromAccountToModule(0x5c418c0, 0xc000090b00, 0x5c0c4e0, 0xc000518f40, 0x5c439c0, 0xc0001446c0, 0x5c418c0, 0xc000090b00, 0x5c439c0, 0xc0001446c0, ...)
	github.com/cosmos/[email protected]/x/bank/keeper/keeper.go:282 +0x193
github.com/cosmos/cosmos-sdk/x/auth/ante.DeductFees(0xfe044b8, 0xc00015ef20, 0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, ...)
	github.com/cosmos/[email protected]/x/auth/ante/fee.go:107 +0x138
github.com/cosmos/cosmos-sdk/x/auth/ante.DeductFeeDecorator.AnteHandle(0x5c2c620, 0xc000145710, 0xfe044b8, 0xc00015ef20, 0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, ...)
	github.com/cosmos/[email protected]/x/auth/ante/fee.go:92 +0x375
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.ValidateSigCountDecorator.AnteHandle(0x5c2c620, 0xc000145710, 0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, ...)
	github.com/cosmos/[email protected]/x/auth/ante/sigverify.go:352 +0x22f
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.SetPubKeyDecorator.AnteHandle(0x5c2c620, 0xc000145710, 0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, ...)
	github.com/cosmos/[email protected]/x/auth/ante/sigverify.go:93 +0x1a7
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.RejectFeeGranterDecorator.AnteHandle(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/x/auth/ante/fee_grant.go:26 +0xef
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.ConsumeTxSizeGasDecorator.AnteHandle(0x5c2c620, 0xc000145710, 0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, ...)
	github.com/cosmos/[email protected]/x/auth/ante/basic.go:142 +0x20d
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.ValidateMemoDecorator.AnteHandle(0x5c2c620, 0xc000145710, 0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, ...)
	github.com/cosmos/[email protected]/x/auth/ante/basic.go:66 +0x2af
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.TxTimeoutHeightDecorator.AnteHandle(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/x/auth/ante/basic.go:199 +0x14f
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.ValidateBasicDecorator.AnteHandle(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/x/auth/ante/basic.go:34 +0x14f
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.MempoolFeeDecorator.AnteHandle(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/x/auth/ante/fee.go:54 +0x188
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.RejectExtensionOptionsDecorator.AnteHandle(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/x/auth/ante/ext.go:35 +0xef
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/x/auth/ante/setup.go:64 +0x4cf
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1(0x5c2b860, 0xc000126008, 0x5c41240, 0xc00b541000, 0xb, 0x0, 0xc009034920, 0xb, 0x527955, 0x2a7b2b61, ...)
	github.com/cosmos/[email protected]/types/handler.go:40 +0x12c
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0xc000129a00, 0xc00b538d00, 0xc008bdec60, 0x151, 0x153, 0x0, 0x0, 0x0, 0x0, 0x0)
	github.com/cosmos/[email protected]/baseapp/baseapp.go:632 +0x8ab
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).CheckTx(0xc000129a00, 0xc008bdec60, 0x151, 0x153, 0xc000000000, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/cosmos/[email protected]/baseapp/abci.go:229 +0x1ac
github.com/tendermint/tendermint/abci/client.(*localClient).CheckTxAsync(0xc000e534a0, 0xc008bdec60, 0x151, 0x153, 0xc000000000, 0x0)
	github.com/tendermint/[email protected]/abci/client/local_client.go:98 +0xdc

I suspect it doesn't take the already-delegated amount into consideration, such that the code sees the full vested amount as locked, tries to subtract that from my balance (which is now 2/3 of the vested amount), and panics because the remainder is negative.

This may be related to #8601.

Version

Gaia 4.0.4

$ ./build/gaiad version
HEAD-b876ea4366a055e40c252ea5d441e2bea5fb3fa0

Steps to Reproduce

  1. Create a ContinuousVestingAccount with 300 vested ATOM (not sure how this is done), and send 1 free ATOM for fees.

  2. Delegate 100 ATOM to validator A:

gaiad tx staking delegate --from me --chain-id cosmoshub-4 --fees 6000uatom <validatorA> 100000000uatom
  1. Try to delegate 100 ATOM to validator B:
gaiad tx staking delegate --from me --chain-id cosmoshub-4 --fees 6000uatom <validatorB> 100000000uatom
  1. Observe panic message redacted to hide potentially sensitive system info: panic

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

Kudos for being a good steward of decentralization on the hub by supporting multiple validators!

I'm curious of this is a regression or a bug in creating of new vesting accounts on a live chain? IIRC, delegating to multiple validators wasn't an issue with the genesis vesting accounts on hub-1.

@erikgrinaker
Copy link
Contributor Author

erikgrinaker commented Mar 7, 2021

No idea, didn't use vesting accounts on previous versions.

Note that it's not so much a problem with delegating to multiple validators, as it is a bug in fee payments when a vesting account has a delegation. If I understand this correctly, any vesting account that has delegated a larger amount of ATOM than the amount of free (non-locked/vested) ATOMs will be unable to pay fees for any transaction, including sending ATOMs and claiming rewards.

In the example above, with 100 out of 300 vested ATOMs delegated, all fee payments will panic until I transfer 100 additional "free" (unvested) ATOMs into the account such that the amount of free ATOMs is greater than the amount of delegated ATOMs.

@aaronc aaronc added the backlog label Mar 8, 2021
@aaronc aaronc added this to the v0.42.0 milestone Mar 8, 2021
@aaronc
Copy link
Member

aaronc commented Mar 8, 2021

Hmm... this seems concerning, adding it to the backlog.

@alessio
Copy link
Contributor

alessio commented Mar 8, 2021

Removing from the v0.42.0 as this is not a PR and it's a bit late to include a fix in v0.42.0 anyways. But it'd be great to see a patch coming through 🙏

@alessio alessio removed this from the v0.42.0 milestone Mar 8, 2021
@AdityaSripal
Copy link
Member

Agreed with @alexanderbez that this is a regression. I was able to stake to multiple validators with my previous account.

@AdityaSripal
Copy link
Member

AdityaSripal commented Mar 8, 2021

Note that it's not so much a problem with delegating to multiple validators, as it is a bug in fee payments when a vesting account has a delegation. If I understand this correctly, any vesting account that has delegated a larger amount of ATOM than the amount of free (non-locked/vested) ATOMs will be unable to pay fees for any transaction, including sending ATOMs and claiming rewards.

In the example above, with 100 out of 300 vested ATOMs delegated, all fee payments will panic until I transfer 100 additional "free" (unvested) ATOMs into the account such that the amount of free ATOMs is greater than the amount of delegated ATOMs.

This is certainly not how it used to be, nor how the vesting account was originally designed. The vesting account was designed to first delegate its vesting atoms before trying to delegate any free atoms.

So in the case where you have 400 vesting atoms and 100 free atoms, and you choose to delegate 300 atoms. You will have 300 vesting delegated atoms, 100 vesting undelegated atoms, and 100 free atoms. If you choose to vest 450 atoms, you will still have 50 free atoms left.

I would look to see if that logic has changed at all.

@erikgrinaker
Copy link
Contributor Author

Yeah, when I skimmed the code over the weekend it seemed like it calculated the available amount to use for fees like:

available = balance - locked

However, locked did not take into account the delegated amount (possibly due to #8601), so in my previous example it would use locked=300 (the total vested amount), but balance=200 (the undelegated amount remaining in the account). So 200-300=-100 → panic.

@aaronc aaronc added this to the v0.43 milestone Mar 9, 2021
@boz
Copy link
Contributor

boz commented Mar 10, 2021

Note that it's not so much a problem with delegating to multiple validators, as it is a bug in fee payments when a vesting account has a delegation. If I understand this correctly, any vesting account that has delegated a larger amount of ATOM than the amount of free (non-locked/vested) ATOMs will be unable to pay fees for any transaction, including sending ATOMs and claiming rewards.

On a v0.41.4-based chain I am able to claim rewards from a periodic vesting account whose balance is almost entirely vesting/locked tokens.

@alexanderbez alexanderbez self-assigned this Mar 10, 2021
@alexanderbez
Copy link
Contributor

alexanderbez commented Mar 10, 2021

I was not able to reproduce this on master.

I delegated to two validators from both a Continuous vesting account at genesis and from one that I created at runtime.

Maybe we need to try delegating to a second validator w/ fees > spendable coins. I would recommend someone from the SDK picking it up from here. If that is an issue and is reproducible, I would say this has nothing to do with vesting accounts.

@calvinlauyh
Copy link
Contributor

calvinlauyh commented Mar 12, 2021

I am experiencing the same issue on our chain and we are based on v0.42.1

This issue seems to affect all vesting accont types. In my scenario I am using DelayedVestingAccount.

Taking a quick glanace of the code that panic, my speculation is the same as @erikgrinaker

Yeah, when I skimmed the code over the weekend it seemed like it calculated the available amount to use for fees like:

available = balance - locked

However, locked did not take into account the delegated amount (possibly due to #8601), so in my previous example it would use locked=300 (the total vested amount), but balance=200 (the undelegated amount remaining in the account). So 200-300=-100 → panic.

Once an account got into this state, no transactions (including unbonding) could go through and this account is in a "locked" state. One have to wait until the the token are vested before it can resume funds operations.

Steps to Reproduce

  1. Create a DelayedVestingAccount with 300 vested TOKEN, with 10 non-vesting (i.e. immedaite usable) TOKEN (for paying fee).
    • Create a validator with initial delegation of 300 TOKEN or
    • Delegate 300 TOKEN to validator A
  2. Try to send any transaction, the CLI panic and return the error
Error: recovered: negative coin amount
stack:
goroutine 788 [running]:
runtime/debug.Stack(0x18, 0x55ea5a0, 0xc003c098c0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
github.com/cosmos/cosmos-sdk/baseapp.newDefaultRecoveryMiddleware.func1(0x54c14e0, 0x5b44b30, 0x0, 0xc003c98a88)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/recovery.go:71 +0x26
github.com/cosmos/cosmos-sdk/baseapp.newRecoveryMiddleware.func1(0x54c14e0, 0x5b44b30, 0x0, 0x0, 0xc000ede800)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/recovery.go:39 +0x42
github.com/cosmos/cosmos-sdk/baseapp.processRecovery(0x54c14e0, 0x5b44b30, 0xc000ede800, 0x0, 0x0)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/recovery.go:28 +0x43
github.com/cosmos/cosmos-sdk/baseapp.processRecovery(0x54c14e0, 0x5b44b30, 0xc003c098e0, 0x5bc8280, 0xc003b53b40)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/recovery.go:33 +0x7e
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1(0xc003c9c260, 0xc003c9c710, 0xc00103a340, 0xc003c9de58, 0xc003c9de50, 0xc003c9de40)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/baseapp.go:583 +0x170
panic(0x54c14e0, 0x5b44b30)
        /usr/local/go/src/runtime/panic.go:969 +0x175
github.com/cosmos/cosmos-sdk/types.Coin.Sub(0xc003c22808, 0x7, 0xc003c09880, 0xc003c220f0, 0x7, 0xc003c097a0, 0x5bb2f80, 0xc0000440b0, 0x5bc8280)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/types/coin.go:112 +0xf1
github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseSendKeeper.SubtractCoins(0x5bc8980, 0xc000396270, 0x5b93b00, 0xc000f90540, 0x5bca900, 0xc000170510, 0x5bc8980, 0xc000396270, 0x5bca900, 0xc000170510, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/x/bank/keeper/send.go:189 +0x2d0
github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseSendKeeper.SendCoins(0x5bc8980, 0xc000396270, 0x5b93b00, 0xc000f90540, 0x5bca900, 0xc000170510, 0x5bc8980, 0xc000396270, 0x5bca900, 0xc000170510, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/x/bank/keeper/send.go:154 +0x55b
github.com/cosmos/cosmos-sdk/x/bank/keeper.msgServer.Send(0x5bd4920, 0xc000e13e40, 0x5bb3000, 0xc003c42a80, 0xc003b53c00, 0x0, 0x0, 0x0)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/x/bank/keeper/msg_server.go:46 +0x3ad
github.com/cosmos/cosmos-sdk/x/bank.NewHandler.func1(0x5bb2f80, 0xc0000440b0, 0x5bc8280, 0xc003b53d00, 0xb, 0x0, 0xc0038efb30, 0x21, 0x6, 0x1abda460, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/x/bank/handler.go:19 +0x478
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runMsgs(0xc00103a340, 0x5bb2f80, 0xc0000440b0, 0x5bc8280, 0xc003b53d00, 0xb, 0x0, 0xc0038efb30, 0x21, 0x6, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/baseapp.go:720 +0xf18
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0xc00103a340, 0xc003c05702, 0xc00014cc30, 0xc1, 0xc1, 0x0, 0x0, 0x0, 0x0, 0x0)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/baseapp.go:665 +0x445
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Simulate(...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/test_helpers.go:22
github.com/cosmos/cosmos-sdk/x/auth/tx.txServer.Simulate(0x0, 0x0, 0x0, 0x5bd4380, 0xc00329cfa0, 0x0, 0x0, 0x5bbbd00, 0xc000ed84f0, 0x5bbf1e0, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/x/auth/tx/service.go:133 +0x1a3
github.com/cosmos/cosmos-sdk/types/tx._Service_Simulate_Handler(0x566d3c0, 0xc002b67a20, 0x5bb3000, 0xc003c05770, 0xc00377bbd0, 0x0, 0x5bb3000, 0xc003c05770, 0x20, 0xc0038efb30)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/types/tx/service.pb.go:671 +0x214
github.com/cosmos/cosmos-sdk/baseapp.(*GRPCQueryRouter).RegisterService.func1(0x5bb2f80, 0xc0000440b0, 0x5bc8280, 0xc003b53a80, 0xb, 0x0, 0xc0038efb30, 0x21, 0x6, 0x1abda460, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/grpcrouter.go:84 +0x1de
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).handleQueryGRPC(0xc00103a340, 0xc0032ba930, 0xc000c8f380, 0xc4, 0x1a0, 0xc003b71890, 0x23, 0x6, 0x0, 0x0, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/abci.go:562 +0x127
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query(0xc00103a340, 0xc000c8f380, 0xc4, 0x1a0, 0xc003b71890, 0x23, 0x6, 0x0, 0x0, 0x0, ...)
        /Users/hei/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/abci.go:406 +0x8ef
github.com/tendermint/tendermint/abci/client.(*localClient).QuerySync(0xc000f8ad20, 0xc000c8f380, 0xc4, 0x1a0, 0xc003b71890, 0x23, 0x0, 0x0, 0x0, 0x0, ...)
        /Users/hei/go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:250 +0x10e
github.com/tendermint/tendermint/proxy.(*appConnQuery).QuerySync(0xc00107a0b0, 0xc000c8f380, 0xc4, 0x1a0, 0xc003b71890, 0x23, 0x0, 0x0, 0x40dd6a5, 0x54aaee0, ...)
        /Users/hei/go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:159 +0x68
github.com/tendermint/tendermint/rpc/core.ABCIQuery(0xc003b6ba80, 0xc003b71890, 0x23, 0xc000c8f380, 0xc4, 0x1a0, 0x0, 0x0, 0x0, 0x0, ...)
        /Users/hei/go/pkg/mod/github.com/tendermint/[email protected]/rpc/core/abci.go:20 +0x103
reflect.Value.call(0x556d220, 0x59bab60, 0x13, 0x5765ec1, 0x4, 0xc00375fb80, 0x5, 0x5, 0xc00375fb98, 0xc003b699e0, ...)
        /usr/local/go/src/reflect/value.go:475 +0x8c7
reflect.Value.Call(0x556d220, 0x59bab60, 0x13, 0xc00375fb80, 0x5, 0x5, 0x1, 0x5, 0x0)
        /usr/local/go/src/reflect/value.go:336 +0xb9
github.com/tendermint/tendermint/rpc/jsonrpc/server.makeJSONRPCHandler.func1(0x5bac9c0, 0xc003b6ba40, 0xc002b61800)
        /Users/hei/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_json_handler.go:100 +0xa05
github.com/tendermint/tendermint/rpc/jsonrpc/server.handleInvalidJSONRPCPaths.func1(0x5bac9c0, 0xc003b6ba40, 0xc002b61800)
        /Users/hei/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_json_handler.go:124 +0x9c
net/http.HandlerFunc.ServeHTTP(0xc00012bd60, 0x5bac9c0, 0xc003b6ba40, 0xc002b61800)
        /usr/local/go/src/net/http/server.go:2042 +0x44
net/http.(*ServeMux).ServeHTTP(0xc000caf780, 0x5bac9c0, 0xc003b6ba40, 0xc002b61800)
        /usr/local/go/src/net/http/server.go:2417 +0x1ad
github.com/tendermint/tendermint/rpc/jsonrpc/server.maxBytesHandler.ServeHTTP(0x5b77720, 0xc000caf780, 0xf4240, 0x5bac9c0, 0xc003b6ba40, 0xc002b61800)
        /Users/hei/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_server.go:234 +0xd4
github.com/tendermint/tendermint/rpc/jsonrpc/server.RecoverAndLogHandler.func1(0x5bad180, 0xc0038f67e0, 0xc002b61800)
        /Users/hei/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_server.go:207 +0x39a
net/http.HandlerFunc.ServeHTTP(0xc002a435c0, 0x5bad180, 0xc0038f67e0, 0xc002b61800)
        /usr/local/go/src/net/http/server.go:2042 +0x44
net/http.serverHandler.ServeHTTP(0xc00320c000, 0x5bad180, 0xc0038f67e0, 0xc002b61800)
        /usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc000022320, 0x5bb2f40, 0xc000cafb40)
        /usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2969 +0x36c
: panic: invalid request

@aaronc aaronc removed the in progress label Apr 8, 2021
alessio pushed a commit that referenced this issue Apr 8, 2021
… vesting accounts (#8865)

Delegations and undelegations calculations performed during
accounting operations for vesting accounts were correct but
were not written back to the account store.

closes: #8601
closes: #8812

Co-authored-by: Alessio Treglia <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Jonathan Gimeno <[email protected]>
Co-authored-by: Frojdi Dymylja <[email protected]>
Co-authored-by: Adam Bozanich <[email protected]>
Co-authored-by: Amaury <[email protected]>
Co-authored-by: SaReN <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants