Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multichain-testing: noble forwarding capabilities #10384

Merged
merged 5 commits into from
Nov 4, 2024
Merged

Conversation

0xpatrickdev
Copy link
Member

@0xpatrickdev 0xpatrickdev commented Nov 1, 2024

closes: #10221
closes: #10222

Description

  • new starship config for fast-usdc (includes noble@7.0.0)
  • adds noble-tools: registerForwardingAcct(channelId, address), queryForwardingAddress(channelId, address), mockCctpMint(amount, address) and corresponding tests
  • separates Orchestation API tests (yarn test:main) from Fast USDC tests (yarn test:fast-usdc) via separate ava configs
  • 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

@0xpatrickdev
Copy link
Member Author

0xpatrickdev commented Nov 1, 2024

Following the README:

## Start Chains
Runs agoric, noble, and osmosis with hermes relayers.
```sh
# start starship with fusdc configuration
make start FILE=config.fusdc.yaml
```
## Run Tests
```sh
yarn test:fast-usdc
```

yarn test:fast-usdc

{
  maxRetries: 6,
  retryIntervalMs: 3500,
  message: 'agoric1x3a66cjvhaskzhj9uzuchw5vrnuvggagxs5wed received forwarded funds from noble'
}
Retry 1/6 - Waiting for 3500ms for agoric1x3a66cjvhaskzhj9uzuchw5vrnuvggagxs5wed received forwarded funds from noble...
  ✔ noble forwarding (5.4s)
    ℹ Made agoric wallet: agoric1x3a66cjvhaskzhj9uzuchw5vrnuvggagxs5wed
    ℹ Found noble->agoric channelId in vstorage: channel-1
    ℹ Registering forwarding account for channel-1 agoric1x3a66cjvhaskzhj9uzuchw5vrnuvggagxs5wed...
    ℹ Register forwarding account tx: {
        code: 0,
        height: '4087',
        txhash: '575DC6447E34A20F86401475612AD6430F86DEC7667ED2A5D9FBAC2400E53D02',
      }
    ℹ Got forwarding address: noble1pjp3g0fsml74p7r5c23ttufwwsgdpe5r4kn3e9
    ℹ Initiating mock cctp mint for 10000000 uusdc to noble1pjp3g0fsml74p7r5c23ttufwwsgdpe5r4kn3e9...
    ℹ Mocked CCTP Mint tx: {
        code: 0,
        height: '4088',
        txhash: '82B72B045895F994C13C9AE1D6C031E9E8B03396A337BDCA5F57520DC8021B4D',
      }
    ℹ Sleeping for 3500ms...
    ℹ Received forwarded funds from noble: [
        {
          amount: '10000000',
          denom: 'ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5',
        },
      ]
    ℹ Expected denom hash: 8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5
  ─

  1 test passed

And in CI: https://github.com/Agoric/agoric-sdk/actions/runs/11671097069/job/32496771932?pr=10384#step:12:1

Copy link

cloudflare-workers-and-pages bot commented Nov 1, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: de0f11b
Status: ✅  Deploy successful!
Preview URL: https://ebc8b73e.agoric-sdk.pages.dev
Branch Preview URL: https://pc-starship-noble.agoric-sdk.pages.dev

View logs

@0xpatrickdev 0xpatrickdev force-pushed the pc/starship-noble branch 2 times, most recently from f27ebfe to a4ee6a6 Compare November 4, 2024 17:56
@0xpatrickdev 0xpatrickdev added the force:integration Force integration tests to run on PR label Nov 4, 2024
@0xpatrickdev 0xpatrickdev force-pushed the pc/starship-noble branch 2 times, most recently from 680d604 to 11b34c6 Compare November 4, 2024 18:45
- bumps starship helm chart to version that includes `noble` chain
@0xpatrickdev 0xpatrickdev force-pushed the pc/starship-noble branch 2 times, most recently from 9f996fc to 18468f8 Compare November 4, 2024 19:55
@0xpatrickdev 0xpatrickdev marked this pull request as ready for review November 4, 2024 19:56
@0xpatrickdev 0xpatrickdev requested a review from a team as a code owner November 4, 2024 19:56
@0xpatrickdev 0xpatrickdev requested review from thams and turadg and removed request for thams November 4, 2024 19:56
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Thanks for timing CI and noting that since it's parallel it won't increase time to green.

uses: ./.github/workflows/multichain-e2e-template.yml
with:
config: config.yaml
test_command: test
Copy link
Member

Choose a reason for hiding this comment

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

thanks for DRYING two cases.

please name this default case so each case has a name. from reading further down I would suggest,

Suggested change
test_command: test
test_command: test:main

ts: 'module',
},
require: ['@endo/init/debug.js'],
nodeArguments: ['--import=tsimp/import'],
Copy link
Member

Choose a reason for hiding this comment

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

fyi, tsimp is on the way out #10325

@@ -8,7 +8,8 @@
"lint:eslint": "eslint .",
"lint:types": "tsc --noEmit",
"lint-fix": "yarn lint:eslint --fix",
"test": "ava",
"test": "ava --config ava.main.config.js",
Copy link
Member

Choose a reason for hiding this comment

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

test could test both configs. or it could echo instructions on how to test, since it's a long slow test

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. I went with an echo since we can't run test:main at the same time as test:fast-usdc (one config's port assignments will step on the other's with the current approach).

$ yarn test
Run specific test suites:
yarn test:main (needs `make start`)
yarn test:fast-usdc (needs `make start FILE=config.fusdc.yaml`)

Comment on lines 10 to 13
export type UseChainFn = Awaited<
ReturnType<ReturnType<typeof makeSetupRegistry>>
>['useChain'];

Copy link
Member

Choose a reason for hiding this comment

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

most of this is for:

Suggested change
export type UseChainFn = Awaited<
ReturnType<ReturnType<typeof makeSetupRegistry>>
>['useChain'];
export type MultichainRegistry = Awaited<
ReturnType<ReturnType<typeof makeSetupRegistry>>
>;

Then instead of UseChainFn, MultichainRegistry['useChain']

@0xpatrickdev 0xpatrickdev added the automerge:rebase Automatically rebase updates, then merge label Nov 4, 2024
@mergify mergify bot merged commit e58c081 into master Nov 4, 2024
81 checks passed
@mergify mergify bot deleted the pc/starship-noble branch November 4, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate CCTP Integrate noble in starship (requires upstream changes to starship helm chart)
2 participants