Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standardize on errors / codes #39

Open
tzarebczan opened this issue Jul 25, 2022 · 4 comments
Open

standardize on errors / codes #39

tzarebczan opened this issue Jul 25, 2022 · 4 comments
Labels
type: bug Existing functionality is wrong or broken

Comments

@tzarebczan
Copy link

tzarebczan commented Jul 25, 2022

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

@tzarebczan tzarebczan added the type: bug Existing functionality is wrong or broken label Jul 25, 2022
@moodyjon
Copy link
Contributor

moodyjon commented Aug 18, 2022

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
Copy link

More context, please?

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

@moodyjon
Copy link
Contributor

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
Copy link
Author

tzarebczan commented Sep 23, 2022

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Existing functionality is wrong or broken
Projects
None yet
Development

No branches or pull requests

3 participants