Add secp256r1 precompile: RIP 7212 #2443
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the secp256r1 precompile to BSC network.
As mentioned in the RIP 7212, it adds the
Secp256r1
precompile to the address0x100
with the gas cost of3450
.Rationale
Together with the recent rise of account abstraction and more integration of blockchain with Web2 applications, there has been an increasing need to validate Secp256r1-based signatures.
Many applications/key management systems like Passkey, Okta, etc are utilizing Secp256r1 signature scheme.
Conventionally, the validation of
Secp256r1
signature was performed fully on-chain through smart contracts, hence degrading the UX of users due to high gas fees (e.g., 180K~350K gas unit depending on the implementation).With the adoption of this implementation, BSC Network, which is one of the most used and popular chains, will be able to accommodate more seamless integration with these Web2 applications and use cases.
Changes
Notable changes:
Secp256r1
precompile to the Cancun version3450