diff --git a/.gitignore b/.gitignore index 619db42d..b4c5ee41 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,6 @@ _build/ mytestnet/ -screenlog.0 \ No newline at end of file +screenlog.0 +.idea +genesis* \ No newline at end of file diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index cf818563..429b706d 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -269,7 +269,13 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appCodec, appKeepers.keys[ibchost.StoreKey], appKeepers.GetSubspace(ibchost.ModuleName), appKeepers.StakingKeeper, appKeepers.UpgradeKeeper, appKeepers.ScopedIBCKeeper, ) - appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasm08types.StoreKey], authorityAddress, homePath, &appKeepers.IBCKeeper.ClientKeeper) + appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper( + appCodec, + appKeepers.keys[wasm08types.StoreKey], + authorityAddress, + homePath, + &appKeepers.IBCKeeper.ClientKeeper, + ) // ICA Host keeper appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper( diff --git a/scripts/relayer_hyperspace/config-chain-a.toml b/scripts/relayer_hyperspace/config-chain-a.toml new file mode 100644 index 00000000..586d8b5a --- /dev/null +++ b/scripts/relayer_hyperspace/config-chain-a.toml @@ -0,0 +1,13 @@ +type = "picasso_kusama" +name = "picasso_dev" +para_id = 2087 +parachain_rpc_url = "ws://127.0.0.1:9988" +relay_chain_rpc_url = "ws://127.0.0.1:9944" +client_id = "08-wasm-0" +connection_id = "connection-0" +commitment_prefix = "0x6962632f" +private_key = "//Alice" +ss58_version = 49 +channel_whitelist = [["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 new file mode 100644 index 00000000..edd5bc81 --- /dev/null +++ b/scripts/relayer_hyperspace/config-chain-b.toml @@ -0,0 +1,20 @@ +type = "cosmos" +name = "centauri" +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" +connection_id = "connection-0" +account_prefix = "centauri" +fee_denom = "ppica" +fee_amount = "10000000000000000" +gas_limit = 9223372036854775806 +store_prefix = "ibc" +max_tx_size = 20000000 +wasm_code_id = "9d5056f2b551213094a03b788db80274445175bae78c8fede38bf25a2ddc84bc" +channel_whitelist = [["channel-0", "transfer"]] +mnemonic = "bottom loan skill merry east cradle onion journey palm apology verb edit desert impose absurd oil bubble sweet glove shallow size build burst effort" +skip_optional_client_updates = false +max_packets_to_process = 50 +skip_tokens_list = [] diff --git a/scripts/relayer_hyperspace/config-core.toml b/scripts/relayer_hyperspace/config-core.toml new file mode 100644 index 00000000..a6bcac3d --- /dev/null +++ b/scripts/relayer_hyperspace/config-core.toml @@ -0,0 +1 @@ +prometheus_endpoint = "https://127.0.0.1" \ No newline at end of file diff --git a/scripts/relayer_hyperspace/config-relayer.toml b/scripts/relayer_hyperspace/config-relayer.toml new file mode 100644 index 00000000..1cad706f --- /dev/null +++ b/scripts/relayer_hyperspace/config-relayer.toml @@ -0,0 +1,15 @@ + +# create client +../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.toml --delay-period 10 + +# # create connection +# ../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.toml --delay-period 1 --port-id transfer --order unordered + +# # create channel +# ../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.toml --delay-period 0 --port-id tranfer --order unordered --version ics20-1 + +# # start relayer +# ../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.toml --delay-period 1 --port-id transfer --order unordered --version ics20-1 + +# # send ibc +# centaurid tx ibc-transfer transfer transfer channel-0 --chain-id test-1 5yNZjX24n2eg7W6EVamaTXNQbWCwchhThEaSWB7V3GRjtHeL 100stake \ No newline at end of file diff --git a/scripts/relayer_hyperspace/start_relayer.sh b/scripts/relayer_hyperspace/start_relayer.sh new file mode 100644 index 00000000..4e2d3e7d --- /dev/null +++ b/scripts/relayer_hyperspace/start_relayer.sh @@ -0,0 +1 @@ +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/testnode.sh b/scripts/testnode.sh index 9b2e76e0..910fe681 100755 --- a/scripts/testnode.sh +++ b/scripts/testnode.sh @@ -57,4 +57,4 @@ fi sed -i'' -e 's/max_body_bytes = /max_body_bytes = 1/g' ~/.banksy/config/config.toml # Start the node (remove the --pruning=nothing flag if historical queries are not needed) -# centaurid start --pruning=nothing --minimum-gas-prices=0.0001ppica --rpc.laddr tcp://0.0.0.0:26657 +centaurid start --pruning=nothing --minimum-gas-prices=0.0001ppica --rpc.laddr tcp://0.0.0.0:26657 diff --git a/scripts/upgrade/08-wasm/post_08_wasm.sh b/scripts/upgrade/08-wasm/post_08_wasm.sh new file mode 100755 index 00000000..ea0bb225 --- /dev/null +++ b/scripts/upgrade/08-wasm/post_08_wasm.sh @@ -0,0 +1,17 @@ +#!/bin/bash +KEY="mykey" +KEYALGO="secp256k1" +KEYRING="test" +HOME_DIR=mytestnet + + +sleep 2 + +checksum=$(./_build/new/centaurid query ibc-wasm checksums --home $HOME_DIR -o json | jq -r '.checksums[0]') + +if ./_build/new/centaurid query ibc-wasm code $checksum --home $HOME_DIR -o json &> /dev/null; then + echo "Code with checksum $checksum exists." +else + echo "Code with checksum $checksum does not exist." +fi + diff --git a/scripts/upgrade/08-wasm/pre_08_wasm.sh b/scripts/upgrade/08-wasm/pre_08_wasm.sh new file mode 100755 index 00000000..e95e0b71 --- /dev/null +++ b/scripts/upgrade/08-wasm/pre_08_wasm.sh @@ -0,0 +1,18 @@ +#!/bin/bash +KEY="mykey" +KEYALGO="secp256k1" +KEYRING="test" +HOME_DIR=mytestnet + + + +# validate dependencies are installed +command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; } + + +stat $(pwd)/contracts/ics10_grandpa_cw.wasm +./_build/old/centaurid tx 08-wasm push-wasm $(pwd)/contracts/ics10_grandpa_cw.wasm --from=mykey --gas 10002152622 --fees 10020166ppica --keyring-backend test --chain-id=test-1 -y + +sleep 3 + +./_build/old/centaurid query 08-wasm all-wasm-code \ No newline at end of file