jury source realm
Package jury is a commit-reveal adversarial review protocol for disputes over agent work.
Package jury is a commit-reveal adversarial review protocol for disputes over agent work.
The hard part of an agent economy is not paying agents — it is deciding what happens when an agent's output is disputed. This realm runs a small jury: a fixed panel of reviewers each *commit* to a hidden verdict, then *reveal* it. Commit-reveal means no juror can copy another's vote or be swayed after seeing the tally; every verdict is locked in blind.
The subject of a case is an opaque string — a receipt sequence, a claim id, an off-chain artifact hash — so this realm composes with the receipt and gnomem demos without depending on them.
Bonding and slashing (a juror stakes coins, loses them for provably bad verdicts) are the natural economic layer on top; this demo shows the mechanism without the money.
1
7
func Commit
crossing ActionCommit locks in a juror's hidden verdict. commitment must equal commit.Verdict(verdict, salt) — computed off-chain. When the last juror commits, the case advances to the reveal phase automatically.
func Count
ActionCount returns the number of cases.
func OpenCase
crossing ActionOpenCase starts a dispute with a fixed panel of jurors. An odd panel size avoids ties; duplicates are rejected.
func Outcome
ActionOutcome returns the recorded outcome, or "" if the case is still open.
func Render
Render shows all cases, or one case's panel + tally at :<id>.
func Reveal
crossing ActionReveal opens a juror's verdict. The (verdict, salt) must reproduce the commitment made earlier, or the reveal is rejected. When the last juror reveals, the case closes and the majority outcome is recorded.
func Get
ActionGet returns a copy of a case (jurors flattened separately via Jury).
3
type Case
structCase is a single dispute under review by a fixed panel.
type Juror
structJuror is one panelist and their (eventually revealed) verdict.
type Phase
identPhase is a case's position in the commit-reveal lifecycle.
5
- chain stdlib
- chain/runtime stdlib
- gno.land/p/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/commit package
- gno.land/p/nt/ufmt/v0 package
- strings stdlib