-
Notifications
You must be signed in to change notification settings - Fork 962
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
Part 1 of Aligning Core Blockchain Package with Latest 2.1 Spec #371
Part 1 of Aligning Core Blockchain Package with Latest 2.1 Spec #371
Conversation
Codecov Report
@@ Coverage Diff @@
## master #371 +/- ##
=========================================
- Coverage 54.24% 53.5% -0.74%
=========================================
Files 30 31 +1
Lines 2459 2493 +34
=========================================
Hits 1334 1334
- Misses 960 998 +38
+ Partials 165 161 -4
Continue to review full report at Codecov.
|
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.
Great job on this - this has so many important updates and everything was pretty comprehensive. Comments are mostly small things!
@@ -36,6 +36,11 @@ type beaconState struct { | |||
CrystallizedState *types.CrystallizedState | |||
} | |||
|
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.
comment?
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.
@rauljordan thanks for the review! it's ready again!
beacon-chain/blockchain/core.go
Outdated
if err != nil { | ||
return nil, -1, err | ||
} | ||
return indices[:int(attesterCount)], indices[len(indices)-1], nil | ||
} | ||
|
||
// getAttestersTotalDeposit returns the total deposit combined by attesters. | ||
// TODO: Consider slashing condition |
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.
punctuation
beacon-chain/blockchain/core.go
Outdated
} | ||
} | ||
|
||
// split the shuffled list for heights |
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.
punctuation
beacon-chain/blockchain/service.go
Outdated
@@ -211,11 +211,17 @@ func (c *ChainService) run(done <-chan struct{}) { | |||
log.Errorf("Write active state to disk failed: %v", err) | |||
} | |||
|
|||
currentSlot := block.SlotNumber() | |||
// TODO: Apply 2.1 fork choice logic using the following |
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.
.
I approve but it looks like we'll have to get coverage up by a lot in the blockchain package as it seems it has a lot of stuff untested. Maybe we can revisit that after the spec is a little bit more solid. |
I'll open a PR to improve the coverage tomorrow |
First part of aligning beacon chain node code base with latest 2.1 spec. Following items got changed in this PR with respect to 2.1:
I don't want to put all the 2.1 changes in a single giant PR. Will be opening multiple small in regards to more 2.1 updates. Per blocking processing, cycle length recalculating, test coverage improvements will be coming next.
https://notes.ethereum.org/SCIg8AH5SA-O4C1G1LYZHQ?view