Two foundational SPEL libraries, delivered from written requirement to verified on-chain deployment.
Every program on a new execution layer needs the same access-control building blocks. Without a shared, reviewed version, each team reimplements them by hand and each copy is audited separately. This engagement delivered two of those blocks, an admin authority and a freeze authority, as reusable libraries, and verified each privileged operation on a running chain.
The Logos Execution Zone (LEZ) is an SVM-style execution layer that runs programs as RISC Zero guests. Programs require a standard mechanism to restrict privileged instructions to an authority, and a standard emergency stop. The platform uses a hash-based account model with no Solana-style on-curve distinction, so established patterns were reinterpreted for the target rather than ported, and the programs compile to a zkVM guest rather than to native code.
require_admin gate, and set / transfer / revoke operations.Each requirement was built test-first: a failing test, then the implementation. The sample programs were then compiled to RISC Zero guests, packaged in the R0BF binary format, and deployed to a locally run LEZ sequencer in standalone mode. Transactions were built and signed through the framework's CLI and submitted to the sequencer, with every result read back from on-chain account state and the execution log. Continuous integration runs the tests, format, and lint on every push.
Every privileged instruction in both libraries was exercised end to end on the sequencer, including the negative cases. Each row below corresponds to one or more submitted transactions whose effect was confirmed against on-chain account state and the execution log.
| Library | Instruction | Positive path | Rejection path |
|---|---|---|---|
| admin | initialize | verified | n/a |
set_counter (gated) | verified | non-admin, revoked | |
transfer_admin | verified | n/a | |
revoke_admin | verified | post-revoke lockout | |
| freeze | initialize | verified | n/a |
freeze / unfreeze | verified | frozen write blocked | |
set_freeze_authority | verified | former authority | |
revoke_freeze_authority | verified | revoked authority | |
freeze_account | verified (claim + cycle) | n/a | |
unfreeze_account | verified | n/a |
Running against a live sequencer surfaced two issues. The framework's CLI could not submit a class of instruction argument that its own code generator produces; we found the root cause, wrote the fix, verified it against the running chain, and prepared it as an upstream contribution. Separately, our own per-account freeze passed every unit test but failed on-chain on the first freeze of an account: the marker account was written before it was claimed, which the unit tests did not catch because they construct state directly. We corrected the handler to claim the marker on first use, rebuilt, redeployed, and reverified the full freeze, unfreeze, and re-freeze cycle.
The access-control check adds a fixed, predictable cost: one account reference per gated instruction (the config PDA), measured at 32 bytes, with no change to instruction data. Per-account freeze adds a second reference. The overhead therefore scales linearly with the number of gated instructions in a transaction and is independent of program logic.
Two access-control libraries, taken from a written requirement to a deployment verified on-chain.