-
Notifications
You must be signed in to change notification settings - Fork 667
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
[e2e] Simplify pre-funded key usage #3011
Conversation
d0d2262
to
de1e0c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
aa27154
to
0ba5d07
Compare
Updated to fix an unrelated latent bug that cause the e2e job to fail. |
e872971
to
289678d
Compare
I need to fix the periodic e2e failures introduced by this change. |
This PR has become stale because it has been open for 30 days with no activity. Adding the |
2474cf6
to
c8d8497
Compare
f74a6af
to
4662df7
Compare
Rebased and updated to use explicit change owners for wallets with multiple keys. |
cbbbbb1
to
926742b
Compare
As part of refactoring the e2e tests for reuse in antithesis and load testing, this change simplifies key usage so that tests can be supplied a specific pre-funded key rather than retrieving their own key at runtime. Fund usage is also minimized. It should be possible to run most tests repeatedly for extended periods of time without running out of keys or funds. Previously, pre-funded keys were distributed via an http server to ensure a given key was used by at most a single test. This was intended to ensure compatibility with parallel test execution by guaranteeing that no pre-funded key would ever be used concurrently. Since ginkgo uses process-based parallization, it's sufficient to ensure that each process is allocated a single unique key. The tests assigned to run in a given test process are executed sequentially so a key won't be in danger of concurrent usage. As part of this change, the virtuous test was updated to use one pre-funded key to fund a new set of keys. Previously 10 pre-funded keys were required.
This avoids having a large balance on one key being transfered to a different key by the wallet randomly selecting a key for change output.
926742b
to
6a8f855
Compare
tc.WithDefaultContext(), | ||
) | ||
require.NoError(err) | ||
} | ||
|
||
runFunc := func(round int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: This test looks... Interesting... Should look to see what the use actually is.
Why this should be merged
As part of refactoring the e2e tests for reuse in antithesis and load testing, this change simplifies key usage so that tests can be supplied a specific pre-funded key rather than retrieving their own key at runtime. Fund usage is also minimized . It should be possible to run most tests repeatedly for extended periods of time without running out of keys or funds.
How this works
Previously, pre-funded keys were distributed via an http server to ensure a given key was used by at most a single test. This was intended to ensure compatibility with parallel test execution by guaranteeing that no pre-funded key would ever be used concurrently.
Since ginkgo uses process-based parallization, it's sufficient to ensure that each process is allocated a unique key. The tests assigned to run in a given test process are executed sequentially so a key won't be in danger of concurrent usage.
As part of this change, the virtuous test was updated to use the one funded key to fund a new set of keys. Previously 10 pre-funded keys were required.
How this was tested
CI, local parallel execution