Skip to content

Commit

Permalink
refactor: sync with axon new start commands
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyuanhust committed Sep 26, 2023
1 parent 4205215 commit 1de7ea8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ibc-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
timeout-minutes: 60
env:
SRC_DIR: ${{ github.workspace }}/ibc-test-src
AXON_COMMIT: d03d2bb7cb3dcdc03319c3a74beeee6715e7f448
AXON_COMMIT: 7ae0a826647d07e0b25b4adb440a8c97231d6a04
IBC_CONTRACT_COMMIT: 5746d048304ca4d73dc4800459ddd79d57fa124c
strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $ yarn migrate > migrate.log | tail -f migrate.log
After running `yarn migrate`, the `OwnableIBCHandler` address is listing in console, we record it and mark as **`YOUR_IBC_AXON_ADDRESS`** to use later.

### Contract Deployment on CKB
Detailed deployment steps can be found in [ibc-ckb-contracts](https://github.com/synapseweb3/ibc-ckb-contracts). Alternatively, you can find pre-deployed contracts TYPE_ARGS on both testnet and mainnet:
Detailed deployment steps can be found in [forcerelay-ckb-contracts](https://github.com/synapseweb3/forcerelay-ckb-contracts). Alternatively, you can find pre-deployed contracts TYPE_ARGS on both testnet and mainnet:
||Mainnet|Testnet|
|-|-|-|
|connection|WIP|WIP|
Expand All @@ -58,7 +58,7 @@ Unlike Axon, business modules cannot be registered directly with a contract on C
It's important to note that the IBC port on CKB corresponds to the `LOCK_HASH` of your wallet cell on CKB, which we will refer to as `WALLET_LOCK_HASH` for future use.

### Installation and Setting
We recommand you to download the pre-compiled binary, or you can compile mannully from the source code, which requires `Rust ^v1.72.0` installed:
We recommend you to download the pre-compiled binary, or you can compile mannully from the source code, which requires `Rust ^v1.72.0` installed:

```
$ git clone https://github.com/synapseweb3/forcerelay
Expand Down
25 changes: 20 additions & 5 deletions tools/ibc-test/src/framework/utils/axon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ pub(crate) fn prepare_axon_chain(
// copy configs to working dir
for file in [
"config.toml",
"genesis_single_node.json",
"specs/single_node/chain-spec.toml",
"debug.key",
"default.db-options",
] {
let src_path = axon_src_path.join("devtools/chain").join(file);
Expand All @@ -61,7 +62,8 @@ pub(crate) fn prepare_axon_chain(
}

let chain_config_path = working_dir.join("config.toml");
let genesis_config_path = working_dir.join("genesis_single_node.json");
let chain_spec_path = working_dir.join("specs/single_node/chain-spec.toml");
let key_file_path = working_dir.join("debug.key");

// Modify configs

Expand Down Expand Up @@ -94,14 +96,27 @@ pub(crate) fn prepare_axon_chain(
fs::write(&chain_config_path, config_doc.to_string())
.with_context(|| format!("write config to {:?}", &chain_config_path))?;

// init axon
let init_command = Command::new("axon")

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / test-stable

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (axon, axon, ckb, ckb)

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (axon, axon, ckb, ckb)

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (axon, axon, axon, axon)

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (axon, axon, axon, axon)

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (ckb, ckb, axon, axon)

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (ckb, ckb, axon, axon)

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (ckb, ckb, ckb, ckb)

unused variable: `init_command`

Check warning on line 100 in tools/ibc-test/src/framework/utils/axon.rs

View workflow job for this annotation

GitHub Actions / ibc-test (ckb, ckb, ckb, ckb)

unused variable: `init_command`
.arg("init")
.arg("--config")
.arg(&chain_config_path)
.arg("--chain-spec")
.arg(&chain_spec_path)
.arg("--key-file")
.arg(&key_file_path)
.current_dir(&working_dir)
.stdout(Stdio::null())
.stderr(Stdio::null())
.output()
.expect("axon init fail");

// start process
let chain_process = ChildProcess::new(
Command::new("axon")
.arg("run")
.arg("-c")
.arg("--config")
.arg(&chain_config_path)
.arg("-g")
.arg(&genesis_config_path)
.current_dir(&working_dir)
.stdout(Stdio::null())
.stderr(Stdio::null())
Expand Down

0 comments on commit 1de7ea8

Please sign in to comment.