Skip to content Search Apps Documentation Source Content 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.

registry package

Overview

Package registry is spike (a) of tasarim-v6 §5.5: can a realm store an interface value handed over by ANOTHER realm and call it later, and what can that foreign code do to the registry while it runs?

It is deliberately tiny and is never part of the product. Two exports are intentionally unsafe probes and are marked as such: SharedBoard (returns a pointer into registry state) and UnsafeBump (a non-crossing exported mutator). Production core has neither; this spike measures why.

Functions

BoardCount

func BoardCount() int
Ask AI Claude ChatGPT

BoardCount reads the probe target.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.BoardCount()"

Result

Bumps

func Bumps() int
Ask AI Claude ChatGPT

Bumps reads the UnsafeBump counter.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.Bumps()"

Result

Fingerprint

func Fingerprint(id string) string
Ask AI Claude ChatGPT

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.Fingerprint()"

Result

IsRegistered

func IsRegistered(id string) bool
Ask AI Claude ChatGPT

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.IsRegistered()"

Result

Register

func Register(cur realm, e Engine) string
Ask AI Claude ChatGPT

Register stores the caller realm's engine. The id is the caller's pkgpath, so a realm can only ever register itself.

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/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry" -func "Register" -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/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry" -func "Register" -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
  

Render

func Render(path string) string
Ask AI Claude ChatGPT

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.Render()"

Result

RenderInTx

func RenderInTx(cur realm, id, seed string) string
Ask AI Claude ChatGPT

RenderInTx runs an engine inside a transaction. UNSAFE PROBE: a qeval discards writes, so this is how the spike observes on chain what engine code can do from a write path — the thing core never does (I-12).

Params

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/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry" -func "RenderInTx" -args $'' -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/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry" -func "RenderInTx" -args $'' -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
  

RenderWith

func RenderWith(id, seed string) string
Ask AI Claude ChatGPT

RenderWith runs a registered engine. Read-only: reached through qeval.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.RenderWith(,)"

Result

UnsafeBump

func UnsafeBump()
Ask AI Claude ChatGPT

UnsafeBump is a non-crossing exported function that mutates registry state. UNSAFE PROBE: interrealm v2 §4.1 says a non-crossing call into /r/registry borrows /r/registry's storage, so a foreign engine calling it SHOULD succeed. That is exactly why production core exports no state-changing non-crossing function (invariant I-12).

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.UnsafeBump()"

Result

VerifyFingerprint

func VerifyFingerprint(id string) bool
Ask AI Claude ChatGPT

VerifyFingerprint re-renders the sample and compares it with the hash stored at registration; false means the engine's output changed.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.VerifyFingerprint()"

Result

SharedBoard

func SharedBoard() *Board
Ask AI Claude ChatGPT

SharedBoard returns a pointer into registry state. UNSAFE PROBE: the spike checks that a foreign engine writing through it is refused by the VM (interrealm v2 §3.2 readonly check).

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa/spike/registry.SharedBoard()"

Result