Documentation ¶
Overview ¶
establish connection to a 'FullNode' filecoin API with cli configuration. Mostly with an eye towards ease of use for lotus users.
Index ¶
- Variables
- func DB(connStr string) *pgxpool.Pool
- func GetAPI(c *cli.Context) (api.FullNode, error)
- func GetBlockstore(c *cli.Context) (api.FullNode, statediff.StateRootFunc, blockstore.Blockstore, error)
- func GetCar(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
- func GetHead(client api.FullNode) statediff.StateRootFunc
- func GetNewSql(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
- func GetSql(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
- func GetVector(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
- func Lazy(c *cli.Context) (iface.Datasource, error)
- func NewCachingStore(backing blockstore.Blockstore) blockstore.Blockstore
- func NewSqlBlockStore(connstr string) (blockstore.Blockstore, statediff.StateRootFunc, error)
- type CarAPI
- func (ra *CarAPI) ClientCalcCommP(ctx context.Context, inpath string) (*api.CommPRet, error)
- func (ra *CarAPI) ClientDataTransferUpdates(ctx context.Context) (<-chan api.DataTransferChannel, error)
- func (ra *CarAPI) ClientDealSize(ctx context.Context, root cid.Cid) (api.DataSize, error)
- func (ra *CarAPI) ClientFindData(ctx context.Context, root cid.Cid, piece *cid.Cid) ([]api.QueryOffer, error)
- func (ra *CarAPI) ClientGenCar(ctx context.Context, ref api.FileRef, outputPath string) error
- func (ra *CarAPI) ClientGetDealInfo(ctx context.Context, d cid.Cid) (*api.DealInfo, error)
- func (ra *CarAPI) ClientGetDealUpdates(ctx context.Context) (<-chan api.DealInfo, error)
- func (ra *CarAPI) ClientHasLocal(ctx context.Context, root cid.Cid) (bool, error)
- func (ra *CarAPI) ClientImport(ctx context.Context, ref api.FileRef) (*api.ImportRes, error)
- func (ra *CarAPI) ClientImportLocal(ctx context.Context, f io.Reader) (cid.Cid, error)
- func (ra *CarAPI) ClientListDataTransfers(ctx context.Context) ([]api.DataTransferChannel, error)
- func (ra *CarAPI) ClientListDeals(ctx context.Context) ([]api.DealInfo, error)
- func (ra *CarAPI) ClientListImports(ctx context.Context) ([]api.Import, error)
- func (ra *CarAPI) ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (api.QueryOffer, error)
- func (ra *CarAPI) ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error)
- func (ra *CarAPI) ClientRemoveImport(ctx context.Context, importID imports.ID) error
- func (ra *CarAPI) ClientRetrieve(ctx context.Context, order api.RetrievalOrder, ref *api.FileRef) error
- func (ra *CarAPI) ClientRetrieveTryRestartInsufficientFunds(ctx context.Context, paymentChannel address.Address) error
- func (ra *CarAPI) ClientRetrieveWithEvents(ctx context.Context, order api.RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error)
- func (ra *CarAPI) ClientStartDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error)
- func (ra *CarAPI) ComputeGasOutputs(gasUsed, gasLimit int64, baseFee, feeCap, gasPremium abi.TokenAmount) vm.GasOutputs
- func (ra *CarAPI) Store() adt.Store
- type Postconditions
- type Preconditions
- type SqlBlockstore
- func (sbs *SqlBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
- func (sbs *SqlBlockstore) DeleteBlock(cid.Cid) error
- func (sbs *SqlBlockstore) Get(c cid.Cid) (blocks.Block, error)
- func (sbs *SqlBlockstore) GetSize(c cid.Cid) (size int, err error)
- func (sbs *SqlBlockstore) Has(c cid.Cid) (has bool, err error)
- func (sbs *SqlBlockstore) HashOnRead(enabled bool)
- func (sbs *SqlBlockstore) Put(b blocks.Block) (err error)
- func (sbs *SqlBlockstore) PutMany(blks []blocks.Block) error
- type StateTree
- type TestVector
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiFlag = cli.StringFlag{ Name: "api", Usage: "api endpoint, formatted as token:multiaddr", Value: "", EnvVars: []string{"FULLNODE_API_INFO"}, }
View Source
var CarFlag = cli.StringFlag{
Name: "car",
Usage: "car file location for data source",
Value: "",
}
View Source
var NewSqlFlag = cli.StringFlag{
Name: "annotatedSql",
Usage: "Postgress connection for archivial lotus data source",
Value: "",
}
View Source
var NoCacheFlag = cli.BoolFlag{ Name: "nocache", Usage: "disable datastore cache layer", Value: false, }
View Source
var SqlFlag = cli.StringFlag{
Name: "sql",
Usage: "sql connection string for data source",
Value: "",
}
View Source
var VectorFlag = cli.StringFlag{
Name: "vector",
Usage: "test-vector.json file location for data source",
Value: "",
}
Functions ¶
func GetBlockstore ¶ added in v0.0.6
func GetBlockstore(c *cli.Context) (api.FullNode, statediff.StateRootFunc, blockstore.Blockstore, error)
func GetCar ¶ added in v0.0.6
func GetCar(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
func GetNewSql ¶ added in v0.0.19
func GetNewSql(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
func GetSql ¶ added in v0.0.13
func GetSql(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
func GetVector ¶ added in v0.0.6
func GetVector(c *cli.Context) (statediff.StateRootFunc, blockstore.Blockstore, error)
func Lazy ¶ added in v0.0.8
func Lazy(c *cli.Context) (iface.Datasource, error)
func NewCachingStore ¶ added in v0.0.8
func NewCachingStore(backing blockstore.Blockstore) blockstore.Blockstore
NewCachingStore creates a store with a local map cache
func NewSqlBlockStore ¶ added in v0.0.13
func NewSqlBlockStore(connstr string) (blockstore.Blockstore, statediff.StateRootFunc, error)
Types ¶
type CarAPI ¶ added in v0.0.8
type CarAPI struct { impl.FullNodeAPI context.Context // contains filtered or unexported fields }
func NewOpener ¶ added in v0.0.13
func NewOpener(c *cli.Context, roots statediff.StateRootFunc, db blockstore.Blockstore) (*CarAPI, error)
func (*CarAPI) ClientCalcCommP ¶ added in v0.0.8
func (*CarAPI) ClientDataTransferUpdates ¶ added in v0.0.8
func (*CarAPI) ClientDealSize ¶ added in v0.0.8
func (*CarAPI) ClientFindData ¶ added in v0.0.8
func (*CarAPI) ClientGenCar ¶ added in v0.0.8
func (*CarAPI) ClientGetDealInfo ¶ added in v0.0.8
func (*CarAPI) ClientGetDealUpdates ¶ added in v0.0.8
func (*CarAPI) ClientHasLocal ¶ added in v0.0.8
func (*CarAPI) ClientImport ¶ added in v0.0.8
func (*CarAPI) ClientImportLocal ¶ added in v0.0.8
func (*CarAPI) ClientListDataTransfers ¶ added in v0.0.8
func (*CarAPI) ClientListDeals ¶ added in v0.0.8
func (*CarAPI) ClientListImports ¶ added in v0.0.8
func (*CarAPI) ClientMinerQueryOffer ¶ added in v0.0.8
func (*CarAPI) ClientQueryAsk ¶ added in v0.0.8
func (ra *CarAPI) ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error)
func (*CarAPI) ClientRemoveImport ¶ added in v0.0.8
func (*CarAPI) ClientRetrieve ¶ added in v0.0.8
func (*CarAPI) ClientRetrieveTryRestartInsufficientFunds ¶ added in v0.0.8
func (*CarAPI) ClientRetrieveWithEvents ¶ added in v0.0.8
func (ra *CarAPI) ClientRetrieveWithEvents(ctx context.Context, order api.RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error)
func (*CarAPI) ClientStartDeal ¶ added in v0.0.8
func (*CarAPI) ComputeGasOutputs ¶ added in v0.0.8
func (ra *CarAPI) ComputeGasOutputs(gasUsed, gasLimit int64, baseFee, feeCap, gasPremium abi.TokenAmount) vm.GasOutputs
type Postconditions ¶ added in v0.0.6
type Postconditions struct {
StateTree *StateTree `json:"state_tree"`
}
Postconditions contain a representation of VM state at th end of the test
type Preconditions ¶ added in v0.0.6
type Preconditions struct {
StateTree *StateTree `json:"state_tree"`
}
type SqlBlockstore ¶ added in v0.0.13
type SqlBlockstore struct {
// contains filtered or unexported fields
}
func (*SqlBlockstore) AllKeysChan ¶ added in v0.0.13
func (sbs *SqlBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
func (*SqlBlockstore) DeleteBlock ¶ added in v0.0.13
func (sbs *SqlBlockstore) DeleteBlock(cid.Cid) error
func (*SqlBlockstore) Get ¶ added in v0.0.13
func (sbs *SqlBlockstore) Get(c cid.Cid) (blocks.Block, error)
func (*SqlBlockstore) GetSize ¶ added in v0.0.13
func (sbs *SqlBlockstore) GetSize(c cid.Cid) (size int, err error)
func (*SqlBlockstore) Has ¶ added in v0.0.13
func (sbs *SqlBlockstore) Has(c cid.Cid) (has bool, err error)
func (*SqlBlockstore) HashOnRead ¶ added in v0.0.13
func (sbs *SqlBlockstore) HashOnRead(enabled bool)
HashOnRead specifies if every read block should be rehashed to make sure it matches its CID.
type TestVector ¶ added in v0.0.6
type TestVector struct { CAR string `json:"car"` Pre *Preconditions `json:"preconditions"` Post *Postconditions `json:"postconditions"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.