pub struct AptosNetDataClient { /* private fields */ }
Expand description

An AptosDataClient that fulfills requests from remote peers’ Storage Service over AptosNet.

The AptosNetDataClient:

  1. Sends requests to connected Aptos peers.
  2. Does basic type conversions and error handling on the responses.
  3. Routes requests to peers that advertise availability for that data.
  4. Maintains peer scores based on each peer’s observed quality of service and upper client reports of invalid or malicious data.
  5. Selects high quality peers to send each request to.
  6. Exposes a condensed data summary of our peers’ data advertisements.

The client currently assumes 1-request => 1-response. Streaming responses are handled at an upper layer.

The client is expected to be cloneable and usable from many concurrent tasks and/or threads.

Implementations

Trait Implementations

Returns a global summary of the data currently available in the network. Read more

Returns a single account states chunk with proof, containing the accounts from start to end index (inclusive) at the specified version. The proof version is the same as the specified version. Read more

Returns all epoch ending ledger infos between start and end (inclusive). If the data cannot be fetched (e.g., the number of epochs is too large), an error is returned. Read more

Returns a new transaction output list with proof. Versions start at known_version + 1 and known_epoch (inclusive). The end version and proof version are specified by the server. If the data cannot be fetched, an error is returned. Read more

Returns a new transaction list with proof. Versions start at known_version + 1 and known_epoch (inclusive). The end version and proof version are specified by the server. If the data cannot be fetched, an error is returned. Read more

Returns the number of account states at the specified version.

Returns a transaction output list with proof object, with transaction outputs from start to end versions (inclusive). The proof is relative to the specified proof_version. If the data cannot be fetched (e.g., the number of transaction outputs is too large), an error is returned. Read more

Returns a transaction list with proof object, with transactions from start to end versions (inclusive). The proof is relative to the specified proof_version. If include_events is true, events are included in the proof. If the data cannot be fetched (e.g., the number of transactions is too large), an error is returned. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more