Skip to main content

Module state

Module state 

Source
Expand description

Implementations of the v1 API traits and the v2 tonic service traits, both reading the one data source this type wraps.

StructsΒ§

NodeApiStateImpl
Node API state implementation

ConstantsΒ§

FETCH_TIMEOUT πŸ”’
Timeout for failing requests due to missing data.
MAX_NAMESPACES_PER_REQUEST πŸ”’
Bounds the namespace list of a v2 multi-namespace light-client request, as the URL length bounds v1’s, since every namespace costs a lookup in every block of the range.
NAMESPACE_PROOF_RANGE_LIMIT πŸ”’

TraitsΒ§

StateSignatureDataSourceErased πŸ”’
SubmitDataSourceErased πŸ”’
Network-agnostic submit hook used by the axum wrapper. The original SubmitDataSource<N, P> trait is parameterized by the network type; this erased trait lets NodeApiStateImpl avoid carrying those parameters.

FunctionsΒ§

bad_request πŸ”’
block_id_from_query πŸ”’
block_id_to_hs πŸ”’
block_ident πŸ”’
v1 spells the three ways of naming a block as separate routes, so v2’s optional parameters carry the same choice, with neither given meaning the latest block.
catchup_at πŸ”’
The (height, view) the catchup routes over a merkle tree are asked for.
classify_query_error πŸ”’
end_at_first_error πŸ”’
A conversion error is sent as an event: error frame. Ending the stream there means a subscriber that skips the frame cannot miss a height without noticing.
enforce_range πŸ”’
explorer_error πŸ”’
Like lc_error, for explorer data source errors.
fetch_supply_inputs πŸ”’
header_query πŸ”’
large_object_range_limit πŸ”’
lc_error πŸ”’
Convert a query-service error to an AvailabilityError-carrying anyhow error so the HTTP layer returns the status carried by the error (400/404) instead of 500.
lc_large_object_range_limit πŸ”’
lc_leaf_proof_chain_limit πŸ”’
Bounds the leaves in a single leaf proof, and so the memory to build and serialize it.
leaf_query πŸ”’
namespace_from_query πŸ”’
namespace_id πŸ”’
Namespace ids are 32 bits on chain but travel as uint64 so they round-trip with the responses’ namespace fields. Anything wider is a client error, not a truncation.
node_window_limit πŸ”’
not_found πŸ”’
payload_id_to_hs πŸ”’
range_exceeded πŸ”’
range_from_query πŸ”’
ranges_from_body πŸ”’
required πŸ”’
serialize_tree πŸ”’
A tree travels as bincode, the encoding peers already decode from v1 and from the v2 reward tree route.
small_object_range_limit πŸ”’
snapshot_from_query πŸ”’
state_cert_error πŸ”’
transaction_ident πŸ”’
As block_ident, except that naming a transaction by position takes both height and offset, so half of that pair is a bad request rather than a fallback to the latest.
validate_ranges πŸ”’
Check a ranges request against the same per-request object limit the range endpoints enforce, and convert it for the data source.