From 2df08f9b2ed280d686375d469558c0d6c8a51445 Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Wed, 8 May 2024 13:22:32 +0000 Subject: [PATCH] Update export instructions + remove unused script --- .../materializer/scripts/standalone-export.sh | 19 +++---- .../testing/materializer/src/docker/mod.rs | 1 - .../deploy_single_node.sh | 55 ------------------- 3 files changed, 9 insertions(+), 66 deletions(-) delete mode 100644 scripts/deploy_subnet_under_calibration_net/deploy_single_node.sh diff --git a/fendermint/testing/materializer/scripts/standalone-export.sh b/fendermint/testing/materializer/scripts/standalone-export.sh index 85150599c..3ef294489 100755 --- a/fendermint/testing/materializer/scripts/standalone-export.sh +++ b/fendermint/testing/materializer/scripts/standalone-export.sh @@ -41,23 +41,22 @@ rm -rf ~/.fendermint && cp -r out/fendermint ~/.fendermint rm -rf ~/.cometbft && cp -r out/cometbft ~/.cometbft echo "Data exported successfully" - +echo echo "start fendermint eth api" echo source ~/workspace/ipc/fendermint/testing/materializer/scripts/fendermint.env echo ~/workspace/ipc/target/release/fendermint eth run echo -echo "start fendermint" +echo "start fendermint (remember to edit the fendermint.env appropriately)" echo source ~/workspace/ipc/fendermint/testing/materializer/scripts/fendermint.env echo ~/workspace/ipc/target/release/fendermint run echo -echo "start cometbft" +echo "start cometbft (remember to edit the cometbft.env appropriately)" echo cd ~/.cometbft echo source ~/workspace/ipc/fendermint/testing/materializer/scripts/cometbft.env echo cometbft start - - -# query cometbft -# curl http://localhost:26657/status -# -# query fendermint eth api -# curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":0,"method":"eth_chainId","params":[]}' http://localhost:8445 \ No newline at end of file +echo +echo "Once started, you can run the following commands" +echo "Query cometbft:" +echo " curl http://localhost:26657/status" +echo "Query fendermint eth api:" +echo " curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":0,"method":"eth_chainId","params":[]}' http://localhost:8445" diff --git a/fendermint/testing/materializer/src/docker/mod.rs b/fendermint/testing/materializer/src/docker/mod.rs index 58ce24cbd..d1d9fe5fc 100644 --- a/fendermint/testing/materializer/src/docker/mod.rs +++ b/fendermint/testing/materializer/src/docker/mod.rs @@ -617,7 +617,6 @@ impl Materializer for DockerMaterializer { where 's: 'a, { - //todo!("use curl or something to trigger the faucet") Ok(()) } diff --git a/scripts/deploy_subnet_under_calibration_net/deploy_single_node.sh b/scripts/deploy_subnet_under_calibration_net/deploy_single_node.sh deleted file mode 100644 index d3e6d4cc6..000000000 --- a/scripts/deploy_subnet_under_calibration_net/deploy_single_node.sh +++ /dev/null @@ -1,55 +0,0 @@ - - -export FM_NETWORK=test -export GATEWAY=0x47C59245435cfDd7717E974d3A9F9FaE9D01730f -export REGISTRY=0xfF05a6FE75402Fd0828244AfbD591b23e30487c6 - -cd ipc -rm -rf test-network && mkdir test-network -rm -rf ~/.fendermint/ -rm -rf ~/.cometbft -rm -rf .ipc/ - -mkdir -p ~/.fendermint/data -cp -r ./fendermint/app/config ~/.fendermint/config - -# setup wallet -cd scripts/deploy_subnet_under_calibration_net -./prepare_local.sh - -# Single Node -./target/release/ipc-cli subnet create --parent /r314159 --min-validator-stake 0.01 --min-cross-msg-fee 0 --min-validators 0 --bottomup-check-period 50 --permission-mode collateral --supply-source-kind native - -export SUBNET=t410fp7ghvl5hczznloihmmxer3m27ap3iwcvrjj4uaa - -# open ~/.ipc/config.toml and change the subnet id to the one you just created and the gateway and registry to the GATEWAY and REGISTRY -# open ~/.fendermint/config/config.toml and update the ipc and topdown section - -./target/release/ipc-cli subnet join --subnet /r314159/${SUBNET} --collateral 0.02 - -# Fund an address -./target/release/ipc-cli cross-msg fund --subnet /r314159/${SUBNET} 0.01 - -# create genesis -cargo run -p fendermint_app --release -- genesis --genesis-file test-network/genesis.json ipc from-parent -s /r314159/${SUBNET} --parent-endpoint "https://api.calibration.node.glif.io/rpc/v1" --parent-gateway ${GATEWAY} --parent-registry ${REGISTRY} - -# convert private key -cargo run -p fendermint_app --release -- key eth-to-fendermint --secret-key --name alice --out-dir test-network/keys -cargo run -p fendermint_app --release -- key eth-to-fendermint --secret-key /home/admin/secret_key --name alice --out-dir test-network/keys - -# add account to genesis -cargo run -p fendermint_app --release -- \ - genesis --genesis-file test-network/genesis.json \ - add-account --public-key test-network/keys/alice.pk --balance 10 --kind ethereum - -cat test-network/genesis.json - -cargo run -p fendermint_app --release -- \ - genesis --genesis-file test-network/genesis.json \ - into-tendermint --out ~/.cometbft/config/genesis.json - -cargo run -p fendermint_app --release -- \ - key into-tendermint --secret-key test-network/keys/alice.sk --out ~/.cometbft/config/priv_validator_key.json - - -cargo run -p fendermint_app --release -- run \ No newline at end of file