You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: bump signet-storage family to 0.8 (workspace 0.18.0) (#143)
* chore: bump signet-storage family to 0.8 and migrate to new API
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>
* fix: declare missing B generic in SignetNodeBuilder doctest
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>
* refactor: drop B: ColdStorageBackend generic, use concrete NodeColdBackend 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>
* refactor: drop cold backend generic, use ErasedBackend defaults
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>
* fix: move build_storage doctest onto method, disambiguate connect()
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.
* chore: bump signet-storage to 0.9, signet sdk to 0.18, bin-base to 0.21
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.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: James <james@prestwi.ch>
0 commit comments