You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The zebra_state::Request::FindBlockHeaders request variant duplicates functionality of Request::FindBlockHashes, but adds more work, blocking the state queue from processing other requests. Once the list of block hashes has been atomically computed, there's no need to atomically fetch all of the blocks to obtain their headers, so there is no correctness problem with moving that phase of the work out of the state service. This simplifies the state implementation.
Describe the solution you'd like
Change FindBlockHashes to include a max_len: usize, passed directly to self.find_chain_hashes;
Replace the existing use of FindBlockHeaders in the Inbound service by a FindBlockHashes, followed by a sequence of Block requests;
Remove FindBlockHeaders from the state API.
Describe alternatives you've considered
Leaving the code as-is. This prevents a clean separation of concerns and prevents us from composing middleware in front of the state service.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The
zebra_state::Request::FindBlockHeaders
request variant duplicates functionality ofRequest::FindBlockHashes
, but adds more work, blocking the state queue from processing other requests. Once the list of block hashes has been atomically computed, there's no need to atomically fetch all of the blocks to obtain their headers, so there is no correctness problem with moving that phase of the work out of the state service. This simplifies the state implementation.Describe the solution you'd like
Change
FindBlockHashes
to include amax_len: usize
, passed directly toself.find_chain_hashes
;Replace the existing use of
FindBlockHeaders
in theInbound
service by aFindBlockHashes
, followed by a sequence ofBlock
requests;Remove
FindBlockHeaders
from the state API.Describe alternatives you've considered
Leaving the code as-is. This prevents a clean separation of concerns and prevents us from composing middleware in front of the state service.
The text was updated successfully, but these errors were encountered: