-
Notifications
You must be signed in to change notification settings - Fork 137
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
Observed intermittent "Serialization Error: too large read" errors when sending GRNs #620
Comments
Thank you for opening an issue @shuan9-polo . It seems like this error appears when the transaction that is constructed is too big to fit in a block https://github.com/mimblewimble/grin/blob/f51b6e13761ac4c3c8e57904618ef431c14c6227/core/src/core/transaction.rs#L853-L855 The |
Would you please elaborate how I can do this? Is it possible to do this with the grin-wallet cli? |
@shuan9-polo I'm not sure about the state of self-spend at the moment - it might not work over Tor Grinnode-live/2020-grin-bug-bash-challenge#59. Perhaps using manual send (not Tor), would work meaning you send to your own grin address, but with manual slatepacks. I'm not sure what the state of this is at the moment, so you should definitely confirm first that it works by trying smaller amounts. |
Oh, I need to clarify that the address is not owned by me, instead, it's from an exchange. I mean the address associated with me in that exchange by "my address". Sorry for misleading you. |
@shuan9-polo so the issue, as I understand it, is that one party in a transaction (probably the sender) is adding way too many inputs in the transaction so that the transaction becomes too big to include in a block. This can happen if you own a lot of inputs with very small values. One option to solve this would be to select the inputs manually but the wallet does not support this today. So another option is to make sure you don't have inputs with too low value so that when it builds a transaction, it's not using too many inputs. This can be achieved by sending to yourself multiple times by using "smallest" strategy. Each self-send would then take some small inputs and produce two outputs which would reduce the number of inputs with small amounts that you may have. Does this make sense? So you'd need to first consolidate the outputs you have and only then send such big transactions. Alternatively, you could try with even smaller amounts. |
Thanks @phyro, as I understand, what you asked me to do is:
Hopefully, the send will complete successfully. I have tried self-spend with Tor first but failed by the same errors observed in Grinnode-live/2020-grin-bug-bash-challenge#59. Then I tried it with manual steps by
and it worked. After a while, I see the txs is confirmed and well received. But I did notice that it still took some fee for self-spend. So my question is, do you have a chance to know which solution may cost less fee, the self-spend one or the below? |
@shuan9-polo I'm glad you were able to consolidate them. Yes, self-spend is a transaction like any other, so it pays fees to miners just like a regular transaction. Unfortunately, I don't know how to solve this differently than what I have suggested above (or by having an option to manually select the outputs you want to use). The closest that comes to mind is to do smarter consolidation which means using as many inputs to create the 1 or 2 outputs that hold the sum of the input amounts. |
Hi @phyro, I did not use the self-spend way to consolidate the outputs as it will cost a lot of fees. Reading through the following description of the
As I understand from it, calling
|
@shuan9-polo I'm not too familiar with this option so I can't really tell. I don't know what happens and what could go wrong in your scenario where we believe you have a lot of outputs, I'd assume that you'd again get to the same problem if you used all outputs as inputs and the issue is too many inputs? I would personally consolidate them in some iterations. If that's too costly, then I'm not sure what the answer to this is. If the transaction is too big, you have no choice but to split it in multiple transactions currently (afaik). |
Should this ticket be closed? Reading through the dialog, it appears this is expected behavior. If a user builds a transaction that is too large, it makes sense to see a "too large" error. |
Agree. If they have more questions they can open a new issue and link to this one |
Describe the bug
When sending GRINs to my address via Tor, the following errors were sometimes observed:
I have enough spendable GRINs according to the
grin-wallet info
output so it should not be caused by the balance.I also tried with smaller amount
10000.65818005
for 10 times, but only the first attempt worked:To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the following logs printed after the
send
commands are executed:Screenshots
N/A
Desktop (please complete the following information):
(the grin-wallet and grin server are both hosted in containers)
Additional context
N/A
The text was updated successfully, but these errors were encountered: