-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
signet testing: transaction that was evicted from mempool and abandoned by sender wallet showed up as a new unconfirmed txn on sparrow recepient #74
Comments
Interesting test! On the one hand, it would be good to reflect what's in the user's mempool, and on the other, in the general case broadcasting a transaction means it can never truly be considered lost. What happens when you refresh the wallet in this state (View menu)? |
Which also fails to return
|
The If Sparrow is disconnecting on a wallet refresh, then it seems bwt (the library Sparrow is using to connect to the node) is experiencing a terminal error. Are there any logs that might indicate why this happening? bwt's debug logging is included inside Sparrow's logging, so it should be present. The bwt logs look similar to the first line in the log excerpts above. |
I think I know whats happening here. Just to be sure i recreated the last result again, but this time captured the full log which is attached below. Reading the logs top to bottom should ideally reflect the events described below but if i missed something let me know. Also curious if you find something additional too
Sparrow.log |
Its possible that this issue concerns a case that is rare/improbable? As you mentioned previously, that broadcasted transactions are not considered 'lost' . However I am puzzled of why the entry switched from "Unconfirmed" to "Unconfirmed Parent". Should it continue staying "Unconfirmed"? |
I believe your thinking is correct - this is a rare/improbable use case, but nevertheless I have been suspicious for some time that there is a subtle bug causing the "Unconfirmed Parent" situation when it is not always correct. That bug might be in bwt however - note that in the Electrum server protocol specification for blockchain.scripthash.get_mempool, the server notifies the client by returning Although it should be present in the bwt logging too, may I suggest adding debug logging to SubscriptionService to see how bwt is following the protocol on this - strictly, it should notify the script hashes attached to the transaction to return them to their original states (prior to initiating the test). I should note that Sparrow does not handle that situation as you would expect - a bug in electrs means that Sparrow needs to ignore old script hash statuses, or be overwhelmed with unnecessary server queries after invalid notifications. It would also be interesting to know if normal situation where a transaction has an unconfirmed parent are working correctly. cc'ing @shesek (author of bwt) |
bwt should be handling transactions with unconfirmed parents correctly and report them with a height of If something still seems off on bwt's side, let me know and I'll look into this. It probably wouldn't hurt to add some tests around this at least. Edit: It's not strictly related, but maybe also worth noting that bwt reports the effective feerate of transactions with unconfirmed parents, calculated as |
hi @craigraw @shesek thanks for the discussion, here's what I'll do as next steps: check the wallet behavior for an actual unconfirmed parent. Meanwhile if there's a patch you'd like me to build with that will provide additional logs for Sparrow or BWT, I'm happy to re-run this flow and provide the data for further debugging |
Great - bwt's debug logging is also turned on when Sparrow's is. |
@7hacker did you find time to perform this test with an unconfirmed parent? Outstanding Action: Identify whether problem still exists. Identify whether fix can be applied to bwt and if so talk to shesek. |
@6102bitcoin no i haven't had a chance to try this but I can spend some time on it. Do you have a suggestion of how to generate an unconfirmed parent? I'm using a custom signet here |
I don't. @craigraw might know how |
I'm not sure if this is correct but assuming that no txn would ever come then this entry would be unncessary?
The text was updated successfully, but these errors were encountered: