In order to debug a validation error (e.g. tx-size-small or non-mandatory-script-verify-flag), you have to search through the source code and determine the meaning of the error. While many are self-explanatory, some are not, especially if exposed to end users. Therefore, some error message translation is necessary. It would be helpful to have a list of these errors in the code in one place. It would also be helpful for external software application development to have a list and description of these errors in the documentation. Happy to submit a PR if this isn't already being done and if there are any specific implementation suggestions.
Create a list of validation errors in one location #15356
issue JBaczuk opened this issue on February 6, 2019-
JBaczuk commented at 4:56 PM on February 6, 2019: contributor
- maflcko added the label Brainstorming on Feb 6, 2019
- maflcko added the label Docs on Feb 6, 2019
- maflcko added the label Validation on Feb 6, 2019
-
HashUnlimited commented at 2:01 PM on February 12, 2019: contributor
An idea would be to introduce error codes so they could be pinpointed, traced to architecture, translated and discussed in an external Wiki. That would eliminate redundant phrasing in the source.
-
JBaczuk commented at 3:35 AM on February 14, 2019: contributor
An idea would be to introduce error codes so they could be pinpointed, traced to architecture, translated and discussed in an external Wiki. That would eliminate redundant phrasing in the source.
In the JSON-RPC 2.0 spec codes
-32000 to -32099are reserved for implementation-specific server errors, does Bitcoin Core implement this? -
pinheadmz commented at 2:17 PM on April 27, 2023: member
Are you still interested in working on this?
-
JBaczuk commented at 3:12 PM on April 27, 2023: contributor
@pinheadmz Probably not at this point. I don't think I have enough information anyway.
-
maflcko commented at 4:19 PM on April 27, 2023: member
Not sure what exactly should be done here. Maybe the error messages can be improved for some, but generally they should be self-explanatory. Recall that the ones you mention are accompanied by an extended description and more specific error message. For example,
"non-mandatory-script-verify-flag (Negative locktime)". -
maflcko commented at 4:20 PM on April 27, 2023: member
The feature request didn't seem to attract much attention in the past. Thus, closing due to lack of interest, progress and direction.
Pull requests with improvements are always welcome. Moreover, it is possible to re-open this issue or create a new issue referencing it, if there is fresh interest.
- maflcko closed this on Apr 27, 2023
- bitcoin locked this on Apr 26, 2024