filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.84k stars 1.27k forks source link

Minor UI / UX issues go here #1518

Closed arajasek closed 4 years ago

arajasek commented 4 years ago

This is a place to collect suggestions for UI/UX changes. Larger items can be spun into their own issues as we triage, smaller items can just be knocked out and removed.

1) CLI: lotus client list-deals should print out the deal ID 2) lotus state list-miners should probably have some filtering, it's likely that most miners on-chain are just junk/spam. 3) Fix unmarshalling of lotus-storage-miner deals list output.

laser commented 4 years ago

Recommendation X

It would be nice if lotus client list-deals produced the CID of the original data, i.e. the CID used in the lotus client retrieve command.

Current behavior:

Import data, get CID:

$ lotus client import /var/folders/8h/gmmbhq1s5tb8sk9011sy2wkw0000gn/T/lotus-interopnet.XXXX.Rw5cffZE/original-data.txt
bafkreigmfoyuwkvaux2ome5tp4ta6bpnei2pllhsniaepaeqgkb6fvvuka

Make a deal using that CID:

$ lotus client deal bafkreigmfoyuwkvaux2ome5tp4ta6bpnei2pllhsniaepaeqgkb6fvvuka t01000 0.000000000001 5

List deals - don't see that CID:

$ lotus client list-deals
DealCid                                                      Provider  State              PieceCID                                                       Size  Price    Duration  Message
bafyreihf2rtnxlj7szlh35mib6nazr5boajlv7wtn6d27uj2tr536v5tku  t01000    StorageDealActive  bafk4chzacsrkrlu33lbz4u4xor5jm6ig6w6g4we6g4yfhtyxeclwdx4e5maa  2032  1000000  5

Retrieve, using that CID:

$ lotus client retrieve bafkreigmfoyuwkvaux2ome5tp4ta6bpnei2pllhsniaepaeqgkb6fvvuka /var/folders/8h/gmmbhq1s5tb8sk9011sy2wkw0000gn/T/lotus-interopnet.XXXX.Rw5cffZE/retrieved-data.txt

Recommendation Y

The lotus-storage-miner deals list command should output a table of values similar to lotus client list-deals. It currently outputs something like this:

15:59 $ lotus-storage-miner deals list
2020-04-06T15:59:15.478-0700    WARN    rpc     jsonrpc/client.go:385   unmarshaling failed     {"message": "[{\"Proposal\":{\"PieceCID\":{\"/\":\"bafk4chzacsrkrlu33lbz4u4xor5jm6ig6w6g4we6g4yfhtyxeclwdx4e5maa\"},\"PieceSize\":2048,\"Client\":\"t3xfdy3topsp2frdpn4p7pcyx3hwgjep6ewahawtfbydofmvk7ixfunfu6q3xjlz2wlesm2crjx6zizcwwlyuq\",\"Provider\":\"t01000\",\"StartEpoch\":10005,\"EndEpoch\":10010,\"StoragePricePerEpoch\":\"1000000\",\"ProviderCollateral\":\"2032\",\"ClientCollateral\":\"0\"},\"ClientSignature\":{\"Type\":2,\"Data\":\"sx1I5eSQpH1uX+KC1MyKG7c+2KncO3u9pd5pDUl5vdTIQ+5JmvixPc1G7ijkMCuAD/0QXzvLVn5nDN7i9fs0LNmBv71gaShspjp6uZinxizk9tcciXd7r4dc6le37n0F\"},\"ProposalCid\":{\"/\":\"bafyreihf2rtnxlj7szlh35mib6nazr5boajlv7wtn6d27uj2tr536v5tku\"},\"Miner\":\"\",\"Client\":\"12D3KooWEC12M2FajjvRjraDiHxcya22UAya8Zn7S8WFnYF7D5Zy\",\"State\":16,\"PiecePath\":\"fstmp819577048\",\"Message\":\"\",\"Ref\":{\"TransferType\":\"graphsync\",\"Root\":{\"/\":\"bafkreigmfoyuwkvaux2ome5tp4ta6bpnei2pllhsniaepaeqgkb6fvvuka\"},\"PieceCid\":null,\"PieceSize\":0},\"DealID\":2}]"}
2020-04-06T15:59:15.479-0700    WARN    main    lotus-storage-miner/main.go:80  RPC client error: unmarshaling result: failed to parse peer ID: cid too short
laser commented 4 years ago

Recommendation Z

The lotus client list-deals output should tell a storage client if their deal is no longer honored, i.e. that the sector into which the piece referenced by the deal is no longer being proven. Today, the command will show the deal state as StorageDealActive when the sector containing the piece is first proven - but the deal state is not updated further if the sector is lost, the storage miner misses a PoSt, et cetera.

mishmosh commented 4 years ago

@arajasek this race condition with balance checking was reported in a different repo, but seems to be an issue in lotus: https://github.com/filecoin-shipyard/js-lotus-client/issues/29

arajasek commented 4 years ago

Fail to propose deals that violate a miner's min/max size (and other params if appropriate)

arajasek commented 4 years ago

this is super unimportant, but it'd be nice to unify the lotus cli's various names that indicate "sender" (the flag is variously called sender, source, and from)

whyrusleeping commented 4 years ago

lotus state compute-state --show-trace should get a couple improvements:

arajasek commented 4 years ago

Random usability thing: for list-deals if the DealID = 0, that means it isn’t on chain, so on chain should be NO — @Aayush Rajasekaran I know you are often the tracker of these things (currently it shows yes)

Done in #1786

arajasek commented 4 years ago

Some CLI for miners to configure their asks (set minsize, maxsize, etc.)

arajasek commented 4 years ago

Document the change to lotus-storage-miner storage attach -- init [--seal,--stare] /some/path that was made to make it possible to add drives while miner is running

arajasek commented 4 years ago

Rename the height flag of compute state to execHeight and improve its doc string.

arajasek commented 4 years ago

Flesh out the documentation in #1564

arajasek commented 4 years ago

Make mempool invalid msg warnings less spammy

2020-05-20T19:40:28.775+0800    WARN    miner   miner/miner.go:490  invalid message in message pool: 'Version' unsupported
2020-05-20T19:40:28.886+0800    WARN    miner   miner/miner.go:549  2192 messages in mempool does not have enough funds
2020-05-20T19:40:28.886+0800    WARN    miner   miner/miner.go:553  2192 messages in mempool had too high nonce
mishmosh commented 4 years ago

Make mempool invalid msg warnings less spammy

Or bump them to a different log level, and avoid showing by default entirely.

arajasek commented 4 years ago

https://lotu.sh/en+mining references state power which isn't a thing (use info instead, i guess?)

daviddias commented 4 years ago

More issues are:

jennijuju commented 4 years ago

cli mentioned in this tickets have been implemented. Closing since ux issues are now labeled with area/ux and doesn't need a separate ticket to collect them.