chore: remove a third-party type from public API#59
Merged
Conversation
Evalir
approved these changes
May 4, 2026
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.

[Claude Code]
Per the ticket,
alloyandtrevmare out of scope (too entrenched). This PR tackles theroaringleak called out explicitly.sqlxwas investigated but pulled back to scope (see below).Changes
signet-storage-typesIntegerList::iter()returnsimpl Iterator<Item = u64> + Clone + '_instead ofroaring::treemap::Iter<'_>.roaringno longer appears in any public signature; it remains an internal dependency only.+ Cloneis retained so callers that forked the iterator continue to compile.sqlx - considered, deferred
An earlier draft hid
sqlxfromsignet-cold-sql's public API by introducing an opaqueSqlPoolConfigwrappingPoolOptions<sqlx::Any>, an opaqueSqlBackendErrorreplacingSqlColdError::Sqlx(sqlx::Error), and demotingSqlColdBackend::new(AnyPool)topub(crate). That draft is reverted in this PR.The blocker: a fully opaque
SqlPoolConfigonly exposes ~5 ofPoolOptions' ~15 knobs. Notably absent areafter_connect(needed for SQLitePRAGMAtuning -journal_mode=WAL,synchronous=NORMAL,busy_timeout),before_acquire/after_releasehooks,test_before_acquire, lazy connection, and pool fairness. Recovering each opaquely is its own design problem (callbacks-as-SQL-strings, etc.) and partial removal is the worst of both worlds - it leakssqlxtypes implicitly through reduced configurability while still requiring users to learn a new wrapper API. Either we hidesqlxcompletely (and re-expose every needed knob through opaque shims) or we don't. This PR chooses don't, for now.sqlxjoins the "out of scope" table.Remaining third-party types in storage public APIs (out of scope for this PR)
alloysignet-storage-types,signet-cold,signet-hot,signet-storageBlockNumber,B256,Address,Filter,Log,Receipt,TxType, table key/value types. Ticket says out of scope.trevm(re-exportsrevm)signet-storage-types::ExecutedBlock.bundle(BundleState);signet-hot::Bytecodestable value (Bytecode);signet-hot::RevmRead/RevmWriteimplDatabase/DatabaseRef/TryDatabaseCommit. Ticket says out of scope.sqlxsignet-cold-sql:SqlColdBackend::new(AnyPool),connect_with(_, PoolOptions<sqlx::Any>),SqlConnector::with_pool_options,SqlColdError::Sqlx(sqlx::Error). All-or-nothing ? see above.tokio_util::sync::CancellationTokensignet-storage(pub use+StorageBuilder::cancel_token,UnifiedStorage::spawn);signet-cold::ColdStorageTask::{new, spawn}tokio_stream::wrappers::ReceiverStreamsignet-cold::LogStreamtype aliasStream-implementing wrapper.tokio::sync::{mpsc, oneshot},tokio::time::Instantsignet-cold::Responderalias;signet-cold::StreamParams.{sender, deadline}bytes::BufMutsignet-storage-types::IntegerList::to_mut_bytes;signet-hot::ValSer::encode_value_toboundserde::{Serialize, Deserialize}signet-storage-types::{DbSignetEvent, DbZenithHeader}derivesauto_impl::auto_implsignet-hot::HotKv/HotKvReadderivesignet_libmdbxsignet-hot-mdbx::{Tx<K>, Cursor, SyncMode, Ro/Rw/RoSync/RwSync, TransactionKind}signet-but is functionally a fork ofreth-libmdbx. Treat alongside trevm/alloy.Verification
cargo +nightly fmt -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo clippy --workspace --all-targets --no-default-features -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-depscargo t -p signet-storage-types