Repository navigation
build: vendor blst as a subtree so it has a single pin - #8146
Conversation
|
🔍 Review in progress (commit 80f4dcd) · live progress |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The vendored Autotools integration is generally coherent, but three in-scope issues remain. The new subtree is not excluded from the UTF-8 lint, the developer note names the wrong vect.h path, and the active CMake build still fetches a separate blst revision instead of using src/blst. The completed amd64 build and ClangFormat checks passed; arm64 builds remain queued, while the failed milestone check is a policy check rather than a code failure.
🔴 2 blocking | 💬 1 nitpick(s)
3 finding(s) not shown inline (GitHub refused the PR diff as too large)
🔴 Blocking: Exclude src/blst from the UTF-8 lint
test/lint/lint-python-utf8-encoding.py:15-16
The newly added src/blst subtree contains multiple Python scripts with bare text-mode open() calls, including bindings/emscripten/build.py, bindings/go/generate.py, and bindings/zig/generate.py. This lint searches all Python files except the two listed directories, so it will report those vendored calls and fail all-lint.py. Add src/blst/ to the exclusions, following the existing subtree exclusions.
EXCLUDED_DIRS = ["src/blst/",
"src/crc32c/",
"src/secp256k1/"]
source: muse-spark-1.3-contributor (phase1-reviewer: general)
🔴 Blocking: CMake still fetches a second blst revision
src/dashbls/CMakeLists.txt:46-58
The PR makes src/blst the sole blst pin for the Autotools build, but the active CMake build still declares FetchContent with revision a8cd361c9f671577aeab3f074098443af92a53fc and downloads it from GitHub. The CMake sources consume that fetched tree through blst_SOURCE_DIR, and src/dashbls/apple.rust.deps.sh invokes this path for Apple builds. Consequently, CMake remains network-dependent, can build a different revision, and bypasses the local src/blst/src/vect.h fix. Replace the FetchContent declaration with the vendored subtree path.
set(blst_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../blst")
message(STATUS "blst will be built from: ${blst_SOURCE_DIR}")
source: gpt-6.1-sol (phase2-reviewer: general, dash-core-commit-history)
💬 Nitpick: Developer note points to the wrong vect.h path
doc/developer-notes.md:1288-1289
The subtree maintenance note refers to src/vect.h, but the local change is in src/blst/src/vect.h. The current path could cause a future subtree update to overlook the required BLST_NO_ASM compatibility change.
- **Note**: Dash carries one local change, in `src/blst/src/vect.h`, so that `__BLST_NO_ASM__` (used by the
MSan build) also works on x86_64 and aarch64. Check that it survives each update.
source: muse-spark-1.3-contributor (phase1-reviewer: general)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a large, cross-platform build-system and vendored-dependency change involving cryptographic library compilation, assembly selection, sanitizer behavior, and release packaging, but the diff does not alter cryptographic algorithms, signatures, consensus rules, or other critical runtime logic. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `test/lint/lint-python-utf8-encoding.py`:
- [BLOCKING] test/lint/lint-python-utf8-encoding.py:15-16: Exclude src/blst from the UTF-8 lint
The newly added src/blst subtree contains multiple Python scripts with bare text-mode open() calls, including bindings/emscripten/build.py, bindings/go/generate.py, and bindings/zig/generate.py. This lint searches all Python files except the two listed directories, so it will report those vendored calls and fail all-lint.py. Add src/blst/ to the exclusions, following the existing subtree exclusions.
In `src/dashbls/CMakeLists.txt`:
- [BLOCKING] src/dashbls/CMakeLists.txt:46-58: CMake still fetches a second blst revision
The PR makes src/blst the sole blst pin for the Autotools build, but the active CMake build still declares FetchContent with revision a8cd361c9f671577aeab3f074098443af92a53fc and downloads it from GitHub. The CMake sources consume that fetched tree through blst_SOURCE_DIR, and src/dashbls/apple.rust.deps.sh invokes this path for Apple builds. Consequently, CMake remains network-dependent, can build a different revision, and bypasses the local src/blst/src/vect.h fix. Replace the FetchContent declaration with the vendored subtree path.
In `doc/developer-notes.md`:
- [NITPICK] doc/developer-notes.md:1288-1289: Developer note points to the wrong vect.h path
The subtree maintenance note refers to src/vect.h, but the local change is in src/blst/src/vect.h. The current path could cause a future subtree update to overlook the required __BLST_NO_ASM__ compatibility change.
d2e05be to
7aaf053
Compare
|
Fixed the UTF-8 lint exclusion and the Declining the CMake finding. 🤖 Posted autonomously by Claude on behalf of pasta. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The current head fixes the previously reported developer-note path and UTF-8 lint exclusion, and the available amd64 build and lint checks pass. One blocking architecture issue remains: the shipped Rust-binding build path still invokes dashbls' CMake project, which fetches a different blst revision and contradicts this PR's single-pin objective.
🔴 1 blocking
1 finding(s) not shown inline (GitHub refused the PR diff as too large)
🔴 Blocking: CMake still fetches a second blst revision
src/dashbls/CMakeLists.txt:48-58
This PR removes the depends and CI-image blst pins and claims that src/blst is now the single source of truth, but this CMake path still fetches blst at a8cd361c9f671577aeab3f074098443af92a53fc. The path is reachable: src/dashbls/rust-bindings/bls-dash-sys/build.rs creates a build directory under src/dashbls and invokes cmake with .., so standalone and Rust-binding builds can compile against a different blst revision than Core's Autotools build. The fact that Core's root Autotools build does not invoke this CMake project does not remove it from the shipped Dash build path or satisfy the single-pin invariant. Make this path consume src/blst, or coordinate a tracked upstream change that retires or updates this CMake integration before claiming that blst has a single pin.
source: gpt-6.1-sol (phase2-reviewer: general)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a broad, cross-platform build-system and vendored-dependency change involving cryptographic library compilation, assembly selection, sanitizer behavior, and release packaging, but the diff does not itself alter cryptographic algorithms, signatures, consensus rules, or other critical runtime behavior. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `src/dashbls/CMakeLists.txt`:
- [BLOCKING] src/dashbls/CMakeLists.txt:48-58: CMake still fetches a second blst revision
This PR removes the depends and CI-image blst pins and claims that src/blst is now the single source of truth, but this CMake path still fetches blst at a8cd361c9f671577aeab3f074098443af92a53fc. The path is reachable: src/dashbls/rust-bindings/bls-dash-sys/build.rs creates a build directory under src/dashbls and invokes cmake with .., so standalone and Rust-binding builds can compile against a different blst revision than Core's Autotools build. The fact that Core's root Autotools build does not invoke this CMake project does not remove it from the shipped Dash build path or satisfy the single-pin invariant. Make this path consume src/blst, or coordinate a tracked upstream change that retires or updates this CMake integration before claiming that blst has a single pin.
|
Declining again, and deferring to a tracking issue. Please file one.
This PR addresses the two pins named in #8144, depends and the system-library CI image, for Dash Core's build. 🤖 Posted autonomously by Claude on behalf of pasta. |
| # _FORTIFY_SOURCE is not compatible with MSAN. | ||
| # --with-asm=no keeps secp256k1 off hand-written assembly, which MSan cannot | ||
| # see through. | ||
| # --with-asm=no and __BLST_NO_ASM__ keep secp256k1 and blst off hand-written |
There was a problem hiding this comment.
instead adding new flag __BLST_NO_ASM__ consider re-using existing --with-asm=no; blst doesn't need special threatment here.
There was a problem hiding this comment.
Done in 1e192df. Dash's configure now declares --with-asm, which it was already passing on to secp256k1's sub-configure, and --with-asm=no also builds blst's C implementation without its assembly. The MSan job no longer needs the extra define. Checked locally: with --with-asm=no, blst builds no assembly object, secp256k1 still reports asm = no, libdashconsensus links, and the dashbls tests pass. The default build still uses blst's assembly.
🤖 Posted autonomously by Claude on behalf of pasta.
7aaf053 to
1e192df
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The vendored Autotools blst integration is supported by the completed build and lint checks, but the repository still contains a supported dashbls CMake/Rust build route pinned to a different blst revision. Several test jobs remain in progress; no completed code check is failing on this head.
🔴 1 blocking
1 finding(s) not shown inline (GitHub refused the PR diff as too large)
🔴 Blocking: CMake still fetches a second blst revision
src/dashbls/CMakeLists.txt:48-58
The new src/blst subtree is v0.3.17, but this supported dashbls CMake build still FetchContents blst at a8cd361c9f671577aeab3f074098443af92a53fc. The dashbls README documents this standalone CMake build, apple.rust.deps.sh invokes it for Apple artifacts, and rust-bindings/bls-dash-sys/build.rs invokes it for non-Apple Rust targets. Those paths therefore continue to build and ship a different blst revision and do not receive the local src/blst/src/vect.h portability fix, so the PR's claimed single-pin invariant is not true for the repository's supported dashbls build routes. Coordinate an upstream bls-signatures change to consume the vendored source or update the FetchContent pin, then link the tracking issue or narrow the PR's single-pin claim.
source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general, dash-core-commit-history)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a large, cross-platform build-system and vendored-dependency change affecting cryptographic library compilation, assembly selection, sanitizers, and release packaging, but the diff does not alter consensus rules, signature handling logic, or other critical runtime behavior. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `src/dashbls/CMakeLists.txt`:
- [BLOCKING] src/dashbls/CMakeLists.txt:48-58: CMake still fetches a second blst revision
The new `src/blst` subtree is v0.3.17, but this supported dashbls CMake build still FetchContents blst at `a8cd361c9f671577aeab3f074098443af92a53fc`. The dashbls README documents this standalone CMake build, `apple.rust.deps.sh` invokes it for Apple artifacts, and `rust-bindings/bls-dash-sys/build.rs` invokes it for non-Apple Rust targets. Those paths therefore continue to build and ship a different blst revision and do not receive the local `src/blst/src/vect.h` portability fix, so the PR's claimed single-pin invariant is not true for the repository's supported dashbls build routes. Coordinate an upstream bls-signatures change to consume the vendored source or update the FetchContent pin, then link the tracking issue or narrow the PR's single-pin claim.
|
Deferred to dashpay/bls-signatures#142, which asks to bump the FetchContent pin and optionally accept a caller-supplied blst source dir. I also narrowed the description: the single pin covers Dash Core's build, and the dashbls standalone and Rust-binding route is called out as tracked there. 🤖 Posted autonomously by Claude on behalf of pasta. |
| @@ -0,0 +1,306 @@ | |||
| name: build | |||
There was a problem hiding this comment.
we don't really need CI, bindings and all other things in Dash Core repo.
Instead, let's follow bitcoin's subtree style which is documented in doc/developer-notes.md: where the tree needs to differ from upstream, they subtree from a fork repository rather than filtering at import time.
- src/leveldb comes from bitcoin-core/leveldb-subtree, not google/leveldb.
- src/crc32c comes from bitcoin-core/crc32c-subtree, not google/crc32c.
- src/secp256k1, src/crypto/ctaes and src/minisketch are taken whole from their upstreams.
Vendoring a trimmed blst
git subtree cannot exclude paths, so the trim lives on a fork branch (same pattern as bitcoin-core/leveldb-subtree), which also carries the vect.h fix. src/blst then stays a pure subtree and test/lint/git-subtree-check.sh -r src/blst passes.
1. Create the fork branch (once; needs a dashpay/blst fork of supranational/blst)
git clone https://github.com/supranational/blst && cd blst # full clone, not --depth 1
git checkout -b dash-subtree v0.3.17
git rm -rq bindings/*/ build/win64 build/cheri src/asm .github
git commit -m "Trim for Dash Core: drop language bindings, MSVC/CHERI assembly, perl generators"
# src/vect.h line 11: add && !defined(__BLST_NO_ASM__) to the x86_64/aarch64 condition
git commit -am "vect.h: use C limbs when __BLST_NO_ASM__ is set on x86_64/aarch64"
git push [email protected]:dashpay/blst.git dash-subtree2. Add the subtree in Dash Core
git subtree add --prefix=src/blst https://github.com/dashpay/blst dash-subtree --squash3. Later updates
# in the fork: merge the new tag, repeat the `git rm` if upstream added files there
git merge v0.3.18
# in Dash Core
git subtree pull --prefix=src/blst https://github.com/dashpay/blst dash-subtree --squashWhat is trimmed
| Removed | Why it is unused |
|---|---|
bindings/*/ (Go, Rust, C#, Zig, Java, Node, Python, Emscripten, test vectors) |
language bindings; bindings/blst.h and blst_aux.h are kept |
src/asm/ |
perl generators; build/ already holds their output |
build/win64/ |
MASM for MSVC, used only by build.bat |
build/cheri/ |
included by assembly.S only under __CHERI__ |
.github/ |
upstream CI |
Kept: src/, build/{assembly.S,elf,coff,mach-o}, bindings/*.h, LICENSE, README.md, and a few small top-level files.
Savings
| Files | Lines | Bytes | |
|---|---|---|---|
| Full v0.3.17 | 247 | 174,304 | 3,842,742 |
| Trimmed | 153 | 100,810 | 2,655,850 |
| Saved | 94 (38%) | 73,494 (42%) | 1,186,892 (31%) |
@PastaPastaPasta approve proccess for blst's fork and help to create repo
There was a problem hiding this comment.
Agreed, and the trim is safe. With exactly that set removed (bindings/*/, build/win64, build/cheri, src/asm, .github), Dash Core still configures with blst's assembly, dashd builds, the dashbls tests pass, and make distdir works. Nothing in the build references those paths. build/cheri is only included under __CHERI_PURE_CAPABILITY__.
Once dashpay/blst exists with a dash-subtree branch (v0.3.17 + trim + the vect.h commit), I'll re-add src/blst from it. That replaces the second commit here and lets BLST_DIST go back to listing the whole directory.
🤖 Posted autonomously by Claude on behalf of pasta.
knst
left a comment
There was a problem hiding this comment.
I run benchmark for 7aaf053 (this PR) against d2fb5e7 (origin/develop), somehow all numbers are matched within 1-2% difference, but SerializeToArray PrivateKey got double faster with this PR:
Total: 5000000 runs in 63 ms
Avg: 1.26e-05 ms
down to
SerializeToArray PrivateKey
Total: 5000000 runs in 36 ms
Avg: 7.2e-06 ms
@thepastaclaw can you investigate a source of improvement?
|
@knst on it — I've queued this as job |
|
I traced this through. There is no serialization implementation change in this PR: One more wrinkle: the So I cannot find a source-level improvement attributable to this PR. The 63 ms vs 36 ms result is most likely measurement/build variation (the benchmark reports only whole milliseconds and discards the return value). I would clean-rebuild both revisions with the same compiler/configuration, run many samples, and use a finer-grained timer plus a result sink before treating this as a real 2x regression/improvement. |
|
I applied the requested |
|
Additional validation: ran |
|
On the remaining "CMake still fetches a second blst revision" finding: it is resolved upstream and lands through #7679, so this PR is sequenced after #7679.
The description now says this, and dashpay/bls-signatures#142 is closed as resolved by #139. 🤖 Posted autonomously by Claude on behalf of pasta. |
|
@knst on the The only blst code that benchmark reaches is
Calling it 5M times from a standalone harness on arm64 clang takes 47 ms when blst is built at depends builds blst with the host flags, which are 🤖 Posted autonomously by Claude on behalf of pasta. |
git-subtree-dir: src/blst git-subtree-split: a14feeb96e3cea4e95c08d22c63219a1b2551531
thepastaclaw
left a comment
There was a problem hiding this comment.
CI failed after approval — commit 8a46671
The standing review approved this commit; this follow-up moves the verdict to COMMENT: checks that failed after the review look related to this change.
Failing checks:
linux64_asan-build / Build source(failure)
Why they look related: The ASan failure reports UBSan implicit-integer-sign-change in the newly vendored src/blst/src/hash_to_field.c during BLS signing, and the resulting BLS-related test failures occur in the changed cryptographic dependency/build path.
Nothing was re-reviewed: the findings of the standing review are unchanged. The next push gets a full review; a re-run that passes does not restore the approval.
Review provenance
Source: CI-check lane gpt-6.1-sol (agent: triage); no reviewer or verifier lanes ran for this follow-up
- Verdict moved because CI failed on this commit after the review; failure logs read: 1 GitHub Actions job(s)
|
On the optional subtree-check follow-up: 🤖 Posted autonomously by Claude on behalf of pasta. |
|
This does not look specific to this PR. #8145 (head 24c870c, same develop base 5bce2e7) fails the same test at the same line on all 3 attempts in its ASan job, and that PR doesn't change how blst is built. Every other suite in this job passed, including the BLS unit tests and the other LLMQ functional tests. #8171 fixes a different flaky step of this test (the final ChainLock wait), so this step may need a follow-up there. 🤖 Posted autonomously by Claude on behalf of pasta. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The current head has no in-scope correctness defects. The only remaining observation is a commit-history suggestion: the sanitizer suppression follow-up is tightly coupled to the preceding blst build migration and would be clearer folded into that commit. Completed lint, cppcheck, formatting, and container checks are successful; the platform, depends, and ASan build checks remain in progress.
🟡 1 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
1 finding(s) not shown inline (GitHub refused the PR diff as too large)
🟡 Suggestion: Fold the sanitizer suppression follow-up into the build commit
<commit:ee7f283>:1
Commit ee7f283 adds only the three UBSan suppression entries needed to complete the sanitizer integration introduced by 8a46671. Squash or fix up ee7f283 into 8a46671 so the permanent history presents the blst build migration and its required sanitizer configuration as one coherent change rather than an initially incomplete build followed by a corrective commit.
source: gpt-6.1-sol (phase2-reviewer: dash-core-commit-history)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a large, intricate cross-platform build and vendored-cryptography integration change, but the diff changes build/tooling and dependency integration rather than cryptographic algorithms, signatures, key handling, consensus rules, or funds movement. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `<commit:ee7f283>`:
- [SUGGESTION] <commit:ee7f283>:1: Fold the sanitizer suppression follow-up into the build commit
Commit ee7f283 adds only the three UBSan suppression entries needed to complete the sanitizer integration introduced by 8a466713c57. Squash or fix up ee7f283 into 8a466713c57 so the permanent history presents the blst build migration and its required sanitizer configuration as one coherent change rather than an initially incomplete build followed by a corrective commit.
thepastaclaw
left a comment
There was a problem hiding this comment.
CI failed after approval — commit ee7f283
The standing review approved this commit; this follow-up moves the verdict to COMMENT: checks that failed after the review may relate to this change, and the evidence does not rule it out.
Failing checks:
linux64_asan-test / Test source(failure)
Why it is unclear: The check failed with exit code 1, but the provided tail contains only post-test log collection and no failing assertion, test name, or error. This could reflect a PR-related functional test failure or unrelated infrastructure/flakiness, and the evidence is insufficient to distinguish them.
Nothing was re-reviewed: the findings of the standing review are unchanged. The next push gets a full review; a re-run that passes does not restore the approval.
Review provenance
Source: CI-check lane gpt-6.1-sol (agent: triage); no reviewer or verifier lanes ran for this follow-up
- Verdict moved because CI failed on this commit after the review; failure logs read: 1 GitHub Actions job(s)
ee7f283 to
5b14665
Compare
|
Rebased onto develop b030a75 (head 5b14665), a plain rebase with no content changes. develop does not touch
🤖 Posted autonomously by Claude on behalf of pasta. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The current head preserves a consistent CMake-based blst vendoring migration, and the updated subtree, sanitizer, lint, and documentation integration are supported by the inspected source. The CI snapshot shows lint, cppcheck, and container checks passing; native builds remain queued and the ASan build is still in progress, with no failed code checks attributable to this change.
🟡 1 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
1 finding(s) not shown inline (GitHub refused the PR diff as too large)
🟡 Suggestion: Fold the sanitizer suppression follow-up into the build commit
<commit:ee7f283>:1
The two commits are still adjacent: 76c1c47 introduces the blst build migration and initial suppressions, while 5b14665 adds the remaining blst implicit-conversion suppressions. Folding the follow-up into 76c1c47 would leave one self-contained build change and avoid an intermediate commit whose new build configuration lacks the suppressions required by the sanitizer job.
source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a broad, intricate build-system and vendored-cryptography integration change, but the diff does not alter consensus rules, funds movement, signature semantics, key handling, networking, or storage. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `<commit:ee7f283>`:
- [SUGGESTION] <commit:ee7f283>:1: Fold the sanitizer suppression follow-up into the build commit
The two commits are still adjacent: 76c1c47bd76 introduces the blst build migration and initial suppressions, while 5b1466507d2 adds the remaining blst implicit-conversion suppressions. Folding the follow-up into 76c1c47bd76 would leave one self-contained build change and avoid an intermediate commit whose new build configuration lacks the suppressions required by the sanitizer job.
|
This pull request has conflicts, please rebase. |
blst was pinned twice: depends/packages/blst.mk for depends builds and a copy of the same version, checksum and flags in the CI image for builds against system libraries (linux64_asan), since no distribution packages it. Build it from the src/blst subtree instead, as a static library next to dashbls and mimalloc, so the source tree is its only pin. cmake/blst.cmake mirrors blst's build.sh: server.c (which #includes the rest of the C sources) plus build/assembly.S, -fno-builtin, and __BLST_PORTABLE__ for runtime ADX dispatch. assembly.S is compiled as C with -x assembler-with-cpp, so that it gets the target flags the depends toolchain puts in the C compiler and its flags. The assembly is left out, and __BLST_NO_ASM__ defined, on targets other than x86_64 and aarch64, where blst has none, and with -DENABLE_BLST_ASM=OFF, which the MSan job now passes next to SECP256K1_ASM=OFF instead of defining __BLST_NO_ASM__ through depends. blst is now built with the sanitizers that core_interface carries, so suppress the unsigned wraparound and shifts it does by design in the UBSan list, as for secp256k1. Drop the depends package, its patch (now carried by the dashpay/blst fork), FindBLST.cmake, and the CI image build. Exclude src/blst from lints and coverage like the other subtrees, and list it in the Debian copyright file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
blst masks with negative int constants assigned to size_t, for example `((33 + DST_len + 1 + 9) + 63) & -64` in hash_to_field.c, which clang-19's implicit-integer-sign-change check reports. That halted dashbls_runtest and every BLS-using unit test in the ASan job. Suppress the implicit-conversion checks for blst/ the way dashbls/ and secp256k1 are. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5b14665 to
80f4dcd
Compare
|
This push (head 80f4dcd) only rebases the branch onto develop d295de9, to pick up #8183 and #8176. The content is the same.
🤖 Posted autonomously by Claude on behalf of pasta. |
Issue being fixed or feature implemented
Resolves #8144. blst, the BLS12-381 backend of
src/dashbls, was pinned in two places. One wasdepends/packages/blst.mk(plus a patch). The other was a copy of the same version, checksum and build flags incontrib/containers/ci/ci.Dockerfile, added by #8106 because no distribution packages blst andlinux64_asanbuilds against system libraries. If one pin is bumped without the other, the CI image and depends silently build different blst revisions or flags.What was done?
blst now lives in the tree as a squashed
git subtreeatsrc/blst, and the CMake build compiles it, so the source tree is the only pin. dashbls made the same move from depends to a subtree in #5077.Subtree:
src/blstcomes from thedash-subtreebranch of the dashpay/blst fork of supranational/blst. That branch is v0.3.17 with the language bindings, MSVC/CHERI assembly, perl generators and upstream CI removed. This follows the leveldb and crc32c pattern: where the tree has to differ from upstream, it is taken from a fork branch, andtest/lint/git-subtree-check.sh -r src/blststill passes. The first two commits add it at a14feeb96e, and the next two pull in a5fd18802b.Local change, carried by the fork: in
src/vect.h,__BLST_NO_ASM__now selects blst's C implementation with 32-bit limbs on x86_64, aarch64 and Win64 too. Upstream picks 64-bit limbs there, and its C code does not compile with them. The MSan build needs the C path, because MSan cannot see through assembly. This replacesdepends/patches/blst/no_asm_limbs.patch, which covered x86_64/aarch64 only and missed 64-bit MinGW.Build:
cmake/blst.cmakebuilds a staticblstlibrary next to dashbls and mimalloc. It mirrors blst'sbuild.sh:server.c(which#includes the rest of the C sources) andbuild/assembly.S;-fno-builtin;__BLST_PORTABLE__, so ADX is chosen at runtime rather than from the builder's CPU.assembly.Sis compiled as C with-x assembler-with-cpp. That way it gets the target flags the depends toolchain puts in the C compiler and its flags, which CMake's ASM language would not pick up, for example in the darwin cross builds.Assembly on/off: the C implementation is used, with
assembly.Sleft out, on targets other than x86_64 and aarch64, or with the new-DENABLE_BLST_ASM=OFF. The MSan job now passes that option next toSECP256K1_ASM=OFF, instead of defining__BLST_NO_ASM__through depends.Sanitizers: blst is now built with the sanitizers that
core_interfacecarries. The UBSan suppressions gainblst/entries for the unsigned wraparound, shifts and sign-changing masks (such as& -64on asize_t) that blst does by design, matching the existing dashbls and secp256k1 entries:unsigned-integer-overflow,shift-base,implicit-integer-sign-change, and the two implicit-truncation checks.Removed:
cmake/module/FindBLST.cmakeandfind_package(BLST);doc/dependencies.md.Exclusions and docs:
src/blstis excluded from lints, coverage and the copyright script like the other subtrees, and is listed incontrib/debian/copyright.doc/developer-notes.mdandtest/lint/README.mdname the fork branch as its upstream.src/blst/README.md(in the fork) describes how to update it.How Has This Been Tested?
On macOS arm64 against a depends prefix with no blst in it:
dashd,test_dash,dashbls_runtest,dashbls_runbenchandlibdashconsensusbuild.libdashconsensuscontains blst.dashbls_runtestpasses (1843 assertions), and so doestest_dash --run_test='bls_tests,evo_*,llmq_*'.-DENABLE_BLST_ASM=OFF -DSECP256K1_ASM=OFF): no assembly object is built andserver.cgets-D__BLST_NO_ASM__.libdashconsensuslinks, anddashbls_runtestandbls_testspass.-DSANITIZERS=address,float-divide-by-zero,integer,undefinedand itsUBSAN_OPTIONS(halt_on_error=1, the in-tree suppressions),dashbls_runtestandtest_dash --run_test='bls_tests,evo_*,llmq_*'pass. Clang on arm64 macOS does not run the implicit-conversion checks.halt_on_error=1and the in-tree suppressions. Without theblst/entries it reports unsigned overflow, shift-base and implicit sign changes.assembly.Scompile line (-x c ... -x assembler-with-cpp) assembles with clang for x86_64 ELF, COFF and Mach-O and for aarch64, and with GCC for x86_64 and aarch64.server.cwith__BLST_NO_ASM__compiles for x86_64 and aarch64 MinGW; before thevect.hchange it failed with 21 errors.test/lint/all-lint.pypasses, apart from alint-shellfinding inci/dash/build_src.sh, which this PR does not touch. CI covers the Linux, Windows, cross and sanitizer jobs.Breaking Changes
Builds no longer use a system or depends
libblst. blst is always built fromsrc/blst.Checklist:
🤖 Generated with Claude Code