Refactor zebra-network Bitcoin to Zebra protocol translation layer #1515
Labels
A-rust
Area: Updates to Rust code
C-bug
Category: This is a bug
C-cleanup
Category: This is a cleanup
C-design
Category: Software design work
S-needs-design
Status: Needs a design decision
Motivation
The Bitcoin to Zebra protocol translation layer is a bit of a mess, and a source of subtle bugs:
https://github.com/ZcashFoundation/zebra/blob/main/zebra-network/src/peer/connection.rs
It contains a lot of undocumented state, assumptions and invariants. And it's unclear if these assumptions match the
zcashd
implementation.We should refactor the protocol translation into cleaner request/response pairs. We should then test those requests and responses against Zebra and
zcashd
(#1048).Current Implementation
There is a summary of the current implementation here:
https://docs.google.com/document/d/1KgPl3r_Pp8AUM0KvDnBv7LK0vRMvxVjM9ooIwr2mB7U/edit#
Design Questions
Handling Incomplete Peer Responses
notfound
, and use receivednotfound
to finish requests #2726zcashd
to returnNotFound
for blocks?Internal Protocol
notfound
, and use receivednotfound
to finish requests #2726Should we close the connection if there is a missing item? (No)
NotFound
response for a missing item, even if the peer doesn't send aNotFound
?notfound
, and use receivednotfound
to finish requests #2726The text was updated successfully, but these errors were encountered: