-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
docs: add Provider
doc section for cacheUtxo
#2598
docs: add Provider
doc section for cacheUtxo
#2598
Conversation
Torres-ssf
commented
Jun 24, 2024
- Close: Add docs related to the optional caching UTXOs logic #2056
- Close: Review UTXO caching logic #1515
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job on this 🚀 , left some suggestions.
Co-authored-by: Chad Nehemiah <chad.nehemiah94@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, couple comments and questions.
- If I have one utxo and am submitting multiple transactions,
cacheUtxo
has no effect and in fact we risk the second tx failing but we would be able to fund both txs initially? - Why would you not want to
cacheUtxo
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll think more about this before coming back to it.
At first glance, this flag looks confusing.
If you have just one UTXO and you fund and submit 2 TXs simultaneously:
When you have just one UTXO, you cannot send multiple TXs without waiting for the first one to complete. It will always fail
The only reason that comes to mind would be in a situation where your first TX failed, and then your UTXO that was not being spent is now unusable until the cache for it got whipped. Also, the error message is different. Maybe you have just one UTXO and since the cache is being used by default, and you are completely unaware of it, if you try to send 2 transactions in a row the error message would be This flag makes it possible for users that own multiple UTXOs to submit multiple TXs in a row, without waiting for each one to be processed, and without running into the error UTXO non-existent. This error will likely happen, as the TXs are going to be funded automatically, and TX1 and TX2 can be funded with the same UTXO(s). Then, when TX1 is processed, that specific UTXO will be spent, and TX2 will fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed explanation
Coverage Report:
Changed Files:Coverage values did not change👌. |