Skip to content

Commit-Reveal Juror Voting to Prevent Vote Copying & Bribery #38

Closed

Description

@meshackyaro

Description

This issue aims to address the implementation of Commit-Reveal Juror Voting to Prevent Vote Copying & Bribery.

The core objective is to: Replace direct voting with a two-phase commit-reveal scheme so jurors cannot observe or copy others' votes before the reveal window closes.

By completing this feature, we will ensure that the TrustFlow protocol maintains its high standards for security, usability, and decentralized logic. This issue requires careful attention to the Smart Contracts architecture and adherence to the existing project conventions.

When picking up this issue, please ensure you document any new dependencies or architectural decisions made during development.

Component

Smart Contracts

Difficulty

🔴 Hard

Tasks

  • Review Soroban architecture and soroban-cli usage
  • Implement Rust logic for: Commit-Reveal Juror Voting to Prevent Vote Copying & Bribery
  • Write comprehensive unit tests in Rust
  • Ensure proper event emission for indexing
  • Run cargo fmt and cargo clippy
  • Verify soroban contract build successfully compiles to WASM without bloating size

Acceptance Criteria

  • Feature accurately implements the objective: Replace direct voting with a two-phase commit-reveal scheme so jurors cannot observe or copy others' votes before the reveal window closes.
  • Any PR that introduces Rust errors is automatically blocked
  • CI pipeline runs in under 3 minutes per PR
  • Code is properly reviewed and approved by codeowners

Estimated Time

3-5 days

Activity

  1. Godbrand0 commented on Jul 23, 2026

    @Godbrand0
    Contributor

    I would like to take on this issue.
    Understanding
    I understand the goal is to replace the current direct voting mechanism with a two-phase commit-reveal scheme so that jurors cannot see or copy other votes before the reveal window closes, thereby mitigating vote copying and bribery risks while preserving the protocol’s security and decentralization properties.
    Approach

    Review the existing Soroban architecture and voting-related contracts.
    Design and implement a clean commit phase (hash of vote + salt) and reveal phase with proper timing windows and validation.
    Emit clear events for both commit and reveal actions to support indexing.
    Write comprehensive unit tests covering happy paths, edge cases (late reveals, invalid commits, double commits, etc.), and access control.
    Ensure the contract builds cleanly to WASM, stays within size limits, and passes cargo fmt + cargo clippy.

    I have solid experience with Rust smart contracts (including Soroban), commit-reveal patterns, and writing production-grade unit tests. I will document any new dependencies or architectural decisions in the PR.
    Happy to start immediately and keep the PR focused and reviewable.
    Looking forward to contributing.

  2. grantfox-oss commented on Jul 23, 2026

    @grantfox-oss

    🦊 GrantFox — @Godbrand0 has been assigned to this issue as part of the Official Campaign | FWC26 campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #38)
    2. Your PR will be reviewed by the trustflow-protocol maintainers

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Jul 23, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!

    @Godbrand0's PR #52 was approved and merged by @meshackyaro.

    🏆 @Godbrand0: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (341 total points). Track your full progress on GrantFox.

    👏 Great work, @Godbrand0! Keep contributing to trustflow-protocol.

  4. added a commit that references this issue on Jul 30, 2026
    7989430
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions