Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

jury state

Back to all declarations

Phase

type

Phase is a case's position in the commit-reveal lifecycle.

Value

jury.Phase

PhaseCommit

jury.Phase

Value

<gnolang.StringValue>

PhaseReveal

jury.Phase

Value

<gnolang.StringValue>

PhaseClosed

jury.Phase

Value

<gnolang.StringValue>

Juror

type

Juror is one panelist and their (eventually revealed) verdict.

Value

jury.Juror

Case

type

Case is a single dispute under review by a fixed panel.

Value

jury.Case

cases

[]*jury.Case

// index 0 => ID 1

Value

<zero>

OpenCase

func(subject string, jurors [].uverse.address) uint64

OpenCase starts a dispute with a fixed panel of jurors. An odd panel size avoids ties; duplicates are rejected.

Open
OID
088a7b…0441:4
OpenCase details

Inspect func

Commit

func(caseID uint64, commitment string)

Commit 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.

Open
OID
088a7b…0441:6
Commit details

Inspect func

Reveal

func(caseID uint64, verdict bool, salt string)

Reveal 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.

Open
OID
088a7b…0441:7
Reveal details

Inspect func

Get

func(caseID uint64) jury.Case

Get returns a copy of a case (jurors flattened separately via Jury).

Open
OID
088a7b…0441:8
Get details

Inspect func

Outcome

func(caseID uint64) string

Outcome returns the recorded outcome, or "" if the case is still open.

Open
OID
088a7b…0441:9
Outcome details

Inspect func

Count

func() int

Count returns the number of cases.

Open
OID
088a7b…0441:10
Count details

Inspect func

allCommitted

func(c *jury.Case) bool
Open
OID
088a7b…0441:12
allCommitted details

Inspect func

allRevealed

func(c *jury.Case) bool
Open
OID
088a7b…0441:13
allRevealed details

Inspect func

mustCase

func(id uint64) *jury.Case
Open
OID
088a7b…0441:14
mustCase details

Inspect func

mustJuror

func(c *jury.Case, addr .uverse.address) *jury.Juror
Open
OID
088a7b…0441:15
mustJuror details

Inspect func

assert

func(cond bool, msg string)
Open
OID
088a7b…0441:17
assert details

Inspect func

Render

func(path string) string

Render shows all cases, or one case's panel + tally at :\<id>.

Open
OID
088a7b…0441:18
Render details

Inspect func

renderCase

func(id uint64) string
Open
OID
088a7b…0441:20
renderCase details

Inspect func

short

func(a .uverse.address) string
Open
OID
088a7b…0441:22
short details

Inspect func
Phase : type =jury.Phase
PhaseCommit : jury.Phase =<gnolang.StringValue>
PhaseReveal : jury.Phase =<gnolang.StringValue>
PhaseClosed : jury.Phase =<gnolang.StringValue>
Juror : type =jury.Juror
Case : type =jury.Case
cases : []*jury.Case =<zero>
OpenCase : func(subject string, jurors [].uverse.address) uint64 Inspect
Commit : func(caseID uint64, commitment string) Inspect
Reveal : func(caseID uint64, verdict bool, salt string) Inspect
Get : func(caseID uint64) jury.Case Inspect
Outcome : func(caseID uint64) string Inspect
Count : func() int Inspect
closeCase : func(c *jury.Case) Inspect
allCommitted : func(c *jury.Case) bool Inspect
allRevealed : func(c *jury.Case) bool Inspect
mustCase : func(id uint64) *jury.Case Inspect
mustJuror : func(c *jury.Case, addr .uverse.address) *jury.Juror Inspect
boolStr : func(b bool) string Inspect
assert : func(cond bool, msg string) Inspect
Render : func(path string) string Inspect
renderIndex : func() string Inspect
renderCase : func(id uint64) string Inspect
parseID : func(s string) uint64 Inspect
short : func(a .uverse.address) string Inspect