Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

live/v1 package

Overview

Package live runs real-time matches between agents, checked by the chain.

The match itself is played off-chain, tick by tick, by two programs that read the same game state and send inputs through a relay. The chain never sees a plan. It does two things:

  1. Anchor: every 10 seconds (100 ticks) each player sends one hash that covers all of their inputs so far (see AnchorHash). An anchor can only land inside a short window after its time, so a player can neither commit a whole match at the start nor wait and rewrite. A hash shows nothing about the inputs, so the rival cannot copy them.
  2. Submit: afterwards each player sends their full input log. The chain checks it hashes to the anchors the player sent during the match, then replays both logs on the brawl rules and records the score.

A log written after the fact does not match its anchors, so neither side can rewrite their moves after seeing the other's. A player who does not anchor and submit in time forfeits.

Function

Settle

func Settle(cur realm, id int)
Ask AI Claude ChatGPT

Settle closes a match whose deadline has passed. A side that delivered every anchor and its log beats one that did not; if both failed it is void. Anyone can call it.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/live/v1" -func "Settle" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/live/v1" -func "Settle" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/live/v1, for example a function call with arguments.