You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But more importantly, when you call SetAsk on StoredAsk in the markets code, unless you pass a value for MinPieceSize, it's not copied over.
Proposed solution
SetAsk should retain any existing MinPieceSize/MaxPieceSize when called (i.e. in the if s.ask != nil clause)
Also the the code referenced above is problematic cause it will overwrite any MaxPieceSize. The proper solution I think should be to let NewStoredAsk take a var args StorageAskOption list -- if there is a value already on disk, this list is unused, but if the code here is run: https://github.com/filecoin-project/go-fil-markets/blob/master/storagemarket/impl/storedask/storedask.go#L90,
Then pass the var args list to it.
Then go back and add the sector size to the call to NewStoredAsk.
The text was updated successfully, but these errors were encountered:
Describe the bug
If you set a
MinPieceSize
vialotus-miner storage-deals set-ask
and then restart the miner, it resets to the default valueTo Reproduce
Steps to reproduce the behavior:
lotus-miner storage-deals set-ask --price 100000000000 --verified-price 100000000000 --min-piece-size 250MiB --max-piece-size 32GiB
lotus-miner
lotus-miner storage-deals get-ask
Expected behavior
The value set should persist
Version (run
lotus version
):master
Additional context
The line that causes this is here:
https://github.com/filecoin-project/lotus/blob/master/node/modules/storageminer.go#L399
But more importantly, when you call SetAsk on StoredAsk in the markets code, unless you pass a value for MinPieceSize, it's not copied over.
Proposed solution
SetAsk should retain any existing MinPieceSize/MaxPieceSize when called (i.e. in the if s.ask != nil clause)
Also the the code referenced above is problematic cause it will overwrite any MaxPieceSize. The proper solution I think should be to let NewStoredAsk take a var args StorageAskOption list -- if there is a value already on disk, this list is unused, but if the code here is run:
https://github.com/filecoin-project/go-fil-markets/blob/master/storagemarket/impl/storedask/storedask.go#L90,
Then pass the var args list to it.
Then go back and add the sector size to the call to NewStoredAsk.
The text was updated successfully, but these errors were encountered: