Summary
deregister removes an entry by swap-remove: the last index slot is moved into the freed one and
the count drops. There is a test for removing the middle of three entries, but none for registering
again afterwards. That is the path where a stale Slot or Index key would surface, and it is the
normal path for a contract that fixes a bad manifest.
Acceptance Criteria
Tech Stack
Rust (edition 2021, toolchain 1.93.0 pinned in rust-toolchain.toml), soroban-sdk 27.0.4,
target wasm32v1-none. Build with stellar contract build, never cargo build. Tests are
#[cfg(test)] modules on Env::default(); run them with cargo test --all.
Summary
deregisterremoves an entry by swap-remove: the last index slot is moved into the freed one andthe count drops. There is a test for removing the middle of three entries, but none for registering
again afterwards. That is the path where a stale
SlotorIndexkey would surface, and it is thenormal path for a contract that fixes a bad manifest.
Acceptance Criteria
countis correct at each step.pagereturns every live entry exactly once, with no gaps and no duplicates.get.manifest-correction path.
Tech Stack
Rust (edition 2021, toolchain 1.93.0 pinned in
rust-toolchain.toml),soroban-sdk27.0.4,target
wasm32v1-none. Build withstellar contract build, nevercargo build. Tests are#[cfg(test)]modules onEnv::default(); run them withcargo test --all.