Skip to content

Conversation

@sanket1729
Copy link
Member

Copied and updated basic vendor scripts from the rust-secp256k1 repos. This does not no any symbol renaming, but is still handy and maintains which versions of simplicity we are using.

To update the vendored sources, use the `vendor-simplicity.sh` script:

```
$ ./vendor-libsecp.sh depend <rev>
Copy link
Collaborator

Choose a reason for hiding this comment

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

In 27cbcfb:

vendor-libsecp should be vendor_simplicity.sh. (Also, consider renaming vendor_simplicity to vendor-simplicity.)

The default build process is to build using the vendored libsecp256k1 sources in
the depend folder. There is no support for symbols yet.

To update the vendored sources, use the `vendor-simplicity.sh` script:
Copy link
Collaborator

Choose a reason for hiding this comment

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

In 27cbcfb:

This message uses - but the actual file uses _. I recommend renaming the file.

@apoelstra
Copy link
Collaborator

Other than the filename stuff this looks great! It's great that we can just run a revendoring script to check that simplicity updates were done correctly.

Copy link
Collaborator

@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 9f55381

@sanket1729
Copy link
Member Author

Merging this and fixing these things in first commit of PR2.

@sanket1729 sanket1729 merged commit 48c5fc7 into BlockstreamResearch:master Dec 15, 2022
apoelstra added a commit that referenced this pull request Dec 17, 2022
987ade1 Expose FFI bindings to jets (sanket1729)
e9a6d41 Add wrappers to the C library for better interfacing (sanket1729)
df61fe0 Rename filenames (sanket1729)

Pull request description:

  Based on #48

ACKs for top commit:
  apoelstra:
    ACK 987ade1

Tree-SHA512: d5d735ea6fbe1d7abb695bd41712612986ebd47d738aa7a5029c3be5fe768d5d25a36b4245c2e1faeb57526a06891f748340ac2d042f377c1eeb397c25dc15bd
apoelstra added a commit that referenced this pull request Jan 1, 2023
bbbb7ca Clippy warnings (sanket1729)
0a853b0 Use FFI jets instead of regular jets (sanket1729)
b4a3064 Remove depcrecated jets (sanket1729)
f5c3070 rename to_type() -> to_variable_type (sanket1729)
a7e2cc8 Prepare for adding jets: Comment policy compiler (sanket1729)

Pull request description:

  Based on #48 and #49

ACKs for top commit:
  apoelstra:
    ACK bbbb7ca

Tree-SHA512: 56f867d6e31bdb9abfdf43b171887a3a3dca3b8141d43fc807d328a041ec2a4d2351b8af918b205cac1366dee7815239a2a8f722b89c393f0f693b83af1b29ec
apoelstra added a commit to apoelstra/rust-simplicity that referenced this pull request Sep 5, 2025
I can't find any citation that this is safe to do. We don't actually use
this structure in our Rust code; we populate it by calling a c_set function
which is defined on the C side, and then pass it to C functions. So no code
needs to be changed.

However, I want to remove the c_set_* functions because they hide life
information (and in fact, are unsound, as we currently use them) and serve
to obfuscate code. They seem to have come from BlockstreamResearch#48 BlockstreamResearch#49 BlockstreamResearch#50 BlockstreamResearch#51 in which
Sanket seems to have copied the corresponding Haskell code into Rust, where
it is unnecessary and dangerous.
apoelstra added a commit to apoelstra/rust-simplicity that referenced this pull request Sep 12, 2025
I can't find any citation that this is safe to do. We don't actually use
this structure in our Rust code; we populate it by calling a c_set function
which is defined on the C side, and then pass it to C functions. So no code
needs to be changed.

However, I want to remove the c_set_* functions because they hide life
information (and in fact, are unsound, as we currently use them) and serve
to obfuscate code. They seem to have come from BlockstreamResearch#48 BlockstreamResearch#49 BlockstreamResearch#50 BlockstreamResearch#51 in which
Sanket seems to have copied the corresponding Haskell code into Rust, where
it is unnecessary and dangerous.
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