Skip to content

Remove backward-compat shims and reset schema/table versions to v1 (pre-launch) #2367

Closed

Description

@thiras

Pre-launch rule (CLAUDE.md): no backward-compatibility shims, migration paths, or dual-format readers for wire, postcard, ABI, config, or storage changes. A scan of crates/ found several that slipped in. The ALPNs, EIP-712 domains, contracts and the admin_v1 namespace are already at their starting versions and need nothing.

Code to remove or reset

  • crates/node/src/channel_store.rs:203-217, 549, 901-960: drop_superseded_capability_tables deletes the old capability_v1 / capability_v2 tables every time the store opens. This is a migration hook. Delete the constants, both drop fns, the call at :549, and the test that injects legacy rows (pool_signer_key_bytes).

  • crates/incentive/src/buyer_pool_table.rs:69, 82, 90: tables are buyer_pool_state_v6 / buyer_pool_owner_index_v6 and BUYER_SUPPORTED_SCHEMA_VERSION = 4. Reset to _v1 / 1. Trim the doc text about orphaning rows written under older suffixes.

  • crates/common/src/config/mod.rs:521-580: RETIRED_ENV_VARS warns when DECDN_DELIVERY_CEILING is still set, for operators upgrading from an older build. Delete the table and the code that reads it.

  • crates/cli/src/commands/node.rs:354-379: the --wait guard against an "older binary" that does not honor wait_admin. Its error message talks about the "legacy SIGTERM-equivalent path" and tells the operator to upgrade the node. Make DrainResponse.wait_admin_honored a required field. Keep the refusal only for the case where another caller's drain won the race, and reword the message for that case.

  • crates/common/src/admin.rs:

    Make the fields required, or keep the defaults and drop the compat rationale.

  • crates/node/src/runtime/reload.rs:1269: the "config reload applied" log line is "retained for backwards compatibility with log scrapers". Keep it as a completion marker with a present-tense reason, or delete it.

  • crates/node/src/blacklist_watcher.rs:1046: a back-fill for takedowns "discharged by an older build". Check whether the "prior boot's eviction" case still needs it. If it does, reword the comment; if not, delete it.

  • crates/incentive/src/store.rs:188-197: CheckpointKey literals are "frozen for backward compatibility". Reword: a key only has to stay stable within one build's on-disk format.

  • crates/cli/src/commands/origin.rs:56, crates/common/src/cli/origin.rs:70: the "legacy fs: prefix" rejection with a hint is a shim for an old spelling. Delete it.

Wording only (present-tense canon)

Out of scope

ADR 013 in-version forward compatibility: decoders accept trailing bytes, and StreamRequestExt is sent as separate trailing bytes after StreamRequest. This is compatibility designed for after launch, not left over. Collapsing it is an ADR change and needs its own issue if wanted.

Notes

  • Do not bump channel_store's SUPPORTED_SCHEMA_VERSION. It is already 1.
  • Changing the redb table names orphans existing dev stores. That is expected pre-launch: testnet nodes re-adopt from chain (see the buyer-schema reseed note).
  • admin.rs is in decdn-common, not the public-api snapshot crates, so no .snap regen should be needed.

Activity

  1. added
    rust
    kind:chore
    status:mainnet-blocking
    on Oct 7, 2026
  2. self-assigned this
    on Oct 7, 2026
  3. assigned and unassigned on Oct 7, 2026
  4. moved this from In progress to Done in deCDNon Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:choreruststatus:mainnet-blocking

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions