Skip to main content
Rule 8 says to bound every walk over recursive data. This page says how far. Each number comes from a limit the network itself enforces, so a walker with these caps accepts everything a valid ledger can contain and nothing much beyond it.

The numbers

In code

Test it against the corpus

  • cap46-nested-auth-local-0001 is a real six-level authorization tree. Every walker should accept it.
  • cap46-scval-limits-synthetic-0001 holds an ScVal claiming 2³² − 1 elements in 12 bytes, and a vector nested 2,000 deep. A decoder with the caps above refuses both immediately; one that reserves capacity from the length prefix tries to allocate for four billion elements.
  • base-over-max-length-synthetic-0001 is a real envelope with a 101st operation, and one with a 29-byte memo. Both must fail to decode.
All three pinned SDKs (JavaScript 17.4.0, go-stellar-sdk 0.9.0, stellar-xdr 30.0.0 with the limits above) pass all of these. IX002 flags Go walkers with no depth or size cap.