E1858: recursion in a verb with a stack limit
meta stack_limit(bytes: N) promises that a verb never uses more than N bytes of stack (ADR-0103).
meta stack_limit(bytes: N) promises that a verb never uses more than N
bytes of stack (ADR-0103). The compiler can only prove that bound when the
call depth is bounded, so the initial contract rejects any recursion that is
reachable from such a verb. This covers a verb that calls itself and verbs
that call each other in a cycle. The error points at the call that closes the
cycle.
Example
actus
Fix
Replace the recursion with a loop, so the stack use does not depend on the number of steps.
actus
toml
Run actus explain E1858 in your terminal to read this entry offline. Browse Strict & toolchain or all error codes.