Merged
Conversation
…ilder into feature/lamport-signature
jonasmartin
reviewed
Mar 17, 2026
src/scripts.rs
Outdated
Comment on lines
+64
to
+75
| KeyType::EcdsaKey => Err(ScriptError::InvalidKeyType( | ||
| "Lamport".to_string(), | ||
| "EcdsaKey".to_string(), | ||
| )), | ||
| KeyType::XOnlyKey => Err(ScriptError::InvalidKeyType( | ||
| "Lamport".to_string(), | ||
| "XOnlyKey".to_string(), | ||
| )), | ||
| KeyType::WinternitzKey { .. } => Err(ScriptError::InvalidKeyType( | ||
| "Lamport".to_string(), | ||
| "Winternitz".to_string(), | ||
| )), |
Contributor
There was a problem hiding this comment.
do not handle every type
_=> Err(ScriptError::InvalidKeyType("Lamport".to_string(), self.to_string() )
if to_string is not implmented, can derive debug, and then format!("{:?}",self)
jonasmartin
reviewed
Mar 17, 2026
src/scripts.rs
Outdated
Comment on lines
+420
to
+423
| if keep_message { | ||
| stack.op_dup(); | ||
| stack.to_altstack(); | ||
| } |
Contributor
There was a problem hiding this comment.
this is not right, the idea is not to keep the signature or preimage, but if it represents 0 or 1
jonasmartin
reviewed
Mar 17, 2026
|
|
||
| stack.op_swap(); | ||
| stack.hexstr(&ones[idx]); | ||
| stack.op_equal(); |
Contributor
There was a problem hiding this comment.
// maybe adding this is enough to keep the 1 or 0
if keep {
stack.op_dup();
stack.to_altstack();
}
jonasmartin
reviewed
Mar 17, 2026
|
|
||
| stack.op_true(); | ||
| assert!(!stack.run().success); | ||
| } |
Contributor
There was a problem hiding this comment.
add a test for keep_mesage true
jonasmartin
requested changes
Mar 17, 2026
Contributor
jonasmartin
left a comment
There was a problem hiding this comment.
PTAL to the comments.
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.
Adds bitcoin script for Lamport signature verification and support for Lamport signatures in speedup data