-
Notifications
You must be signed in to change notification settings - Fork 846
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
Batched test RPC calls cause incorrect reports #864
Comments
This is not the case, see the test I just added. |
I think your problem is that you send an HTTP error code if any of the request does not work. |
Hmm, this is interesting. Not returning 404 actually looks like a bug in I'd agree that it'd be nicer to be able to batch the requests. I guess the discussion should be handled with core devs. |
@Kixunil do I understand correctly that their code mean that if one of the batched request fails for permission, then ALL the response of the requests are not sent out? If so that's problematic, as some call may have succeed but the caller can't know. |
Yes, exactly that. You can see in the linked code that it pre-checks all the methods in a for loop and if it hits any forbidden method, it bails out right away with 403. |
I've been thinking about it and since 0.20.0 is out, it basically means that using batching in NBitcoin for scanning is essentially a bug. There are at least two projects tight now that protect their nodes using whitelisting. As a result NBXplorer, which uses NBitcoin doesn't have the correct information about capabilities which in turn causes BTCPayServer to disable PayJoin. So we have to either sacrifice privacy or security. Un-batching would resolve the issue and the performance penalty should be reasonably low. Capabilities are scanned only at the beginning, so it's constant increase. If the time becomes too long the requests could be launched in parallel. However I don't believe it will be needed. Is there anything I, non-C# dev, can do to help getting un-batched scan into NBitcoin/NBXplorer as soon as possible? |
This is a temporary fix until MetacoSA/NBitcoin#864 is resolved.
@Kixunil I think that's OK to fallback to non-batched. I will check what I can do. |
fixed in .51, we fallback to serial if batching fails. |
pushed NBXplorer with the new nbitcoin on 2.1.41 |
please open issue on NBXplorer repo if you still have the problem |
Thanks a lot! Just sent some sats. :) |
Batching various calls during RPC test causes that if one of them fails, all of them fail. This interferes with ability to discover the capabilities correctly.
The text was updated successfully, but these errors were encountered: