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 simplicity #82

Merged

Conversation

uncomputable
Copy link
Collaborator

Update rust-simplicity to the latest version. Type-check every Simfony value.

Because we decided to type-check every Simplicity value, we also need to
type-check every Simfony value. This produces quite a large diff,
although most changes are mechanical. The implementations of
From<Option<Self>> and From<Either<Self, Self>> no longer work for Value
because additional type information is needed.

TypedValue is subsumed by Value. The implementation of Arbitrary for
Value needs to be rewritten. Typed values allow us to generate arbitrary
well-formed values, which was previously not the case. In the
implementation of Arbitrary, first a random type is generated and then a
random value of this type. There will be a function such as
`Value::arbitrary_of_type`. The details depend on how arbitrary values
are going to be used, and they are not used at the moment, so I simply
removed the implementation of Arbitrary for Value here.

To reduce the diff, the update of rust-simplicity happens in the next
commit. For now, the Simplicity values are kept typeness.
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 c106837 successfully ran local tests; nice! Did not carefully check all the Value changes but very nice to see TypedValue go away

@apoelstra apoelstra merged commit c0910bb into BlockstreamResearch:master Sep 1, 2024
4 checks passed
@uncomputable uncomputable deleted the 2024-08-update-sim branch September 2, 2024 07:52
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