Closed arirubinstein closed 1 year ago
The Go panic comes from a bridge message VBANK_GET_MODULE_ACCOUNT_ADDRESS
naming something that isn't a module account. The Swingset side seems to generate that request only for vbank/reserve
and vbank/provision
, which app.go
seems to think are module addresses. Strange. I'll see if something has changed since upgrade-9
.
The address is fine as a module address, but the underlying account was created as a normal account. Presumably this happened by transferring funds into the provision account, since it's exempted from the usual prohibition of transferring external funds into a module account. We specifically exclude it from the list of blocked addresses: https://github.com/Agoric/agoric-sdk/blob/35e5e303bf8d98a8c2fe4a0815bafe8ff00317b5/golang/cosmos/app/app.go#L914
@raphdev verified this in the reproduction scenario, and we can see the offending transfer: https://github.com/Agoric/docker-upgrade-test/blob/46a021460f9d503a28465ea18172510f6d1defaf/ut_chainsetup_from.sh#L7
However, the test should stay as-is, as this premature account creation seems to have happened on mainnet:
$ agd query auth module-account vbank/provision --chain-id agoric-3 --node https://main.rpc.agoric.net:443
Error: rpc error: code = Unknown desc = account is not a module account: panic
...
$ agd query auth account agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346 --chain-id agoric-3 --node https://main.rpc.agoric.net:443
'@type': /cosmos.auth.v1beta1.BaseAccount
account_number: "59646"
address: agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346
pub_key: null
sequence: "0"
Note that @michaelfig predicted this yesterday.
I'll modify the upgrade handler to convert the account type for the provision account.
Shortly after the agoric-upgrade-10 upgrade handler is run, the chain panics with the following output:
To Reproduce:
git clone git@github.com:Agoric/docker-upgrade-test.git && cd docker-upgrade-test
docker build .
docker run --expose 26656 --expose 26657 --rm -it <image_id_from_step_2>