Add RotationVoted event for intermediate votes (#130) - #173
Conversation
collinsezedike
left a comment
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.
|
Two things to fix before this can merge:
|
312fe60 to
026242e
Compare
|
Fixed both items and all CI checks are now green: Regenerated packages/tholos-sdk/src/index.ts — this time verified byte-for-byte (diff -rq) against the exact CI-pinned stellar-cli 27.0.0. |
collinsezedike
left a comment
There was a problem hiding this comment.
Both prior findings (CONTRACT.md and the sdk bindings drift) are fixed. One left: docs/src/ARCHITECTURE.md's rotation event enumeration (line 148) still lists only RotationProposed / RotationExecuted / RotationCancelled, the same doc gap already fixed in CONTRACT.md and ROTATION_DESIGN.md but missed here. Please add RotationVoted there too.
026242e to
66e97c6
Compare
collinsezedike
left a comment
There was a problem hiding this comment.
ARCHITECTURE.md and ROTATION_DESIGN.md are both correctly updated with RotationVoted. One thing left: docs/src/CHANGELOG.md's Unreleased > Added section has no entry for this change. The file's own header states all notable changes are documented there, and every other contract-interface change in it follows that. Please add one closing #130.
181ab80 to
8984ce0
Compare
|
Added the CHANGELOG entry closing #130. All four docs (CONTRACT.md, ROTATION_DESIGN.md, ARCHITECTURE.md, CHANGELOG.md) now mention RotationVoted, the SDK bindings are regenerated and verified byte-for-byte against the CI-pinned stellar-cli, and all checks are green. Let me know if there's anything else! |
collinsezedike
left a comment
There was a problem hiding this comment.
Thanks for this, the CHANGELOG entry is correct. Merging now.
|
@Iker2522 If you have a moment, a star on the repo would be appreciated! |
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