Closed LexLuthr closed 2 years ago
How is it going? Is there any fix for that?
storage provider event {"name": "ProviderEventFailed", "proposal CID": "bafyreigdghzgczmdo2l5kynazrcjvmuee6ezbqs4l7cp7j43wdgngma72y", "state": "StorageDealError", "message": "deal rejected: deal duration out of bounds (min, max, provided): 518400, 1555200, 3889526"} that is the problem.
I found the bug: 4s a epoch in devnet, 30s a epoch in mainnet. so the real duration is x 4/30*2880) days. the duration is 30/4 times more than mainnet.
in params_2k.go: 96: const BlockDelaySecs = uint64(4) here you can find it.
I think you can fix here:
cli/client.go 624: dur = 24 time.Hour time.Duration(days) epochs = abi.ChainEpoch(dur / (time.Duration(build.BlockDelaySecs) time.Second)) replace to: epochs = abi.ChainEpoch(dur / (time.Duration(30) time.Second))
It should solve this problem.
yes, I have solve this problem. Now I meet a new issue: when I run in devnet this command: lotus-miner storage-deals import-data xx
I got this:
ERROR: given data does not match expected commP (got: baga6ea4seaqj5rdeitkss6f5hdtgqkdellh65cti5neiuszcytkv533cplgzgpy, expected baga6ea4seaqhmpyav5opkbboc6tkj67vz7t3veypiajs6xjpfwzlxfvofuljkjq)
then I fix the issue by use manual deal. when import-data, It tells me: normal shutdown of state machine
well done. just need to get rid of "--start-epoch" then all working fine. if anybody has same issue can message to me.
@jennijuju you can close the issue now.
@jackoelv Please do not recommend closing issues opened by other community members unless it has been fixed in the code. Please let the lotus team take a call on fixing the issues.
@LexLuthr take a look above:
I think you can fix here:
cli/client.go
624:
dur = 24 * time.Hour * time.Duration(days)
epochs = abi.ChainEpoch(dur / (time.Duration(build.BlockDelaySecs) * time.Second))
replace to:
epochs = abi.ChainEpoch(dur / (time.Duration(30) * time.Second))
It should solve this problem.
a little work, then the issue solved.
@jackoelv I have already mentioned how to workaround the problem in my initial description. The issue was opened to fix this permanently in the code for 2k build.
Oh, got it: -P
Checklist
Latest release
, or the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.Lotus component
Lotus Version
Describe the Bug
New deals fail in devnet with as the deal duration crosses goes out of bound
As per @magik6k on a devnet the epoch/block time is 2 (or 4?) seconds instead of 30. Deal bounds are defined in terms of epochs, so when making a deal on a devnet, when you are specifying the duration in days, that number must be 15x smaller. But the cli does not allow to specify less than 180 day (minimum) period.
The workaround is commenting out the following code and rebuilding the lotus binary. The deals can be made with the new binary without any problems.
https://github.com/filecoin-project/lotus/blob/master/cli/client.go#L617-L620
and line 47 of the same file go fix Go compilation error about unused import.
// "github.com/filecoin-project/lotus/chain/actors/builtin"
Logging Information
Repo Steps