SIMD-0152: Precompiles#152
Merged
joncinque merged 3 commits intosolana-foundation:mainfrom Jun 20, 2024
Merged
Conversation
samkim-crypto
approved these changes
Jun 10, 2024
Contributor
samkim-crypto
left a comment
There was a problem hiding this comment.
Looks good to me and sorry for the delay on this.
seanyoung
approved these changes
Jun 11, 2024
ptaffet-jump
approved these changes
Jun 11, 2024
topointon-jump
approved these changes
Jun 12, 2024
Contributor
topointon-jump
left a comment
There was a problem hiding this comment.
Nice! Left some minor comments 😄
samkim-crypto
approved these changes
Jun 12, 2024
Contributor
|
@jacobcreech, it seems like we have reached consensus, but I cannot seem to merge it. Can you help with merging 🙏 ? |
joncinque
approved these changes
Jun 20, 2024
Contributor
|
Yay great work @0x0ece! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Define a unified behavior for precompiles, and highlight a few minor
changes to the existing precompiles to minimize differences.
Motivation
Precompiles are special native programs designed to verify additional
transaction signatures.
They run without the VM and without loading any account, and they can access
data from other instructions, within the same transaction.
At the time of writing, two precompiles exist to verify Ed25519 and
Ethereum-like Secp256k1 signatures, and another one is being proposed to
support Secp256r1 signatures for FIDO Passkeys.
Historically, the two precompiles were built at different times and
by different people, so naturally there are some subtle differences
in how they behave, especially in edge cases.
The main goal of this document is to provide a specification for how
a precompile should behave, remove differences and provide guidelines
for future proposals.
In addition, we highlight 3 minor changes to the existing precompiles
that will simplify their behavior and make it easier to develop
alternative validator clients.