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.

hlmailbox source realm

Package hlmailbox is the gno.land end of the bridge's message layer (bridge/PLAN.md §5.1): realms send messages to ot...

Overview

Package hlmailbox is the gno.land end of the bridge's message layer (bridge/PLAN.md §5.1): realms send messages to other chains through it and take the messages other chains send them from it. Messages, ids and the merkle tree are Hyperlane's byte for byte (gno.land/p/…/hyperlane/v0), so the Solana side runs Hyperlane's own programs.

Out. Dispatch takes a message from the realm that calls it, numbers it, puts its id in the merkle tree, keeps the message, and emits the Dispatch event the Solana light client proves from LastResultsHash (§13: id, nonce, origin, destination, sender, recipient, hash). Reemit emits it again from a fresh block, by anyone.

In. A recipient realm pulls its own messages: it calls Process with the message and the verifier's metadata; Process checks the caller is the recipient, that the message is for this chain and was never delivered, marks it delivered, and only then asks the active verifier — a realm that registered itself here, chosen by GovDAO by pkgpath — whether the message is genuine; a verifier's error is a panic, so the transaction and the mark revert together and a refused message stays deliverable.

Who may change what. Nobody holds an admin key: every setting moves by a decision made with this realm's builders (gov.gno), at once or after 7 days (§5.3), and nothing but Launch and cancel before the one-shot Launch. Who decides is the governor's (M1k): the compiled launchGovernor alone, by its own call through Govern, until it yields (Yield, once, for every bridge realm at once), and GovDAO's proposals from then on — or from the first block, when no governor was compiled. The guardians and watch keys (flags.gno) can only pause: three flags per key per route — sends, credits, payouts — which the routes ask about with Paused. Every launch value is compiled in below and written by init.

Constants 3

const seatCount, guardians, FnSends, FnCredits, FnPayouts, maxFlagIDs, launchSeat1, launchSeat2, launchSeat3, launchSeat4, launchSeat5, launchSeat6

 1const (
 2	seatCount  = 6
 3	guardians  = 4
 4	FnSends    = "sends"
 5	FnCredits  = "credits"
 6	FnPayouts  = "payouts"
 7	maxFlagIDs = 256 // ids a payouts flag may name
 8
 9	// The launch seats (§5.3, §11.9): PLACEHOLDERS until the four people and the two monitors have keys — seat 1
10	// is Jae's cold key, the rest derived test addresses — replaced in the deployed source the launch vote reads.
11	launchSeat1 = address("g1562mcsvwrd2hm3nj7and8ggexdqd3hnag20cmv")
12	launchSeat2 = address("g16l5nrlrp9pd8rdld7vzylrthfusv30apeq0n6z")
13	launchSeat3 = address("g1acuz6nhl9hyka2a4t9t965kmd8t355hy7ukur5")
14	launchSeat4 = address("g1d6nckzj9n8udw8apwrxfg929p8zm330d664ucy")
15	launchSeat5 = address("g1m8d47hlnmp77rpkamxphlx9q6jfvejt89j7hfj")
16	launchSeat6 = address("g1gdudkuvqdxwfncvmualymvyufdj8u7m893czuv")
17)
source

const SymbolGNOT, SymbolBUBBLE

1const (
2	SymbolGNOT   = "GNOT"
3	SymbolBUBBLE = "BUBBLE"
4)
source

The routes a successor announces for (AQ5): a migrate names only a successor announced for its own route, so a slip never sends the GNOT lock to a realm whose code moves BUBBLE, or the other way round.

const namespace, pkgPath, DomainMainnet, DomainTest, mainnetChainID, SolanaMainnet, SolanaLocal, launchVerifier, launchThreshold, launchSigners, launchRouteGNOT, launchRouteBUBBLE, hlgovPath, maxSigners

 1const (
 2	namespace = "gno.land/r/g1zdaz6sypk5tdsjc2fzsqrrn4ttn8qzmnl4waqp/"
 3	pkgPath   = namespace + "hlmailbox" // must match gnomod.toml
 4
 5	// DomainMainnet and DomainTest are gno.land's Hyperlane domain ids, "GnoL" and "GnoT" in ASCII; nobody in the
 6	// Hyperlane registry holds either (2026-10-10). gnoland-1 is mainnet; every other chain is a test chain.
 7	DomainMainnet  = uint32(1198419788)
 8	DomainTest     = uint32(1198419796)
 9	mainnetChainID = "gnoland-1"
10
11	// SolanaMainnet and SolanaLocal are the destination's domains: Solana's own on mainnet; on any other gno chain
12	// the one the local test validator and the e2e run use (Hyperlane's "solanatestnet"). Devnet is 1399811151.
13	SolanaMainnet = uint32(1399811149)
14	SolanaLocal   = uint32(1399811150)
15
16	// The launch values (§5.3): the active verifier, the signers and their rule, the routes. The signer keys below
17	// are PLACEHOLDERS (the three test signers of the vectors) until the operator's three machines exist; the
18	// launch vote reads the real ones in the deployed source. bridge/local/e2e.sh swaps them for its run's keys.
19	launchVerifier    = namespace + "hlverifier"
20	launchThreshold   = 2
21	launchSigners     = "e2c2b621677535e5b2a0a92f37aec61e7ce0397cf1cf713f91a18227eafec2ef,d837b6369a315b6d26babddc0af241d8908a1809481b29e98365965cf8301689,c0b2dc0da05eb6ee67b68068611a72858f3093c79e8d90589ff2ac1f0ea4da26"
22	launchRouteGNOT   = namespace + "hlgnot"
23	launchRouteBUBBLE = namespace + "hlbubble"
24	hlgovPath         = namespace + "hlgov" // r/hlgov: the one realm that notes a route's enrolment on Solana (NoteEnrolled, AR1)
25
26	maxSigners = 255 // a signature names its signer in one byte
27)
source

Functions 55

func ActiveVerifier

Action
1func ActiveVerifier(origin uint32) string
source

ActiveVerifier is the pkgpath of the verifier GovDAO chose for an origin ("" if none).

func AddRoute

crossing Action
1func AddRoute(cur realm, path string)
source

AddRoute registers a successor route realm (a route's migrate names it), so flags can be set on it too, and records the succession both ways (AQ1): the caller's `successor`, the new route's `predecessor`, which is what lets the successor take a message addressed to the predecessor (Process) — the burns name the predecessor until kind 6 enrolls the successor. The path is a deployed realm's: a sub-identity's (`host#subpath`) is refused, since the route powers are keyed by exact pkgpath (mustBeRoute) and such a path would hand them to a token its host mints for free; a path that is a route already is refused (a chain never cycles). A route that migrated already re-points its migration (AR2): its migrate decision names another successor while the first pulled nothing — the route's own state refuses once page 0 moved, and a first successor that migrated on holds the lock, so it is refused here too — and the first's registration is dropped with the flags copied to it, the new path taking its place with the flags standing on the route now.

func AnnounceSuccessor

crossing Action
1func AnnounceSuccessor(cur realm, symbol string)
source

AnnounceSuccessor is how a realm offers itself as a route's successor (R25): called once from that realm's own code (its init, usually), naming the route it succeeds — GNOT or BUBBLE (AQ5: a migrate names only a successor announced for its own route) — it is kept under the caller's exact pkgpath, which a route's migrate builder and its closure require of the path they name — so the lock never goes to a path with no realm behind it (a typo, or an undeployed path whose namespace owner could deploy anything there and pull the lock). Only an /r/ realm, with its own cur: a sub-realm identity (host#subpath, a token a realm mints for free) is refused as in RegisterVerifier, so every entry costs a package deployment and the listing (render.gno) is bounded. Nothing is ever withdrawn; GovDAO reads the successor's source before it votes, as before.

func ClearEnrolled

crossing Action
1func ClearEnrolled(cur realm, path string)
source

ClearEnrolled is r/hlgov's word, from its cancel closure, that the kind 6 whose note stands on the route at path was cancelled (R37, AS2): the note goes, so the route's refund gate reads "no kind 6" again and its clock restarts with a re-proposal — before, a cancelled, lost or held kind 6 left the note standing and the gate opened on the realm's clock alone while the predecessor was still the enrolled router. r/hlgov's exact pkgpath alone, for a route; a route with no note is left as it is.

func ClearFlag

crossing Action
1func ClearFlag(cur realm, route, fn string)
source

ClearFlag clears the caller's own flag on one function of a route. It resets no meter.

func ClearFlags

crossing Action
1func ClearFlags(cur realm, fn string) bool
source

ClearFlags clears every seat's flag for fn on the calling route — the void builder's andUnpause option (§5.3), which reopens payouts in the same closure as the void. It reports whether any flag was cleared.

func Count

Action
1func Count() uint32
source

Count is how many messages went out: the next message's nonce.

func Delivered

Action
1func Delivered(id string) int64
source

Delivered is the block height a message (by id, in hex) was delivered at here; 0 if it never was.

func Dispatch

crossing Action
1func Dispatch(cur realm, destination uint32, recipient [32]byte, body []byte) [32]byte
source

Dispatch sends body to recipient on destination, from whoever calls it — a realm, usually — and returns the message's id. The sender is the caller's address as Hyperlane carries one; the nonce is the message's index in the merkle tree. The event is §13's: id, nonce, origin, destination, sender, recipient, hash.

func Dropped

Action
1func Dropped(path string) string
source

Dropped is the predecessor whose re-point dropped the realm at path from the line (R35) — a route no more, in nobody's chain, that neither sends (Dispatch refuses it) nor takes (Process refuses it) — or "" for a route, a realm never registered, or one registered afresh since.

func DroppedRoutes

Action
1func DroppedRoutes() []string
source

DroppedRoutes lists the dropped successors' pkgpaths (R35's tombstones; Dropped names each one's predecessor): routes no more, whose addresses the routes still refuse as a send's recipient and sweep at a credit (AT6), as a registered route's — a holder may have pasted one as a deposit address while its page printed it as the lock's holder to be, and a claim credited to it would be paid into a realm no counter of the line holds. Bounded by the re-points a bridge sees in its life, as Routes is by its migrations.

func Enrolled

Action
1func Enrolled(path string) (height, at int64)
source

Enrolled is the block height and unix time r/hlgov last dispatched a kind 6 enrolling the route at path as the token's router on Solana (NoteEnrolled); 0, 0 if never, or for no route. A route's refund builder waits 7 days after it (AR1).

func Execute

crossing Action
1func Execute(cur realm, id int64)
source

Execute applies a queued decision whose 7 days have passed. Anyone may call it; the relayers do. A queued rotation of signers or seats applies only while the set it was decided against still stands: one that finds the signers or the seats changed in between panics (it stays pending; GovDAO cancels it and proposes afresh).

func Flagged

Action
1func Flagged(route, id string, height int64, verifier bool) bool
source

Flagged is whether some guardian's standing payouts flag on route names this claim — by its message id, or by a range covering the height it was credited at (a "since" range only if the verifier credited it): the test that makes GovDAO's void of that claim at once (§5.3). A watch key's flag never counts.

func Flags

Action
1func Flags(route string) []string
source

Flags lists the standing flags of a route as "fn seat@time[ids…]" lines.

func Govern

crossing Action
1func Govern(cur realm, r Request)
source

Govern is the governor's way in before the yield (M1k): the governor — the compiled launchGovernor, by its own transaction (a MsgCall, or the MsgRun script that makes the request in the same transaction; never through another realm) — makes a builder's decision directly, the same closure GovDAO's proxy runs after the yield: the same checks, the same at-once test, the same 7-day queue and 14-day deadline, the same record and events. The closure is called non-crossing, in this frame, so it reads the governor from cur.Previous() as it reads the proxy after the yield. Refused for anyone else, and for everyone once the governor yielded (or when none was compiled): GovDAO's proposals decide then. A request past its 14 days is refused (the deadline error, as a proposal's denial) and made afresh.

func Hook

Action
1func Hook() string
source

Hook is this mailbox's merkle tree hook id in hex: the 32 bytes every checkpoint for a message from here names.

func IsGuardianSeat

Action
1func IsGuardianSeat(n int) bool
source

IsGuardianSeat is whether a seat number is a guardian's (1–4) rather than a watch key's (5–6).

func IsRoute

Action
1func IsRoute(path string) bool
source

IsRoute is whether a pkgpath is one of the route realms this mailbox keeps flags for.

func LaunchedAt

Action
1func LaunchedAt() int64
source

LaunchedAt is the unix time the Launch decision executed, 0 before: the routes' meters start empty there.

func Live

Action
1func Live() bool
source

Live is whether the Launch decision has executed: before it the routes refuse sends and credits.

func MarkDone

crossing Action
1func MarkDone(cur realm, id string)
source

MarkDone marks a message id delivered without a message: a route's credit-by-vote (§5.3) does it, so the id can never be credited twice. Only a registered route may call it, and only for an id not done.

func Message

Action
1func Message(nonce uint32) (message, root string)
source

Message is the message dispatched with this nonce, in hex, and the tree's root right after it ("", "" if none).

func NoteEnrolled

crossing Action
1func NoteEnrolled(cur realm, path string, height int64)
source

NoteEnrolled is r/hlgov's note, from its kind-6 closure, that it dispatched a decision enrolling the route at path as the token's router on Solana at this block height (AR1): the route's refund builder and its apply read it (Enrolled) and refuse a refund until the note is 14 days old (R37: a week for the delivery, a week for Solana's own clock), since a refunded send stays deliverable on Solana until the predecessor's router is replaced and a refund that lands first lets one stranger's Reemit and delivery mint it twice. The latest note counts: a later kind 6 for the route restarts the wait; a cancelled one clears it (ClearEnrolled). Necessary, not sufficient — the realm cannot see Solana; hlwatch reads the token's enrolled router there and alarms a refund proposal whose successor the token has not enrolled.

func NotePulled

crossing Action
1func NotePulled(cur realm, path string)
source

NotePulled is the predecessor's note, from its Pull, that the successor its migrate registered has pulled page 0 (R35): the lock and the counters moved with it, so the migration is under way — the route's own state refuses a re-point from here on, and AddRoute refuses one too — and r/hlgov's kind 6 may enrol the successor: before it a kind 6 could name a route a re-point then drops, leaving Solana's token minting for a realm in nobody's chain. Only the route whose successor it is notes it; a second note (a second Pull of page 0) changes nothing.

func Paused

Action
1func Paused(route, fn string) bool
source

Paused is what the routes ask: whether any seat's flag for fn stands on route.

func PayoutsEpoch

Action
1func PayoutsEpoch(route string) (epoch, at int64)
source

PayoutsEpoch is how many times an unpause or a removal cleared a standing payouts flag on route, and when the last one did: the routes empty their meters when it changes (§5.4).

func Predecessor

Action
1func Predecessor(path string) string
source

Predecessor is the route whose migrate registered path as its successor; "" for a launch route, or no route.

func Process

crossing Action
1func Process(cur realm, metadata, message []byte) (origin uint32, sender [32]byte, body []byte)
source

Process takes a message from another chain for the caller, who must be its recipient — or a route that succeeds the recipient along the chain of migrations (AQ1: a burn addressed to a migrated route is the successor's to credit, once its last page is in; the route decides when), a successor a re-point dropped from that chain counted as a hop of its predecessor's (R35: the line's last realm takes what is addressed to it; the dropped realm itself, a route no more, is refused). metadata is whatever the origin's active verifier needs (the signers' checkpoint and signatures, for the ed25519 one). The message must be for this chain and never delivered; it is marked delivered, then the verifier is asked, and a verifier's error is a panic, so the whole transaction reverts with the mark and the message stays deliverable (§5.1). It is then handed back for the recipient to act on.

func Pulled

Action
1func Pulled(path string) bool
source

Pulled is whether the successor at path pulled page 0 of its predecessor's migration, as the predecessor's Pull noted it (NotePulled): the lock and the counters moved, so the migration is never re-pointed and a kind 6 may enrol it (R35). False for a launch route, a successor that pulled nothing, or no route.

func Reemit

crossing Action
1func Reemit(cur realm, nonce uint32)
source

Reemit emits the Dispatch event of a message dispatched earlier again, in this block, by anyone: a message dispatched before a validator-set change, or whose results leaf is bigger than the ISM accepts, is then delivered from a fresh header. The id is unchanged, so the other side's processed-message record still refuses a second delivery.

func RegisterVerifier

crossing Action
1func RegisterVerifier(cur realm, v Verifier)
source

RegisterVerifier is how a verifier realm offers itself: called once from that realm (its init, usually), it is kept under the caller's pkgpath, which GovDAO names to activate it. Only an /r/ realm may register, and once; a sub-realm identity (`cur.Sub(…)`, a token a realm mints for free, whose pkgpath `host#subpath` passes the prefix test) is refused, so every entry costs a package deployment and the listing (bounded; render.gno) cannot be flooded. Nothing is ever unregistered.

func Render

1func Render(path string) string
source

Render:

Example
 1""                  the mailbox's page: the launch values live or waiting, verifiers, signers, seats, flags
 2"decisions"         the decisions page: the last 100 pending and executed per kind
 3"json"              domain, hook, count, root, live, signers, verifiers (the first 20 registered paths and the
 4                    count), seats, flags, routes (each with its predecessor and successor, and the height and
 5                    time of the kind 6 that enrolled it on Solana: enrolled, enrolledAt), successors (the
 6                    first 20 announced paths, the count, and successorRoutes: the route each announced for),
 7                    for the agents
 8"decisions.json"    every decision, as a JSON array
 9"msg/<nonce>"       one dispatched message: {"nonce","id","root","height","message"}; "null" if none
10"msgs/<from>"       up to 20 messages from nonce <from> on, as a JSON array
11"verifiers/<from>"  up to 20 registered verifier paths from offset <from> on, in path order, as a JSON array
12"successors/<from>" up to 20 announced successor paths from offset <from> on, in path order, as a JSON array
13"delivered/<id>"    the block height a message id (hex) was delivered at here, 0 if never

func RouteSymbol

Action
1func RouteSymbol(path string) string
source

RouteSymbol is the token a realm's route is for (R36): the launch paths' compiled symbols; for every other realm the route it announced itself a successor of (SuccessorFor — a registered successor always announced, AQ5); "" for one that never did. r/hlgov's kind 6 compares it with the token it names, so a slip can never enrol one token's route as the other's router.

func SeatOf

Action
1func SeatOf(a address) int
source

SeatOf is the seat an address holds, 0 if none.

func SetFlag

crossing Action
1func SetFlag(cur realm, route, fn, ids string)
source

SetFlag sets, or re-asserts, the caller's flag on one function of a route: fn is sends, credits or payouts. ids is what a guardian's payouts flag suspects — a comma-separated list of message ids, or a range of credits ("heights:<from>-<to>" inclusive, or "since:<from>" for every credit the verifier makes from that height on) — "" otherwise; a re-assertion replaces it. A watch key's flag never names ids or a range.

func SignerKeys

Action
1func SignerKeys() string
source

SignerKeys is the signer set in hex, comma separated, in the order signatures name them.

func Signers

Action
1func Signers() ([]Key, Rule)
source

Signers is the signer set and its rule: copies, so a verifier can read them and nobody can change them.

func Successor

Action
1func Successor(path string) string
source

Successor is the route path's migrate registered; "" while it never migrated, or for no route.

func SuccessorAnnounced

Action
1func SuccessorAnnounced(path string) bool
source

SuccessorAnnounced is whether a realm at this pkgpath announced itself as a possible successor: what a route's migrate builder and its closure require of the path they name (R25).

func SuccessorFor

Action
1func SuccessorFor(path string) string
source

SuccessorFor is the route — GNOT or BUBBLE — a realm at this pkgpath announced itself as a successor of (AQ5); "" if it never announced itself. A route's migrate builder and its closure refuse another route's successor.

func VacateSeat

crossing Action
1func VacateSeat(cur realm, seat int, holder address) bool
source

VacateSeat removes the key in a seat if holder still has it, its flags with it (a payouts flag among them restarting the route's meters): the void builder's unpause option retires keys in the same closure as the void (§5.3). Only a route realm may call it. It reports whether the seat was vacated: a seat whose occupant changed since the proposal named it, or one emptied since, is left as it is (R17), so a replacement that landed in between is never undone by a removal that meant the key before it.

func VerifierRegistered

Action
1func VerifierRegistered(path string) bool
source

VerifierRegistered is whether a realm at this pkgpath registered as a verifier.

func Yield

crossing Action
1func Yield(cur realm)
source

Yield is the governor's one-way hand-over to GovDAO (M1k): from this block gno.land/r/gov/dao's proposals are the only way a decision is made on every bridge realm — each reads Yielded here before it accepts one, so no realm is ever yielded apart from the rest — and Govern is closed for good. The governor alone, by its own transaction; refused when no governor was compiled (GovDAO governs from the first block) and a second time. A decision the governor queued still applies by Execute(id) after its 7 days, or GovDAO cancels it.

func Yielded

Action
1func Yielded() int64
source

Yielded is the block height the governor yielded at (Yield), 0 until then: what every bridge realm reads before it accepts a decision — the governor's own call before, GovDAO's proxy after (decisions.DAOGoverns).

func NewCancelRequest

crossing Action
1func NewCancelRequest(cur realm, id int64) Request
source

NewCancelRequest cancels a queued decision of this realm, at once. It is the one builder proposed before Launch.

func NewLaunchRequest

crossing Action
1func NewLaunchRequest(cur realm) Request
source

NewLaunchRequest is the launch's builder — the governor's decision like any other (M1k), the launch vote's once the governor has yielded: its execution makes the realms live, once, with the compiled values. It carries the 14-day deadline every builder carries: a passed launch nobody executed within 14 days of its proposal returns the deadline error (GovDAO denies it for good) and the launch is proposed again, so a forgotten vote is never a standing trap. A second execution errors.

func NewRotateSeatsRequest

crossing Action
1func NewRotateSeatsRequest(cur realm, changes string) Request
source

NewRotateSeatsRequest replaces or vacates guardian and watch-key seats: changes is "seat:address" pairs, comma separated, an empty address vacating the seat; two guardians at most per proposal; a seat's current key is refused. Removals alone apply at once; any replacement queues the whole proposal 7 days, and a queued one applies only while the six seats still stand as they did when it was decided. A removed or replaced key's flags clear with it. A removal means the key the seat holds when the proposal is made (the description names it): a seat whose occupant changed by execution — a replacement landed in between — is skipped and the note says so (R21), the proposal spent if nothing was left to remove.

func NewRotateSignersRequest

crossing Action
1func NewRotateSignersRequest(cur realm, keys string, threshold int, groupA, groupB string) Request
source

NewRotateSignersRequest sets the signer set and its rule together (§5.3): the keys in hex, comma separated, in the order signatures name them; a threshold, or §11.13's two groups (one of each must sign; threshold 0). It applies at once only as a pure removal — the new set a subset of the old, under the live rule pruned of the removed keys (the same threshold; the groups less the keys that leave), which the active verifier says the remaining set can still meet (Satisfiable, decided when the proposal executes); any other change, a lowered threshold among them, is queued 7 days, and a queued rotation applies only while the signer set and rule are still those it was decided against.

func NewSetVerifierRequest

crossing Action
1func NewSetVerifierRequest(cur realm, origin uint32, path string) Request
source

NewSetVerifierRequest activates a registered verifier for an origin, 7 days after the proposal executes.

func NewUnpauseRequest

crossing Action
1func NewUnpauseRequest(cur realm, routePath, fns string, removeSeat int) Request
source

NewUnpauseRequest clears every seat's flag for the named functions of a route (sends, credits, payouts; comma separated), and may vacate one seat in the same stroke (removeSeat, 0 for none — one seat, so §5.3's cap of two guardians per proposal holds by construction; the void builder's unpause option, which takes a list, counts them). The seat's holder now is what the proposal means and is recorded with it: a seat whose occupant changed by execution — a replacement landed in between — is skipped, and the note says so (R17). It applies at once; the builder refuses one that would clear nothing now, and an executed one that finds nothing to clear is spent (recorded, no effect, no meter reset), never queued.

Types 4

type Key

array
1type Key [32]byte
source

Key is a signer's ed25519 public key.

type Request

struct
1type Request struct {
2	proposal dao.ProposalRequest
3	text     string
4	decide   func(cur realm) error
5}
source

Request is what a builder returns (M1k): the proposal GovDAO's proxy executes after the yield (Proposal), and the same decision the governor runs directly before it (Govern). The closure is one; only who may run it changes with the yield. A Request comes from a builder alone — the type is this realm's and the closure unexported, so no other code can build one or change what it decides (the construction and conversion guards of the interrealm spec, §3.2 and §8.2) — and a stranger holding one can only hand it back to Govern, which refuses everyone but the governor.

Methods on Request

func Description

method on Request
1func (r Request) Description() string
source

Description is the proposal's: the parameters as the builder wrote them.

func Proposal

method on Request
1func (r Request) Proposal() dao.ProposalRequest
source

Proposal is the request as a GovDAO proposal: `dao.MustCreateProposal(cross(cur), req.Proposal())`.

type Rule

struct
1type Rule struct {
2	Threshold int
3	GroupA    []Key
4	GroupB    []Key
5}
source

Rule is how many signers must sign: Threshold of the set, or — when both groups are named (§11.13) — one key of GroupA and one of GroupB. The verifier applies it; Satisfiable says whether a set can still meet it.

Methods on Rule

func String

method on Rule
1func (r Rule) String() string
source

String says the rule in words.

func TwoGroups

method on Rule
1func (r Rule) TwoGroups() bool
source

TwoGroups is whether the rule is "one of A and one of B" rather than a threshold.

type Verifier

interface
1type Verifier interface {
2	Verify(origin uint32, metadata, message []byte) error
3	Satisfiable(signers []Key) bool
4}
source

Verifier decides whether an incoming message is genuine (§5.1). A verifier is a realm; it registers once with RegisterVerifier and GovDAO activates it by pkgpath. Both methods are non-crossing. An implementation is a type declared in the registering realm: its methods then run under that realm's authority (borrow rule #1) and can write nothing of this realm's. A type declared in /p/ with no object to anchor on (`type V int`) would run under this realm's own authority instead — the no-anchor case — which RegisterVerifier cannot tell apart, so GovDAO activates a verifier whose source it has read; what the mailbox hands a verifier is the recipient's bytes (Verify) or a copy of its own keys (Satisfiable), never a value it keeps.

Dependencies

Source Files 5