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

Update examples #83

Merged
merged 6 commits into from
Sep 2, 2024

Conversation

uncomputable
Copy link
Collaborator

Implement a harness for testing example programs. Add examples from Ivy and CashScript, and remove old examples.

These programs only show a piece of syntax that Simfony offers. We want
examples of real use cases of Simfony on Bitcoin. The syntax will be
explained in a separate piece of documentation.

I also removed sighash_all.simf, because it merely recomputes
sig_all_hash, without doing anything else.
Build a unit test for an example program with custom witness data and
with a custom transaction. For now, only the lock time and sequence
number can be changed, but these are the values that we introspect the
most, at the moment. Add a method for printing the sighash, in order to
generate signatures. Add a method for printing the program encoding, in
order to export the test vector to rust-simplicity.

Add #[allow(dead_code)] to the lock time and sequence methods, because
we don't use them at the moment. I will add more examples in the
following commits, which will make use of these methods.
OP_CHECKSIGFROMSTACKVERIFY is superseded by the hodl vault, which also
verifies the signature for a custom message. The recursive covenant is
superseded by the last will, which is also recursive.
Copy link
Contributor

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK a9a6e26 successfully ran local tests; wow!

@apoelstra apoelstra merged commit 10429c3 into BlockstreamResearch:master Sep 2, 2024
4 checks passed
@uncomputable uncomputable deleted the 2024-08-examples branch September 3, 2024 08:57
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.

2 participants