standardize on errors / codes #39

Open
opened 2022-07-25 18:05:09 +02:00 by tzarebczan · 4 comments
tzarebczan commented 2022-07-25 18:05:09 +02:00 (Migrated from github.com)

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

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```
moodyjon commented 2022-08-18 23:46:13 +02:00 (Migrated from github.com)

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.

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.
roylee17 commented 2022-08-18 23:54:06 +02:00 (Migrated from github.com)

More context, please?

What are the RPCs being used, and who uses them? Herald or app?

More context, please? What are the RPCs being used, and who uses them? Herald or app?
moodyjon commented 2022-08-19 00:32:11 +02:00 (Migrated from github.com)

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?

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?
tzarebczan commented 2022-09-23 15:17:45 +02:00 (Migrated from github.com)

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

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```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/herald.go#39
No description provided.