SPEL v0.4 actor-model port: lez-multisig ported and tested end to end
Target: logos-co/spel PR #301 (refactor/lez-v0.4.x @ dbb6aec) · LEZ 616256b (moudy/lez-books) · Bedrock node logos-blockchain@3926a532 · updated 2026-11-11
spel: deploy, create, propose, approve, execute, a chained call into another program, and a configuration change. Every step passed. The run surfaced one real spel bug (inspect applying the wrong IDL), plus documentation gaps, LEZ-side rough edges, and the absence of any chain-backed test in CI.
Findings are posted on the PR: #301 comment. The port is on branch feat/lez-v0.4-actor-model of lez-multisig.
1. The live run
Script: scripts/e2e-v04.sh on the branch. It starts its own Bedrock node and sequencer, then drives everything through spel.
| Step | Command | Result |
|---|---|---|
| Deploy | spel deploy multisig + a hello_world target | both addresses returned |
| Create a 2-of-3 multisig | send … create-multisig (no signer) | config PDA written: threshold 2, member_count 3 |
| Propose a call to the target | send --signer m1 … propose | proposal PDA written, proposer auto-approved |
| Execute with 1 of 2 approvals | send --signer m3 … execute | refused (exit 2, nothing changed) |
| Second approval | send --signer m2 … approve | 2 of 2 |
| Execute | send --signer m3 … execute | proposal Executed; the target account's state is 68692121 = "hi!!" |
| Config change | propose-config AddMember → approve → execute | member_count: 4 |
Along the way spel generate-idl produced a clean IDL v2 for the ported core (12 messages, 5 types, no annotations), and spel program-id read the guest .bin. On the fixture side, generate-idl on token_core matches the committed golden byte for byte. send's access-list and authorization printout made the multi-actor relays easy to follow.
2. How the port maps
- No program framework. #301 ships only
spel-framework-core(the IDL engine) and thespelCLI. Programs are written againstlee_core, so the guest islee_core::actor_entrypoint!plus a handler, and the oldspel-frameworkdependency is gone. - Signer checks become a relay. A user sends to their own account's actor, where
is_authorizedis true if they signed. That actor forwards to the config or proposal PDA, and PDAs accept these internal messages onlyfrom_own_program(). - Snapshots. An actor can only read its own state, so each proposal stores a copy of the members and threshold from when it was created.
- ChainedCall becomes
Response::send. Execute sends the stored message to the target actor and grants the vault PDA's seed. A message reaches exactly one actor, so the multisig can only drive actor-model targets, not multi-account instructions. - Fresh PDAs are written by granting the PDA seed on the relaying message, with
write_once. - Tests: 8 host unit tests cover the full flow and the refusals (non-member, below threshold, foreign program, unsigned).
3. Findings
- spel bug:
inspect ACCOUNT@<other program>applies the wrong IDL and exits 1. With aspel.tomlnaming onlymultisig, reading the target's account decodes it with the multisig IDL:(vault_owner (GsDB…), Aq1M…): 4 bytes Hex: 68692121 ❌ Borsh decode failed: enum variant index 104 out of range (max 1)
Without aspel.tomlin scope the same command prints the hex and exits 0. The IDL should only be auto-applied when the program after@is that program. - A refused message gives no reason. The below-threshold execute is included in a block, and spel can only report "no declared actor changed: the program probably refused the message (LEZ reports no outcome)". The handler's panic message is lost. The cause is on the LEZ side, but it's the main debugging pain point for actor programs.
- The documented token example can't be reached. The tutorial and quickstart point at
github.com/logos-co/lez-programs, which doesn't exist (404).logos-blockchain/lez-programsmainis still on the old framework (lee_core v0.2.4+spel-frameworkmacros). generate-idlonly resolves crate and path-dependency types. A git-dependency type fails, e.g. LEZ'sclockwithlee_core::Timestamp. The multisig works around it by usingAccountIdand raw byte arrays in its messages.deployfloods stderr with about 1.6 MB ofTransaction data is Public(PublicTransaction { … })dumps per program. They come from aprintln!in the LEZ wallet library (lez/wallet/src/lib.rs:824); stdout stays clean.- No chain-backed e2e in CI. All sequencer jobs were retired and only build and test run. A deploy → send → inspect script like this one would have caught finding 1.
- From the static review: a unit struct decodes as
[]instead of{}(decode.rs:63); a one-field tuple struct decodes as a bare scalar but must be sent as[x](parse.rs:195); workspacemembersglobs only handle a single trailing*(dep_walk.rs:241).
4. Running a local LEZ v0.4 chain
- The sequencer needs a Bedrock node.
sequencer_service setup <home> --config … --funding-public-key <local node key> --create-channel, thenstart. The old standalone--portmode is gone. - The node is pinned to an untagged commit (
logos-blockchain@3926a532). There's no release binary for it, and the pulled0.1.2image fails onmissing field `blend`. LEZ's resolver builds the node inside Docker, which kept failing on this network. - What worked: the node's source was already in cargo's git cache from the LEZ build, so a native
cargo build --locked --release -p logos-blockchain-node --features testingbuilt it in about 13 minutes, even on Rust 1.98.1 against the pinned 1.99.0. Run it withPOL_PROOF_DEV_MODE=true node node-config.yaml --deployment deployment-settings.yaml. - Deployable
.bins without Docker:risc0_build::embed_methods()already writes the R0BF<name>.binnext to the guest ELF. - Ports:
startdefaults its metrics to:9000and fails if anything else holds it. Pass--metrics-addressand--rpc-listen-address. - risc0 build artifact: building LEZ downloads
recursion_zkr.zipfrom risc0's S3 bucket. That host was unreachable from this machine; fetching the file elsewhere and pointingRECURSION_SRC_PATHat it works.
5. What changed since the first version of this report
The 2026-11-10 version concluded that a live e2e was blocked on the Bedrock node, and that multisig couldn't serve as the test. Both were wrong:
- The CLI witness exchange (
spel sign/submit) is retired in #301. The on-chain multisig program is a different thing: it ports to the actor model and is now the test. - The Bedrock node turned out to be buildable natively (section 4), so the chain came up and the full flow ran.
The earlier gap list still stands, now confirmed live: no chain-backed CI, the missing quickstart repo, and the IDL type limitation.
Run on an isolated local stack: Bedrock node + LEZ sequencer + spel #301, RISC0_DEV_MODE. Prepared by laptop/SPEL (vpavlin).