package
0.1.1
Repository: https://github.com/myelnet/pop.git
Documentation: pkg.go.dev

# README

Retrieval Manager

This module manages a trustless transfer of bytes between 2 parties. It is based on go-fil-markets implementation but does not require unsealing as the blocks are not sealed in storage sectors but ready to be delivered.

Basic flow

  1. Client calls stateMachines.begin with a new deal id and initial deal state

  2. Client sends an EventOpen to the state machine

  3. The state machine moves to StatusNew deal sending a deal Proposal voucher and a data transfer pull request.

  4. The Provider receives the voucher, runs some validation and sends back a response stating if they accept or not.

  5. If the deal status is accepted, the client will get or create a new channel adding the funds in anticipation of the whole transfer costs.

  6. The Client state machine will block until the payment channel is confirmed on chain

  7. Once the channel address is returned the state machine will call the payment manager to allocate and return a new lane number

  8. Meanwhile the provider resumes the data transfer and starts sending blocks until the given payment interval is reached and will request a payment to continue.

  9. The Client will create a new voucher for the requested payment, sign it and send to the provider. The provider will validate the voucher and if accepted send the next amount of bytes.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

DecodeNode validates and computes a decoded ipld.Node selector from the provided cbor-encoded selector TODO: ipld sub module.
New creates a new retrieval instance.
NewProviderRequestValidator returns a new instance of the ProviderRequestValidator.
NewProviderRevalidator returns a new instance of a ProviderRevalidator.
TransportConfigurer configurers the graphsync transport to use a custom blockstore per deal.

# Structs

Client wraps all the client operations.
Provider wraps all the provider operations.
ProviderRequestValidator validates incoming requests for the Retrieval Provider.
ProviderRevalidator defines data transfer revalidation logic in the context of a provider for a retrieval deal.
Retrieval manager implementation.

# Interfaces

Manager handles all retrieval operations both as client and provider.
OfferManager organizes and stores offers for authorizing retrieval deals.
RevalidatorEnvironment are the dependencies needed to build the logic of revalidation -- essentially, access to the node at statemachines.
StoreConfigurableTransport defines the methods needed to configure a data transfer transport use a unique store for a given request.
StoreGetter retrieves the store for a given proposal cid.
StoreIDGetter is an interface required for finding the store associated with the content to provide.
ValidationEnvironment contains the dependencies needed to validate deals.

# Type aliases

Unsubscribe is a function that unsubscribes a subscriber for either the client or the provider.