-
Notifications
You must be signed in to change notification settings - Fork 120
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
Tracking: inbound message handling. #889
Comments
Should we perform transaction verification before adding to the mempool? |
Yes, there are different transaction verification rules for mempool transactions, I'll clarify the line to reflect that. |
#878 is unmergeable (the way it used Abscissa components didn't work out) but it has some code that could be extracted to implement the inbound network service. One thing we need to decide (cc @ZcashFoundation/zebra-team) is whether we want to continue to provide a special-case My position is that we should drop it, since eliminating that distinction will simplify the implementation. We will want to run full nodes anyways (in order to be able to supply blocks to other peers), so I don't think that there's much benefit to making a special seed mode. |
Is writing a full node a post-alpha task? |
Yes, we need to do this before, because it's part of what's required to participate in the network (altruistically, if we don't do this, we'll be draining bandwidth from the network and providing none, selfishly, we need to do this to learn about gossiped blocks). That said, the work here mostly consists of wiring things together, rather than implementing a ton of new functionality, the bulk of the work left to do remains in implementing all the validation and state handling. |
Adding #1027 to this Epic |
We usually edit the description and add a checkbox for new tasks. Is there an automatic way to see when tickets are completed? |
I think we're almost done here! |
All done with this Epic |
The zebra-network API is designed so that on init, the user passes in a
Service
whose job it is to respond to network requests from other peers. Currently, the only existing implementation of this is theSeedService
, which responds to address requests from peers.This code should be refactored into a general-purpose
Inbound
service that handles all requests from peers.We need to implement an inbound network service with the following behaviors:
Request::Peers
by returning sanitized peer addresses;Request::BlocksByHash
by querying the state service for those blocks;Request::TransactionsByHash
(Send inboundTransactionsById
requests to the mempool storage service #1077)Request::FindBlocks
(HandleFindBlocks
in the Inbound service #1078)Request::FindHeaders
(HandleFindHeaders
in the Inbound service #1079)Request::PushTransaction
(Send inboundPushTransaction
s broadcasts to the mempool download and verify stream #1080)Request::AdvertiseTransactions
(Send inboundAdvertiseTransactionIds
broadcasts to the mempool download & verify stream #1081)Request::AdvertiseBlock
(HandleAdvertiseBlock
in Inbound service #1082)Request::MempoolTransactions
(Send inboundMempoolTransactionIds
requests to the mempool storage service #1083)Other work:
peer/connection.rs
(use exhaustive match statement inpeer/connection.rs
#1027)The text was updated successfully, but these errors were encountered: