Summary
open_reveal_phase (contracts/tholos-v2/src/lib.rs:1322-1364) auto-reveals the asserter's and disputer's fixed positions the moment Reveal opens: it marks each position.revealed = true, sets position.agrees_with_outcome, and tallies their weight into resolution.agree_weight/disagree_weight (lib.rs:1340-1357). It publishes RevealOpened for the phase transition itself, but never a Revealed event for either of the two positions it just revealed.
By contrast, an external voter's explicit reveal() call does publish Revealed { id, voter, choice } (lib.rs:1562). An off-chain indexer or keeper reconstructing per-voter reveal state purely from Revealed events would silently miss the asserter's and disputer's votes, the two that are guaranteed to exist on every disputed assertion, even though the on-chain state itself is fully consistent.
Scope
- Emit a
Revealed event (or equivalent) for each of the asserter's and disputer's fixed positions inside open_reveal_phase, alongside the existing RevealOpened event, so indexers see a complete set of reveals without needing to separately special-case the two protocol-fixed positions.
- No behavior change to phase transition or weight tallying logic itself.
- Add a test asserting both events are published when
Reveal opens.
Proposed approach
Reuse the existing Revealed event struct, publishing one for assertion.asserter and one for disputer right after their Position writes in open_reveal_phase's loop, using each one's already-known agrees_with_asserter value as choice.
Summary
open_reveal_phase(contracts/tholos-v2/src/lib.rs:1322-1364) auto-reveals the asserter's and disputer's fixed positions the momentRevealopens: it marks eachposition.revealed = true, setsposition.agrees_with_outcome, and tallies their weight intoresolution.agree_weight/disagree_weight(lib.rs:1340-1357). It publishesRevealOpenedfor the phase transition itself, but never aRevealedevent for either of the two positions it just revealed.By contrast, an external voter's explicit
reveal()call does publishRevealed { id, voter, choice }(lib.rs:1562). An off-chain indexer or keeper reconstructing per-voter reveal state purely fromRevealedevents would silently miss the asserter's and disputer's votes, the two that are guaranteed to exist on every disputed assertion, even though the on-chain state itself is fully consistent.Scope
Revealedevent (or equivalent) for each of the asserter's and disputer's fixed positions insideopen_reveal_phase, alongside the existingRevealOpenedevent, so indexers see a complete set of reveals without needing to separately special-case the two protocol-fixed positions.Revealopens.Proposed approach
Reuse the existing
Revealedevent struct, publishing one forassertion.asserterand one fordisputerright after theirPositionwrites inopen_reveal_phase's loop, using each one's already-knownagrees_with_assertervalue aschoice.