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

Separate ticket and beacon randomness #637

Merged
merged 7 commits into from
Aug 20, 2020
Merged

Conversation

austinabell
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • Not updating specs-actors to use the two distinct yet as I will do that when I update actors, but this sets up and fixes bugs to allow it to be used.

other commit not referenced in issue:
filecoin-project/lotus@ed72aa1

Reference issue to close (if applicable)

Closes #628

Other information and links

@austinabell austinabell added Drand Spec Change Updates to implementation required due to a Filecoin spec change after implementation Status: Needs Review labels Aug 18, 2020
Copy link
Contributor

@flodesi flodesi left a comment

Choose a reason for hiding this comment

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

LGTM

blockchain/chain/src/store/chain_store.rs Outdated Show resolved Hide resolved
let check_for_beacon_entry = |ts: &Tipset| {
let cbe = ts.blocks()[0].beacon_entries();
if let Some(entry) = cbe.last() {
return Ok(Some(entry.clone()));
Copy link
Contributor

Choose a reason for hiding this comment

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

You could call cbe.pop() here instead of last() to avoid a clone

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a slice, not a vec

Copy link
Contributor

Choose a reason for hiding this comment

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

😬

blockchain/chain/src/store/chain_store.rs Show resolved Hide resolved
@austinabell austinabell merged commit 2371815 into main Aug 20, 2020
@austinabell austinabell deleted the austin/randomness/separate branch August 20, 2020 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Drand Spec Change Updates to implementation required due to a Filecoin spec change after implementation Status: Merge Ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Randomness to distinguish between Drand & Ticket Chain
4 participants