--- tags: game-of-chains --- # Malicious binary testing, round 1 ## Settings ### Provider binary gaiad + ICS v0.2.1 https://github.com/smarshall-spitzbart/gaia/commit/f729517a4a231a02172df6763c2ffed0524a2804 ### Consumer binary interchain-security-cd malicious-binary branch https://github.com/cosmos/interchain-security/commit/830218cebff472dba3c6ee62b1773ecc9defeae3 ## Results Consumer chain failed on startup ### Cosmovisor log ``` Dec 01 20:52:01 dante-usdc-test-consumer systemd[1]: Started cosmovisor. Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: 8:52PM INF Configuration is valid: Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: Configurable Values: Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: DAEMON_HOME: /home/slasher/.slasher Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: DAEMON_NAME: interchain-security-cd Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: DAEMON_ALLOW_DOWNLOAD_BINARIES: true Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: DAEMON_RESTART_AFTER_UPGRADE: true Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: DAEMON_POLL_INTERVAL: 300ms Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: UNSAFE_SKIP_BACKUP: true Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: DAEMON_PREUPGRADE_MAX_RETRIES: 0 Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: Derived Values: Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: Root Dir: /home/slasher/.slasher/cosmovisor Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: Upgrade Dir: /home/slasher/.slasher/cosmovisor/upgrades Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: Genesis Bin: /home/slasher/.slasher/cosmovisor/genesis/bin/interchain-security-cd Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: Monitored File: /home/slasher/.slasher/data/upgrade-info.json Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: module=cosmovisor Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: 8:52PM INF running app args=["start","--x-crisis-skip-assert-invariants","--home","/home/slasher/.slasher"] module=cosmovisor path=/home/slasher/.slasher/cosmovisor/genesis/bin/interchain-security-cd Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237831]: 8:52PM ERR failed to read error="lstat /home/slasher/.slasher/cosmovisor/current/upgrade-info.json: no such file or directory" filename=/home/slasher/.slasher/cosmovisor/current/upgrade-info.json module=cosmovisor Dec 01 20:52:01 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF starting node with ABCI Tendermint in-process Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start impl=multiAppConn module=proxy msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start connection=query impl=localClient module=abci-client msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start connection=snapshot impl=localClient module=abci-client msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start connection=mempool impl=localClient module=abci-client msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start connection=consensus impl=localClient module=abci-client msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start impl=EventBus module=events msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start impl=PubSub module=pubsub msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF service start impl=IndexerService module=txindex msg={} Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version= Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF created new capability module=ibc name=ports/transfer Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF port binded module=x/ibc/port port=transfer Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: 8:52PM INF claimed capability capability=1 module=transfer name=ports/transfer Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: panic: unknown field "pending_slash_requests" in types.GenesisState Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: goroutine 1 [running]: Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/cosmos-sdk/codec.(*ProtoCodec).MustUnmarshalJSON(0x2321af0?, {0xc000c7a000?, 0x17cdaa1?, 0x45?}, {0x2303bc8?, 0xc0001d1e60?}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.12-0.20221116140330-9c145c827001/codec/proto_codec.go:178 +0x45 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/interchain-security/x/ccv/consumer.AppModule.InitGenesis({{}, {{0x22f7410, 0xc000e388f0}, {0x2316490, 0xc000cf9cf0}, {{0x2316490, 0xc000cf9cf0}, 0xc0000b8f48, {0x22f7410, 0xc000e38870}, ...}, ...}}, ...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/chain-repo/x/ccv/consumer/module.go:138 +0xa2 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(_, {{0x2309f20, 0xc0000c8000}, {0x2317fe0, 0xc0004e2a40}, {{0x0, 0x0}, {0xc0004e6bb9, 0x7}, 0x0, ...}, ...}, ...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.12-0.20221116140330-9c145c827001/types/module/module.go:327 +0x29d Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/interchain-security/app/consumer.(*App).InitChainer(_, {{0x2309f20, 0xc0000c8000}, {0x2317fe0, 0xc0004e2a40}, {{0x0, 0x0}, {0xc0004e6bb9, 0x7}, 0x0, ...}, ...}, ...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/chain-repo/app/consumer/app.go:576 +0x20e Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc0003b1180, {{0x1aa89e8a, 0xedb1b493a, 0x0}, {0xc0004e6bb9, 0x7}, 0xc000e7e240, {0x306e1d0, 0x0, 0x0}, ...}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.12-0.20221116140330-9c145c827001/baseapp/abci.go:63 +0x455 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc0001a7140, {{0x1aa89e8a, 0xedb1b493a, 0x0}, {0xc0004e6bb9, 0x7}, 0xc000e7e240, {0x306e1d0, 0x0, 0x0}, ...}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/tendermint/tendermint@v0.34.23/abci/client/local_client.go:272 +0x118 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0x0?, {{0x1aa89e8a, 0xedb1b493a, 0x0}, {0xc0004e6bb9, 0x7}, 0xc000e7e240, {0x306e1d0, 0x0, 0x0}, ...}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/tendermint/tendermint@v0.34.23/proxy/app_conn.go:77 +0x55 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0x1a25e84, 0x7}}, {0xc0004e6bb9, 0x7}, 0x1, 0x0, {{0x0, ...}, ...}, ...}, ...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/tendermint/tendermint@v0.34.23/consensus/replay.go:319 +0xd78 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc000ea3d40, {0x23189a8, 0xc0000b7ba0}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/tendermint/tendermint@v0.34.23/consensus/replay.go:268 +0x3d4 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/tendermint/tendermint/node.doHandshake({_, _}, {{{0xb, 0x0}, {0x1a25e84, 0x7}}, {0xc0004e6bb9, 0x7}, 0x1, 0x0, ...}, ...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/tendermint/tendermint@v0.34.23/node/node.go:329 +0x1b8 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/tendermint/tendermint/node.NewNode(0xc0001f92c0, {0x2306c58, 0xc000d5bae0}, 0xc000e39c30, {0x22f26c0, 0xc000013860}, 0x0?, 0x0?, 0xc000e39e40, {0x230ac78, ...}, ...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/tendermint/tendermint@v0.34.23/node/node.go:777 +0x597 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/cosmos-sdk/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x23232e8, 0xc000d3fc80}, {0xc000cb5348, 0x7}, {0x230ed70, 0xc000cf9cf0}, ...}, ...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.12-0.20221116140330-9c145c827001/server/start.go:280 +0x7db Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc0003d5b00?, {0xc000d3f5f0?, 0x0?, 0x3?}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.12-0.20221116140330-9c145c827001/server/start.go:128 +0x169 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/spf13/cobra.(*Command).execute(0xc0003d5b00, {0xc000d3f560, 0x3, 0x3}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/spf13/cobra@v1.6.0/command.go:916 +0x862 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/spf13/cobra.(*Command).ExecuteC(0xc0001e8300) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/spf13/cobra@v1.6.0/command.go:1040 +0x3bd Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/spf13/cobra.(*Command).Execute(...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/spf13/cobra@v1.6.0/command.go:968 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/spf13/cobra.(*Command).ExecuteContext(...) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/spf13/cobra@v1.6.0/command.go:961 Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x21000f0?, {0xc0005015f0, 0x24}) Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.12-0.20221116140330-9c145c827001/server/cmd/execute.go:36 +0x1eb Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: main.main() Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237837]: /home/slasher/chain-repo/cmd/interchain-security-cd/main.go:23 +0x7d Dec 01 20:52:02 dante-usdc-test-consumer cosmovisor[237831]: 8:52PM ERR error="exit status 2" module=cosmovisor Dec 01 20:52:02 dante-usdc-test-consumer systemd[1]: cv-slasher.service: Main process exited, code=exited, status=1/FAILURE Dec 01 20:52:02 dante-usdc-test-consumer systemd[1]: cv-slasher.service: Failed with result 'exit-code'. ``` ### CCV state from provider chain ``` { "params": { "enabled": true, "blocks_per_distribution_transmission": "1000", "distribution_transmission_channel": "", "provider_fee_pool_addr_str": "", "ccv_timeout_period": "2419200s", "transfer_timeout_period": "3600s", "consumer_redistribution_fraction": "0.75", "historical_entries": "10000", "unbonding_period": "1728000s" }, "provider_client_id": "", "provider_channel_id": "", "new_chain": true, "provider_client_state": { "chain_id": "provider", "trust_level": { "numerator": "1", "denominator": "3" }, "trusting_period": "0.500s", "unbonding_period": "1s", "max_clock_drift": "10s", "frozen_height": { "revision_number": "0", "revision_height": "0" }, "latest_height": { "revision_number": "0", "revision_height": "365136" }, "proof_specs": [ { "leaf_spec": { "hash": "SHA256", "prehash_key": "NO_HASH", "prehash_value": "SHA256", "length": "VAR_PROTO", "prefix": "AA==" }, "inner_spec": { "child_order": [ 0, 1 ], "child_size": 33, "min_prefix_length": 4, "max_prefix_length": 12, "empty_child": null, "hash": "SHA256" }, "max_depth": 0, "min_depth": 0 }, { "leaf_spec": { "hash": "SHA256", "prehash_key": "NO_HASH", "prehash_value": "SHA256", "length": "VAR_PROTO", "prefix": "AA==" }, "inner_spec": { "child_order": [ 0, 1 ], "child_size": 32, "min_prefix_length": 1, "max_prefix_length": 1, "empty_child": null, "hash": "SHA256" }, "max_depth": 0, "min_depth": 0 } ], "upgrade_path": [ "upgrade", "upgradedIBCState" ], "allow_update_after_expiry": true, "allow_update_after_misbehaviour": true }, "provider_consensus_state": { "timestamp": "2022-12-02T01:49:34.060709366Z", "root": { "hash": "/ptZpl4TqM4N/Uzk+JoSTpwFceIHcDBuuIvpv5kFo8U=" }, "next_validators_hash": "1970FE0E8CC0698AF8D31F2A28B73B6500CAF7480DB8024E730AAA0CE4B8D77D" }, "maturing_packets": [], "initial_val_set": [ <A BUNCH OF VALIDATORS> ], "height_to_valset_update_id": [], "outstanding_downtime_slashing": [], "pending_slash_requests": { "requests": [] } } ``` ### ccv from consumer genesis after being initialized: ``` "ccvconsumer": { "params": { "enabled": false, "blocks_per_distribution_transmission": "1000", "distribution_transmission_channel": "", "provider_fee_pool_addr_str": "", "ccv_timeout_period": "2419200s", "transfer_timeout_period": "3600s", "consumer_redistribution_fraction": "0.75", "historical_entries": "10000", "unbonding_period": "1728000s" }, "provider_client_id": "", "provider_channel_id": "", "new_chain": false, "provider_client_state": null, "provider_consensus_state": null, "maturing_packets": [], "initial_val_set": [], "height_to_valset_update_id": [], "outstanding_downtime_slashing": [], "pending_consumer_packets": { "list": [] }, "last_transmission_block_height": { "height": "0" } }, ```