Summary
MaintenanceState stores last_maintained and last_keeper
(crates/maintainable/src/types.rs). extend_all returns the number of keys it extended, but that
number is thrown away — a cross-contract reader only sees that something happened.
rent_vault pays a tip based on lk_state(). It currently cannot tell a run that extended every
declared key from one that extended none because they were all above the threshold. Storing the
count gives the vault something to check and gives keepers an auditable record.
This changes a stored #[contracttype], so it needs a decision about existing deployments — the
testnet contracts hold state in the old shape.
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
MaintenanceStatestoreslast_maintainedandlast_keeper(
crates/maintainable/src/types.rs).extend_allreturns the number of keys it extended, but thatnumber is thrown away — a cross-contract reader only sees that something happened.
rent_vaultpays a tip based onlk_state(). It currently cannot tell a run that extended everydeclared key from one that extended none because they were all above the threshold. Storing the
count gives the vault something to check and gives keepers an auditable record.
This changes a stored
#[contracttype], so it needs a decision about existing deployments — thetestnet contracts hold state in the old shape.
Acceptance Criteria
MaintenanceStategains a field for the number of keys extended on the last run.__lk_extend_allwrites it.Maintainedevent carries the same count.a run below it.
lk_state()reads an entrywritten by the old layout, and what an adopter has to do about it.
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.