Repository navigation
feat(compile): verify the unspendable internal key - #368
Open
vadim-anfv wants to merge 2 commits into
Open
vadim-anfv wants to merge 2 commits into
vadim-anfv wants to merge 2 commits into
Conversation
Move the H + rG derivation out of the compile handler into new module, so that the verification that pairs with it can share it. The derivation itself is unchanged.
Check that a tr() descriptor's internal key is the NUMS point tweaked by a given r, so the r that compile returns can be checked against the descriptor. No caller yet: the CLI surface is undecided, hence the dead_code allow.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #368 +/- ##
==========================================
+ Coverage 58.74% 59.17% +0.42%
==========================================
Files 25 26 +1
Lines 4608 4656 +48
==========================================
+ Hits 2707 2755 +48
Misses 1901 1901
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Blocked by #347, which rewrites the same
compilecode path.Continues #218.
compile --type trreturns therit derived the unspendable internal key from (#225); this adds the check that the pair holds, and extracts the derivation so both halves share it.The CLI surface is not part of this PR: the options are laid out in #218 (comment), and the logic is the same under all of them. Once we pick one, I'll open a follow-up PR wiring verification into the CLI, with integration tests.
Notes to the reviewers
A concept ACK on the interface is more useful than a line-by-line review right now, since the code gets rebased once #347 lands.
compilebehaves as before, the existingtest_compile_*tests pass untouched#[allow(dead_code)]is there because nothing calls the verification until the command exists, and goes away with itrin a type, and left it as plain functions until the command adds more callersChecklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features: