v1 source realm
Package advent is Gnoël, an on-chain advent calendar with sealed guesses.
View source
Gnoël
Twenty-four riddles, sealed guesses, and one very small VM. Gnoël is an Advent calendar for Gno-mes: the organizer opens each door with a transaction, and every opened door stays playable. GnoWeb serves the calendar, a page for each riddle, its public seals, and the Nice List. The rich app adds the wallet flow, personal progress, and a live calendar.
GnoWeb on Onyx · GnoWeb beta · Rich app beta
Play
Connect Adena or use a local gnokey account. Get test GNOT from the Onyx faucet. Choose an open door and type an answer. Outer ASCII whitespace is ignored. Spelling, accents, and case matter.
Each address can have one pending guess per door. A player can replace it before review. A miss allows a new guess. A solve earns one point and closes that door for the solver. The Nice List shows the first 24 scores, with address order breaking ties. A day’s solve count is the number of addresses that solved it.
Open doors and review seals
On Onyx, the dedicated organizer account is the testnet deployment account. On other chains, the organizer defaults to the home realm’s admin. The organizer can delegate door publishing and corrections through SetPublisher and delegate verdicts through SetOracle. Both roles initially belong to the organizer. The companion lives in tools/gnoel. It prints commands by default and invokes gnokey interactively with -run.
Create a private key and its public companion outside the checkout:
1go -C tools tool gnoel keygen -key /path/to/private/gnoel.pem
Open a door with one transaction. The tool schedules the first review at the next midnight in Europe/Paris. Use absolute paths because Go executes the tool from tools/.
1go -C tools tool gnoel publish -day 1 -title 'A Tiny Runtime' \
2 -clue /path/to/door-01.txt -public /path/to/private/gnoel.pem.public -run
For a typo in an open door, send the corrected clue as a text file. The title, review schedule, oracle key, attempts, and scores are kept.
1go -C tools tool gnoel edit -day 1 -clue /path/to/door-01.txt -run
Keep a private solutions JSON file beside the PEM. Each entry contains the winning strings and the key used for that door. You can reuse the key across doors or rotate it for a new door.
1{
2 "1": {"key": "gnoel.pem", "answers": ["example answer", "accepted variant"]}
3}
Run the oracle at the end of the day and rerun it on subsequent days to catch late solves. Supply -day N to review only one door. Omit -run to inspect the proposed transactions.
1go -C tools tool gnoel review -solutions /path/to/private/solutions.json -run
For the GnoDev beta, add -chain moulstaging-1 -rpc https://rpc.gno-staging.moul.p2p.team -realm gno.land/r/moul/advent/v1. On a paused GnoDev, a review becomes available once a new block carries a timestamp past the cutoff. Use -signer for your gnokey name. A terminal-only player can use gnoel seal -day N -address g1… -answer /path/to/guess.txt. Add -replace for a pending guess.
What the public sees
The browser generates a fresh 32-byte random salt for every guess. SHA-256 binds the answer and salt to the network, realm, door, and wallet address. RSA-OAEP encrypts only the salt for the oracle, with the commitment as the OAEP label. The transaction contains the hash and ciphertext. The wallet sees those same fields.
The oracle decrypts the salt and tests the organizer’s accepted strings against the commitment. It publishes only a verdict for each ID. Anyone can read the commitments and verdicts. The oracle’s attestation is trusted. The private key can reveal the salts, so keep it and the solutions file out of Git and retain them for late guesses.
Calendar(), Leaders(), Progress(address), and paginated Attempts(day, start) give clients a public view of the same state as GnoWeb. The oracle includes a fingerprint of each batch in its review transaction, so replacing a pending guess invalidates any review computed against the old seal.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.
Package advent is Gnoël, an on-chain advent calendar with sealed guesses.
1
14
func Attempts
ActionAttempts returns one bounded page of the public record, starting at a 1-based ID.
func Calendar
ActionCalendar returns tab-separated rows for open doors, with title and clue in base64.
func CarryOver
crossing ActionCarryOver records a pending seal from the first deployment on Onyx.
func FinishCarryOver
crossing ActionFinishCarryOver closes imports and opens regular submissions and reviews.
func Leaders
ActionLeaders returns the top 24 addresses with their confirmed solves.
func Progress
ActionProgress lists the latest status of an address across all 24 doors.
func Publish
crossing ActionPublish opens a case. The RSA-2048 SPKI public key is pinned for that case so that rotating the key for a new door leaves old doors playable.
func Render
func ReplaceGuess
crossing ActionReplaceGuess reseals the caller's current guess while it awaits review.
func Review
crossing ActionReview records one verdict per consecutive attempt, starting at the first pending ID. A stale batch fails before it can apply verdicts to other guesses.
func SetOracle
crossing Actionfunc SetPublisher
crossing ActionSetPublisher delegates publishing and clue corrections to another account.
func Submit
crossing ActionSubmit publicly records the commitment and its encrypted random salt.
func UpdateClue
crossing ActionUpdateClue corrects the text of an open door while keeping its review schedule, oracle key and submissions intact.
12
- chain/runtime stdlib
- chain/runtime/unsafe stdlib
- crypto/sha256 stdlib
- encoding/base64 stdlib
- encoding/hex stdlib
- gno.land/p/moul/kit/tally/v0 package
- gno.land/p/moul/kit/ui/v0 package
- gno.land/p/moul/realmpath/v0 package
- gno.land/p/nt/bptree/v0 package
- strconv stdlib
- strings stdlib
- time stdlib