standardize on errors / codes #39
Labels
No labels
consider soon
documentation
good first issue
hacktoberfest
help wanted
priority: blocker
priority: high
priority: low
priority: medium
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/herald.go#39
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Old:
the transaction was rejected by network rules.\n\nMissing inputs\n...
New:
ejected: orphan transaction 7e27725626174a5e19ebab2dd3fcafce1ca68971bd5710d0a0112f46bee90246 references outputs of unknown or fully-spent transaction fbdb1ce2c895c4bd82fef905b35a10a7bcef68972f260c7be1dbab02f239000d\n[0
Old:
'the transaction was rejected by network rules.\n\ntxn-mempool-conflict (code 18)\n[01
New: ?
Old:
'bad-txns-claimscriptsize-toolarge (code 16)';
New: ?
Not sure about this one, but recently creeped up on YT sync:
Old:
Not enough funds to cover this transaction.
New:
insufficient funds available to construct transaction'
Old: ?
New:
-32603: double spend: -26: TX rejected: output a7472451be1236a891193c2ba97becaf97898e64f7f4c805f16c8cd837af0d78:0 already spent by transaction 9b8d1d53fcad953f80e7925a3a5fe7898644f1b511f16b446b04f88d1f207d3c in the memory pool
old:
'the transaction was rejected by network rules.\n\ntx-size (code
new:
TX rejected: transaction 0f47f0fbfced417587bc1e7ad1f78c09d8af204199b644e114a70ac27c03df81 is not standard: weight of transaction 602540 is larger than max allowed weight of 400000
I tracked several of these down, and the cause is the mixing of lbrycrd and lbcd. You can find these new messages in the code of lbcd and lbcwallet.
@roylee17 How do you want to handle this? It's caused by the upstream ancestors btcsuite/btcd and btcsuite/btcwallet.
[edit] Exception would be "claimscriptsize-toolarge" which would be LBRY code.
More context, please?
What are the RPCs being used, and who uses them? Herald or app?
The last one (YTsync) is referenced here: https://github.com/lbryio/ytsync/blob/master/shared/shared.go
Possibly all of them are seen in the context of YT sync. Having to update the error code matching is causing distress?
Yeah, we pretty much never had standardized codes across the board and various apps had to read output results and infer them. Some errors would come from the SDK, some from lbrycrd, etc. So now that we're using lbcd, the errors are different. It would be best if the SDK/hub (not sure where exactly) standardized them with error codes based on some full node standardization.. there aren't too many.
Edit, I added another one to the list:
-32603: double spend: -26: TX rejected: output a7472451be1236a891193c2ba97becaf97898e64f7f4c805f16c8cd837af0d78:0 already spent by transaction 9b8d1d53fcad953f80e7925a3a5fe7898644f1b511f16b446b04f88d1f207d3c in the memory pool