Skip to content

chore: bump signet-storage family to 0.8 (workspace 0.18.0)#143

Merged
Evalir merged 6 commits into
mainfrom
chore/bump-signet-storage-0.8
May 14, 2026
Merged

chore: bump signet-storage family to 0.8 (workspace 0.18.0)#143
Evalir merged 6 commits into
mainfrom
chore/bump-signet-storage-0.8

Conversation

@rswanson
Copy link
Copy Markdown
Member

@rswanson rswanson commented May 12, 2026

Summary

  • Bumps the signet-storage family (storage, cold, hot, hot-mdbx, cold-mdbx, storage-types) from 0.7 → 0.8 and migrates to the new API. Because 0.8 is a breaking upstream release with transitive constraints, this also bumps init4-bin-base 0.19.1 → 0.20.0 and the rest of the signet-* ecosystem (bundle, constants, evm, extract, types, tx-cache, zenith, journal, test-utils) 0.16 → 0.17. Workspace version goes 0.17.2 → 0.18.0 (minor, not patch — this is a breaking API change for downstream consumers of signet-node / signet-rpc).
  • Adopts the object-safe DynColdStorageBackend trait + ErasedBackend newtype added in signet-cold. ColdStorage and UnifiedStorage<H, B> default B to ErasedBackend, so the cold backend generic disappears from SignetNode, SignetNodeBuilder, and StorageRpcCtx<H>. Construction sites erase via UnifiedStorage::spawn_erased / ColdStorage::new_erased.
  • NodeColdBackend is gone — the cfg-selected concrete alias is no longer needed. StorageConfig::build_storage inlines the hot/cold connect() calls (replacing StorageBuilder + Either) so the SQL/MDBX branches can each be erased independently at spawn time.
  • Migrates the rest of the API surface:
    • ColdStorageReadHandle is gone; cold_reader() now returns ColdStorage (a cheap clone).
    • ColdStorageTask::spawn removed — use ColdStorage::new / new_erased or UnifiedStorage::spawn_erased.
    • UnifiedStorage::append_blocks / unwind_above are now async.
    • signet-types 0.17 wraps headers in SignetHeaderV1; sites that handled Sealed<Header> directly now bridge via SignetHeaderV1::new_unchecked / SignetHeaderV1::into_inner.
  • Pins the signet-storage family to the prestwich/cold-dyn-backend branch via [patch.crates-io]. Drop this once the changes ship on crates.io.

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo clippy --workspace --all-targets --no-default-features -- -D warnings
  • RUSTDOCFLAGS=\"-D warnings\" cargo doc --workspace --no-deps
  • CI green
  • Manual smoke against a dev stack before merging (storage migration risk)

🤖 Generated with Claude Code

Bumps the workspace to 0.18.0 and updates the signet-storage family of
crates (signet-storage, signet-cold, signet-hot, signet-hot-mdbx,
signet-cold-mdbx, signet-storage-types) from 0.7 to 0.8. This is a
breaking upstream release, so the rest of the signet ecosystem
(signet-bundle, signet-types, signet-evm, signet-zenith, etc.) and
init4-bin-base also move forward to coherent versions: 0.16 -> 0.17,
init4-bin-base 0.19.1 -> 0.20.0.

Code migration for the new storage API:

- UnifiedStorage<H> -> UnifiedStorage<H, B> (second generic for the
  cold-storage backend). The B parameter propagates through every
  type that holds the unified handle: StorageRpcCtx, SignetNode,
  SignetNodeBuilder, and all rpc endpoint signatures.
- ColdStorageReadHandle -> ColdStorage<B> (read handle is now a
  cheap clone of the cold storage handle itself).
- ColdStorageTask::spawn / ColdStorageHandle removed; use
  ColdStorage::new or UnifiedStorage::spawn.
- append_blocks and unwind_above on UnifiedStorage are now async.
- signet-types 0.17 wraps headers in SignetHeaderV1. Sites that
  used Sealed<Header> directly now bridge via
  SignetHeaderV1::new_unchecked and SignetHeaderV1::into_inner.
- node-config exposes a NodeColdBackend type alias that resolves to
  EitherCold when SQL features are on and to MdbxColdBackend
  otherwise, so callers can name the cold side concretely without
  caring which runtime backend was chosen.

Pre-push checks (fmt, clippy --all-features, clippy
--no-default-features, doc) all pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rswanson rswanson requested a review from a team as a code owner May 12, 2026 16:12
The `# Examples` block on `SignetNodeBuilder` referenced
`UnifiedStorage<H, B>` after the storage-0.8 migration but only declared
`H` on the `example` fn, so `cargo test --doc` failed to compile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rswanson rswanson self-assigned this May 12, 2026
Copy link
Copy Markdown
Member

@prestwich prestwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussion first

})
.into_consensus();
let sealed_header = Sealed::new_unchecked(block.header, hash);
// SignetHeaderV1 reseals the header; the recomputed hash matches the
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking:

I made init4tech/signet-sdk#234 to improve this as recomputing the hash is cruft

to_alias,
txns,
parent_header,
SignetHeaderV1::new_unchecked(parent_header.unseal()),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking:

I made init4tech/signet-sdk#234 to improve this as recomputing the hash is cruft


ExecutedBlockBuilder::new()
.header(header)
.header(header.into_inner())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment here that the storage API is signet-agnostic, and therefore the header type is simply Sealed<Header>

Comment thread crates/node-config/src/lib.rs Outdated
// features are disabled. Keep the dependency satisfied for the SQL-enabled
// build so callers can still type-name the backend uniformly.
#[cfg(any(feature = "postgres", feature = "sqlite"))]
use signet_cold_mdbx as _;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmm all of this is code smell that exists because the coldstoragebackend is not dyn compatible. So do we actually need to support BOTH mdbx and sql right now? Do we run both versions?

rswanson and others added 3 commits May 13, 2026 11:37
…ckend alias

Addresses review feedback that the per-endpoint `<B: ColdStorageBackend>`
propagation is code smell rooted in `ColdStorageBackend` not being
dyn-compatible. Replace the generic with a concrete `NodeColdBackend`
type alias defined in `signet-rpc`:

- `test-utils` feature → `MemColdBackend` (in-memory, for tests)
- `postgres`/`sqlite` features → `EitherCold` (runtime MDBX-or-SQL)
- default → `MdbxColdBackend`

This sets up the codebase so the followup boxing-futures upstream
work can flip the alias to `Box<dyn ColdStorageBackend>` in one place
rather than rewriting every endpoint signature.

- `StorageRpcCtx<H, B>` → `StorageRpcCtx<H>`
- `SignetNode<N, H, B, AliasOracle>` → `SignetNode<N, H, AliasOracle>`
- `SignetNodeBuilder::with_storage<H, B>` → `<H>`
- `signet_rpc::router::<H, B>()` → `<H>()`
- `signet-node-config` drops its own `NodeColdBackend` alias and the
  `signet-cold-mdbx as _` workaround; re-exported from `signet-rpc`
  via the new dep
- `StorageConfig::build_storage` cfg-gated to `not(feature = "test_utils")`
  since the production builder path is meaningless when the alias is
  swapped to `MemColdBackend`
- `signet-rpc/tests/eth_rpc.rs` marked `required-features = ["test-utils"]`
- `node-tests` now enables `signet-rpc/test-utils` so its in-memory
  storage matches the type the builder expects

Also addresses review item 3: comment on `block-processor` clarifying
that the storage API is signet-agnostic, so the header type at that
seam is plain `Sealed<Header>` rather than `SignetHeaderV1`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Migrates to the object-safe DynColdStorageBackend trait + ErasedBackend
newtype from signet-cold. ColdStorage and UnifiedStorage now default to
the erased backend, so the B generic disappears from SignetNode,
SignetNodeBuilder, and StorageRpcCtx.

NodeColdBackend is gone: the cfg-selected concrete alias is no longer
needed since erasure happens at construction time via
UnifiedStorage::spawn_erased / ColdStorage::new_erased. StorageConfig
inlines the connector logic for the same reason.

Pins the signet-storage family to the prestwich/cold-dyn-backend
branch via [patch.crates-io] until the changes ship on crates.io.

ps: tell swanny i love him 💛

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The doctest example was on the StorageConfig struct, but referenced
build_storage which is cfg-gated to not(feature = "test_utils"). Under
--all-features the example failed to compile. Moving it onto the method
itself means rustdoc only emits the example when the method exists.

Also disambiguate the two connect() calls in build_storage: both
HotConnect and ColdConnect impl connect() on MdbxConnector, which broke
the build under no-default-features.
Copy link
Copy Markdown
Member

@prestwich prestwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prestwich prestwich requested a review from Evalir May 14, 2026 09:09
signet-storage 0.9 was published with the object-safe DynColdStorageBackend
trait and erased defaults, so the prestwich/cold-dyn-backend patch can be
dropped. 0.9 transitively pulls signet sdk 0.18, and the FromEnv impl for
SqlConnector now lives in init4-bin-base 0.21.
@Evalir Evalir merged commit e0727ec into main May 14, 2026
7 checks passed
rswanson added a commit that referenced this pull request May 21, 2026
Breaking upstream bumps (signet-sdk 0.18->0.19, storage 0.9->0.10,
init4-bin-base 0.21->0.23) plus the new KnownChains::Gouda wiring
warrant a minor bump under 0.x semver. Mirrors the 0.17.2->0.18.0
precedent from #143 (storage 0.7->0.8).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fraser999 added a commit that referenced this pull request May 21, 2026
…ches (#144)

* chore(deps): pin signet-sdk + bin-base + storage to gouda branches

Pin signet-* (signet-sdk, storage) and init4-bin-base to the
gouda-branch SHAs in preparation for wiring KnownChains::Gouda
through this workspace.

- signet-sdk: 8a85a4636bccf971226a9c80c311832ce33e998c
- init4-bin-base: 72eb719abc33fdc169fd287658878eba5520953c
- signet-storage: 7841fabdd71dd5b58a7bd21ccd9b7d25d11ddc55

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(genesis): add gouda.genesis.json

Add the Gouda rollup genesis JSON. Derived from the parmigiana
template with Gouda-specific values: chainId 792669, deployHeight
1143386, host-side magic addresses (zenith/orders/passage/transactor),
USDC/USDT/WBTC addresses, and startTimestamp.

The host side reuses parmigiana.host.genesis.json (Gouda runs on the
parmigiana host chain — chainId 3151908).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(genesis): wire KnownChains::Gouda through GenesisSpec arms

Add the GOUDA_GENESIS_JSON const, GOUDA_GENESIS LazyLock,
GOUDA_GENESIS_HARDFORKS LazyLock, and Gouda match arms in
genesis_hardforks(), load_raw_genesis(), and load_genesis().

Gouda's host genesis reuses PARMIGIANA_HOST_GENESIS since it runs on
the parmigiana host chain.

Extend the load_files() test to cover Gouda. Document GOUDA_GENESIS in
the README.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* chore(deps): bump init4-bin-base to gouda branch with storage fix

Pins init4-bin-base at 68a60bbc613d4eded415ad51cc45f5f056d9be83 (gouda
branch) which includes signet-cold-sql via git-rev, resolving the
diamond dependency issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(deps): bump signet-sdk/bin-base/storage to gouda chains commit

* chore(deps): bump init4-bin-base to storage-fix commit (closes signet-cold-sql diamond)

* fix(genesis): correct gouda host startTimestamp; bump upstream gouda SHAs

- gouda.genesis.json: host.startTimestamp 1779051536 -> 1765226348
  (parmigiana host genesis anchor — gouda runs on parmigiana host)
- signet-sdk family: bump to ecce6a4 (host-start-timestamp fix)
- init4-bin-base: bump to dc2f86c (re-pin to fixed signet-sdk)
- signet-storage family: bump to d5bf6fa (re-pin to fixed signet-sdk)

* chore(deps): bump init4-bin-base to storage-diamond fix (b2f92e4)

* chore(deps): swap git pins for tagged releases (bin-base 0.23.1, signet-sdk 0.19, storage 0.10)

Now that init4-bin-base 0.23.1 ships with signet-cold-sql ^0.10.0,
the storage 0.10 / signet-sdk 0.19 / bin-base 0.23.1 trio resolves
without duplicate signet_cold_sql in the dep graph. Drops all gouda
git pins (init4tech/bin-base, init4tech/signet-sdk, init4tech/storage)
in favor of crates.io versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: bump workspace to 0.19.0

Breaking upstream bumps (signet-sdk 0.18->0.19, storage 0.9->0.10,
init4-bin-base 0.21->0.23) plus the new KnownChains::Gouda wiring
warrant a minor bump under 0.x semver. Mirrors the 0.17.2->0.18.0
precedent from #143 (storage 0.7->0.8).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* minor update to README

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Fraser Hutchison <190532+Fraser999@users.noreply.github.com>
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.

3 participants