1. Overview
  2. Docs

The baker and endorser rely on this stream to be notified of new blocks.

Returns current and next protocol for a block.

header returns the block header of the block associated to the given block specification.

operations returns all operations included in the block.

inject_block_callback is called when an RPC is performed on Tezos_shell_services.Injection_services.S.block, after checking that the block header can be deserialized.

inject_operation is used by the endorser (or the client) to inject operations, including endorsements.

val pending_operations : unit -> mempool Lwt.t

pending_operations returns the current contents of the mempool. It is used by the baker to fetch operations to potentially include in the block being baked. These operations might include endorsements. If there aren't enough endorsements, the baker waits on monitor_operations.

val monitor_operations : applied:bool -> branch_delayed:bool -> branch_refused:bool -> refused:bool -> ((Tezos_crypto.Operation_hash.t * Tezos_client_012_Psithaca.Mockup.M.Protocol.operation) * Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace option) list Tezos_rpc.RPC_answer.stream

Return a stream of list of operations. Used by the baker to wait on endorsements. Invariant: the stream becomes empty when the node changes head.

val list_blocks : heads:Tezos_crypto.Block_hash.t list -> length:int option -> min_date:Tezos_base.TzPervasives.Time.Protocol.t option -> Tezos_crypto.Block_hash.t list list Tezos_base.TzPervasives.tzresult Lwt.t

Lists block hashes from the chain, up to the last checkpoint, sorted with decreasing fitness. Without arguments it returns the head of the chain. Optional arguments allow to return the list of predecessors of a given block or of a set of blocks.

List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.

rpc_context_callback is used in the implementations of several RPCs (see local_services.ml). It should correspond to the rpc_context constructed from the context at the requested block.

Return raw protocol data as a block.

Broadcast block manually to nodes dests (given by their number, starting from 0). If dests is not provided, broadcast to all nodes.

Broadcast operation manually to nodes dests (given by their number, starting from 0). If dests is not provided, broadcast to all nodes.

Simulate waiting for the node to be bootstrapped. Because the simulated node is already bootstrapped, returns the current head immediately.