feat: RBAC auth manager, jackpot ZK verifier, Mississippi straddle, t… - #479
Merged
Marvy247 merged 1 commit intoAug 30, 2026
Merged
Conversation
…ime bank - Auth Manager (contracts/auth-manager): managed authorization layer between contracts with RBAC granular permissions (Permission bitmask + Role), direct grants, and multi-sig admin proposal flow (propose/approve/execute with timelock threshold). Adds contract-to-contract allowlist for cross-call authorization and integrates via TableState DataKey::AuthManager. - Jackpot Verifier (contracts/jackpot-verifier): verifies whether a completed hand qualifies for a jackpot (bad beat, royal flush, straight flush, quads, etc.) via ZK proof. Hand data submitted with proof/public_inputs binding deck_root, hand commitment, category/rank/score; qualification logic mirrors pot.rs thresholds. Supports custom jackpot types, claim anti-replay, and fundable pool. Poker-table integrates via verify_jackpot_with_proof and claim_jackpot_with_proof with cross-contract delegation. - Mississippi Straddle (contracts/poker-table): extend StraddlePosition with Button/Mississippi/Any/Custom and StraddleConfig with live_only, amount_cap, allow_reraise. Add Mississippi pending volunteer model (post/cancel_mississippi_straddle), capped effective_amount, ActiveStraddle state, live straddle turn-order handling in commit_deal, and re-raise rights enforcement in betting. Caps and live-only semantics enforced at posting. - Time Bank (contracts/poker-table): per-player reservoirs that replenish at a fixed per-hand and per-ledger rate, capped at max_seconds. Players spend extension_seconds via use_time_bank to push action_deadline (seconds->ledgers ceil/5). Enforced via contract-level timeout checks (should_enforce_timeout) and integrated with start_new_hand replenish_all and join_table init. Adds DataKey::TimeBank/TimeBankConfig and configure/get/use endpoints. Fix legacy multi-currency/ban-list/hand-cancellation/anti-cheat compilation issues and align Cargo workspace members.
|
@Chidubemkingsley Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
closes Add a contract-to-contract authorization framework #188
closes Implement a jackpot hand verification contract #187
closes Add configurable straddle and Mississippi straddle rules #186
closes Add a time-bank system for tournament play #185
Auth Manager (contracts/auth-manager): managed authorization layer between contracts with RBAC granular permissions (Permission bitmask + Role), direct grants, and multi-sig admin proposal flow (propose/approve/execute with timelock threshold). Adds contract-to-contract allowlist for cross-call authorization and integrates via TableState DataKey::AuthManager.
Jackpot Verifier (contracts/jackpot-verifier): verifies whether a completed hand qualifies for a jackpot (bad beat, royal flush, straight flush, quads, etc.) via ZK proof. Hand data submitted with proof/public_inputs binding deck_root, hand commitment, category/rank/score; qualification logic mirrors pot.rs thresholds. Supports custom jackpot types, claim anti-replay, and fundable pool. Poker-table integrates via verify_jackpot_with_proof and claim_jackpot_with_proof with cross-contract delegation.
Mississippi Straddle (contracts/poker-table): extend StraddlePosition with Button/Mississippi/Any/Custom and StraddleConfig with live_only, amount_cap, allow_reraise. Add Mississippi pending volunteer model (post/cancel_mississippi_straddle), capped effective_amount, ActiveStraddle state, live straddle turn-order handling in commit_deal, and re-raise rights enforcement in betting. Caps and live-only semantics enforced at posting.
Time Bank (contracts/poker-table): per-player reservoirs that replenish at a fixed per-hand and per-ledger rate, capped at max_seconds. Players spend extension_seconds via use_time_bank to push action_deadline (seconds->ledgers ceil/5). Enforced via contract-level timeout checks (should_enforce_timeout) and integrated with start_new_hand replenish_all and join_table init. Adds DataKey::TimeBank/TimeBankConfig and configure/get/use endpoints.
Fix legacy multi-currency/ban-list/hand-cancellation/anti-cheat compilation issues and align Cargo workspace members.