-
Notifications
You must be signed in to change notification settings - Fork 191
Conversation
* Added chunking to the GAS claim process so that at most 200 UTXOs will be claimed at a time. This allows addresses with thousands of UTXOs to claim gas through a series of transactions. A single transaction with thousands of UTXOs wasn't succeeding otherwise.
Is there an example / test /use case where addresses with lots of claimable are currently failingl? |
I've had this happen a couple of times, and the only fix I found was to chunk through the claims incrementally (which has worked without issue). The main use case for us was with our token sale SC address, which had 2k-3k claims available. At two different points in time (mid-sale and post-sale), I had tried using the standard claim process, and the tx would never go through. It would break the state of the wallet, and I'd have to rebuild the wallet. I suspected size was the issue, so I started playing around with it. I tried chunks of 500 claims at a time, and that didn't work. I found the only way around it was to chunk through the transactions in smaller increments, and 200 seemed to work in our case. It's definitely not scientific in any way, which is why I was curious to get your thoughts. If this is something that shouldn't technically be necessary, then perhaps there is some separate issue that needs to be addressed (and this approach scrapped altogether). Unfortunately, I don't have an active example of this issue... |
Thanks for the explanation. I'd be interested in the root cause of the issue, but would have to be able to reproduce to determine that. I wonder if maybe we're running into the max size of a transaction? Perhaps for now it would be best to allow users to pass in the size of the chunk, otherwise it defaults to current behavior? |
I like that idea! I'll take a crack at it :) |
Should be good to go now, I believe. |
Thanks for the changes! |
* Trivial error change for REST API when transaction is not found * Fixing lint that I broke in #419
What current issue(s) does this address, or what feature is it adding?
Addresses with thousands of UTXOs may have issues with transaction size preventing GAS claims from working in neo-python.
@localhuman: will be curious to hear your thoughts on this. Does the approach seem reasonable? Necessary? Anything that could be better about it?
How did you solve this problem?
Claim GAS for at most 200 UTXOs at a time.
How did you make sure your solution works?
Tested and used the process.
Are there any special changes in the code that we should be aware of?
No.
Please check the following, if applicable:
make lint
?make test
?CHANGELOG.rst
? (if not, please do)