This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: land program addresses off-curve #11355
Merged
jackcmay
merged 1 commit into
solana-labs:master
from
jackcmay:program-address-off-curve-web3
Aug 6, 2020
Merged
fix: land program addresses off-curve #11355
jackcmay
merged 1 commit into
solana-labs:master
from
jackcmay:program-address-off-curve-web3
Aug 6, 2020
Conversation
This file contains 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
e05fc4c
to
70716cb
Compare
Codecov Report
@@ Coverage Diff @@
## master #11355 +/- ##
==========================================
- Coverage 81.9% 75.2% -6.7%
==========================================
Files 320 29 -291
Lines 75012 1344 -73668
Branches 0 154 +154
==========================================
- Hits 61449 1012 -60437
+ Misses 13563 299 -13264
- Partials 0 33 +33 |
jackcmay
commented
Aug 4, 2020
web3.js/src/publickey.js
Outdated
static async findProgramAddress( | ||
seeds: Array<Buffer | Uint8Array>, | ||
programId: PublicKey, | ||
): Promise<[PublicKey, number]> { |
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.
@mvines Looks like this is causing esdoc issues, is there a better way then making [Pubkey, number] as a new type?
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've run into similar limitations in the past, a new type got me past it :-/
f8646a7
to
345ed62
Compare
345ed62
to
dbee74d
Compare
mergify bot
pushed a commit
that referenced
this pull request
Aug 6, 2020
(cherry picked from commit 5c4b815) # Conflicts: # web3.js/module.flow.js # web3.js/src/publickey.js # web3.js/test/publickey.test.js
mergify bot
pushed a commit
that referenced
this pull request
Aug 6, 2020
(cherry picked from commit 5c4b815)
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.
Problem
The derived program address may land on the ed25519 curve and have a signer.
Summary of Changes
The signature verifier only accepts public keys that are on the curve. To separate the space between keypairs and program addresses force all program address to be off the curve.
This PR also adds a new syscall so that programs can call create_program_address. This is necessary because the dependency used to validate off curve has dependencies that are not compatible with BPF programs.
This is a compliment PR to #11323
Fixes #