-
Notifications
You must be signed in to change notification settings - Fork 170
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
updated randomness sampling in fil to broaden ec solution to all rand… #642
Conversation
…omness given vdf removal
1323ad6
to
c188350
Compare
I only now get to your comments from #538 @jbenet. They were super useful, I'm sorry I missed them until now. And likewise, I now finally understand what you meant in your question there @whyrusleeping that I thought I had answered (was thinking solely in terms of EC randomness, not overall randomness). Sorry about that! |
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.
Merging for velocity, @jzimmerman please review when you get a chance.
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.
Some general notes:
- I think it makes sense to have randomness primitives both in the runtime (as a VM context primitive available to actors) and in the relevant subsystems (as a pure function to extract randomness from chain state), but we shouldn't duplicate implementations (i.e., the former should be implemented in terms of calls to the latter).
- See VM updates #637 for serialization APIs -- ideally, we would do something like the following for random seeds, to avoid potentially error-prone duplication/variation in seed generation methods:
type RandomnessRole int
const (
RandomnessRole_TicketProduction RandomnessRole = 1+iota
RandomnessRole_ElectionProof
// ...
)
type RandomSeed []byte
DeriveRandomSeedExtended(role RandomnessRole, s Serialization) RandomSeed
DeriveRandomSeed(role RandomnessRole) RandomSeed
// Serialization methods "Serialize_T(T) Serialization" auto-generated as in https://github.com/filecoin-project/specs/pull/637
Randomness(epoch Epoch, seed RandomSeed)
- We should set lookback parameters keeping in mind the possibility of null epochs.
…omness given vdf removal
@whyrusleeping, this PR should do the following:
In order to ease all of this, I moved most of the ticket things to SPC readme.
Needs to be made to compile still.