Give committed changes a receipt

Rechain records accepted changes as blocks. See how a Wasm fixture tests refusals, block indices and continuity across an upgrade.

Put the business change in the log

A receipt should point to a committed change that a caller or operator may need to find later. The basic Rechain canister has a counter and a collection of named objects. A command becomes a typed action. Each reducer checks the part it owns and prepares its change. Once all reducers accept, Rechain applies the changes and appends the action’s block. A zero increment or an empty object name leaves both state and block position as they were.

Give callers something they can look up

The example uses the canister and the next block index to form a created object’s ID. The public reads can find the object and fetch recorded blocks. Use the accepted action’s index or domain ID when you design a response for a caller. Think about which fields people will need to verify the change later and what details may be sensitive in an exportable history.

See what the Wasm run checked

The October 20 smoke run refused a zero increment, accepted a counter increment and created an object. It checked state and blocks, drained the canister and upgraded it to the same Wasm with memory kept. The values remained readable and the next increment used the next index. This is a continuity check for that exact artifact. Include changes to the recorded format in your own upgrade rehearsal if a future release will read old actions differently.

Code, tests, and related material