Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Register secp256r1 precompile#1044

Merged
StephenButtolph merged 37 commits intomasterfrom
register-p256v-precompile
Sep 12, 2025
Merged

Register secp256r1 precompile#1044
StephenButtolph merged 37 commits intomasterfrom
register-p256v-precompile

Conversation

@JonathanOppenheimer
Copy link
Copy Markdown
Contributor

@JonathanOppenheimer JonathanOppenheimer commented Jul 10, 2025

Why this should be merged

ACP-204 implemented secp256r1 Curve Support as a precompile to allow cheaper verification of "modern device security systems" that use this curve. It was already added to libevm in ava-labs/libevm#184.

Close #1042

How this works

This PR registers the libevm p256verify precompiles as a stateless precompile gatekept by the Granite release

How this was tested

precompile/contracts/p256verify/contract_test.go and standard CI.

Need to be documented?

I'm not sure...

Need to update RELEASES.md?

Probably? I'm also not sure... are users informed when a new precompile is provided?

@JonathanOppenheimer JonathanOppenheimer requested a review from a team as a code owner July 10, 2025 18:34
Comment thread precompile/registry/registry.go Outdated
Comment thread precompile/modules/registerer.go Outdated
Comment thread precompile/registry/registry.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread go.mod Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Signed-off-by: Jonathan Oppenheimer <jonathan.oppenheimer@avalabs.org>
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go
JonathanOppenheimer and others added 2 commits August 26, 2025 15:24
Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org>
Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com>
Signed-off-by: Jonathan Oppenheimer <jonathan.oppenheimer@avalabs.org>
Comment thread params/hooks_libevm.go
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go
Comment thread params/hooks_libevm.go Outdated
ARR4N
ARR4N previously requested changes Sep 4, 2025
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go Outdated
Comment thread params/hooks_libevm.go
Copy link
Copy Markdown
Contributor

@StephenButtolph StephenButtolph left a comment

Choose a reason for hiding this comment

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

Can we add an E2E test for this precompile into the avalanchego test suite for Granite?

I suppose we could also add a unit test... but tbh I feel like this is a good candidate for an E2E test.

JonathanOppenheimer and others added 2 commits September 12, 2025 11:22
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com>
Copy link
Copy Markdown
Collaborator

@ARR4N ARR4N left a comment

Choose a reason for hiding this comment

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

LGTM pending resolution of Stephen's suggestions.

Comment thread params/hooks_libevm.go
@JonathanOppenheimer
Copy link
Copy Markdown
Contributor Author

Can we add an E2E test for this precompile into the avalanchego test suite for Granite?

I suppose we could also add a unit test... but tbh I feel like this is a good candidate for an E2E test.

That PR would be made in the AvalancheGo repository correct? Would you like me to attempt that?

@StephenButtolph StephenButtolph added this pull request to the merge queue Sep 12, 2025
Merged via the queue into master with commit fe2ab9d Sep 12, 2025
9 checks passed
@StephenButtolph StephenButtolph deleted the register-p256v-precompile branch September 12, 2025 16:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Register ACP-204 secp256r1 Precompile

6 participants