-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multichain-testing: noble forwarding capabilities (#10384)
closes: #10221 closes: #10222 ## Description - [x] new starship config for `fast-usdc` (includes `[email protected]`) - [x] adds noble-tools: `registerForwardingAcct(channelId, address)`, `queryForwardingAddress(channelId, address)`, `mockCctpMint(amount, address)` and corresponding tests - [x] separates Orchestation API tests (`yarn test`) from Fast USDC tests (`yarn test:fast-usdc`) via separate ava configs - [x] github workflow / test in ci ### Security Considerations None, test code that uses existing dependencies ### Scaling Considerations Adds another 20min+ `multichain-testing` CI job, but runs it in parallel ### Documentation Considerations Includes docs for `fast-usdc` developers ### Testing Considerations Includes tests of `noble-tools.ts` ### Upgrade Considerations N/A, test code
- Loading branch information
Showing
16 changed files
with
511 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: Multichain E2E Workflow Template | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
config: | ||
required: true | ||
type: string | ||
test_command: | ||
required: true | ||
type: string | ||
description: 'Test command to run (e.g., "test:main" or "test:fast-usdc")' | ||
|
||
jobs: | ||
multichain-e2e: | ||
runs-on: ubuntu-latest-16core | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
path: ./agoric-sdk | ||
|
||
- uses: ./agoric-sdk/.github/actions/restore-node | ||
with: | ||
node-version: 18.x | ||
path: ./agoric-sdk | ||
|
||
# Extract chain and relayer information | ||
- name: Extract config information | ||
id: extract-config | ||
run: | | ||
# Create logs directory | ||
mkdir -p ./agoric-sdk/multichain-testing/logs | ||
# Extract namespace name | ||
NAMESPACE=$(yq e '.name' ./agoric-sdk/multichain-testing/${{ inputs.config }}) | ||
echo "NAMESPACE=${NAMESPACE}" >> $GITHUB_ENV | ||
# Build validator pod names (chainid-genesis-0) | ||
VALIDATOR_PODS=$(yq e '.chains[] | .id + "-genesis-0"' ./agoric-sdk/multichain-testing/${{ inputs.config }} | tr '\n' ' ') | ||
echo "VALIDATOR_PODS=${VALIDATOR_PODS}" >> $GITHUB_ENV | ||
# Build relayer pod names (type-name-0) | ||
RELAYER_PODS=$(yq e '.relayers[] | .type + "-" + .name + "-0"' ./agoric-sdk/multichain-testing/${{ inputs.config }} | tr '\n' ' ') | ||
echo "RELAYER_PODS=${RELAYER_PODS}" >> $GITHUB_ENV | ||
# For debugging | ||
echo "Namespace: ${NAMESPACE}" | ||
echo "Validator pods: ${VALIDATOR_PODS}" | ||
echo "Relayer pods: ${RELAYER_PODS}" | ||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "/home/runner/bin" >> $GITHUB_PATH | ||
working-directory: ./agoric-sdk | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Install @agoric/multichain-testing deps | ||
run: yarn install | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Lint @agoric/multichain-testing | ||
run: yarn lint | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Setup Starship Infrastructure | ||
id: starship-infra | ||
uses: cosmology-tech/[email protected] | ||
with: | ||
values: ./agoric-sdk/multichain-testing/${{ inputs.config }} | ||
port-forward: true | ||
version: 0.2.20 | ||
timeout: 30m | ||
namespace: ${{ env.NAMESPACE }} | ||
|
||
- name: Fund Provision Pool | ||
run: | | ||
kubectl config set-context --current --namespace=${NAMESPACE} | ||
kubectl get pods | ||
make fund-provision-pool | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Override Chain Registry | ||
run: make override-chain-registry | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Run @agoric/multichain-testing E2E Tests | ||
run: yarn ${{ inputs.test_command }} | ||
working-directory: ./agoric-sdk/multichain-testing | ||
env: | ||
FILE: ${{ inputs.config }} | ||
|
||
- name: Capture validator logs | ||
if: always() | ||
run: | | ||
for pod in ${VALIDATOR_PODS}; do | ||
echo "Capturing validator logs for ${pod}" | ||
kubectl logs ${pod} --container=validator > ./agoric-sdk/multichain-testing/logs/${pod}.log 2>&1 || true | ||
done | ||
working-directory: ./agoric-sdk | ||
|
||
- name: Capture relayer logs | ||
if: always() | ||
run: | | ||
for pod in ${RELAYER_PODS}; do | ||
echo "Capturing relayer logs for ${pod}" | ||
kubectl logs ${pod} --container=relayer > ./agoric-sdk/multichain-testing/logs/${pod}.log 2>&1 || true | ||
done | ||
working-directory: ./agoric-sdk | ||
|
||
- name: Upload test logs | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: multichain-e2e-logs-${NAMESPACE} | ||
path: ./agoric-sdk/multichain-testing/logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,81 +5,16 @@ on: | |
workflow_call: | ||
|
||
jobs: | ||
multichain-e2e: | ||
runs-on: ubuntu-latest-16core | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
path: ./agoric-sdk | ||
- uses: ./agoric-sdk/.github/actions/restore-node | ||
with: | ||
node-version: 18.x | ||
path: ./agoric-sdk | ||
|
||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "/home/runner/bin" >> $GITHUB_PATH | ||
working-directory: ./agoric-sdk | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Install @agoric/multichain-testing deps | ||
run: yarn install | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Lint @agoric/multichain-testing | ||
run: yarn lint | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Setup Starship Infrastructure | ||
id: starship-infra | ||
uses: cosmology-tech/[email protected] | ||
with: | ||
# uses ghcr.io/agoric/agoric-sdk:dev image (latest master) | ||
values: ./agoric-sdk/multichain-testing/config.yaml | ||
port-forward: true | ||
version: 0.2.10 | ||
timeout: 30m | ||
namespace: agoric-multichain | ||
|
||
- name: Fund Provision Pool | ||
run: | | ||
kubectl config set-context --current --namespace=agoric-multichain | ||
kubectl get pods | ||
make fund-provision-pool | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Ensure ports are forwarded | ||
run: | | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:26657/status || (echo "agoriclocal node is available") | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:8081/chains/agoriclocal || (echo "agoriclocal URL check failed") | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:8081/chains/osmosislocal || (echo "osmosislocal URL check failed") | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:8081/chains/gaialocal || (echo "gaialocal URL check failed") | ||
- name: Override Chain Registry | ||
run: make override-chain-registry | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Run @agoric/multichain-testing E2E Tests | ||
run: yarn test | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Capture and print agoric validator logs | ||
if: always() | ||
run: kubectl logs agoriclocal-genesis-0 --container=validator || true | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Capture and print agoric-osmosis relayer logs | ||
if: always() | ||
run: kubectl logs hermes-agoric-osmosis-0 --container=relayer || true | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Capture and print agoric-cosmos relayer logs | ||
if: always() | ||
run: kubectl logs hermes-agoric-gaia-0 --container=relayer || true | ||
working-directory: ./agoric-sdk/multichain-testing | ||
orchestration-api-test: | ||
name: Multichain E2E (Orchestration API) | ||
uses: ./.github/workflows/multichain-e2e-template.yml | ||
with: | ||
config: config.yaml | ||
test_command: test:main | ||
|
||
fast-usdc-test: | ||
name: Multichain E2E (Fast USDC) | ||
uses: ./.github/workflows/multichain-e2e-template.yml | ||
with: | ||
config: config.fusdc.yaml | ||
test_command: test:fast-usdc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default { | ||
extensions: { | ||
ts: 'module', | ||
}, | ||
require: ['@endo/init/debug.js'], | ||
nodeArguments: ['--import=tsimp/import'], | ||
files: ['test/fast-usdc/**/*.test.ts'], | ||
concurrency: 1, | ||
serial: true, | ||
timeout: '125s', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default { | ||
extensions: { | ||
ts: 'module', | ||
}, | ||
require: ['@endo/init/debug.js'], | ||
nodeArguments: ['--import=tsimp/import'], | ||
files: ['test/**/*.test.ts', '!test/fast-usdc/**/*.test.ts'], | ||
concurrency: 1, | ||
serial: true, | ||
timeout: '125s', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: agoric-multichain-testing-fusdc | ||
version: 0.2.20 | ||
|
||
chains: | ||
- id: agoriclocal | ||
name: agoric | ||
image: ghcr.io/agoric/agoric-sdk:dev | ||
numValidators: 1 | ||
env: | ||
- name: DEBUG | ||
value: SwingSet:vat,SwingSet:ls | ||
genesis: | ||
app_state: | ||
staking: | ||
params: | ||
unbonding_time: '2m' | ||
swingset: | ||
params: | ||
bootstrap_vat_config: '@agoric/vm-config/decentral-itest-orchestration-config.json' | ||
scripts: | ||
updateConfig: | ||
file: scripts/update-config.sh | ||
faucet: | ||
enabled: false | ||
ports: | ||
rest: 1317 | ||
rpc: 26657 | ||
exposer: 38087 | ||
grpc: 9090 | ||
resources: | ||
cpu: 1 | ||
memory: 4Gi | ||
- id: osmosislocal | ||
name: osmosis | ||
numValidators: 1 | ||
genesis: | ||
app_state: | ||
staking: | ||
params: | ||
unbonding_time: '2m' | ||
interchain_accounts: | ||
host_genesis_state: | ||
params: | ||
host_enabled: true | ||
allow_messages: ['*'] | ||
interchainquery: | ||
host_port: 'icqhost' | ||
params: | ||
host_enabled: true | ||
allow_queries: | ||
- /cosmos.bank.v1beta1.Query/Balance | ||
- /cosmos.bank.v1beta1.Query/AllBalances | ||
faucet: | ||
enabled: true | ||
type: starship | ||
ports: | ||
rest: 1315 | ||
rpc: 26655 | ||
grpc: 9093 | ||
faucet: 8084 | ||
resources: | ||
cpu: 1 | ||
memory: 1Gi | ||
- id: noblelocal | ||
name: noble | ||
numValidators: 1 | ||
genesis: | ||
app_state: | ||
staking: | ||
params: | ||
unbonding_time: '2m' | ||
faucet: | ||
enabled: true | ||
type: starship | ||
ports: | ||
rest: 1314 | ||
rpc: 26654 | ||
grpc: 9092 | ||
faucet: 8083 | ||
resources: | ||
cpu: 1 | ||
memory: 1Gi | ||
|
||
relayers: | ||
- name: osmosis-noble | ||
type: hermes | ||
replicas: 1 | ||
chains: | ||
- osmosislocal | ||
- noblelocal | ||
- name: agoric-osmosis | ||
type: hermes | ||
replicas: 1 | ||
chains: | ||
- agoriclocal | ||
- osmosislocal | ||
- name: agoric-noble | ||
type: hermes | ||
replicas: 1 | ||
chains: | ||
- agoriclocal | ||
- noblelocal | ||
|
||
explorer: | ||
enabled: false | ||
|
||
registry: | ||
enabled: true | ||
ports: | ||
rest: 8081 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
name: agoric-multichain-testing | ||
version: 0.2.20 | ||
|
||
chains: | ||
- id: agoriclocal | ||
name: agoric | ||
|
Oops, something went wrong.