Skip to content

test(cardano): index the preprod blocks that broke native script decoding - #1359

Open
nicolasLuduena wants to merge 1 commit into
lts/v1from
test/native-script-preprod-blocks
Open

nicolasLuduena wants to merge 1 commit into
lts/v1from
test/native-script-preprod-blocks

Conversation

@nicolasLuduena

Copy link
Copy Markdown
Member

Follow-up to #1358. Adds regression coverage for the two preprod blocks (epoch 313) that crashed dolos on pallas 1.1.1:

block slot native script pallas 1.1.1 pallas 1.2.0
5183974 (bac16602…) 133883340 nested 5384 levels stack overflow, SIGABRT ok
5184855 (8ddb2e96…) 133902219 N-of-K with N = -1 unexpected type i8 … expected u32 ok

The raw blocks live in crates/cardano/test_data/preprod/blocks/<hash>.cbor (46 KB total, same layout as mainnet/update_proposal_blocks) and are run through CardanoIndexDeltaBuilder::index_block, the sync-path code that walks witness scripts, asserting the script hash lands in the archive index. Verified both tests fail on 1.1.1 and pass on 1.2.0.

Note for follow-up: sync is fine, but the serving side still recurses over these scripts — minibf /scripts/{hash}/json (NativeScript::to_json) and the u5c mapper — and will overflow the request thread's stack for block 5183974. That's a separate issue.

🤖 Generated with Claude Code

…ding

Two preprod blocks from epoch 313, kept as raw fixtures under
test_data/preprod/blocks and run through CardanoIndexDeltaBuilder::index_block:

- 5183974: a native script nested 5384 levels deep, which overflowed the
  stack in pallas < 1.2 (txpipe/pallas#802)
- 5184855: an N-of-K native script with N = -1, which failed with
  `expected u32` in pallas < 1.2 (txpipe/pallas#803)

Both must index cleanly since the Haskell node accepts them; the tests
guard the pallas 1.2 bump from #1358 against regressing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1a23f843-85d7-4643-a678-d1bf4ba5bb14

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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