Add RotationVoted event for intermediate votes (#130) - #173
Open
Iker2522 wants to merge 1 commit into
Open
Conversation
collinsezedike
requested changes
Sep 4, 2026
collinsezedike
left a comment
Collaborator
There was a problem hiding this comment.
Two doc gaps in files this PR doesn't touch, so I can't anchor them inline. docs/src/CONTRACT.md's Events table and vote_rotation prose list RotationExecuted and RotationCancelled but not the new RotationVoted, so a reader concludes intermediate votes emit nothing, the exact gap this PR fixes on-chain. docs/src/ROTATION_DESIGN.md's indexer-facing event enumeration and its vote_rotation walkthrough have the same omission, so an indexer author following that doc still misses intermediate votes. Please update both, this PR's own checklist also left CONTRACT.md unchecked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vote_rotationonly published events on terminal outcomes (execute or deadlock-cancel). An intermediate vote that neither passes nor deadlocks the proposal fell through silently, so an off-chain indexer watching only events couldn't see votes accumulate on an open proposal.Added a
RotationVotedevent (same#[contractevent]pattern asRotationExecuted/RotationCancelled), published right before theOk(None)return once both terminal checks are ruled out. No changes to vote-counting/majority/deadlock logic.Test plan
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo testpass locallyCONTRACT.mdupdated if the public interface changedscripts/testnet-smoke.shrun against testnet, if this changes contract behavior in a way that affects the deployed flowcargo test -p tholos— 70 passed, 0 failed, including the existing terminal-path tests (test_rotation_requires_majority_then_executes,test_deadlock_autocancels_rotation) unchanged. New test asserts the exact event viato_xdr()comparison.Closes #130