Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 state

Back to all declarations

gasWantedCompact

int64

gasWantedCompact is the gas ceiling a compacting transaction is assumed to ask for, used only to price the advertised bounty. A caller compacting an unusually large number of nodes should re-price with storagecost.EvaluateAtFloor directly rather than trust this.

Value

5000000

maxText

untyped bigint

maxText caps an entry so one caller cannot lock an unbounded deposit in a single call. Small on purpose: this realm is about the NODES, and a fat payload would only hide the thing it exists to show.

Value

(256 <untyped> bigint)

Entry

type

Entry is one element. Author is kept so a drop can be refused to anyone else: soft-deleting a stranger's entry would be vandalism, and the holes this realm studies should come from ordinary use.

Value

v0.Entry

Add

func(text string) int

Add appends an entry and locks its storage deposit against the caller.

Open
OID
0ec6ae…7ae5:6
Add details

Inspect func

Drop

func(index int)

Drop soft-deletes your own entry, which is what creates a hole. It frees nothing on its own, and that is the point of the realm: the bytes stay locked until somebody compacts. Only the author may drop, so the fragmentation on this page is the honest kind that ordinary use produces.

Open
OID
0ec6ae…7ae5:8
Drop details

Inspect func

Compact

func() int

Compact frees the dead tree nodes and returns how many it freed. Permissionless by design, and the refund goes to whoever signs this transaction rather than to the realm or to the authors: the chain pays the signer directly, so there is nothing here to distribute and nothing to steal. The worst a caller can do is waste their own gas compacting a board that had no holes.

Open
OID
0ec6ae…7ae5:9
Compact details

Inspect func

Fragmentation

func() (live int, allocated int)

Fragmentation reports live elements against allocated indices. The gap between them is what a compaction has to work with. It is a free read so a bot can poll it and decide for itself, which is the whole design: the realm publishes, the caller times.

Open
OID
0ec6ae…7ae5:10
Fragmentation details

Inspect func

Reclaimable

func() int

Reclaimable is how many dead nodes a Compact would free right now. It is NOT the same as allocated minus live. A dead element only becomes a reclaimable node once every element under it is also dead, so a board with many scattered holes can report a large gap and nothing to reclaim. That difference is exactly what makes the timing a decision instead of a rule.

Open
OID
0ec6ae…7ae5:11
Reclaimable details

Inspect func

Quote

func() v1.Quote

Quote prices what a Compact would return, at the default storage price and the floor gas price. Unlike a payload-derived bounty this is a counted quantity: Reclaimable is exact, and storagecost.EstimateNodes multiplies it by a measured per-node constant. Treat it as an advertisement all the same. The authoritative numbers are the chain's, in the StorageUnlockEvent the transaction emits.

Open
OID
0ec6ae…7ae5:12
Quote details

Inspect func

entryAt

func(i int) (*v0.Entry, bool)

entryAt reads index i, reporting whether a live entry is there.

Open
OID
0ec6ae…7ae5:13
entryAt details

Inspect func

ratioSuffix

func(live int, allocated int) string

ratioSuffix adds the fragmentation percentage, and says nothing at all when the board is empty rather than dividing by zero.

Open
OID
0ec6ae…7ae5:15
ratioSuffix details

Inspect func

verdict

func(q v1.Quote, dead int) string
Open
OID
0ec6ae…7ae5:16
verdict details

Inspect func
gasWantedCompact : int64 =5000000
maxText : untyped bigint =(256 <untyped> bigint)
Entry : type =v0.Entry
entries : *v1.List Inspect
Add : func(text string) int Inspect
Drop : func(index int) Inspect
Compact : func() int Inspect
Fragmentation : func() (live int, allocated int) Inspect
Reclaimable : func() int Inspect
Quote : func() v1.Quote Inspect
entryAt : func(i int) (*v0.Entry, bool) Inspect
Render : func(path string) string Inspect
ratioSuffix : func(live int, allocated int) string Inspect
verdict : func(q v1.Quote, dead int) string Inspect