Skip to content
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

Update specs-actors & cbor-gen #2965

Merged
merged 7 commits into from
Aug 12, 2020
Merged

Update specs-actors & cbor-gen #2965

merged 7 commits into from
Aug 12, 2020

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Aug 10, 2020

  • Updates specs-actors & cbor-gen.
  • Binds WindowPoSts to a particular chain using chain randomness.
  • Switches over to by-value bitfields.

@Stebalien Stebalien changed the base branch from master to next August 10, 2020 23:12
@Stebalien Stebalien force-pushed the steb/update-actors branch 12 times, most recently from 6b4cbe1 to 445eb0b Compare August 11, 2020 23:58
@Stebalien
Copy link
Member Author

Stebalien commented Aug 12, 2020

@magik6k where do we validate proof randomness?

nvm. I misunderstood where WindowPoStVerifyInfo came from.

@Stebalien Stebalien force-pushed the steb/update-actors branch 5 times, most recently from cfa3aa8 to 228b885 Compare August 12, 2020 03:04
}

func (w *randWrapper) GetBeaconRandomness(ctx context.Context, pers crypto.DomainSeparationTag, round abi.ChainEpoch, entropy []byte) ([]byte, error) {
return w.rand.Randomness(ctx, pers, round, entropy)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to prevent the tests from catching some errors. I believe we'll need to get chain-validation to pass us two random sources.

// date by the time we submit, it'll be rejected.
// TODO: we need a better lookback value, but I'm not sure what it should be.
commEpoch := ts.Height() - StartConfidence
commRand, err := s.api.ChainGetRandomnessFromTickets(ctx, ts.Key(), crypto.DomainSeparationTag_PoStChainCommit, commEpoch, nil)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how we should actually do this. I assume that StartConfidence is way too short.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have to submit the post within the ChallengeWindow anyways, I'd assume that we can just pull this from the di.Open epoch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works. But note, we should probably be computing PoSts in advance of the deadline opening.

@Stebalien Stebalien force-pushed the steb/update-actors branch 4 times, most recently from 0dbddcf to 221f04b Compare August 12, 2020 04:32
@Stebalien Stebalien force-pushed the steb/update-actors branch 4 times, most recently from 9d472c8 to bf7fb53 Compare August 12, 2020 06:55
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments, looks good in general

if minExpiration := height + miner.MaxSealDuration[sector.SectorType] + miner.MinSectorExpiration + 10; expiration < minExpiration {
expiration = minExpiration
}
// TODO: enforce a reasonable _maximum_ sector lifetime?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That happens at other levels (at least it should)

// date by the time we submit, it'll be rejected.
// TODO: we need a better lookback value, but I'm not sure what it should be.
commEpoch := ts.Height() - StartConfidence
commRand, err := s.api.ChainGetRandomnessFromTickets(ctx, ts.Key(), crypto.DomainSeparationTag_PoStChainCommit, commEpoch, nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have to submit the post within the ChallengeWindow anyways, I'd assume that we can just pull this from the di.Open epoch

@@ -159,6 +159,13 @@ func (m *Sealing) handlePreCommitting(ctx statemachine.Context, sector SectorInf
return ctx.Send(SectorSealPreCommit1Failed{xerrors.Errorf("handlePreCommitting: failed to compute pre-commit expiry: %w", err)})
}

// Sectors must last _at least_ MinSectorExpiration + MaxSealDuration.
// TODO: The "+10" allows the pre-commit to take 10 blocks to be accepted.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@magik6k this needs attention.

@magik6k magik6k merged commit bfa0ae1 into next Aug 12, 2020
@magik6k magik6k deleted the steb/update-actors branch August 12, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants