diff --git a/Makefile b/Makefile index db248b1e..78cf50e9 100644 --- a/Makefile +++ b/Makefile @@ -214,6 +214,7 @@ pica-upgrade: relayer-test-cleanup: @echo "Cleaning up" + @rm -rf mytestnet > /dev/null 2>&1 @killall parachain-node > /dev/null 2>&1 @killall polkadot > /dev/null 2>&1 @./scripts/relayer_hyperspace/cleanup.sh diff --git a/kien-note.md b/kien-note.md deleted file mode 100644 index 417d221b..00000000 --- a/kien-note.md +++ /dev/null @@ -1,57 +0,0 @@ -# Running the test - -## How did i build the `hyperspace` and `cw-grandpa` binaries -Go to the `ComposableFi/composable-ibc`, and building it in the master branch - -https://github.com/ComposableFi/composable-ibc/tree/master/hyperspace - -## How to reproduce the case - -1. Build the `picad` binary -```bash -make install -``` - -2. Run the localnet pica with `wasmClient` deployed -```bash -make localnet-pica -``` - -3. Run the localnet picasso -```bash -make localnet-picasso` -``` - -4. Run create clients -```bash -make relayer-create-clients -``` - - -# Current issue -## Client State decode into 08-wasm -`6981` -### Logging msg at ValidateBasic on cosmos side on v47 -add this log at ValidateBasic() function, at modules/core/02-client/types/msgs/go - -```go -fmt.Printf("msg.ClientState : %v\n", msg.ClientState) -clientState, err := UnpackClientState(msg.ClientState) -if err != nil { - return err -} -``` - -then, i get this value, basically, it says the clientState constructed from hyperspace is `08-wasm` - -``` -msg.ClientState : &Any{TypeUrl:/ibc.lightclients.wasm.v1.ClientState,Value:[10 204 1 10 40 47 105 98 99 46 108 105 103 104 116 99 108 105 101 110 116 115 46 103 114 97 110 100 112 97 46 118 49 46 67 108 105 101 110 116 83 116 97 116 101 18 159 1 10 32 146 240 69 84 49 1 104 67 240 92 67 123 199 101 70 152 115 0 205 47 91 76 8 16 108 92 254 197 173 59 35 206 16 67 24 5 40 2 48 167 16 56 20 66 36 10 32 199 203 131 204 79 173 68 214 92 44 140 240 46 150 66 83 144 154 219 206 75 174 118 245 90 177 194 134 163 255 44 194 16 1 66 36 10 32 20 164 40 156 190 217 24 43 102 84 102 53 144 50 192 109 195 183 142 183 238 104 52 237 95 167 180 159 149 51 85 167 16 1 66 36 10 32 184 160 36 189 114 208 123 150 110 8 135 7 155 93 135 60 197 160 19 53 186 39 222 219 43 141 20 36 169 95 136 128 16 1 18 32 157 80 86 242 181 81 33 48 148 160 59 120 141 184 2 116 68 81 117 186 231 140 143 237 227 139 242 90 45 220 132 188 26 5 8 167 16 16 20],XXX_unrecognized:[]} -``` - - -### Logging it at v50 - -`hyperspace` - -``` -msg.ClientState : &Any{TypeUrl:/ibc.lightclients.grandpa.v1.ClientState,Value:[10 32 106 46 120 116 154 178 37 115 118 3 65 47 241 205 37 168 10 129 250 125 20 121 236 81 77 119 185 185 155 72 122 11 16 17 40 2 48 167 16 56 1 66 36 10 32 199 203 131 204 79 173 68 214 92 44 140 240 46 150 66 83 144 154 219 206 75 174 118 245 90 177 194 134 163 255 44 194 16 1 66 36 10 32 20 164 40 156 190 217 24 43 102 84 102 53 144 50 192 109 195 183 142 183 238 104 52 237 95 167 180 159 149 51 85 167 16 1 66 36 10 32 184 160 36 189 114 208 123 150 110 8 135 7 155 93 135 60 197 160 19 53 186 39 222 219 43 141 20 36 169 95 136 128 16 1 66 36 10 32 140 4 179 243 122 62 235 12 208 118 154 107 153 87 196 106 60 118 44 155 224 91 89 26 250 8 121 224 61 159 194 212 16 1],XXX_unrecognized:[]} diff --git a/scripts/50/migrate-wasm-code.sh b/scripts/50/migrate-wasm-code.sh index 5fec7112..8d08175e 100755 --- a/scripts/50/migrate-wasm-code.sh +++ b/scripts/50/migrate-wasm-code.sh @@ -4,7 +4,7 @@ DENOM="ppica" HOME_DIR="mytestnet" CHAINID="centauri-dev" BINARY=_build/new/picad -WASM_CONTRACT_PATH="$PWD/bin/ics10_grandpa_cw.wasm" +WASM_CONTRACT_PATH="composable-ibc/target/wasm32-unknown-unknown/release/ics10_grandpa_cw.wasm" WASM_CLIENT_ID="08-wasm-0" HEX_CHECKSUM=$(sha256sum "$WASM_CONTRACT_PATH" | awk '{ print $1 }') diff --git a/scripts/50/store-wasm-code.sh b/scripts/50/store-wasm-code.sh index f6b15802..c7e795f6 100755 --- a/scripts/50/store-wasm-code.sh +++ b/scripts/50/store-wasm-code.sh @@ -4,12 +4,17 @@ DENOM="ppica" HOME_DIR="mytestnet" CHAINID="centauri-dev" BINARY=picad -WASM_CONTRACT_PATH="/home/kien6034/notional/composable-ibc/target/wasm32-unknown-unknown/release/ics10_grandpa_cw.wasm" +WASM_CONTRACT_PATH="composable-ibc/target/wasm32-unknown-unknown/release/ics10_grandpa_cw.wasm" + +HEX_CHECKSUM=$(sha256sum "$WASM_CONTRACT_PATH" | awk '{ print $1 }') +echo "Hex checksum is: $HEX_CHECKSUM" + # Wait for chain to start echo "Waiting for chain to start..." sleep 10 +exit 0 picad keys show mykey --keyring-backend test --home mytestnet $BINARY tx ibc-wasm store-code $WASM_CONTRACT_PATH --from mykey --keyring-backend test --chain-id $CHAINID --home $HOME_DIR --gas 20002152622 --fees 20020166${DENOM} -y diff --git a/scripts/relayer_hyperspace/config-chain-a.toml b/scripts/relayer_hyperspace/config-chain-a.toml index 7ae746d5..fd1a2cfe 100644 --- a/scripts/relayer_hyperspace/config-chain-a.toml +++ b/scripts/relayer_hyperspace/config-chain-a.toml @@ -8,6 +8,6 @@ connection_id = "connection-0" commitment_prefix = "0x6962632f" private_key = "//Alice" ss58_version = 49 -channel_whitelist = [["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"]] +channel_whitelist = [["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"]] finality_protocol = "Grandpa" key_type = "sr25519" diff --git a/scripts/relayer_hyperspace/config-chain-b.toml b/scripts/relayer_hyperspace/config-chain-b.toml index e349c70c..c3267377 100644 --- a/scripts/relayer_hyperspace/config-chain-b.toml +++ b/scripts/relayer_hyperspace/config-chain-b.toml @@ -4,7 +4,7 @@ rpc_url = "http://127.0.0.1:26657/" grpc_url = "http://127.0.0.1:9090/" websocket_url = "ws://127.0.0.1:26657/websocket" chain_id = "centauri-dev" -client_id = "07-tendermint-0" +client_id = "07-tendermint-1" connection_id = "connection-0" account_prefix = "pica" fee_denom = "ppica" @@ -12,8 +12,8 @@ fee_amount = "9223372036854776" gas_limit = 9223372036854775806 store_prefix = "ibc" max_tx_size = 20000000 -wasm_checksum = "e2597825980ba38dd6263fcdd15503f0832067570d341de819fbc9f77f390d5a" -channel_whitelist = [["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"]] +wasm_checksum = "2499377e7b99e1b621f980ffc2f6a9322742717c7ede1bf7c97235440450fffe" +channel_whitelist = [["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"]] mnemonic = "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" skip_optional_client_updates = false max_packets_to_process = 50 diff --git a/scripts/relayer_hyperspace/create-channel.sh b/scripts/relayer_hyperspace/create-channel.sh index bf11e563..4733fe41 100755 --- a/scripts/relayer_hyperspace/create-channel.sh +++ b/scripts/relayer_hyperspace/create-channel.sh @@ -1,2 +1,2 @@ -RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info /home/kien6034/notional/composable-ibc/target/release/hyperspace create-channel --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 --port-id transfer --version ics20-1 --order unordered \ No newline at end of file +RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info composable-ibc/target/release/hyperspace create-channel --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 --port-id transfer --version ics20-1 --order unordered \ No newline at end of file diff --git a/scripts/relayer_hyperspace/create-clients.sh b/scripts/relayer_hyperspace/create-clients.sh index 67a264c6..5c68b93c 100755 --- a/scripts/relayer_hyperspace/create-clients.sh +++ b/scripts/relayer_hyperspace/create-clients.sh @@ -1,2 +1,2 @@ -RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info /home/kien6034/notional/composable-ibc/target/release/hyperspace create-clients --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 \ No newline at end of file +RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info composable-ibc/target/release/hyperspace create-clients --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 \ No newline at end of file diff --git a/scripts/relayer_hyperspace/create-connections.sh b/scripts/relayer_hyperspace/create-connections.sh index e64c340c..6fbdcc6f 100755 --- a/scripts/relayer_hyperspace/create-connections.sh +++ b/scripts/relayer_hyperspace/create-connections.sh @@ -1 +1 @@ -RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info /home/kien6034/notional/composable-ibc/target/release/hyperspace create-connection --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 \ No newline at end of file +RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info composable-ibc/target/release/hyperspace create-connection --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 \ No newline at end of file diff --git a/scripts/relayer_hyperspace/start-relay.sh b/scripts/relayer_hyperspace/start-relay.sh index 784df00b..52847f68 100755 --- a/scripts/relayer_hyperspace/start-relay.sh +++ b/scripts/relayer_hyperspace/start-relay.sh @@ -1,2 +1,2 @@ -RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info /home/kien6034/notional/composable-ibc/target/release/hyperspace relay --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 \ No newline at end of file +RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info composable-ibc/target/release/hyperspace relay --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 \ No newline at end of file diff --git a/scripts/relayer_hyperspace/v47/create-clients.sh b/scripts/relayer_hyperspace/v47/create-clients.sh index 8f18af59..2b00778d 100755 --- a/scripts/relayer_hyperspace/v47/create-clients.sh +++ b/scripts/relayer_hyperspace/v47/create-clients.sh @@ -1,2 +1,2 @@ -RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info /home/kien6034/notional/composable-ibc-old/bin/hyperspace create-clients --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 +RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info composable-ibc/target/release/hyperspace create-clients --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 diff --git a/scripts/relayer_hyperspace/v47/create-connection.sh b/scripts/relayer_hyperspace/v47/create-connection.sh index 3463b74a..e0df8b25 100755 --- a/scripts/relayer_hyperspace/v47/create-connection.sh +++ b/scripts/relayer_hyperspace/v47/create-connection.sh @@ -1,2 +1,2 @@ -RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info /home/kien6034/notional/composable-ibc-old/bin/hyperspace create-connection --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 +RUST_LOG=hyperspace_cosmos=trace,hyperspace=trace,info composable-ibc/bin/hyperspace create-connection --config-a scripts/relayer_hyperspace/config-chain-a.toml --config-b scripts/relayer_hyperspace/config-chain-b.toml --config-core scripts/relayer_hyperspace/config-core.toml --delay-period 10 diff --git a/test b/test deleted file mode 100644 index 4acfcdd4..00000000 --- a/test +++ /dev/null @@ -1 +0,0 @@ -Error: status: Unknown, message: "recovered: unimplementedstack:\ngoroutine 745 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/cosmos/cosmos-sdk/baseapp.NewBaseApp.newDefaultRecoveryMiddleware.func5({0x2bd4ae0, 0x3b03910})\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/recovery.go:74 +0x25\ngithub.com/cosmos/cosmos-sdk/baseapp.NewBaseApp.newDefaultRecoveryMiddleware.newRecoveryMiddleware.func7({0x2bd4ae0?, 0x3b03910?})\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/recovery.go:42 +0x2d\ngithub.com/cosmos/cosmos-sdk/baseapp.processRecovery({0x2bd4ae0, 0x3b03910}, 0x0?)\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/recovery.go:31 +0x2f\ngithub.com/cosmos/cosmos-sdk/baseapp.processRecovery({0x2bd4ae0, 0x3b03910}, 0x0?)\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/recovery.go:36 +0x53\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1()\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/baseapp.go:836 +0x156\npanic({0x2bd4ae0?, 0x3b03910?})\n\truntime/panic.go:770 +0x132\ngithub.com/cosmos/ibc-go/v8/modules/light-clients/10-grandpa.(*ClientState).Validate(0xc000c9b500?)\n\tgithub.com/cosmos/ibc-go/v8@v8.1.1/modules/light-clients/10-grandpa/client_state.go:24 +0x25\ngithub.com/cosmos/ibc-go/v8/modules/core/02-client/types.MsgCreateClient.ValidateBasic({0xc000c9b500?, 0xc000c9b560?, {0xc00112b800?, 0xc002610600?}})\n\tgithub.com/cosmos/ibc-go/v8@v8.1.1/modules/core/02-client/types/msgs.go:73 +0x11f\ngithub.com/cosmos/cosmos-sdk/baseapp.validateBasicTxMsgs({0xc000c89730?, 0x263?, 0x280?})\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/baseapp.go:625 +0x86\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0xc001bbe248, 0x2, {0xc0010cf680, 0x263, 0x280})\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/baseapp.go:873 +0x326\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Simulate(...)\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/test_helpers.go:28\ngithub.com/cosmos/cosmos-sdk/x/auth/tx.txServer.Simulate({{{0x0, 0x0, 0x0}, {0x3b68088, 0xc00166d920}, 0x0, {0xc001168bd0, 0xc}, {0x3b861c0, 0xc0012a3c20}, ...}, ...}, ...)\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/x/auth/tx/service.go:98 +0x12c\ngithub.com/cosmos/cosmos-sdk/types/tx._Service_Simulate_Handler.func1({0x3b43da0?, 0xc001328f60?}, {0x30a28e0?, 0xc007946500?})\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/types/tx/service.pb.go:1443 +0xcb\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func1({0x3b43da0, 0xc0010ba5a0}, {0x30a28e0, 0xc007946500}, 0xc0014a5830?, 0xc0071e5188)\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/grpcserver.go:70 +0x458\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func2.ChainUnaryServer.2.1({0x3b43da0?, 0xc0010ba5a0?}, {0x30a28e0?, 0xc007946500?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:48 +0x45\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1({0x3b43da0?, 0xc0010ba5a0?}, {0x30a28e0?, 0xc007946500?}, 0x0?, 0xc0071e5188?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/recovery/interceptors.go:33 +0xb0\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func2.ChainUnaryServer.2({0x3b43da0, 0xc0010ba5a0}, {0x30a28e0, 0xc007946500}, 0xc007946540, 0x28?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:53 +0x123\ngithub.com/cosmos/cosmos-sdk/types/tx._Service_Simulate_Handler({0x306f1e0, 0xc000e9c000}, {0x3b43da0, 0xc0010ba5a0}, 0xc00072ab80, 0xc0010ba5d0)\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/types/tx/service.pb.go:1445 +0x143\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func2({0x306f1e0, 0xc000e9c000}, {0x3b43da0, 0xc0010ba5a0}, 0xc00072ab80, 0xc001b08120?)\n\tgithub.com/cosmos/cosmos-sdk@v0.50.5/baseapp/grpcserver.go:84 +0x112\ngoogle.golang.org/grpc.(*Server).processUnaryRPC(0xc0016fa800, {0x3b43da0, 0xc0051e54d0}, {0x3b5cd40, 0xc0017e21a0}, 0xc001b08120, 0xc000d03860, 0xc000fb81c0, 0x0)\n\tgoogle.golang.org/grpc@v1.62.1/server.go:1386 +0xdf8\ngoogle.golang.org/grpc.(*Server).handleStream(0xc0016fa800, {0x3b5cd40, 0xc0017e21a0}, 0xc001b08120)\n\tgoogle.golang.org/grpc@v1.62.1/server.go:1797 +0xe87\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1()\n\tgoogle.golang.org/grpc@v1.62.1/server.go:1027 +0x8b\ncreated by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 761\n\tgoogle.golang.org/grpc@v1.62.1/server.go:1038 +0x125\n: panic [cosmos/cosmos-sdk@v0.50.5/baseapp/recovery.go:72] with gas used: '1174'", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "x-cosmos-block-height": "42"} } \ No newline at end of file