-
Notifications
You must be signed in to change notification settings - Fork 715
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
Dedupe secp256k1 key usage in tests #2511
Conversation
vms/avm/environment_test.go
Outdated
@@ -70,22 +69,16 @@ var ( | |||
chainID = ids.ID{5, 4, 3, 2, 1} | |||
assetID = ids.ID{1, 2, 3} | |||
|
|||
keys []*secp256k1.PrivateKey | |||
keys = secp256k1.TestKeys()[:3] |
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.
I don't love this but a lot of the avm tests rely on this being size 3
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.
added a TODO
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.
I wonder why we use hard-coded test keys/having this test function instead of just generating new ones with NewPrivateKey
commit 7a0dfda Author: Joshua Kim <[email protected]> Date: Tue Dec 12 03:29:47 2023 -0500 testing structs Signed-off-by: Joshua Kim <[email protected]> commit 58d2779 Author: Dhruba Basu <[email protected]> Date: Tue Dec 19 14:01:16 2023 -0500 Dedupe secp256k1 key usage in tests (#2511) commit 6c64372 Author: Dhruba Basu <[email protected]> Date: Tue Dec 19 11:45:58 2023 -0500 Remove unused `AcceptorTracker` struct (#2508) commit 7a9bdad Author: Dhruba Basu <[email protected]> Date: Tue Dec 19 10:44:20 2023 -0500 Remove unused `BuildGenesisTest` function (#2503) commit 44d71db Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 18 19:05:26 2023 -0500 Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#2502) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Stephen Buttolph <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stephen Buttolph <[email protected]> commit aa764bb Author: Alberto Benegiamo <[email protected]> Date: Mon Dec 18 16:00:17 2023 -0700 Drop Pending Stakers 5 - validated PostDurango StakerTxs (#2314) Co-authored-by: Stephen Buttolph <[email protected]> Co-authored-by: dhrubabasu <[email protected]> Signed-off-by: Joshua Kim <[email protected]>
commit 7a0dfda Author: Joshua Kim <[email protected]> Date: Tue Dec 12 03:29:47 2023 -0500 testing structs Signed-off-by: Joshua Kim <[email protected]> commit 58d2779 Author: Dhruba Basu <[email protected]> Date: Tue Dec 19 14:01:16 2023 -0500 Dedupe secp256k1 key usage in tests (#2511) commit 6c64372 Author: Dhruba Basu <[email protected]> Date: Tue Dec 19 11:45:58 2023 -0500 Remove unused `AcceptorTracker` struct (#2508) commit 7a9bdad Author: Dhruba Basu <[email protected]> Date: Tue Dec 19 10:44:20 2023 -0500 Remove unused `BuildGenesisTest` function (#2503) commit 44d71db Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 18 19:05:26 2023 -0500 Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#2502) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Stephen Buttolph <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stephen Buttolph <[email protected]> commit aa764bb Author: Alberto Benegiamo <[email protected]> Date: Mon Dec 18 16:00:17 2023 -0700 Drop Pending Stakers 5 - validated PostDurango StakerTxs (#2314) Co-authored-by: Stephen Buttolph <[email protected]> Co-authored-by: dhrubabasu <[email protected]> Signed-off-by: Joshua Kim <[email protected]>
Co-authored-by: Stephen <[email protected]>
Why this should be merged
De-dupes code
How this works
use existing
secp256k1.TestKeys()
helper function: https://github.com/ava-labs/avalanchego/blob/dev/utils/crypto/secp256k1/test_keys.goHow this was tested
CI