doc.gno
1.35 Kb · 26 lines
1// Package gauntlet is a library for coding bounties that are graded by code,
2// on-chain, instead of by people.
3//
4// A Board holds challenges. A challenge is either a set of fixed test cases
5// (input -> exact expected output) or a Judge: two functions written by the
6// poster, one that generates fresh inputs from a seed and one that checks an
7// answer. Judged challenges cannot be gamed with a lookup table, because the
8// inputs are only known at the moment of grading.
9//
10// Solvers compete with a commit-reveal scheme:
11//
12// 1. Commit: the solver posts sha256(solutionPkgPath + ":" + salt). This fixes
13// their place in the queue before anyone can see their code.
14// 2. Deploy: the solver deploys their solution realm.
15// 3. Reveal: the solution realm calls the board with the salt and its Solve
16// function. The board recomputes the hash from the caller's package path,
17// grades the function, and records pass or fail.
18//
19// The winner is the earliest commit that passes. A later commit can never
20// overtake an earlier one, so copying someone's deployed code does not pay.
21// A commit that is not revealed within the reveal window expires, and its bond
22// is added to the reward.
23//
24// This package moves no coins. It returns Payouts that the hosting realm sends
25// with its banker, so any realm can import it and run bounties in any token.
26package gauntlet