Summary
register_with_presents_the_escrows_own_address asserts call.keys_xdr == keys, where keys is
the value the test itself passed in from its manifest() helper. The assertion compares
manifest() to manifest() and holds no matter what the contract's impl_maintainable! extends.
scripts/init_testnet.sh states in a comment that its manifest constants are "kept in step with the
contract by manifest() in examples/long_escrow/src/test.rs, which asserts against the same three
values." That safety net does not exist. If someone adds a key to the macro, every test still
passes and the published manifest silently goes stale — the exact drift the registry's
documentation warns about, manufactured by our own example.
Also worth fixing while here: register_with takes threshold and extend_to from the caller,
while extend_all uses the values compiled into the macro. The buyer can publish numbers that do
not match what the contract does.
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
register_with_presents_the_escrows_own_addressassertscall.keys_xdr == keys, wherekeysisthe value the test itself passed in from its
manifest()helper. The assertion comparesmanifest()tomanifest()and holds no matter what the contract'simpl_maintainable!extends.scripts/init_testnet.shstates in a comment that its manifest constants are "kept in step with thecontract by
manifest()inexamples/long_escrow/src/test.rs, which asserts against the same threevalues." That safety net does not exist. If someone adds a key to the macro, every test still
passes and the published manifest silently goes stale — the exact drift the registry's
documentation warns about, manufactured by our own example.
Also worth fixing while here:
register_withtakesthresholdandextend_tofrom the caller,while
extend_alluses the values compiled into the macro. The buyer can publish numbers that donot match what the contract does.
Acceptance Criteria
from the same constant it passes in — for example by extending TTLs through
extend_allandchecking which entries moved.
impl_maintainable!without updating the manifestfails the suite. Verify by making the change locally before submitting.
scripts/init_testnet.shis either made true or corrected.thresholdandextend_to: eitherregister_withstops takingthem and uses the compiled values, or the rustdoc states plainly that the caller can publish
values the contract does not honour.
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.