pygate / pygate-gRPC

A Python gRPC Powergate client
http://pygate.tech
MIT License
22 stars 5 forks source link

Add support for "ffs log" #45

Closed peterVG closed 3 years ago

peterVG commented 3 years ago

This function is recommended by Textile over ffs watch to monitor the status of storage deal acceptance and sealing. Since this process can take hours, even days on Filecoin, it is pretty critical for a Filecoin-based application to have access to the output of this command so that it can update the storage verified status of files it has pushed to Filecoin. The usage in POW CLI is:

pow ffs -t <token> log <CID>

Example output:

> 2020-10-01T18:55:34 - Pushing new configuration...
> 2020-10-01T18:55:34 - Configuration saved successfully
> 2020-10-01T18:55:35 - Executing job 7b63943c-1d14-4d50-b74f-26d63eb3482c...
> 2020-10-01T18:55:35 - Ensuring Hot-Storage satisfies the configuration...
> 2020-10-01T18:55:35 - No actions needed in Hot Storage.
> 2020-10-01T18:55:35 - Hot-Storage execution ran successfully.
> 2020-10-01T18:55:35 - Ensuring Cold-Storage satisfies the configuration...
> 2020-10-01T18:55:36 - Current replication factor is lower than desired, making 4 new deals...
> 2020-10-01T18:58:19 - Pushing new configuration...
> 2020-10-01T18:58:19 - Job %!s(MISSING) is already being executed for the same data, this job will be queued until it finishes or is canceled.
> 2020-10-01T18:58:19 - Configuration saved successfully
> 2020-10-01T19:02:13 - Calculating piece size...
> 2020-10-01T19:02:14 - Estimated piece size is 8388608 bytes.
> 2020-10-01T19:02:14 - Proposing deal to miner t021069 with 100000000 attoFIL per epoch...
> 2020-10-01T19:02:14 - Proposing deal to miner t010479 with 100000000 attoFIL per epoch...
> 2020-10-01T19:02:14 - Proposing deal to miner t09573 with 500000000 attoFIL per epoch...
> 2020-10-01T19:02:21 - Watching deals unfold...
> 2020-10-01T19:07:21 - Deal with miner t021069 changed state to StorageDealEnsureClientFunds
> 2020-10-01T19:07:21 - Deal with miner t010479 changed state to StorageDealEnsureClientFunds
> 2020-10-01T19:07:21 - Deal with miner t09573 changed state to StorageDealEnsureClientFunds
> 2020-10-01T19:12:21 - Deal with miner t021069 changed state to StorageDealClientFunding
> 2020-10-01T19:12:21 - Deal with miner t010479 changed state to StorageDealClientFunding
> 2020-10-01T19:17:21 - Deal with miner t09573 changed state to StorageDealClientFunding
> 2020-10-01T22:45:52 - Deal with miner t021069 changed state to StorageDealCheckForAcceptance
> 2020-10-01T22:45:52 - Deal with miner t010479 changed state to StorageDealCheckForAcceptance
> 2020-10-01T22:50:52 - Deal with miner t021069 changed state to StorageDealProposalAccepted
> 2020-10-01T22:50:52 - Deal with miner t010479 changed state to StorageDealProposalAccepted
> 2020-10-01T23:00:52 - Deal 376567 with miner t021069 changed state to StorageDealSealing
> 2020-10-01T23:00:52 - Deal 376569 with miner t010479 changed state to StorageDealSealing
> 2020-10-02T05:04:56 - Scheduling deal repair evaluation...
> 2020-10-02T05:04:56 - Scheduling deal repair errored: getting latest storage config: getting storage config: datastore: key not found