Skip to content

docs: add Decoding Error 1010 tutorial for Bounty #318#517

Open
a918124259a wants to merge 1 commit into
midnightntwrk:mainfrom
a918124259a:tutorial/318-decoding-error-1010
Open

docs: add Decoding Error 1010 tutorial for Bounty #318#517
a918124259a wants to merge 1 commit into
midnightntwrk:mainfrom
a918124259a:tutorial/318-decoding-error-1010

Conversation

@a918124259a
Copy link
Copy Markdown

Summary

Complete tutorial submission for Bounty #318 — Decoding Error 1010: What 'Invalid Transaction' Actually Means.

This tutorial provides a developer-focused deep-dive into Midnight's error code system, based on analysis of the actual midnight-ledger source code. It goes beyond surface-level explanations to show the exact Rust source locations, code structures, and diagnostic steps for each error code.

Deliverables

File Description
tutorials/decoding-error-1010/TUTORIAL.md ~2,500-word comprehensive walkthrough

Coverage

  1. Error code structure: POOL_INVALID_TX = AUTHOR(1000) + 10 — how Substrate's custom error wrapping works
  2. Error 139 (Transaction Builder UnknownError): SDK version mismatch, with diagnosis steps
  3. Error 154 (BlockLimitExceeded): The 5-dimension cost model with actual block limits and normalization
  4. Error 168 (RETIRED): Historical context
  5. Error 170 (InvalidDustSpendProof): Merkle root pruning, indexer sync issues, with diagnostic fields
  6. Error 186 (RETIRED — replaced by 212-218): Full sub-code mapping for effects check failures
  7. Ledger cost model: All 5 dimensions with Rust source code references
  8. Diagnostic toolkit: Logging, SDK version checking, indexer monitoring, cost estimation
  9. Quick reference flowchart

Key Differentiators

  • Source-level accuracy: Based on actual midnight-ledger Rust source (types.rs, cost_model.rs, lib.rs)
  • Not generic blockchain advice: Each error maps to specific Midnight code locations
  • Practical diagnostics: Real commands and code snippets for debugging
  • Cost model explained: The 5-dimensional fee model with concrete block limits (200KB, 50KB, 1MB, etc.)
  • Quick fix flowchart: Start-to-finish diagnostic flow

Bounty: #318 - Decoding Error 1010 Tutorial
Wallet: (Ready to provide upon acceptance)

Covers:
- Error code structure (POOL_INVALID_TX = AUTHOR(1000) + 10)
- Common error codes: 139, 154, 168, 170, 186
- The 5-dimension cost model with block limits
- Diagnostic steps for each error
- Quick reference flowchart

Based on midnight-ledger source analysis.

Closes midnightntwrk#318
@a918124259a a918124259a requested a review from a team as a code owner May 20, 2026 22:11
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants