Repository navigation
Conversation
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.
Why
Witness-generation failures only report a line in the generated C++, e.g.
Circuit constraint violated in poq.cpp:52038: Fr_isTrue(&expaux[0]). The release tarballs shippoq/libpoq.aand friends but not the generatedpoq.cpp. To map that line back to the circom source you have to regenerate the C++ with the exact circom version CI used (CIRCOM_TAG, v2.2.2) and the same flags (--c --r1cs --no_asm --O2). We just had to do this by hand: line 52038 of v0.5.7'spoq.cppis the assert forblend/poq.circom:134(the "selected role is correct" constraint). With the generated sources in the release, that lookup takes seconds.What
compile-witness-generatoraction: new optionalupload-sourcesinput (default"false"). When it is set, the action uploads the{circuit}_cpp/directory as a{circuit}-{version}-witness-sourcesartifact. The upload runs after themain.cppreturn patch, the CalcWit leak patch, the FFI file copy and the Makefile replacement, and before any OS-specific patching or compilation, so it contains exactly the sources CI compiles. It leaves out the.dat, which already ships in every platform bundle aswitness_generator.dat.build-linux(x86_64): setsupload-sources: "true"for all four circuits. It then bundles them intologos-blockchain-circuits-{version}-witness-sources.tar.gz, which holds{pol,poq,signature,poc}_cpp/,VERSIONandCIRCOM_VERSION. This also runs on PRs, so CI checks the packaging.upload-witness-sourcesjob, gated the same way asupload-artifacts(tags orworkflow_dispatch): it attaches the tarball to the draft release.docs/build-pipeline.md: a short note on the new asset.Why a separate asset
The generated C++ does not depend on the target, so we publish it once instead of copying it into all four per-platform tarballs. This also leaves the per-platform bundle layout and contents unchanged.
rust/logos-blockchain-circuits-builddownloads and unpacks those bundles, andcircuits-nix-hashes.jsonpins their hashes, so neither is affected.Testing
actionlintpasses onci.yml.workflow_dispatch, so this PR does not exercise it end to end.🤖 Generated with Claude Code