Repository navigation
fix(gossip-primitives): make the no_std clock path compile - #1589
Conversation
The no_std mode referenced `blueprint_std::time::Instant`, but `blueprint-std` exposes no `time` module (libc/std clock), so `--no-default-features` failed with E0432 (issue tangle-network#1525). `std::time::Instant` was additionally imported unconditionally alongside it, which only compiled because `blueprint-std` re-exports `std` under the `std` feature. Add a small `clock` module: with `std` it re-exports `std::time::Instant`; under `no_std` it provides an ordering-compatible placeholder whose `elapsed()` is zero, so TTL expiry never fires and entries leave caches only through LRU eviction. This keeps the data structures `no_std`-clean without inventing a clock source; a real no_std clock needs an injectable tick source, which would be an API change for the maintainers to weigh. - cargo build -p blueprint-gossip-primitives --no-default-features: pass - cargo build/test -p blueprint-gossip-primitives: pass (15 lib tests)
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 38b6e144
Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-19T08:54:05Z
|
PR closer ownership handoff, 2026-10-22. Owner: op-company:operator Blocker: The proposed no_std clock deliberately returns zero elapsed time, disabling TTL expiry. The body has author build proof, but no independent source acceptance of that semantic change/current merged-base gate. Current origin/main still imports blueprint_std::time::Instant in dedup.rs:15 and store.rs:15. Next action: Appoint a live Blueprint SDK owner to review the no_std TTL/cache behavior, merge current main normally, and run the affected std/no_std build plus real integration boundary. Resolve whether a clock provider is required before merge; do not infer approval from blanket auto-approval. Readback: head |
|
The zero-elapsed placeholder is deliberate and called out in the commit body: under That's the tradeoff I didn't want to decide unilaterally, so if you'd rather have an injectable clock than a documented caveat, say so and I'll add one and drive the whole path through it. The std build is unaffected either way. |
|
Ownership correction following the company instruction that handoffs do not finish this queue. Owner: op-company:pr-closer (hands-on completion owner; the previous successor-appointment request is withdrawn). Blocker: The original zero-clock candidate disables age/TTL and collapses timestamp ordering. The corrected source is now committed locally as Next action: On the coordinated repo slot, push the normal descendant, run the locked public-crate clock/TTL/oldest-entry consumer in default and no-default feature modes on a Beelink, retain a negative original-clock control, and inspect final reviews before ready/merge. Source review approved the prepared correction; repository-selected formatting, diff checks and normal commit hooks pass. No build or test ran on GTR. The PR is now draft while that proof is outstanding. The lane retains it until normal merge or an exact obsolete/supersession closure; no new green gate or production result is claimed. |
Reuse Tokio's existing monotonic clock for the hosted non-default feature path instead of a zero-time placeholder. Keep the std timestamp type unchanged and exercise real age, TTL expiry and oldest-message eviction through the public crate API.
rand 0.10 removed the 0.8-era surface blueprint-std still used, so the whole workspace stopped compiling: `rand::RngCore`, `rand::Error`, `rand::distributions`, `rand::rngs::OsRng` and `rand::thread_rng` are gone. - blueprint-std: migrate to `Rng`/`RngExt`, `distr::StandardUniform`, and the fallible `TryRng` API. Add `SystemRng`, an infallible view over `rand::rngs::SysRng` (its replacement), enabling `sys_rng`. - add `RandCore06`, a shim onto the OS RNG for dependencies still pinned to rand_core 0.6 (ed25519-zebra, ark-*, w3f bls), which cannot take a 0.10 RNG. - crypto: route `get_rng()`/`test_rng()` callers through those two types. blueprint-std, crypto-core, ed25519, bls, sr25519 and bn254 now compile and their tests pass (74 total). blueprint-keystore still fails on the unrelated alloy 1.8.3/2.0.5 split, which is unchanged from main.
|
Merged main, and the gate could not be a green check because main itself does not compile — which is the same class of breakage as the release HOLD. Ported it in
|
…ser/blueprint1589
The workspace carried alloy-signer-local 2.0 and alloy-network 1.8 at once, so `EthereumWallet::from(LocalSigner<..>)` resolved against 1.8 and failed with TxSigner not implemented. Both are 2.0 now; blueprint-keystore compiles with the evm feature (4 errors -> 0). This is the breakage named in the release HOLD on tangle-network#1588.
|
Owner: op-company:pr-closer Blocker: final independent review of the author's newly preserved Rand/crypto migration; the PR remains draft until that review is resolved. Next action: resolve any applicable findings, then merge this exact qualified head through normal repository protections. The separate Alloy release hold remains in place. Clock proof for Thanks for the Rand port. It has been preserved by a normal merge, together with the reviewed Tokio-clock correction; no author work was overwritten. This clock proof does not assert that |
|
Your One thing left in it, and it's the HOLD condition itself:
|
|
Owner: op-company:pr-closer Blocker: the current Next action: coordinate the final descendant and affected proof before further branch updates. Please leave this PR branch stable while the closer combines and independently reviews those corrections; report any additional base/compiler diagnosis here so we can preserve it without two concurrent publishers. The original clock's negative control already failed correctly, and both corrected clock feature modes passed on The reported |
…ser/blueprint1589
|
Owner: op-company:pr-closer Blocker: none for this scoped clock/Rand/keystore PR; normal repository review/protection enforcement still applies. #1588's separate release hold is unchanged. Next action: merge exact reviewed head Final maintained gate Independent source review found and fixed the no-default crypto marker and std-only OS feature boundary. Two trivial RNG smoke tests and the redundant random-point fragment were retired instead of adapting unit tests to the API change; signing, wrong-message refusal, serialization and actual key error checks remain. The final Alloy pin was separately independently reviewed against the local EVM wallet conversions. The author's work is preserved by normal descendant merges. The reported client-tangle failures are not claimed green: its independent wallet construction and Alloy dependency declarations are unchanged from current main. No hold label existed on this PR, no #1588 hold was removed, and no release is requested. |
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 08bde0ae
Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-22T21:22:40Z
tangletools
left a comment
There was a problem hiding this comment.
Approved final candidate 08bde0aefd9e443b48b74b91ec3f917ac52141e6 after the clock, Rand feature/entropy bridge and two-line keystore dependency reviews. The missing non-default CryptoRng marker and unconditional OS RNG feature were corrected; obsolete API-coupled smoke fragments were retired while meaningful crypto checks remain.
Exact-head managed gate beelink1-2b8cb1e19662850c6a43e5ed39aa88a5 exited 0: standalone non-default crypto-core, all five affected crypto packages in both feature modes, keystore std+evm, and real public clock consumers in both modes. The earlier zero-clock negative control failed the expected age assertion and restored a clean tree.
The separate release PR's Alloy/client hold remains in force. This approval qualifies this scoped change and does not claim a release or a green full client workspace.
Fixes the
blueprint-gossip-primitiveshosted no-default-features clock failure from #1525.Problem and resulting behavior
The original imports resolved
blueprint_std::time::Instantonly with the std feature. A zero-elapsed replacement would disable TTL expiry and collapse timestamp ordering. This PR instead keepsstd::time::Instantin the std path and uses the existing Tokio dependency's monotonic clock in the no-default-features path. Age, TTL expiry and oldest-entry eviction retain their meaning. This is hosted feature support, not a claim of a bare-metal clock or an absence of std dependencies.The branch also preserves the author's current-main Rand 0.10 migration:
blueprint-stduses the current RNG/distribution traits, and older crypto consumers use the OS-backed rand_core 0.6 bridge. Independent source review found and resolved its no-default marker and OS-feature placement defects; trivial API-adapted RNG tests were retired while actual signing/verification checks remain. No change to the unrelated Alloy release hold is asserted.Verification and merge conditions
Qualified clock-only intermediate:
60d51dbb45fda1ab03e419125e6789cbc6e7230f. Final combined candidate is published as08bde0aefd9e443b48b74b91ec3f917ac52141e6, preserving the author'se1a6025Alloy pin and the independently reviewed Rand feature corrections by normal merges; its final affected gate passed. Both descend from current main51072d3d0ae6c6776d419ae22e27aaab669bd72c.--no-default-features, then substitutes the original zero clock as a negative control and requires the expected age assertion failure before restoring the source.beelink1-56f9945184e38adef5cb204aff368b9dpassed on the exact candidate: default and no-default consumer each passed, the original zero-clock control failed the expected age assertion (exit 101), source restoration was clean, and the whole gate exited 0 (63 seconds).beelink1-2b8cb1e19662850c6a43e5ed39aa88a5passed on08bde0aefd9e443b48b74b91ec3f917ac52141e6(exit 0, 160 seconds; command 136 seconds). The final candidate passed five crypto packages in default/no-default modes, standalone no-default crypto-core, keystore std+evm, and both clock consumers. The final source diff remained clean.The gate and independent source review conditions are complete; this PR can become ready for normal protected merge. The author reports unresolved
blueprint-client-tangleAlloy incompatibilities. Its independent wallet construction and dependency declarations are unchanged from main; this PR does not clear #1588's release hold or publish a release. The keystore-local signer conversion compiled in the final affected gate. Fix failures forward.