-
Notifications
You must be signed in to change notification settings - Fork 106
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
Send inbound TransactionsById
requests to the mempool storage service
#1077
Comments
TransactionsByHash
in the Inbound service
TransactionsByHash
in the Inbound service getdata
requests in TransactionsByHash
in the Inbound service
getdata
requests in TransactionsByHash
in the Inbound service TransactionsByHash
to the mempool storage service
TransactionsByHash
to the mempool storage serviceTransactionsByHash
requests to the mempool storage service
The |
TransactionsByHash
requests to the mempool storage serviceTransactionsById
requests to the mempool storage service
Thanks! Sorry I missed this ticket, I changed most of the names last week. |
The reply to this message is actually 2 replies. One will have the transactions in the mempool we found but we also need to send a This is what i think we can do and some questions i have: 1- Add code in https://github.com/ZcashFoundation/zebra/blob/main/zebrad/src/components/inbound.rs#L284 that will call https://github.com/ZcashFoundation/zebra/blob/main/zebrad/src/components/mempool.rs#L83 that will call https://github.com/ZcashFoundation/zebra/blob/main/zebrad/src/components/mempool/storage.rs#L100 2- That will get us a collection on what was found in the mempool. We can compare with the hashes in the request we have available here https://github.com/ZcashFoundation/zebra/blob/main/zebrad/src/components/inbound.rs#L284 and construct an additional response with not found hashes. 3- I am not sure on how we can reply with 2 messages in the inbound.rs as all the messages we have just reply with one. Should we wrap the 2 messages in a new response type and send that instead ? |
The minimal scope for this ticket is just the transactions. It looks like So can we open another ticket for |
Ok, cool, that makes this ticket a lot easier to code. Will send a PR. |
I opened ticket #2726 for |
Is your feature request related to a problem? Please describe.
The
zebra_network::Request::TransactionsById
variant should be handled by the inbound network service.Describe the solution you'd like
This page on the Bitcoin wiki https://en.bitcoin.it/wiki/Protocol_documentation#getdata suggests that transaction lookup is only allowed for mempool transactions, to prevent reliance on nodes having transaction indexes. We should check what
zcashd
does.The inbound network service should query the mempool for those transactions and construct a response.
The response should consist of the found transactions, followed by a list of NotFound hashes
zcashd
ignoresNotFound
, but its code says that SPV clients rely onNotFound
. Do SPV clients exist on the Zcash network?Additional context
See:
Blocked on actually having a mempool. Part of #889.
The text was updated successfully, but these errors were encountered: