HYBRID DEVNET · PUBLIC EVIDENCE LIVEVerifiable infrastructure for value, markets, identity, and operational dataInspect the network
Developers/HybridScript 0.1/State, events, and failures
LANGUAGE & RUNTIME · VERSION 0.1

State, events, and failures

Understand what commits on success and what is discarded on failure.

Preview profilehybridscript-0.1-previewReviewed 2026-09-30

A transactional state overlay

Execution starts with a copy of the provided state. Reads observe that overlay, including earlier writes from the same run. The interpreter records read keys and final values for written keys. A successful simulation returns the resulting state; the owning service determines whether and how that result is admitted into a wider lifecycle.

For handled execution errors or exhausted execution units, the interpreter returns the initial state, clears pending state writes, and discards emitted events. The receipt retains failure information and metering. A business result such as {"accepted":false} is still normal successful execution if the function returns it: writes made before that return are not automatically rolled back.

Context is supplied data

The first entrypoint argument is a context dictionary. Treat any context field according to the caller’s documented contract; this manual does not define universal clock, block-height, wallet, or account fields. A context value is not a built-in permission or live network query.

Separate validation from execution failure

OutcomeMeaning
VALIDATION_ERRORSource or request constraints prevent valid execution. Diagnostics may include code, message, line, and column.
EXECUTION_LIMIT_EXCEEDEDThe interpreter cannot charge the next operation within the budget. Pending effects are discarded.
EXECUTION_ERRORA handled runtime failure; inspect error_code, including STATE_LIMIT_EXCEEDED or EVENT_LIMIT_EXCEEDED.
Node admission / worker failureMay occur outside the interpreter; inspect the API or node response rather than assuming a language receipt exists.

Useful diagnostic families

CodeCheck
HS001–HS005Source size, parse errors, AST/function limits, or missing entrypoint.
HS006Duplicate function or requested entrypoint not declared; read the message.
HS007Executable top-level code is not supported.
HS100–HS104Unsupported syntax, literals, prohibited names, or reserved bindings.
HS110–HS113Import registry, symbol, alias, or name collision.
HS120–HS125Function naming, arguments, or entrypoint decorator.
HS130–HS143Attributes, host-call targets, or keyword arguments.