Skip to content

Commit

Permalink
tilt: sdk-ci-tests default maxWorkers=50%
Browse files Browse the repository at this point in the history
cosmwasm(cw_wormhole): integration tests- initial implementation

chore: adding additional vaa parsing tests

cosmwasm: added cw_wormhole integration tests and some code cleanup

cosmwasm: reverted contract changes

Update 0012_ibc_generic_messaging.md with permissionless channel creation information (#4167)

The `wormhole-ibc-receiver` contract contains an allowlist of Wormhole chain ID to channel mappings (other side of Cosmos chain). The allowlist is not used when receiving a packet because we don't want to handle the case of a token transfer failure on the other side. Instead, we just emit the message and ignore it in the IBC watcher. I am just updating the documentation to reflect this.

node: governor token list update

tilt: aptos multi-platform support

tilt: sui multi-platform support

tilt: node multi-platform support

tilt: solana-test-validator multi-platform support

tilt: smaller sui image

Add coin gecko pro API usage for the governor (#4025)

* Add coin gecko pro API usage for the governor

* Add in missing parameter for node test

* Fix missing parameter in publicrpcserver_test.go

* Add in NIT fixes

* Change CLI description

* Reorder error message so that the important part is not truncated in the logs

* Remove network test from unit test. Plan on creating a Github action cron action for this instead

* Remove unnecessary '&' from URL path

* Add in new parameters for gov from rebase

* Fix regression on query creation

* Add coin gecko pro API usage for the governor

* Add in NIT fixes

* Remove network test from unit test. Plan on creating a Github action cron action for this instead

---------

Co-authored-by: Maxwell Dulin <[email protected]>
Co-authored-by: Maxwell Dulin <[email protected]>

node: add amazon kms and benchmark signers (#4168)

* add kms and benchmark signers

* include context during guardiansigner calls

* add error counters and address review comment

* address pr comments

* address pr comments

---------

Co-authored-by: pleasew8t <[email protected]>

wormchain: add ibc_receiver_test and ict workflow (#4155)

Update CODEOWNERS (#4151)

sdk: worldchain mainnet SR entry. (#4188)

cosmwasm: refactored the to guardianAddress logic

wormchain: lower ict setup params to improve stability
  • Loading branch information
evan-gray authored and kakucodes committed Dec 18, 2024
1 parent b6e4cab commit d1817ba
Show file tree
Hide file tree
Showing 74 changed files with 4,599 additions and 1,842 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/solana/ @kcsongor @a5-pickle
/sui/ @kcsongor @a5-pickle @gator-boi
/terra/ @kcsongor @a5-pickle
/wormchain/ @nik-suri @johnsaigle @mdulin2 @jtieri
/wormchain/ @nik-suri @johnsaigle @mdulin2 @joelsmith-2019

# Utilities

Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/wormchain-icts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Wormchain's end-to-end Interchain Tests

on:
pull_request:
push:
tags:
- "**"
branches:
- "main"

permissions:
contents: read
packages: write

env:
GO_VERSION: 1.21

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
e2e-tests:
runs-on: ubuntu-latest
strategy:
matrix:
# names of `make` commands to run tests
test:
- "ictest-cancel-upgrade"
- "ictest-upgrade"
- "ictest-wormchain"
- "ictest-ibc-receiver"
fail-fast: false

steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum

- name: checkout chain
uses: actions/checkout@v4

- name: Run Test
id: run_test
continue-on-error: true
working-directory: wormchain
run: make ${{ matrix.test }}

- name: Retry Failed Test
if: steps.run_test.outcome == 'failure'
working-directory: wormchain
run: |
for i in 1 2; do
echo "Retry attempt $i"
if make ${{ matrix.test }}; then
echo "Test passed on retry"
exit 0
fi
done
echo "Test failed after retries"
exit 1
15 changes: 6 additions & 9 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ update_settings(max_parallel_updates = 10)
# Runtime configuration
config.define_bool("ci", False, "We are running in CI")
config.define_bool("manual", False, "Set TRIGGER_MODE_MANUAL by default")
config.define_bool("m1", False, "Use this flag for M-series Macs (e.g. use an arm64 solana-test-validator due to AVX requirement)")

config.define_string("num", False, "Number of guardian nodes to run")
config.define_string("maxWorkers", False, "Maximum number of workers for sdk-ci-tests. See https://jestjs.io/docs/cli#--maxworkersnumstring")

# You do not usually need to set this argument - this argument is for debugging only. If you do use a different
# namespace, note that the "wormhole" namespace is hardcoded in tests and don't forget specifying the argument
Expand Down Expand Up @@ -78,6 +78,7 @@ config.define_bool("query_server", False, "Enable cross-chain query server")

cfg = config.parse()
num_guardians = int(cfg.get("num", "1"))
max_workers = cfg.get("maxWorkers", "50%")
namespace = cfg.get("namespace", "wormhole")
webHost = cfg.get("webHost", "localhost")
ci = cfg.get("ci", False)
Expand All @@ -101,7 +102,6 @@ btc = cfg.get("btc", False)
redis = cfg.get('redis', ci)
generic_relayer = cfg.get("generic_relayer", ci)
query_server = cfg.get("query_server", ci)
m1 = cfg.get("m1", False)

if ci:
guardiand_loglevel = cfg.get("guardiand_loglevel", "warn")
Expand Down Expand Up @@ -487,15 +487,10 @@ if solana or pythnet:

# solana local devnet

build_args = {}
if m1:
build_args = {"BASE_IMAGE": "ghcr.io/wormholelabs-xyz/solana-test-validator-m1:1.17.29@sha256:c5a43c0762f2dab4873a9e632a389029b6d5f706be7dfb89a42a66cc65a3dd24"}

docker_build(
ref = "solana-test-validator",
context = "solana",
dockerfile = "solana/Dockerfile.test-validator",
build_args = build_args
)

k8s_yaml_with_ns("devnet/solana-devnet.yaml")
Expand Down Expand Up @@ -644,8 +639,10 @@ if ci_tests:
k8s_yaml_with_ns(
encode_yaml_stream(
set_env_in_jobs(
set_env_in_jobs(read_yaml_stream("devnet/tests.yaml"), "NUM_GUARDIANS", str(num_guardians)),
"BOOTSTRAP_PEERS", str(ccqBootstrapPeers)))
set_env_in_jobs(
set_env_in_jobs(read_yaml_stream("devnet/tests.yaml"), "NUM_GUARDIANS", str(num_guardians)),
"BOOTSTRAP_PEERS", str(ccqBootstrapPeers)),
"MAX_WORKERS", max_workers))
)

# separate resources to parallelize docker builds
Expand Down
13 changes: 8 additions & 5 deletions aptos/Docker.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# first build the image
# build the image and tag it appropriately

<!-- cspell:disable-next-line -->
(cd ..; DOCKER_BUILDKIT=1 docker buildx build --platform linux/amd64 -f aptos/Dockerfile.base -t aptos .)
<!-- cspell:disable -->

# tag the image with the appropriate version
```bash
cd .. && docker buildx build --platform linux/amd64,linux/arm64 -f aptos/Dockerfile.base -t ghcr.io/wormhole-foundation/aptos:3.1.0 .
```

docker tag aptos:latest ghcr.io/wormhole-foundation/aptos:3.1.0
<!-- cspell:enable -->

# push to ghcr

```bash
docker push ghcr.io/wormhole-foundation/aptos:3.1.0
```
2 changes: 1 addition & 1 deletion aptos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM cli-gen AS cli-export
FROM const-gen AS const-export
FROM ghcr.io/wormhole-foundation/aptos:3.1.0@sha256:c359f25cd6b2cd9edb2634504756a3b179cd416fd73fda59f66c48168e3b69da as aptos
FROM ghcr.io/wormhole-foundation/aptos:3.1.0@sha256:f66c2b5fea4a75050d051a5260ef643f52f5048d473877f1760be39d9e460d6b AS aptos

# Install nodejs
# todo(aki): move this into base image?
Expand Down
4 changes: 2 additions & 2 deletions aptos/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.62@sha256:5777f201f507075309c4d2d1c1e8d8219e654ae1de154c844341050016a64a0c as aptos-node
FROM rust:1.62@sha256:2cd5c8517d0640bd287b2cfb4c0e62f1a8ed86174764d88280bc2a106d6835db AS aptos-node

RUN apt-get update && apt-get -y install libclang-dev libudev-dev libdw-dev jq cmake curl npm gcc g++ make lld

Expand All @@ -11,5 +11,5 @@ WORKDIR /tmp/aptos-core
RUN git reset --hard 6f83bc6d02207298b2dee91133d75538789bf582
RUN cargo build -p aptos --profile cli

FROM rust:1.62@sha256:5777f201f507075309c4d2d1c1e8d8219e654ae1de154c844341050016a64a0c as export-stage
FROM rust:1.62@sha256:2cd5c8517d0640bd287b2cfb4c0e62f1a8ed86174764d88280bc2a106d6835db AS export-stage
COPY --from=aptos-node /tmp/aptos-core/target/cli/aptos /usr/local/cargo/bin/aptos
61 changes: 57 additions & 4 deletions cosmwasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmwasm/contracts/global-accountant/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ wormhole-sdk = { workspace = true, features = ["schemars"] }

[dev-dependencies]
anyhow = { version = "1", features = ["backtrace"] }
cw-multi-test = "0.13.2"
cw-multi-test = "0.14"
serde-json-wasm = "0.4"
wormhole-bindings = { version = "0.1", features = ["fake"] }
2 changes: 1 addition & 1 deletion cosmwasm/contracts/ntt-global-accountant/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ wormhole-sdk = { workspace = true, features = ["schemars"] }

[dev-dependencies]
anyhow = { version = "1", features = ["backtrace"] }
cw-multi-test = "0.13.2"
cw-multi-test = "0.14"
serde-json-wasm = "0.4"
wormhole-bindings = { version = "0.1", features = ["fake"] }
2 changes: 1 addition & 1 deletion cosmwasm/contracts/wormchain-ibc-receiver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ wormhole-sdk = { workspace = true, features = ["schemars"] }
serde_wormhole.workspace = true

[dev-dependencies]
cw-multi-test = "0.13.2"
cw-multi-test = "0.14"
serde-json-wasm = "0.4"
wormhole-bindings = { version = "0.1.0", features=["fake"] }
serde = { version = "1.0.137", default-features = false, features = ["derive"] }
9 changes: 9 additions & 0 deletions cosmwasm/contracts/wormhole/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ k256 = { version = "0.11", default-features = false, features = ["ecdsa"] }
sha3 = { version = "0.9.1", default-features = false }
generic-array = { version = "0.14.4" }
hex = "0.4.2"

[dev-dependencies]
cw-multi-test = "0.14"
serde_wormhole.workspace = true
wormhole-sdk.workspace = true
wormhole-bindings = { version = "0.1", features = ["fake"] }
tiny-keccak = { version = "2.0", features = ["keccak"] }
serde-json-wasm = "0.4"
wormchain-ibc-receiver = { path = "../wormchain-ibc-receiver" }
Loading

0 comments on commit d1817ba

Please sign in to comment.