-
Notifications
You must be signed in to change notification settings - Fork 297
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
Finalized transitioned anchor #8850
base: master
Are you sure you want to change the base?
Finalized transitioned anchor #8850
Conversation
Signed-off-by: Gabriel Fukushima <[email protected]>
… the state transitioned scenario Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
# Conflicts: # CHANGELOG.md # beacon/validator/src/test/java/tech/pegasys/teku/validator/coordinator/DepositProviderTest.java
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
… state Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
private static final byte[] SEED = new byte[] {0x11, 0x03, 0x04}; | ||
|
||
@Test | ||
@SuppressWarnings("DoNotCreateSecureRandomDirectly") |
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.
we are probably better off using DataStructureUtil to get random objects rather than referencing rnd unless there's a really good reason?
@@ -88,6 +88,7 @@ public SafeFuture<Optional<BeaconState>> getStateToValidate( | |||
// If the attestation is within the lookahead period for the finalized state, use that | |||
// If the target block doesn't descend from finalized the attestation is invalid | |||
final BeaconState finalizedState = recentChainData.getStore().getLatestFinalized().getState(); | |||
// TODO: Test |
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.
todo..
chainUpdater2.initializeGenesis(false); | ||
chainUpdater2.updateBestBlock(chainUpdater2.advanceChain(11)); | ||
|
||
// chainUpdater2.updateBestBlock(chainUpdater.advanceChain(11)); |
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.
extras..
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.
removed
public void warnFailedToLoadInitialState(final Throwable throwable) { | ||
log.warn("Failed to load initial state", throwable); |
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.
we don't really want the stack trace if we can avoid it, do we jsut want the throwable.getMessage?
STATUS_LOG.warnFailedToLoadInitialState(e.getMessage()); | ||
STATUS_LOG.warnFailedToLoadInitialState(ex); |
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.
would prefer no stacktrace on status log...
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've changed the method to only print the log the message but the param we're passing could remain the throwable I think
@@ -466,6 +468,7 @@ public Checkpoint getFinalizedCheckpoint() { | |||
} | |||
} | |||
|
|||
// TODO: Test me |
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.
todos in this file
// blockRoot should be from last non-empty block | ||
assertThat(recentChainData.getChainHead().map(MinimalBeaconBlockSummary::getRoot)) | ||
.contains(anchorPoint.getRoot()); | ||
// head should be |
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.
expand comments to be readable or remove...
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.
fixed comment
Signed-off-by: Gabriel Fukushima <[email protected]>
PR Description
PR based on top of with some extra test coverage for the changes made in RecentChain and AttestationStateSelector
Fixed Issue(s)
Fixes #7956
Documentation
doc-change-required
label to this PR if updates are required.Changelog