zeekayandhanzo-dev 48f873ceef atomic: Apply is NOT idempotent — say so, and prove it
atomiczap.Apply's doc claimed a replayed window is a harmless no-op, so a
caller could apply first and advance its flushed-seq marker after. That is
false, and a caller that believes it halts its chain.

chains/atomic/state.go: SetValue on a present key returns errDuplicatePut,
which is fatal on an accept path. Worse, SetValue on a key the peer has
already CONSUMED succeeds and re-creates the object, so the peer can be
funded twice. RemoveValue's behaviour is not uniform either — replaying the
consume of a real object is tolerated, replaying one of a never-present key
errors on the tombstone.

Corrects the comment to state what a cross-process caller must actually do
(commit state first, accept at-most-once) and adds the tests that pin all
three behaviours, so the next person to reach for at-least-once has to
delete a passing test to do it.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-08-07 06:36:50 -07:00
2026-08-03 21:17:30 -07:00
2026-01-08 23:16:01 -08:00
2025-12-19 09:03:26 -08:00
S
Description
Virtual machine types and interfaces for Lux blockchain
113 MiB
Languages
Go 100%