Skip to content

Commit

Permalink
Updated instructions for regenerating test data
Browse files Browse the repository at this point in the history
  • Loading branch information
misko9 committed Sep 14, 2023
1 parent 01757b9 commit aaaab5a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions modules/light-clients/08-wasm/test_data/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Note: this is a general outline of the process and the actions to take are depen

1. Make your code changes
2. Build local docker images for the e2e test with all modifications
1. ibc-go-simd
1. ibc-go-simd (from local repo)
1. heighliner build -c ibc-go-simd -g local --local
2. hyperspace
1. Repo: ComposableFi/centauri
2. Commit: fce2d6303cc111c8b5f2aa47b2fba3dc61a79bf2
2. PR: gh pr checkout 388
3. Build local Hyperspace docker from centauri repo:
4. amd64: "docker build -f scripts/hyperspace.Dockerfile -t hyperspace:local ."
5. arm64: "docker build -f scripts/hyperspace.aarch64.Dockerfile -t hyperspace:latest --platform=linux/arm64/v8 .
5. arm64: "docker build -f scripts/hyperspace.aarch64.Dockerfile -t hyperspace:local --platform=linux/arm64/v8 .
3. parachain
1. Repo: ComposableFi/centauri
2. Commit: fce2d6303cc111c8b5f2aa47b2fba3dc61a79bf2
2. PR: gh pr checkout 388
3. Build local parachain docker from centauri repo:
4. ./scripts/build-parachain-node-docker.sh (you can change the script to compile for ARM arch if needed)
4. polkadot
Expand All @@ -26,12 +26,11 @@ Note: this is a general outline of the process and the actions to take are depen
6. arm64: docker build --platform linux/arm64 -f scripts/ci/dockerfiles/polkadot/polkadot_builder.aarch64.Dockerfile . -t polkadot-node:local
3. If needed, build new ics10_grandpa_cw.wasm and place in examples/polkadot of interchaintest
1. RUSTFLAGS='-C link-arg=-s' cargo build -p ics10-grandpa-cw --target=wasm32-unknown-unknown --release --lib
4. Run hyperspace interchaintest
1. Use this commit from strangelove-ventures/interchaintest: f02d3adab099e360f81bfd25f3429f69209d6660
2. From the hyperspace_test.go file, make sure the version/tags of ibc-go-simd, hyperspace, parachain, and polkadot match what you used.
3. go test -v -timeout 20m -run ^TestHyperspace$ examples/hyperspace/hyperspace_test.go -count=1
4. Run hyperspace interchaintest (main branch)
1. From the hyperspace_test.go file, make sure the version/tags of ibc-go-simd, hyperspace, parachain, and polkadot match what you used. They are currently set to the defaults.
2. go test -v -timeout 20m -run ^TestHyperspace$ examples/hyperspace/hyperspace_test.go -count=1
5. Test should pass, if not, it needs to be fixed
6. The output will include the ibc-go-simd exported state with the height it was taken at. Pull the exported state into the wasm light client's genesis json (optionally, format it nicely). Warning, it is large.
6. The genesis.json test_data file will be generated on a successful run and needs to be replaced. The new file will be located at examples/hyperspace/exported_state.json. The exported state is not taken from the latest height, but from a height before the last few update clients. We will use those update clients that aren't included in data.json.
7. Open a SQLite brower with ~/.interchaintest/databases/block.db, execute: "SELECT test_case_name, chain_id, block_height, msg_n, type, raw FROM v_cosmos_messages WHERE test_case_id=(SELECT MAX(id) from test_case);". You will pull various base64 encoded strings from these messages along with other data like heights the message/states are associated with.
8. Populate data.json and update test cases, for example:
1. TestVerifyMembershipGrandpa
Expand Down

0 comments on commit aaaab5a

Please sign in to comment.