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

refactor: faster #1208

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

refactor: faster #1208

wants to merge 12 commits into from

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented Aug 7, 2024

Summary

Make Interchaintest fast like zooooooooooooooomies.
NOTE: this requires PollForProposalStatus delta time to be increased to account for faster blocks (else proposals are still in vote period)

This PR is currently just slop, adding things as I find / can improve

Other

  • Also does a little logger touch up to fix a visual bug

Benchmarks

IBC 6 nodes + relayer

go clean -testcache && go test -timeout 3000s -run ^TestLearn$ github.com/strangelove-ventures/interchaintest/v8/examples/ibc -v

Time to beat:
 - Before this PR: 103.31s
 - With faster blocks (in this PR) & faster relayer polling: 70.39s / 67.03s 
 - Without startup Locks: 60 / 62.8s
 - Misc caches (59 / 61s)

IBC-Go simd (v8.0.0) 1 val, build then exit

Performance checks for fast iteration with docker changes

go clean -testcache && go test -timeout 3000s -run ^TestSingleValBenchmark$ github.com/strangelove-ventures/interchaintest/v8/examples/cosmos -v

Time to beat:
- 11.74s (11.335517782s build)
- 10.45s (faster poll on Status to start)
- 10.14s / 10.02s (cached Exec container)
- 8.85s (cache isSDKv47 genesis call)
- 8.12s (key addressCache, doubles for getting mnemonics from keys created to the keyring directly with CreateKey)

Copy link

vercel bot commented Aug 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
interchaintest-docs ⬜️ Ignored (Inspect) Visit Preview Aug 8, 2024 1:52am

@Reecepbcups
Copy link
Member Author

Reecepbcups commented Aug 7, 2024

Build (including relayer setup) takes 50s of the total 60s test time. If we can speed up the ic.Build we could get test down. May require the pre starting relayer PR (backend wise for chain configs, then start once we have a block 1/2)

Should also see if there is anything we can do rly side to speed up the IBC queries, connections, etc. this seems to be one of the last optimizations I can think of

@Reecepbcups
Copy link
Member Author

#1153 is probably the next big performance improvement. Getting relayers to auto provision for planned testing is ideal, lot of dead time waiting.

We already know the chain configs to chains add, rly keys restore, and rly paths new (config). Then we just rly tx link as soon as the chain is at height capable.

Must allow relayers pre ic.Build() standalone

@Reecepbcups
Copy link
Member Author

Reecepbcups commented Aug 8, 2024

ideas from Andrew:

  • sleep infinite then just exec into the container on start
  • next issue may be docker volumes

@Reecepbcups
Copy link
Member Author

export genesis state after IBC start, then can load back from that in future runs

@Reecepbcups
Copy link
Member Author

I have been taking things from this PR and putting into others as it seems right.

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.

1 participant