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

Use global secp256k1 context for tests #12339

Merged
merged 6 commits into from
Nov 8, 2024

Conversation

Jonatan-Chaverri
Copy link
Contributor

Closes #12260

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I think we want to use the global context for all of these fns because even the signing context still does new randomization

@@ -20,7 +20,7 @@ alloy-consensus.workspace = true
alloy-eips.workspace = true

rand.workspace = true
secp256k1 = { workspace = true, features = ["rand"] }
secp256k1 = { workspace = true, features = ["rand", "global-context"] }
Copy link
Collaborator

Choose a reason for hiding this comment

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

this actually looks unused because no changes actually use the global context

@@ -141,7 +141,7 @@ pub fn random_signed_tx<R: Rng>(rng: &mut R) -> TransactionSigned {

/// Signs the [Transaction] with a random key pair.
pub fn sign_tx_with_random_key_pair<R: Rng>(rng: &mut R, tx: Transaction) -> TransactionSigned {
let secp = Secp256k1::new();
let secp = Secp256k1::signing_only();
Copy link
Collaborator

Choose a reason for hiding this comment

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

this isn't the global context

@mattsse mattsse added C-debt A clean up/refactor of existing code C-test A change that impacts how or what we test labels Nov 6, 2024
@Jonatan-Chaverri
Copy link
Contributor Author

@mattsse please check again and let me know if this is what you mean by global context

@mattsse mattsse enabled auto-merge November 8, 2024 12:18
@mattsse mattsse added this pull request to the merge queue Nov 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 8, 2024
@mattsse mattsse merged commit cefc99b into paradigmxyz:main Nov 8, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt A clean up/refactor of existing code C-test A change that impacts how or what we test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use global secp256k1 context for tests
2 participants