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
Audit and clean up dead code following BFT removal
Disclaimer: push back on things that you think should stay.
Follow-up to #8312 (dead BFT execution code) and #8303 (unused KV read serialization). Earlier related cleanup: #4760 and #5176.
Findings are based on static repository-wide reference searches and caller tracing, not a whole-program reachability proof. Reconfirm against current main before removing anything. Not every finding is necessarily BFT-related.
Remove unused NodeSignature::get_serialized_size(), serialize(), and deserialize(). Signature tables use JSON serialization through ServiceValue; retain that path.
Remove the orphan ccf::ds::system::exec() utility/header.
Remove unused http::Message::get_headers(), clear_headers(), and get_content_data().
Remove unused http::Request::get_method() and get_path(). Same-named methods on RPC contexts, curl requests, and Merkle proofs are unrelated and live.
Remove unused NotifyingWriterFactory::get_outbound_work_beacon(); investigate its associated notification work below.
No in-repository production instantiations found. External applications may legitimately use these APIs.
Assess retention/deprecation of SeqnosByKey_InMemory and SeqnosByKey_InMemory_Untyped.
Assess retention/deprecation of SeqnosForValue_Bucketed.
Compatibility-sensitive BFT and legacy remnants
These are review items, not unconditional deletion candidates.
Document or review AppendEntries::contains_new_view; explicitly retained for wire compatibility.
Review raft_append_entries_signed_response; no producer or implementation remains. Preserve numeric values of subsequent wire message types.
Review ConsensusType::BFT and ServiceConfiguration::consensus; serialized configuration/API remnants rather than an active consensus-selection mechanism.
Review NodeSignature::hashed_nonce; emitted empty but still part of signature JSON.
Review deprecated PrimarySignature::commit_seqno and commit_view; emitted as zero, serialized, and checked by governance-history tests.
Retain or explicitly version legacy read-set headers and the max_conflict_version placeholder. Removing dead in-memory metadata does not justify deleting legacy decoders.
Assess the unused public ConsensusTypeMismatch error constant; no emission sites found.
Record an explicit retain/remove/deprecate decision for each compatibility-sensitive item.
Audit and clean up dead code following BFT removal
Disclaimer: push back on things that you think should stay.
Follow-up to #8312 (dead BFT execution code) and #8303 (unused KV read serialization). Earlier related cleanup: #4760 and #5176.
Findings are based on static repository-wide reference searches and caller tracing, not a whole-program reachability proof. Reconfirm against current main before removing anything. Not every finding is necessarily BFT-related.
Dead functions
No in-repository callers found:
KV and consensus (#8328)
Store::has_map_internal().Store::next_version()and its abstract declaration. Keep the parameterized overload andnext_version_unsafe().Store::unset_flag()and its abstract declaration. Keep the production-usedunset_flag_unsafe().Map::HandleCommitter::set_commit_version().Aft::is_retired_completed().Signatures and utilities (#8332)
NodeSignature::get_serialized_size(),serialize(), anddeserialize(). Signature tables use JSON serialization throughServiceValue; retain that path.ccf::ds::system::exec()utility/header.http::Message::get_headers(),clear_headers(), andget_content_data().http::Request::get_method()andget_path(). Same-named methods on RPC contexts, curl requests, and Merkle proofs are unrelated and live.NotifyingWriterFactory::get_outbound_work_beacon(); investigate its associated notification work below.Python infrastructure (#8345)
ccall_with_pipe().probably_free_remote_port(). Keep the live local-port finder.two_different().cert_bytes()andquote_bytes().mk_new()and its recursively dead helpermk().Dead variables, arguments, and recursively dead work
Remove the unused "last new map" tracking chain:
StoreState::last_new_mapStore::next_version()'sprevious_last_new_mapresultCommittableTxapply_changes::version_last_new_map, which is assigned but never readVersionLastNewMapalias, tuple component, updates, andcommit_new_mapargumentRemove unused per-key read-version metadata:
VersionV::read_versionReadLastReadVersionChangeSet::read_version: it implements live whole-map conflict tracking.Simplify the unreachable strict-version checking path:
Store::fill_maps()always passesignore_strict_versions=true.strict_versionsmember/constructor option.Remove or simplify
HandleCommitter::committed_writes:has_writes()occurs beforecommit()sets it.truestate is not observed in the current lifecycle.Remove the ignored
force_become_leaderargument fromAft::become_leader()and its callers.Remove
Consensus::periodic_end()and itsNodeStatecall:Eliminate unused outbound notification work:
outbound_work_beaconis allocated and notified, but no caller retrieves it to wait.Remove
PIPEandPopenimports from the process-helper module when removingccall_with_pipe(); it is their only user there.Nearly dead: test-/benchmark-only production code
Decide whether to retain, move into test support, narrow the interface, or remove. Test-only use is not itself a reason to delete useful coverage.
History and proofs
TxHistory/HashedTxHistory::get_proof()andverify_proof(); only history unit tests call these virtual APIs.Proof(vector)Proof::to_v()Proof::verify()MerkleTreeHistory::verify()TxHistory::append()/HashedTxHistory::append(); the raw-byte API is used only by history benchmarks. Production usesappend_entry().NullTxHistory->NullTxHistoryPendingTximplementation chain.Keep:
MerkleTreeHistory::get_proof(),Proof::get_root(),Proof::get_path(), andTxHistory::get_raw_leaf()have production callers.Location: History implementation
KV and consensus interfaces
Aft::is_candidate(),is_backup(), andis_active().Aft::get_last_idx(),get_committed_seqno(), andget_state_representation().Store::commit_view(); keep the underlying live commit-term state.Store::flag_enabled(); production usesflag_enabled_unsafe().Store::unset_global_hook()->Map::unset_global_hook().CommittableTx::commit_term().commit_version()has production callers.get_index()plumbing:LedgerEnclave::put_entry(), which ignores it.put_entry()'stermparameter is likewise test-consumed.get_term(), which has other live uses.HTTP and other utilities
Review test-/benchmark-only free HTTP builders:
build_header()build_request()build_post_header()build_post_request()build_header()is reached throughbuild_post_header().Request::build_request()member.Review test-only
http::Request::set_method()andset_query_param().Review test-only
SimpleResponseProcessor;SimpleRequestProcessorhas production use.Review test-only CBOR mutation helpers
ccf::cbor::with_element()andwith_entry().Review test-only
WorkerShutdownGate::is_shutting_down(); retain the live shutdown mechanism.Review test-/benchmark-only untimed
WorkBeacon::wait_for_work(); timed waiting remains live.Public indexing APIs: external-use caveat
No in-repository production instantiations found. External applications may legitimately use these APIs.
SeqnosByKey_InMemoryandSeqnosByKey_InMemory_Untyped.SeqnosForValue_Bucketed.Compatibility-sensitive BFT and legacy remnants
These are review items, not unconditional deletion candidates.
AppendEntries::contains_new_view; explicitly retained for wire compatibility.raft_append_entries_signed_response; no producer or implementation remains. Preserve numeric values of subsequent wire message types.ConsensusType::BFTandServiceConfiguration::consensus; serialized configuration/API remnants rather than an active consensus-selection mechanism.NodeSignature::hashed_nonce; emitted empty but still part of signature JSON.PrimarySignature::commit_seqnoandcommit_view; emitted as zero, serialized, and checked by governance-history tests.max_conflict_versionplaceholder. Removing dead in-memory metadata does not justify deleting legacy decoders.ConsensusTypeMismatcherror constant; no emission sites found.