Skip to content

Conversation

@roconnor-blockstream
Copy link
Contributor

@roconnor-blockstream roconnor-blockstream commented May 28, 2025

This Simplicity update has

  • renamed a few types
  • moved some files around
  • added a minCost parameter, currently set to 0
  • added a new error code

@apoelstra
Copy link
Member

Where can I find Simplicity commit c68063f9ef ? The previous commit is the C-master branch on the Simplicity Github repo.

@roconnor-blockstream
Copy link
Contributor Author

Sorry, I forgot to push. You can find C-master now at https://github.com/BlockstreamResearch/simplicity/tree/C-master

@roconnor-blockstream
Copy link
Contributor Author

The fuzzer is failling due to unsigned integer overflow. It's one of those annoying things were overflow is well defined. In this case we are overflowing the amount fields, but that cannot overflow in valid transactions, and even if it were valid, it is the defined behaviour we have.

I suppose we ought to push a fix for the fuzzer before merging this PR?

@apoelstra
Copy link
Member

Yeah, can you add a new sanitizer suppression for the fuzzer? I think there are already a bunch for Simplicity. They are in test/sanitizer_suppressions/ubsan.

@roconnor-blockstream
Copy link
Contributor Author

Turns out the ubsan rule was there, but because this PR moves some source files around, the reference in sanitizer_suppressions is not longer correct.

So I need to fix this in this PR.

@roconnor-blockstream
Copy link
Contributor Author

c1 : fatal error C1083: Cannot open source file: '....\src\simplicity\cmr.c': No such file or directory [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\libelementssimplicity\libelementssimplicity.vcxproj]

MSVC build needs more work

@roconnor-blockstream
Copy link
Contributor Author

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(1091,5): warning MSB8027: Two or more files with the name of jets.c will produce outputs to the same location. This can lead to an incorrect build result. The files involved are ....\src\simplicity\jets.c, ....\src\simplicity\elements\jets.c. [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\libelementssimplicity\libelementssimplicity.vcxproj]

I forgot that I'm not allowed to use the same C file name in different subdirectories. :/

6d503ea4f8 Rename elements/jets.c
c68063f9ef Add testcases that are an even multiple of 1000 milliWU
92887000e6 Add minCost parameter
82d6260ed8 Remove intermedite primitive directory
09b4eee340 Make raw environment struct tags elements specific
a93cd359df Make environment struct tags elements specific
26de216e24 Make primitive.h functions indirect
35d188a247 rename elementsJets.* to jets.*
7fd6dbe2ca simplicity_computeCmr -> simplicity_elements_computeCmr

git-subtree-dir: src/simplicity
git-subtree-split: 6d503ea4f8859ec63ad22a22c0ccef067b1a0b5d
This Simplicity update has
- renamed a few types
- moved some files around
- added a minCost parameter, currently set to 0
- added a new error code
@roconnor-blockstream roconnor-blockstream marked this pull request as ready for review June 24, 2025 15:39
@roconnor-blockstream
Copy link
Contributor Author

Fixed

@delta1
Copy link
Member

delta1 commented Jun 25, 2025

ACK 0a0a69f

Ran tests locally

@apoelstra
Copy link
Member

ACK 0a0a69f

Confirmed that the Simplicity branch is updated correctly to the C-master branch; that the C-master branch matches master's C/ directory; that all functional tests and unit tests pass; and that I could build and run the fuzz tests (on completion Nix seemed to deadlock but I believe this is because I was running multiple nix-builds in parallel, not because of our tests).

Sorry for the long delay.

@delta1 delta1 merged commit b379bb2 into master Jul 17, 2025
13 checks passed
delta1 added a commit to delta1/elements that referenced this pull request Jul 18, 2025
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.

4 participants