MaxInstances
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(64 <untyped> bigint)
MaxOutput
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(4096 <untyped> bigint)
MaxInput
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(1024 <untyped> bigint)
DefaultFuel
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(100000 <untyped> bigint)
MaxSliceFuel
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(5000000 <untyped> bigint)
store
*v0.Store- OID
- 053b6b…1cf0:4
store details
inputs
*v0.Tree- OID
- 053b6b…1cf0:9
inputs details
idgen
v0.IDValue
<zero>
count
intValue
0
host
typehost is the realm-backed [vmkit.Host](/gno.land/p/moul/x/vm/vmkit/v0#Host). One is built per call, wrapping the instance being stepped, so a guest's output and authority are scoped to it and nothing ambient leaks in.
Value
v0.host
Upload
func(src string, input string, budget int64) stringUpload compiles src and stores it as a new instance, returning its id. Compilation happens here rather than at the first Step, so an unbalanced program is rejected by the transaction that submitted it instead of costing somebody else the gas later.
- OID
- 053b6b…1cf0:13
Upload details
Step
func(id string, fuel int64) stringStep runs one slice of the instance: up to \`fuel\` guest ops, then stop and keep the snapshot. Anyone may pay for a slice, not only the owner: a paused program that only its owner can advance is a worse demo and no safer, since the program and its budget were both fixed at upload.
- OID
- 053b6b…1cf0:15
Step details
Remove
func(id string)Remove deletes an instance. Owner only.
- OID
- 053b6b…1cf0:16
Remove details
inputOf
func(id string) string- OID
- 053b6b…1cf0:17
inputOf details
samples
[]struct{...}samples are the programs the home page offers, so the realm is usable without writing Brainfuck by hand.
- OID
- 053b6b…1cf0:19
samples details
Render
func(path string) stringRender is the realm's gnoweb view. - "/" the samples, the instance list, and how the thing works. - "/\<id>" one instance: its program, status, fuel and output.
- OID
- 053b6b…1cf0:23
Render details
renderHome
func() string- OID
- 053b6b…1cf0:25
renderHome details
renderInstance
func(id string) string- OID
- 053b6b…1cf0:26
renderInstance details
fuelText
func(n int64) string- OID
- 053b6b…1cf0:27
fuelText details
operatorsOnly
func(src string) stringoperatorsOnly strips a program down to the eight characters the language defines. Everything else is a comment by definition, and a comment is attacker-controlled text that has no business reaching a renderer.
- OID
- 053b6b…1cf0:28
operatorsOnly details
printable
func(b []uint8, max int) stringprintable renders guest output for a code fence: printable ASCII as itself, everything else as an escape. A guest writes arbitrary bytes, so this is the only form of it that is safe to show.
- OID
- 053b6b…1cf0:29