Trait RpcServer

Source
pub trait RpcServer:
    Sized
    + Send
    + Sync
    + 'static {
Show 30 methods // Required methods fn get_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_blockchain_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetBlockChainInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_address_balance<'life0, 'async_trait>( &'life0 self, address_strings: AddressStrings, ) -> Pin<Box<dyn Future<Output = Result<AddressBalance>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, raw_transaction_hex: String, _allow_high_fees: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<SentTransactionHash>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block<'life0, 'async_trait>( &'life0 self, hash_or_height: String, verbosity: Option<u8>, ) -> Pin<Box<dyn Future<Output = Result<GetBlock>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_header<'life0, 'async_trait>( &'life0 self, hash_or_height: String, verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetBlockHeader>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_best_block_hash(&self) -> Result<GetBlockHash>; fn get_best_block_height_and_hash(&self) -> Result<GetBlockHeightAndHash>; fn get_raw_mempool<'life0, 'async_trait>( &'life0 self, verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetRawMempool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn z_get_treestate<'life0, 'async_trait>( &'life0 self, hash_or_height: String, ) -> Pin<Box<dyn Future<Output = Result<GetTreestate>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn z_get_subtrees_by_index<'life0, 'async_trait>( &'life0 self, pool: String, start_index: NoteCommitmentSubtreeIndex, limit: Option<NoteCommitmentSubtreeIndex>, ) -> Pin<Box<dyn Future<Output = Result<GetSubtrees>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_raw_transaction<'life0, 'async_trait>( &'life0 self, txid: String, verbose: Option<u8>, ) -> Pin<Box<dyn Future<Output = Result<GetRawTransaction>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_address_tx_ids<'life0, 'async_trait>( &'life0 self, request: GetAddressTxIdsRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_address_utxos<'life0, 'async_trait>( &'life0 self, address_strings: AddressStrings, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetAddressUtxos>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stop(&self) -> Result<String>; fn get_block_count(&self) -> Result<u32>; fn get_block_hash<'life0, 'async_trait>( &'life0 self, index: i32, ) -> Pin<Box<dyn Future<Output = Result<GetBlockHash>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_template<'life0, 'async_trait>( &'life0 self, parameters: Option<JsonParameters>, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn submit_block<'life0, 'async_trait>( &'life0 self, hex_data: HexData, _parameters: Option<JsonParameters>, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_mining_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_network_sol_ps<'life0, 'async_trait>( &'life0 self, num_blocks: Option<i32>, height: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_peer_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn validate_address<'life0, 'async_trait>( &'life0 self, address: String, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn z_validate_address<'life0, 'async_trait>( &'life0 self, address: String, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_subsidy<'life0, 'async_trait>( &'life0 self, height: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<BlockSubsidy>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_difficulty<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<f64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn z_list_unified_receivers<'life0, 'async_trait>( &'life0 self, address: String, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn generate<'life0, 'async_trait>( &'life0 self, num_blocks: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetBlockHash>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn get_network_hash_ps<'life0, 'async_trait>( &'life0 self, num_blocks: Option<i32>, height: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the Rpc RPC API.

Required Methods§

Source

fn get_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns software information from the RPC server, as a GetInfo JSON struct.

zcashd reference: getinfo method: post tags: control

§Notes

The zcashd reference might not show some fields in Zebra’s GetInfo. Zebra uses the field names and formats from the zcashd code.

Some fields from the zcashd reference are missing from Zebra’s GetInfo. It only contains the fields required for lightwalletd support.

Source

fn get_blockchain_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetBlockChainInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns blockchain state information, as a GetBlockChainInfo JSON struct.

zcashd reference: getblockchaininfo method: post tags: blockchain

§Notes

Some fields from the zcashd reference are missing from Zebra’s GetBlockChainInfo. It only contains the fields required for lightwalletd support.

Source

fn get_address_balance<'life0, 'async_trait>( &'life0 self, address_strings: AddressStrings, ) -> Pin<Box<dyn Future<Output = Result<AddressBalance>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the total balance of a provided addresses in an AddressBalance instance.

zcashd reference: getaddressbalance method: post tags: address

§Parameters
  • address_strings: (object, example={“addresses”: [“tmYXBYJj1K7vhejSec5osXK2QsGa5MTisUQ”]}) A JSON map with a single entry
    • addresses: (array of strings) A list of base-58 encoded addresses.
§Notes

zcashd also accepts a single string parameter instead of an array of strings, but Zebra doesn’t because lightwalletd always calls this RPC with an array of addresses.

zcashd also returns the total amount of Zatoshis received by the addresses, but Zebra doesn’t because lightwalletd doesn’t use that information.

The RPC documentation says that the returned object has a string balance field, but zcashd actually returns an integer.

Source

fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, raw_transaction_hex: String, _allow_high_fees: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<SentTransactionHash>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sends the raw bytes of a signed transaction to the local node’s mempool, if the transaction is valid. Returns the SentTransactionHash for the transaction, as a JSON string.

zcashd reference: sendrawtransaction method: post tags: transaction

§Parameters
  • raw_transaction_hex: (string, required, example=“signedhex”) The hex-encoded raw transaction bytes.
  • allow_high_fees: (bool, optional) A legacy parameter accepted by zcashd but ignored by Zebra.
§Notes

zcashd accepts an optional allowhighfees parameter. Zebra doesn’t support this parameter, because lightwalletd doesn’t use it.

Source

fn get_block<'life0, 'async_trait>( &'life0 self, hash_or_height: String, verbosity: Option<u8>, ) -> Pin<Box<dyn Future<Output = Result<GetBlock>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the requested block by hash or height, as a GetBlock JSON string. If the block is not in Zebra’s state, returns error code -8. if a height was passed or -5 if a hash was passed.

zcashd reference: getblock method: post tags: blockchain

§Parameters
  • hash_or_height: (string, required, example=“1”) The hash or height for the block to be returned.
  • verbosity: (number, optional, default=1, example=1) 0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data.
§Notes

The size field is only returned with verbosity=2.

The undocumented chainwork field is not returned.

Source

fn get_block_header<'life0, 'async_trait>( &'life0 self, hash_or_height: String, verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetBlockHeader>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the requested block header by hash or height, as a GetBlockHeader JSON string. If the block is not in Zebra’s state, returns error code -8. if a height was passed or -5 if a hash was passed.

zcashd reference: getblockheader method: post tags: blockchain

§Parameters
  • hash_or_height: (string, required, example=“1”) The hash or height for the block to be returned.
  • verbose: (bool, optional, default=false, example=true) false for hex encoded data, true for a json object
§Notes

The undocumented chainwork field is not returned.

Source

fn get_best_block_hash(&self) -> Result<GetBlockHash>

Returns the hash of the current best blockchain tip block, as a GetBlockHash JSON string.

zcashd reference: getbestblockhash method: post tags: blockchain

Source

fn get_best_block_height_and_hash(&self) -> Result<GetBlockHeightAndHash>

Returns the height and hash of the current best blockchain tip block, as a GetBlockHeightAndHash JSON struct.

zcashd reference: none method: post tags: blockchain

Source

fn get_raw_mempool<'life0, 'async_trait>( &'life0 self, verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetRawMempool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns all transaction ids in the memory pool, as a JSON array.

§Parameters
  • verbose: (boolean, optional, default=false) true for a json object, false for array of transaction ids.

zcashd reference: getrawmempool method: post tags: blockchain

Source

fn z_get_treestate<'life0, 'async_trait>( &'life0 self, hash_or_height: String, ) -> Pin<Box<dyn Future<Output = Result<GetTreestate>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about the given block’s Sapling & Orchard tree state.

zcashd reference: z_gettreestate method: post tags: blockchain

§Parameters
  • hash | height: (string, required, example=“00000000febc373a1da2bd9f887b105ad79ddc26ac26c2b28652d64e5207c5b5”) The block hash or height.
§Notes

The zcashd doc reference above says that the parameter “height can be negative where -1 is the last known valid block”. On the other hand, lightwalletd only uses positive heights, so Zebra does not support negative heights.

Source

fn z_get_subtrees_by_index<'life0, 'async_trait>( &'life0 self, pool: String, start_index: NoteCommitmentSubtreeIndex, limit: Option<NoteCommitmentSubtreeIndex>, ) -> Pin<Box<dyn Future<Output = Result<GetSubtrees>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a range of Sapling or Orchard subtrees.

zcashd reference: z_getsubtreesbyindex - TODO: fix link method: post tags: blockchain

§Parameters
  • pool: (string, required) The pool from which subtrees should be returned. Either “sapling” or “orchard”.
  • start_index: (number, required) The index of the first 2^16-leaf subtree to return.
  • limit: (number, optional) The maximum number of subtree values to return.
§Notes

While Zebra is doing its initial subtree index rebuild, subtrees will become available starting at the chain tip. This RPC will return an empty list if the start_index subtree exists, but has not been rebuilt yet. This matches zcashd’s behaviour when subtrees aren’t available yet. (But zcashd does its rebuild before syncing any blocks.)

Source

fn get_raw_transaction<'life0, 'async_trait>( &'life0 self, txid: String, verbose: Option<u8>, ) -> Pin<Box<dyn Future<Output = Result<GetRawTransaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the raw transaction data, as a GetRawTransaction JSON string or structure.

zcashd reference: getrawtransaction method: post tags: transaction

§Parameters
  • txid: (string, required, example=“mytxid”) The transaction ID of the transaction to be returned.
  • verbose: (number, optional, default=0, example=1) If 0, return a string of hex-encoded data, otherwise return a JSON object.
§Notes

We don’t currently support the blockhash parameter since lightwalletd does not use it.

In verbose mode, we only expose the hex and height fields since lightwalletd uses only those: https://github.com/zcash/lightwalletd/blob/631bb16404e3d8b045e74a7c5489db626790b2f6/common/common.go#L119

Source

fn get_address_tx_ids<'life0, 'async_trait>( &'life0 self, request: GetAddressTxIdsRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the transaction ids made by the provided transparent addresses.

zcashd reference: getaddresstxids method: post tags: address

§Parameters
  • request: (object, required, example={"addresses": ["tmYXBYJj1K7vhejSec5osXK2QsGa5MTisUQ"], "start": 1000, "end": 2000}) A struct with the following named fields:
    • addresses: (json array of string, required) The addresses to get transactions from.
    • start: (numeric, optional) The lower height to start looking for transactions (inclusive).
    • end: (numeric, optional) The top height to stop looking for transactions (inclusive).
§Notes

Only the multi-argument format is used by lightwalletd and this is what we currently support: https://github.com/zcash/lightwalletd/blob/631bb16404e3d8b045e74a7c5489db626790b2f6/common/common.go#L97-L102

Source

fn get_address_utxos<'life0, 'async_trait>( &'life0 self, address_strings: AddressStrings, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetAddressUtxos>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns all unspent outputs for a list of addresses.

zcashd reference: getaddressutxos method: post tags: address

§Parameters
  • addresses: (array, required, example={"addresses": ["tmYXBYJj1K7vhejSec5osXK2QsGa5MTisUQ"]}) The addresses to get outputs from.
§Notes

lightwalletd always uses the multi-address request, without chaininfo: https://github.com/zcash/lightwalletd/blob/master/frontend/service.go#L402

Source

fn stop(&self) -> Result<String>

Stop the running zebrad process.

§Notes
  • Works for non windows targets only.
  • Works only if the network of the running zebrad process is Regtest.

zcashd reference: stop method: post tags: control

Source

fn get_block_count(&self) -> Result<u32>

Returns the height of the most recent block in the best valid block chain (equivalently, the number of blocks in this chain excluding the genesis block).

zcashd reference: getblockcount method: post tags: blockchain

Source

fn get_block_hash<'life0, 'async_trait>( &'life0 self, index: i32, ) -> Pin<Box<dyn Future<Output = Result<GetBlockHash>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the hash of the block of a given height iff the index argument correspond to a block in the best chain.

zcashd reference: getblockhash method: post tags: blockchain

§Parameters
  • index: (numeric, required, example=1) The block index.
§Notes
  • If index is positive then index = block height.
  • If index is negative then -1 is the last known valid block.
Source

fn get_block_template<'life0, 'async_trait>( &'life0 self, parameters: Option<JsonParameters>, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a block template for mining new Zcash blocks.

§Parameters
  • jsonrequestobject: (string, optional) A JSON object containing arguments.

zcashd reference: getblocktemplate method: post tags: mining

§Notes

Arguments to this RPC are currently ignored. Long polling, block proposals, server lists, and work IDs are not supported.

Miners can make arbitrary changes to blocks, as long as:

  • the data sent to submitblock is a valid Zcash block, and
  • the parent block is a valid block that Zebra already has, or will receive soon.

Zebra verifies blocks in parallel, and keeps recent chains in parallel, so moving between chains and forking chains is very cheap.

Source

fn submit_block<'life0, 'async_trait>( &'life0 self, hex_data: HexData, _parameters: Option<JsonParameters>, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Submits block to the node to be validated and committed. Returns the submit_block::Response for the operation, as a JSON string.

zcashd reference: submitblock method: post tags: mining

§Parameters
  • hexdata: (string, required)
  • jsonparametersobject: (string, optional) - currently ignored
§Notes
  • jsonparametersobject holds a single field, workid, that must be included in submissions if provided by the server.
Source

fn get_mining_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns mining-related information.

zcashd reference: getmininginfo method: post tags: mining

Source

fn get_network_sol_ps<'life0, 'async_trait>( &'life0 self, num_blocks: Option<i32>, height: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the estimated network solutions per second based on the last num_blocks before height.

If num_blocks is not supplied, uses 120 blocks. If it is 0 or -1, uses the difficulty averaging window. If height is not supplied or is -1, uses the tip height.

zcashd reference: getnetworksolps method: post tags: mining

Source

fn get_peer_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns data about each connected network node.

zcashd reference: getpeerinfo method: post tags: network

Source

fn validate_address<'life0, 'async_trait>( &'life0 self, address: String, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Checks if a zcash transparent address of type P2PKH, P2SH or TEX is valid. Returns information about the given address if valid.

zcashd reference: validateaddress method: post tags: util

§Parameters
  • address: (string, required) The zcash address to validate.
Source

fn z_validate_address<'life0, 'async_trait>( &'life0 self, address: String, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Checks if a zcash address of type P2PKH, P2SH, TEX, SAPLING or UNIFIED is valid. Returns information about the given address if valid.

zcashd reference: z_validateaddress method: post tags: util

§Parameters
  • address: (string, required) The zcash address to validate.
§Notes
  • No notes
Source

fn get_block_subsidy<'life0, 'async_trait>( &'life0 self, height: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<BlockSubsidy>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the block subsidy reward of the block at height, taking into account the mining slow start. Returns an error if height is less than the height of the first halving for the current network.

zcashd reference: getblocksubsidy method: post tags: mining

§Parameters
  • height: (numeric, optional, example=1) Can be any valid current or future height.
§Notes

If height is not supplied, uses the tip height.

Source

fn get_difficulty<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<f64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

zcashd reference: getdifficulty method: post tags: blockchain

Source

fn z_list_unified_receivers<'life0, 'async_trait>( &'life0 self, address: String, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the list of individual payment addresses given a unified address.

zcashd reference: z_listunifiedreceivers method: post tags: wallet

§Parameters
  • address: (string, required) The zcash unified address to get the list from.
§Notes
  • No notes
Source

fn generate<'life0, 'async_trait>( &'life0 self, num_blocks: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<GetBlockHash>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Mine blocks immediately. Returns the block hashes of the generated blocks.

§Parameters
  • num_blocks: (numeric, required, example=1) Number of blocks to be generated.
§Notes

Only works if the network of the running zebrad process is Regtest.

zcashd reference: generate method: post tags: generating

Provided Methods§

Source

fn get_network_hash_ps<'life0, 'async_trait>( &'life0 self, num_blocks: Option<i32>, height: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the estimated network solutions per second based on the last num_blocks before height.

This method name is deprecated, use getnetworksolps instead. See that method for details.

zcashd reference: getnetworkhashps method: post tags: mining

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Mempool, State, Tip, AddressBook, BlockVerifierRouter, SyncStatus> RpcServer for RpcImpl<Mempool, State, Tip, AddressBook, BlockVerifierRouter, SyncStatus>
where Mempool: Service<Request, Response = Response, Error = BoxError> + Clone + Send + Sync + 'static, Mempool::Future: Send, State: Service<ReadRequest, Response = ReadResponse, Error = BoxError> + Clone + Send + Sync + 'static, State::Future: Send, Tip: ChainTip + Clone + Send + Sync + 'static, AddressBook: AddressBookPeers + Clone + Send + Sync + 'static, BlockVerifierRouter: Service<Request, Response = Hash, Error = BoxError> + Clone + Send + Sync + 'static, <BlockVerifierRouter as Service<Request>>::Future: Send, SyncStatus: ChainSyncStatus + Clone + Send + Sync + 'static,