Add structured CBOR error parsing for LocalTxSubmission rejections#134
Open
satran004 wants to merge 3 commits into
Open
Add structured CBOR error parsing for LocalTxSubmission rejections#134satran004 wants to merge 3 commits into
satran004 wants to merge 3 commits into
Conversation
Parse the CBOR-encoded error payload from MsgRejectTx into structured TxSubmissionError trees with era, rule, error name, human-readable message, and optional detail maps. Covers all eras (Byron through Conway) with ~72 error types. Gracefully degrades to raw CBOR on unknown errors. - Add era-specific parsers: Conway, Babbage, Alonzo, Shelley/Allegra/Mary - Add TxSubmissionError tree model with getLeafErrors() and toFullMessage() - Add TxSubmissionErrorParser entry point with HFC envelope unwrapping - Extend MsgRejectTx with errors list, era mismatch, and getErrorMessage() - Extend TxResult with errors and errorMessage fields - Add 20 unit tests with programmatically constructed CBOR - Add 6 DevKit integration tests (fee, witness, validity, value, script errors) - Add preprod integration test for stale tx error parsing
…c error parsers Move common UTXO (tags 1-20), UTXOW witness (tags 1-9), and UTXOW script/datum (tags 10-15) parsing into ErrorParserUtil shared methods. Conway and Alonzo delegate UTXO parsing, Conway and Shelley delegate UTXOW witness parsing, while keeping era-specific tags and recursion in each parser. Reduces ~160 lines of duplicated code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
# Conflicts: # helper/src/integrationTest/java/com/bloxbean/cardano/yaci/helper/BaseTest.java
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Parse the CBOR-encoded error payload from MsgRejectTx into structured TxSubmissionError trees with era, rule, error name, human-readable message, and optional detail maps. Covers all eras (Byron through Conway) with ~72 error types. Gracefully degrades to raw CBOR on unknown errors.