Skip to content

Release v0.8.4: bounded parse nesting, fixes a remote crash - #31

Merged
mwaddip merged 5 commits into
mainfrom
fix/sigma-depth-cap
Sep 28, 2026
Merged

mwaddip merged 5 commits into
mainfrom
fix/sigma-depth-cap

Conversation

@mwaddip

@mwaddip mwaddip commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Pins sigma-rust eni 0bd7199f. A transaction of about 2 KB from any peer could abort the node, because nested values and types were parsed recursively with no depth limit. Values now follow the JVM's MaxTreeDepth (110). Types get the same bound as a temporary divergence, since the JVM defines none. Also included:

  • each transaction parses on a fresh reader state
  • type code 112 before ErgoTree v3 no longer panics
  • script framing matches the JVM

These are upstream as ergoplatform/sigma-rust #927, except the type bound. The addons move to the same pin (indexer 0.2.9, fastsync 0.1.9), and the indexer unit no longer points at the testnet port.

Checked:

  • node tests 1184/1184, addon tests green
  • SANTA corpus unchanged
  • crash probes on the pinned rev

🤖 Generated with Claude Code

mwaddip and others added 5 commits September 28, 2026 04:58
…nd ErgoTree framing

Contract text for the ergo-lib parse rules the next sigma-rust pin brings: sigmastate's
reader nesting level (MaxTreeDepth 110) on a fresh reader state per transaction, the
temporary type-nesting bound as a known divergence (the JVM has none), and the ErgoTree
read window, declared size, root type and pre-v3 function type code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nsaction reader state, ErgoTree framing)

eni bf4d6943..0bd7199f brings:
- sigmastate's MaxTreeDepth (110) reader level on values, data and SigmaBooleans
- a fresh reader state (level, constant and ValDef stores) for every transaction
- a temporary type-nesting bound of 110, eni-only, pending the Ergo team's rule
- ErgoTree parsing on the box's reader, within its own 4096-byte window, and
  unsized non-SigmaProp roots rejected
- type code 112 before ErgoTree v3 as an unknown type code instead of a panic

Before this, a transaction of about 2 KB with deeply nested values aborted the
process on stack overflow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The unit passed --node-url http://127.0.0.1:9052 (the testnet API port), which overrides both /etc/ergo-node/indexer.toml and the indexer's built-in default (http://127.0.0.1:9053, mainnet). On a mainnet node the indexer could never reach the node. Without the flag, the config file's [node].url or the correct default applies.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit ddb2c3ad9c97d95b6cb5dc316042e3fd0fc16ebb)
….1.9

The addons were on f76db922, whose type parser panics on type code 112 before
ErgoTree v3. The node now accepts a size-flagged script carrying it (degraded to
unparsed, as in the JVM), and the indexer parses every output script to derive
its address. Same pin as the node; lockfiles re-synced (9 source swaps each,
plus the member version).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mwaddip
mwaddip merged commit 5576fe1 into main Sep 28, 2026
1 check failed
@mwaddip
mwaddip deleted the fix/sigma-depth-cap branch September 28, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant