Skip to content

Beacon block - #50

Merged
paulhauner merged 15 commits into
masterfrom
beacon_block
Oct 21, 2018
Merged

Beacon block#50
paulhauner merged 15 commits into
masterfrom
beacon_block

Conversation

@paulhauner

Copy link
Copy Markdown
Member

Issue Addressed

#49

Proposed Changes

  • Rename Block -> BeaconBlock, globally
  • Add new fields to BeaconBlock (ancestors, specials, etc)
  • Update SszBeaconBlock as per new struct layout
  • Update all dependant functions (e.g., block_store, validation, etc)

Additional Info

This is a work-in-progress, please do not review yet.

Please do not merge before #33 is merged.

- Update types::block
- Update ssz_helpers::SszBlock
- Update db::stores::block_store
- Add new fields to types::Block
- Update SszBlock as per new Block fields
- Implement generic list decoding>
- Expose `encode` mod.
- Add convenience encoding function.
- Block -> BeaconBlock
- Updates to SszBeaconBlock
@paulhauner paulhauner changed the title [WIP] Beacon block Beacon block Oct 16, 2018
@paulhauner
paulhauner requested a review from AgeManning October 16, 2018 04:31
@paulhauner

paulhauner commented Oct 16, 2018

Copy link
Copy Markdown
Member Author

Ready for review!

@paulhauner

Copy link
Copy Markdown
Member Author

Ok, this is ready for review! The diff is much smaller now #33 has been merged.

See PR description for list of changes.

};

pub const MIN_SSZ_BLOCK_LENGTH: usize = {
8 + // slot

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not do something like const SLOT: usize = 8; for all the fields?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Implemented. Great point @HCastano

@paulhauner

paulhauner commented Oct 18, 2018 via email

Copy link
Copy Markdown
Member Author

This was referenced Oct 20, 2018

@AgeManning AgeManning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me

@paulhauner
paulhauner merged commit 67878a8 into master Oct 21, 2018
@paulhauner
paulhauner deleted the beacon_block branch October 21, 2018 10:01
@paulhauner paulhauner mentioned this pull request Oct 21, 2018
mergify Bot pushed a commit that referenced this pull request Jun 15, 2026
Tighten allowed slots for proposer index computation
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