Skip to content

feat: IBC test framework support Axon#308

Merged
jjyr merged 17 commits intodevfrom
test-ibc-framework-axon-chain-driver-rebased
Aug 31, 2023
Merged

feat: IBC test framework support Axon#308
jjyr merged 17 commits intodevfrom
test-ibc-framework-axon-chain-driver-rebased

Conversation

@jjyr
Copy link
Copy Markdown
Collaborator

@jjyr jjyr commented Aug 23, 2023

  1. Rename ckb4ibc-test to ibc-test, make IBC tests ignorance the underlayer chains.
  2. Support Axon chain in ibc-test
  3. IBC tests README

Known issues:

  1. there are some error output of ibc-tests, the reason is the ibc supervisor consist watching the two chains, but we do not fully implement the CKB relayer.

@jjyr jjyr changed the base branch from main to dev August 23, 2023 09:11
@jjyr jjyr linked an issue Aug 23, 2023 that may be closed by this pull request
@jjyr jjyr requested review from a team, ashuralyk and blckngm August 23, 2023 09:15
@jjyr jjyr marked this pull request as ready for review August 23, 2023 09:46
@ashuralyk
Copy link
Copy Markdown
Contributor

this PR will trigger conflicts with #305, please take a look on it

@Flouse Flouse requested a review from 15168316096 August 24, 2023 04:16
@jjyr jjyr force-pushed the test-ibc-framework-axon-chain-driver-rebased branch 2 times, most recently from 409647b to e4981d7 Compare August 24, 2023 07:57
@jjyr jjyr force-pushed the test-ibc-framework-axon-chain-driver-rebased branch from e4981d7 to d31d3ce Compare August 24, 2023 08:44
@jjyr jjyr force-pushed the test-ibc-framework-axon-chain-driver-rebased branch 3 times, most recently from e7a7293 to dacd98d Compare August 24, 2023 13:36
@jjyr jjyr force-pushed the test-ibc-framework-axon-chain-driver-rebased branch from dacd98d to d93ffc4 Compare August 24, 2023 13:48
Comment thread .github/workflows/ibc-test.yaml
Comment thread .github/workflows/ibc-test.yaml Outdated
Comment thread tools/ibc-test/src/tests/channel.rs
Comment thread tools/ibc-test/README.md
@jjyr jjyr force-pushed the test-ibc-framework-axon-chain-driver-rebased branch from fcfec7d to f5d3a1e Compare August 25, 2023 08:45
@jjyr jjyr force-pushed the test-ibc-framework-axon-chain-driver-rebased branch 5 times, most recently from bf7f32a to 2cdae79 Compare August 27, 2023 07:43
@jjyr jjyr force-pushed the test-ibc-framework-axon-chain-driver-rebased branch from 2cdae79 to b617802 Compare August 27, 2023 09:26
Comment on lines +132 to +142
impl AxonChain {
fn contract(&self) -> Result<Contract, Error> {
let key_entry = self
.keybase
.get_key(&self.config.key_name)
.map_err(Error::key_base)?;
let wallet = key_entry.into_ether_wallet().with_chain_id(self.chain_id);
let client = Arc::new(SignerMiddleware::new(self.client.clone(), wallet));
let contract = Contract::new(self.config.contract_address, Arc::clone(&client));
Ok(contract)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why have to move generation of solidity contract instance out of bootstrap?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IBC test-framework add keys after the node bootstrap. So if we initial the solidity contract in bootstrap, it will raise an error since the key hasn't been added.

Comment on lines +108 to +112
ChainType::Ckb => {
// CKB only allow h256 as portId
let mut buf = [0u8; 32];
buf[..8].copy_from_slice(b"transfer");
PortId::from_str(H256::from(buf).to_string().as_str()).unwrap()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in real packet test case of ckb, port_id should always be the lock_hash of business owners, but leaves this away until merging the next PR can fix it automatically

prefix.to_string()
};
let private_key = {
let data = hex::decode("37aa0f893d05914a4def0460c0a984d3611546cfb26924d7a7ca6e0db9950a2d")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why choose this private key?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is copied from the old test, if we change the key the deploy transaction becames invalid.

@jjyr jjyr added this pull request to the merge queue Aug 31, 2023
Merged via the queue into dev with commit 6e26faa Aug 31, 2023
@ashuralyk ashuralyk deleted the test-ibc-framework-axon-chain-driver-rebased branch September 3, 2023 00:31
@ashuralyk ashuralyk changed the title IBC test framework support Axon feat: IBC test framework support Axon Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upgrade CI ckb4ibc-test to adapt relay feature between Axon and Ckb

3 participants