Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is responsible for requesting EDSs for blocksync over the ShrEx/EDS protocol.
func (*Client) RequestEDS ¶
func (c *Client) RequestEDS( ctx context.Context, dataHash share.DataHash, peers peer.IDSlice, ) (*rsmt2d.ExtendedDataSquare, error)
RequestEDS requests the full ODS from one of the given peers and returns the EDS.
The peers are requested in a round-robin manner with retries until one of them gives a valid response, blocking until the context is canceled or a valid response is given.
type Option ¶
type Option func(*Parameters)
Option is the functional option that is applied to the shrex/eds protocol to configure its parameters.
func WithProtocolSuffix ¶
WithProtocolSuffix is a functional option that configures the `protocolSuffix` parameter
type Parameters ¶
type Parameters struct { // ReadDeadline sets the timeout for reading messages from the stream. ReadDeadline time.Duration // WriteDeadline sets the timeout for writing messages to the stream. WriteDeadline time.Duration // ReadCARDeadline defines the deadline for reading a CAR from disk. ReadCARDeadline time.Duration // BufferSize defines the size of the buffer used for writing an ODS over the stream. BufferSize uint64 // contains filtered or unexported fields }
Parameters is the set of parameters that must be configured for the shrex/eds protocol.
func DefaultParameters ¶
func DefaultParameters() *Parameters
func (*Parameters) Validate ¶
func (p *Parameters) Validate() error
Click to show internal directories.
Click to hide internal directories.