Skip to content
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

[Feature] Introduce the signature type and signature::verify. #2519

Merged
merged 12 commits into from
Aug 31, 2023

Conversation

d0cd
Copy link
Collaborator

@d0cd d0cd commented Aug 7, 2023

This PR introduces the signature type and signature::verify.
signature::verify takes a signature, address, and a value as operands and returns whether or not the signature is valid.
A sample usage is shown below.

function verify(a: signature, b: address, c: field) -> bool {
    return signature::verify(a, b, c);
}

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #2519 (964c961) into testnet3 (e180118) will decrease coverage by 0.01%.
The diff coverage is 90.00%.

@@             Coverage Diff              @@
##           testnet3    #2519      +/-   ##
============================================
- Coverage     80.10%   80.10%   -0.01%     
============================================
  Files           158      159       +1     
  Lines          5309     5322      +13     
  Branches       5309     5322      +13     
============================================
+ Hits           4253     4263      +10     
- Misses         1056     1059       +3     
Files Changed Coverage Δ
compiler/ast/src/functions/core_function.rs 100.00% <ø> (ø)
compiler/ast/src/types/type_.rs 94.11% <ø> (ø)
compiler/parser/src/parser/type_.rs 93.75% <ø> (ø)
compiler/parser/src/tokenizer/mod.rs 81.48% <ø> (-1.28%) ⬇️
compiler/parser/src/tokenizer/token.rs 85.71% <ø> (ø)
compiler/passes/src/code_generation/visit_type.rs 76.47% <ø> (ø)
compiler/span/src/symbol.rs 83.33% <ø> (ø)
compiler/parser/src/parser/expression.rs 82.27% <77.77%> (-0.20%) ⬇️
compiler/parser/src/tokenizer/lexer.rs 100.00% <100.00%> (ø)
...er/passes/src/code_generation/visit_expressions.rs 78.06% <100.00%> (+0.28%) ⬆️
... and 1 more

... and 17 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@collinc97 collinc97 left a comment

Choose a reason for hiding this comment

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

Code changes look clean.
Will approve once the snarkVM deps are updated.

@d0cd d0cd merged commit 0e6f4de into testnet3 Aug 31, 2023
8 of 9 checks passed
@d0cd d0cd deleted the feat/signature branch August 31, 2023 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants