-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix bootstrapper (genesis block generation) in lotus-soup #6379
Conversation
|
||
minerInfos[i].presealExp = (maxPeriods-1)*miner0.WPoStProvingPeriod + pps - 1 | ||
//minerInfos[i].presealExp = (maxPeriods-1)*miner0.WPoStProvingPeriod + pps - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arajasek this comes up to 129537
which is ~45 days, so when we submit initial deals for presealing (chain/gen/genesis/miners.go:193
), the VM throws an error.
Is this value supposed to be equal to 45 days?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arajasek can you explain what is the idea here with (maxPeriods-1)*miner0.WPoStProvingPeriod + pps - 1
? We seem to be using this value for the initial deal durations when building preseal sectors, and this is not passing the 180 days validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nonsense I actually don't know why we do (maxPeriods-1)*miner0.WPoStProvingPeriod + pps - 1
, looking through history it seems like it might be legacy (we've "always" done it).
The value definitely shouldn't be ~45 days, though, it should be ~540 days. We need to figure out why that's happening -- it might be because of some funkiness with block times. Does lotus soup use a custom block time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try to repro on devnet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, confirmed it gets 1550097 on a devnet, so I think this is a lotus-soup config thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arajasek thanks, that makes sense now - we do reduce the window in the test plan, so that we can test proving failures - it happens at https://github.com/filecoin-project/lotus/blob/master/testplans/lotus-soup/init.go#L45
I think we will want to keep the flexibility to change the proving period, but it looks like it is not correlated to the minimum deal duration...
return cid.Undef, xerrors.Errorf("QualityAdjPower (%s) doesn't match previously calculated qaPow (%s)", pc.QualityAdjPower, qaPow) | ||
} | ||
//if !pc.QualityAdjPower.Equals(qaPow) { | ||
//return cid.Undef, xerrors.Errorf("QualityAdjPower (%s) doesn't match previously calculated qaPow (%s)", pc.QualityAdjPower, qaPow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pc.QualityAdjPower
then is equal to 824572800
, whereas qaPow
is calculated to be 838860800
(we are using 8MiB sectors for the lotus-soup testplans).
This PR is fixing the genesis block generation in Lotus, so that
lotus-soup
testplan's deals end-to-end test passes.At the moment on
master
the test plan is failing because the presealed sectors that are added for the initial miner set for genesis are not passing the VM validation for deals:This is happening because the params for the 10 storage deals on miner t01000 look like:
And minimum deal duration is 180 days.
After I updated
chain/gen/genesis/miners.go:176
to increase the preseal duration for the sectors, I hit another problem with the MaxSectorLifetime, so I increased that as well with 10000.After that I got an error with respect to actual and computed power, so I commented that out.
Obviously this is not yet ready for merging, but the
lotus-soup
test plan now works, and genesis sectors are generated correctly.