chore(deps): bring chia declarations onto the chia-wallet-sdk ceiling - #56
Closed
MichaelTaylor3d wants to merge 1 commit into
Closed
chore(deps): bring chia declarations onto the chia-wallet-sdk ceiling#56MichaelTaylor3d wants to merge 1 commit into
MichaelTaylor3d wants to merge 1 commit into
Conversation
`digstore-crypto` declared `chia-bls = "=0.45.0"`, an exact pin ABOVE the chia-wallet-sdk ceiling. The SDK's latest is 0.36.0 and resolves the 0.36.1 primitives, so the 0.4x line is unreachable for every other crate in this workspace. This was the third of the three splits tracked by the epic, and it put four `chia-bls` lines in one lock (0.28.2 / 0.36.1 / 0.42.1 / 0.45.0). The pin carried no stated reason: it was introduced by 5fe545e (2026-06-08, "pin chia-bls=0.45.0 and scaffold digstore-crypto manifest"), the commit that CREATED the manifest — born with the scaffold, uncommented, and predating the SDK ceiling being understood. Moving to 0.36.1 also drops the orphaned chia-sha2 / chia-traits / chia_streamable_macro 0.45.1 line, taking `chia-bls` from four resolved lines to three. The two survivors are deep transitives of the SDK itself (0.42.1 via `chialisp`, 0.28.2 via `clvmr`), not declarations here. Nothing caught this for ~11 weeks because it CANNOT fail loudly: this crate wraps every chia-bls type in an opaque newtype and no `chia_bls` type reaches its public API, so a split would silently produce two BLS implementations in one workspace with no diagnostic. The frozen known-answer vectors are the only gate on that, which is why they are the whole proof here. The AugScheme vectors in `tests/fixtures/bls_vectors.json` reproduce BYTE-UNMODIFIED under 0.36.1: `committed_bls_fixture_matches_generated` recomputes every keypair and signature from the live crate via `bls_keygen` / `bls_sign` over four fixed seeds and compares against the committed file. The 0.45 -> 0.36.1 move therefore changed no cryptographic output and required no source change — the API this crate uses (sign / verify / SecretKey::from_seed / to_bytes / from_bytes) is identical across both lines. `digstore-chain` gains a COMMENT ONLY, no version change: its `chia-sdk-*` declarations cannot reach the 0.36 ceiling yet. `datalayer-driver` 4.0.0 is the latest published release and hard-requires `chia-wallet-sdk ^0.34.0`; because this crate passes DataLayer singleton types across the SDK boundary, moving it alone resolves `chia-sdk-driver` twice and `singleton.rs` fails to compile (`DataStore` 0.34 vs `Datastore<DataStoreMetadata>` 0.36, plus `Verification` / `VerificationAsserter` / `VerifiedData` removed in 0.36). Bridging the two lines with a shim would be the byte-drift class §4.1 exists to prevent, so the hold is recorded in the manifest instead. The rest of the family has already moved to ^0.36 (dig-wallet-backend 0.31.0, dig-cat/dig-tips/dig-offers 0.3.0, dig-options 0.4.0); datalayer-driver is the sole holdout. Patch bump: dependency-only, no behaviour change. Workspace 0.28.0 -> 0.28.1 with the coupled `[workspace.dependencies] digstore-core` declaration moved in lockstep, and digstore-crypto 0.1.0 -> 0.1.1. Refs DIG-Network/dig_ecosystem#3161 Co-Authored-By: Claude <noreply@anthropic.com>
MichaelTaylor3d
force-pushed
the
chore/3161-chia-ceiling
branch
from
August 26, 2026 15:58
498e133 to
8f258f5
Compare
Contributor
Author
|
Superseded by a fresh PR from the same branch (same head SHA 8f258f5). GitHub wedged a |
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.
DRAFT — DO NOT MERGE. Handing back for the gate round.
Slice of https://github.com/DIG-Network/dig_ecosystem/issues/3161 for
DIG-Network/digs.The target is the chia-wallet-sdk ceiling, not crates.io latest: the SDK's latest is
0.36.0 and it resolves the 0.36.1 primitives, so the 0.48.x primitives are unreachable.
A crate already on the ceiling is compliant; being above it is the defect.
Two fixes were in scope. One landed. One is BLOCKED upstream and is reported rather than
forced — the delta does not line up, and bridging two SDK lines with a shim would be the
byte-drift class §4.1 exists to prevent.
1.
digstore-crypto— LANDED:chia-bls = "=0.45.0"->"0.36.1"This was the third of the three splits the epic is named for, and the one above the ceiling.
Why the exact pin existed
No reason was ever recorded, and the pin does not appear to have been deliberate.
git log -Lon the line resolves to a single commit:That is the commit that created the manifest — the pin was born with the scaffold, carried
no explanatory comment, and predates the SDK ceiling being understood. Nothing in the crate
depends on 0.4x behaviour. I judged the reason stale and lowered it; the replacement carries
a comment stating the ceiling so the next reader does not have to re-derive this.
Why nothing caught it for ~11 weeks — the important part
digstore-cryptowraps every chia-bls type in an opaque newtype(
pub struct PublicKey(ChiaPublicKey), private field) and returnsdigstore_core::Bytes48/
Bytes96. Verified: nochia_blstype reaches its public API, and no consumer cratenames
chia_blsat all.So a wrong version here fails silently, not loudly. The compiler structurally cannot see
the split — it would simply have produced two different BLS implementations in one workspace
with no diagnostic. The only thing standing between that and a signature-verification
divergence is the frozen known-answer vector set. That is the direction this fails in, and it
is why the golden evidence below is the whole proof rather than a formality.
BLS evidence — goldens reproduce BYTE-UNMODIFIED
crates/digstore-crypto/tests/fixtures/bls_vectors.jsonis unchanged in this diff(
git statusreports nothing undertests/fixtures/).committed_bls_fixture_matches_generatedis load-bearing, not vacuous — I checked thatBlsFixtureSet::generate()genuinely recomputes: it walks four fixed seeds and callsbls_keygen/bls_signagainst the live crate, then compares to the parsed on-diskfile. It does not reload the fixture. Any change to keygen or AugScheme signing output would
change
pubkey_hex/signature_hexand fail the comparison.The 0.45 -> 0.36.1 move therefore altered no cryptographic output and required no source
change — the API this crate uses (
sign/verify/SecretKey::from_seed/to_bytes/from_bytes) is identical across both lines. This matches thedig-capsuleprecedent.Lock effect
Removes the whole orphaned 0.45 family:
chia-bls0.45.0,chia-sha20.45.1,chia-traits0.45.1,chia_streamable_macro0.45.1.chia-blslines go 4 -> 3(was 0.28.2 / 0.36.1 / 0.42.1 / 0.45.0).
The two survivors are not this repo's declarations and are not fixable here — they are
deep transitives of the SDK itself, exactly the case CLAUDE.md §2.4b calls out:
2.
digstore-chain— BLOCKED, comment only, no version changeIntended:
chia-sdk-coinset/chia-sdk-test/chia-sdk-types/chia-wallet-sdk0.34 -> 0.36.0. I made that change, measured it, and reverted it.
datalayer-driver4.0.0 is the latest published release and hard-requireschia-wallet-sdk ^0.34.0. It is not optional here:digstore-chainpasses DataLayersingleton types straight across the SDK boundary, so moving only this crate resolves
chia-sdk-drivertwice and the build fails with the two lines meeting insingleton.rs:The rest of the family has already moved — the holdout is singular:
chia-wallet-sdkreqdig-wallet-backend^0.36dig-cat/dig-tips/dig-offers^0.36dig-options^0.36datalayer-driver^0.34.0Unblocked by a
datalayer-driverrelease onto 0.36; then this crate anddig-wallet-backendmove together in one cascade. Recorded as a manifest comment in the crate's existing
house style (it already documents a deliberate
dig-constantshold for the samesplits-the-tree-rather-than-advancing-it reason), so the next lane does not repeat this.
This needs a child ticket on the epic for the datalayer-driver release.
Blast radius checked
digstore-cryptois depended on by 9 crates (dig-client-wasm, cli, compiler, guest,host, prover, remote, stage, store) — effectively the whole workspace. Its public surface is
chia-free newtypes, so the radius is behavioural (BLS output), not type-level; the golden KAT
is the gate on that radius and it is green.
digstore-chainis depended on by dig-resolver, cli, subscription — untouched apart from acomment.
Verification
cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warnings -A …(CI's exact line)cargo build --workspace --lockedcargo test --workspace --lockedcargo deny check advisories bans sourcesadvisories ok, bans ok, sources okscripts/check-workspace-dep-versions.shall in-repo workspace dependencies declare version 0.28.1Installed binary (§3.5)
Guest wasm built first (
cargo build -p digstore-guest --target wasm32-unknown-unknown --release), thencargo install --path crates/digstore-cli --force --locked(exit 0):scripts/local-push-test.sh— 5/5 pass, push/pull/clone over a real in-process §21server. This exercises the BLS request-signing path (
sign_request/verify_request)end-to-end under the new
chia-bls, includingclone_rejects_unauthenticated_or_forged_head.digs compileroundtrip on the installed artifact (no chain, no spend):deterministic root
bb53bead…8d77, exit 0.initwas deliberately not exercised — it mints on mainnet and nothing here needed it.Leftover agent worktree
.claude/worktrees/agent-afa366a6361dbae8c/confirmed untracked and gitignored(
.gitignore:17 .claude/worktrees/), so it is not part of any published crate. Its stale=0.45.0copy was left alone as instructed. No finding.Ceiling audit
.claude/scripts/chia-ceiling-audit.shreadsorigin/main, not the working tree, so itstill reports the pre-merge state — currently 5 violations for
apps/digs.chia-bls).chia-sdk-*/chia-wallet-sdkentries indigstore-chain, all blocked on thedatalayer-driverrelease above.Version
Patch — dependency-only, no behaviour change. Workspace
0.28.0->0.28.1, with the coupled[workspace.dependencies] digstore-coredeclaration moved in lockstep (CI enforces it);digstore-crypto0.1.0->0.1.1.