---ISSUE---
Problem
version_discovery_interfaces (src/version_negotiation.rs) is documented as returning "a standard set of expected backend interface symbols that downstream contracts should expose for version discovery":
pub fn version_discovery_interfaces(env: &Env) -> Vec<Symbol> {
let mut ifaces = Vec::new(env);
ifaces.push_back(symbol_short!("ver_info"));
ifaces.push_back(symbol_short!("mig_state"));
ifaces.push_back(symbol_short!("is_paused"));
ifaces
}
The actual contract methods are get_version_info, get_migration_state, and is_paused — ver_info and mig_state do not exist as methods anywhere in the crate.
Consequences:
- A consumer following the discovery protocol will invoke nonexistent functions: the documented use ("downstream contracts should expose for version discovery") tells peers to implement/query
ver_info; calling ver_info on this contract fails at the host boundary, so the discovery protocol is unusable as specced.
- The helper gives false guidance to the multi-contract ecosystem:
version_negotiation.rs's whole purpose is a standard protocol for peers; the discovery list is the one part of the protocol that names concrete entry points, and half of them are wrong.
- No test catches the mismatch: the tests assert the symbols are returned and distinct, but never assert that the symbols correspond to real methods.
Root cause
The discovery symbols were chosen as short aliases and never reconciled with the actual method names; the module was merged unwired (companion issue) so the mismatch went unexercised.
Why this is architecturally hard
- The fix options: (a) return the real method names (
get_version_info, get_migration_state, is_paused — but these exceed symbol_short's 9-char limit, so the function would need full Symbol::new values), or (b) document that the aliases are protocol-level names peers must map — which contradicts "expected backend interface symbols".
- The module is unwired (companion issue); fixing the list before wiring means deciding whether the discovery protocol is a real contract or aspirational documentation.
- Any change should add a test asserting each returned symbol resolves to an actual method on the contract surface (the descriptor-completeness companion issue's machinery would catch this class).
Acceptance criteria
Out of scope
Wiring the negotiation protocol into the contract (companion issue) and the coordination harness scope (companion issue).
Getting started
Good first files to read: apexchainx_calculator/src/version_negotiation.rs (version_discovery_interfaces), apexchainx_calculator/src/lib.rs (method names).
---ISSUE---
Problem
version_discovery_interfaces(src/version_negotiation.rs) is documented as returning "a standard set of expected backend interface symbols that downstream contracts should expose for version discovery":The actual contract methods are
get_version_info,get_migration_state, andis_paused—ver_infoandmig_statedo not exist as methods anywhere in the crate.Consequences:
ver_info; callingver_infoon this contract fails at the host boundary, so the discovery protocol is unusable as specced.version_negotiation.rs's whole purpose is a standard protocol for peers; the discovery list is the one part of the protocol that names concrete entry points, and half of them are wrong.Root cause
The discovery symbols were chosen as short aliases and never reconciled with the actual method names; the module was merged unwired (companion issue) so the mismatch went unexercised.
Why this is architecturally hard
get_version_info,get_migration_state,is_paused— but these exceedsymbol_short's 9-char limit, so the function would need fullSymbol::newvalues), or (b) document that the aliases are protocol-level names peers must map — which contradicts "expected backend interface symbols".Acceptance criteria
version_discovery_interfacescorresponds to a real, callable method (or the function is removed/re-scoped).Out of scope
Wiring the negotiation protocol into the contract (companion issue) and the coordination harness scope (companion issue).
Getting started
just testGood first files to read:
apexchainx_calculator/src/version_negotiation.rs(version_discovery_interfaces),apexchainx_calculator/src/lib.rs(method names).