-
Notifications
You must be signed in to change notification settings - Fork 291
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
EIP-6110 Stop Eth1 data polling #8141
EIP-6110 Stop Eth1 data polling #8141
Conversation
3dd1432
to
8cfa7b2
Compare
c88d37d
to
7692c27
Compare
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.
Do I understand it correctly that since EIP-6110 we don't need DepositTree and snapshots any more?
Though I think we need to approve it I still have some concerns on transition moment, that we are not breaking something too early when we are in Electra but former mechanism is not yet disabled. Anyway, we will run testnets for this.
teku/src/main/java/tech/pegasys/teku/services/BeaconNodeServiceController.java
Outdated
Show resolved
Hide resolved
infrastructure/logging/src/main/java/tech/pegasys/teku/infrastructure/logging/StatusLogger.java
Outdated
Show resolved
Hide resolved
...ure/async/src/test/java/tech/pegasys/teku/infrastructure/async/runloop/AsyncRunLoopTest.java
Outdated
Show resolved
Hide resolved
...ure/async/src/test/java/tech/pegasys/teku/infrastructure/async/runloop/AsyncRunLoopTest.java
Outdated
Show resolved
Hide resolved
@@ -39,11 +40,13 @@ | |||
import tech.pegasys.teku.service.serviceutils.ServiceConfig; | |||
import tech.pegasys.teku.spec.Spec; | |||
import tech.pegasys.teku.spec.TestSpecFactory; | |||
import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; | |||
import tech.pegasys.teku.storage.api.Eth1DepositStorageChannel; | |||
|
|||
public class PowchainServiceTest { |
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'd test something new here. At least that we start preElectra and don't start postElectra
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.
Good point actually. Added a couple of relevant tests.
@@ -305,6 +305,21 @@ void shouldLogAnEventOnSlotWhenAllDepositsRequiredForStateNotAvailable() { | |||
verify(eventLogger).eth1DepositDataNotAvailable(UInt64.valueOf(9), UInt64.valueOf(10)); | |||
} | |||
|
|||
@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.
I'd test also that getDeposits() is empty since former mechanism is disabled
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.
This was part of a previous PR, can have a look at noDepositsIncludedIfFormerDepositMechanismHasBeenDisabled
and getsRemainingEth1PendingDepositsIfElectraIsEnabled
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.
ahhh the one I wanted comment for
All good, all done already
Yes, once we have finalized state where Also when syncing we don't need the deposit tree, so historical sync will still work. Essentially we only need the proofs when proposing in order to include it in the block. |
3649c10
to
c9609ae
Compare
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.
LGTM, just final nit
new PowchainService( | ||
serviceConfig, powConfig, Optional.of(engineWeb3jClientProvider), latestFinalizedState); | ||
|
||
powchainService.start().join(); |
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'd add assertThat(powchainService.isRunning()).isTrue();
so it's clear that it's stopped only after finalized checkpoint. I know that it's clear from Service code, just the test will be more clear I think
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.
Makes sense. It's more clear I agree.
PR Description
If we have already transitioned to the new deposit mechanism:
Eth1Data
vote, just return the one from the stateEth1Data
metricsPowchainService
servicesAsyncRunLoop
becauseTimeBasedEth1HeadTracker
was running in loop andstop
was not implementedAlso attached
FinalizedCheckpointChannel
toPowchainService
to stop Eth1 polling when transitioned on the fly. I am not 100 % sure of the cleanest way to pass a state toPowchainService
becauseRecentChainData
is initialized after starting of the services, so passing it before that will be in null. That's why chose to pass aSupplier
(along with some comments) but happy for suggestions.Update:
Refactored
PowchainService
to initialize when starting. This has couple of benefits. No initialization needed when we have already finalized the transition to the new deposit mechanism. This allows thing like using the websockets web3j client after Electra instead of relying on http, so no more of this error:It also allows to log the eth1 polling disabling only in case it has been enabled before.
Fixed Issue(s)
will solve one of the tasks under #7898
Documentation
doc-change-required
label to this PR if updates are required.Changelog