-
Notifications
You must be signed in to change notification settings - Fork 426
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
Add sr25519_verify() #1840
Merged
SkymanOne
merged 36 commits into
use-ink:master
from
prosopo:goastler-add-sr25519_verify
Aug 9, 2023
Merged
Add sr25519_verify() #1840
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
57c27e3
sr25519 signature verification
kziemianek 5d9cbee
offchain signature verification
kziemianek 37fa479
fmt
kziemianek 0a910e1
schnorrkel optional
kziemianek b2224d6
update dictionary
kziemianek d6a9f7c
fix
kziemianek 9d00c92
update changelog
kziemianek da71ca2
add info about unstable function usage
kziemianek eb93905
missing docs
kziemianek 9ca19c4
review suggestions
kziemianek 9b074f1
added catch for invalid public key or signature in sr25519 verification
goastler b4a65d2
switched to simple signing context in sr25519_verify fn
goastler 548fe27
Added docs for sr25519_verify()
goastler 53c2442
Added docs to sr25519VerifyFailed error
goastler 6ce47f4
Added docs link to substrate sr25519 signing context
goastler b9cfbf5
cargo fmt
goastler a33283e
Remove reference on message variable of sr25519_verify()
goastler 35175bb
Clippy embed error in panic statement during metadata execution
goastler 7fd25ba
sr25519 verification tests
goastler fda5ab1
Updated sr25519_verify PR number in CHANGELOG.md
goastler 5ab85fc
Merge branch 'master' into goastler-add-sr25519_verify
goastler fd914df
Fix comment to adhere to spell check in sr25519 verification tests
goastler ae2c65c
Merge branch 'goastler-add-sr25519_verify' of github.com:prosopo/ink_…
goastler 8866fdb
add parity as author of sr25519 module
goastler 79bea8a
ignore semicolon correction in item module
goastler d0c91cf
Merge branch 'goastler-add-sr25519_verify' of github.com:prosopo/ink_…
goastler 2aef6a8
add warning to docs for sr25519_verify() depending on unstable interf…
goastler 77c6cea
Merge remote-tracking branch 'parity/master' into goastler-add-sr2551…
goastler 97e2d23
remove space typo from sr25519 docs
goastler cf04d6d
remove #1741 from changelog
goastler c500a03
added documentation to the dummy method in sr25519_verification example
goastler 4c3cbc8
typo in sr25519 example contract dummy method
goastler bba49ea
spell check fix in method doc for sr25519
goastler 1810468
spell check fix in method doc for sr25519
goastler eeee6d4
move changelog entry for #1741
goastler 77044d2
changelog typo
goastler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ reentrancy | |
refcount | ||
scalability | ||
scalable | ||
sr25519 | ||
stdin | ||
stdout | ||
subber | ||
|
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Ignore build artifacts from the local tests sub-crate. | ||
/target/ | ||
|
||
# Ignore backup files creates by cargo fmt. | ||
**/*.rs.bk | ||
|
||
# Remove Cargo.lock when creating an executable, leave it for libraries | ||
# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock | ||
Cargo.lock |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
name = "sr25519_verification" | ||
version = "4.1.0" | ||
authors = ["Parity Technologies <admin@parity.io>", "George Oastler <goastler4@gmail.com>"] | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies] | ||
ink = { path = "../../crates/ink", default-features = false } | ||
|
||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } | ||
scale-info = { version = "2.5", default-features = false, features = ["derive"], optional = true } | ||
|
||
[dev-dependencies] | ||
ink_e2e = { path = "../../crates/e2e" } | ||
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
"ink/std", | ||
"scale/std", | ||
"scale-info/std", | ||
] | ||
ink-as-dependency = [] | ||
e2e-tests = [] |
Oops, something went wrong.
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.
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.
@athei @cmichi What do you think about adding a new
unstable
feature to theink_env
crate?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.
Yep . I think we can feature-gate the function with the
sr25519-verify
verify until it gets stabilizedThere 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.
Features are a last resort and should only be used when absolutely necessary (i.e not here). We don't need a feature here. A clear doc that this is an unstable functionality is enough. If someone ignores that hint nothing bad will happen. The contract will simply not deploy on a production chain.
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.
@goastler Could you propagate this warning to the public method then, please(available for users)? Because this comment is useful only for people who dive deep into the ink! codebase.
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.
sure thing :)
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.
done