Integrating das branch into master#9458
Conversation
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
...m/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoice.java
Outdated
Show resolved
Hide resolved
.../src/main/java/tech/pegasys/teku/networking/eth2/peers/GossipTopicDasPeerCustodyTracker.java
Outdated
Show resolved
Hide resolved
|
Everything that was mapped as |
...src/test/java/tech/pegasys/teku/validator/coordinator/BlockOperationSelectorFactoryTest.java
Show resolved
Hide resolved
.../src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java
Fixed
Show fixed
Hide fixed
.../src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java
Show resolved
Hide resolved
ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/util/BlobsUtil.java
Show resolved
Hide resolved
...ion/src/main/java/tech/pegasys/teku/statetransition/datacolumns/DataAvailabilitySampler.java
Fixed
Show fixed
Hide fixed
...ain/java/tech/pegasys/teku/statetransition/datacolumns/retriever/SimpleSidecarRetriever.java
Fixed
Show fixed
Hide fixed
...java/tech/pegasys/teku/statetransition/datacolumns/retriever/SimpleSidecarRetrieverTest.java
Fixed
Show fixed
Hide fixed
...java/tech/pegasys/teku/statetransition/datacolumns/retriever/SimpleSidecarRetrieverTest.java
Fixed
Show fixed
Hide fixed
...java/tech/pegasys/teku/statetransition/datacolumns/retriever/SimpleSidecarRetrieverTest.java
Fixed
Show fixed
Hide fixed
...ion/src/testFixtures/java/tech/pegasys/teku/statetransition/datacolumns/DasCustodyStand.java
Fixed
Show fixed
Hide fixed
...ion/src/testFixtures/java/tech/pegasys/teku/statetransition/datacolumns/DasCustodyStand.java
Fixed
Show fixed
Hide fixed
|
We should add this to commit comment if squash-merged |
|
I've completed first round of review comparing it to das, looks good, nothing lost except #9408, which I guess, was not cherry-picked yet |
also fixed `initDasCustody` a bit - missing finals - random anonymous code segments Signed-off-by: Paul Harris <paul.harris@consensys.net>
Signed-off-by: Paul Harris <paul.harris@consensys.net>
...tatetransition/src/main/java/tech/pegasys/teku/statetransition/util/DebugDataFileDumper.java
Fixed
Show fixed
Hide fixed
...tatetransition/src/main/java/tech/pegasys/teku/statetransition/util/DebugDataFileDumper.java
Fixed
Show fixed
Hide fixed
...java/tech/pegasys/teku/statetransition/datacolumns/retriever/SimpleSidecarRetrieverTest.java
Show resolved
Hide resolved
...java/tech/pegasys/teku/statetransition/datacolumns/retriever/SimpleSidecarRetrieverTest.java
Fixed
Show fixed
Hide fixed
| final List<TestPeer> testNodes = | ||
| craftNodeIds() | ||
| .map( | ||
| nodeId -> | ||
| new TestPeer(stubAsyncRunner, nodeId, Duration.ofMillis(100)) | ||
| .currentRequestLimit(1000)) | ||
| .limit(128) | ||
| .peek(node -> custodyCountSupplier.setCustomCount(node.getNodeId(), columnCount)) | ||
| .peek(testPeerManager::connectPeer) | ||
| .toList(); |
Check notice
Code scanning / CodeQL
Unread local variable Note test
There was a problem hiding this comment.
@zilm13 this unit test performanceTest() seems a bit odd. Help me understand what we are doing here?
Signed-off-by: Paul Harris <paul.harris@consensys.net>
Signed-off-by: Paul Harris <paul.harris@consensys.net>
| headers.forEach(builder::header); | ||
| final Response response = httpClient.newCall(builder.build()).execute(); | ||
| final ResponseBody body = response.body(); | ||
| if (!response.isSuccessful()) { |
There was a problem hiding this comment.
nit: It's more readable when not inverted
|
|
||
| // Check that the sync is done and the peer was not disconnected. | ||
| assertThat(syncFuture).isCompleted(); | ||
| verify(peer, never()).disconnectCleanly(any()); |
There was a problem hiding this comment.
we could add disconnectImmediately check if paranoid also
|
|
||
| completeRequestWithBlocksAtSlots(blocksRequestFuture, denebSecondSlot, denebPeerSlotsAhead); | ||
|
|
||
| verifyBlobSidecarsAddedToPool(denebSecondSlot, slotsPerEpochMinimal, blobSidecarsBySlot); |
There was a problem hiding this comment.
I don't like this test. It delivers last BlobSidecar in a Fulu epoch, which shouldn't happen. Probably it's set with when but it shouldn't be like this anyway. I'd address it in a separate issue
| when(recentChainData.getFinalizedEpoch()).thenReturn(denebPeerFinalizedEpoch); | ||
|
|
||
| final UInt64 slotsPerEpochMinimal = UInt64.valueOf(8); | ||
| final UInt64 denebLastSlot = denebFirstSlot.plus(slotsPerEpochMinimal); |
There was a problem hiding this comment.
it's in FULU, not in deneb, there is even a check below
| "Checking if block {} is in historic block roots {} of the state {}", | ||
| producedBlock, | ||
| state.getBlockRoots(), | ||
| state.getBlockRoots().hashTreeRoot(), |
There was a problem hiding this comment.
I think we could remove this parameter completely, not sure it makes any sense
| SafeFuture<List<Optional<BlobAndProof>>> engineGetBlobAndProofs( | ||
| List<VersionedHash> blobVersionedHashes, UInt64 slot); | ||
|
|
||
| SafeFuture<List<BlobAndCellProofs>> engineGetBlobAndCellProofsList( |
There was a problem hiding this comment.
I don't like this interface difference. From the spec we either get all or nothing here. Maybe it should be wrapped with Optional<> too? I'd at least create an issue to revisit
| } | ||
|
|
||
| @Override | ||
| public boolean isDataNotYetAvailable() { |
There was a problem hiding this comment.
do we need Yet here and previously in BatchImportResult?
| import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.Blob; | ||
| import tech.pegasys.teku.spec.datastructures.type.SszKZGProof; | ||
|
|
||
| public interface BlockContentsWithBlobsSchema<T extends BlockContainer> |
There was a problem hiding this comment.
BlockContents are always with Blobs, may worth renaming this and Signed container
| @MethodSource("getExtendedSampleCountFixtures") | ||
| public void getExtendedSampleCountReturnsCorrectValues( | ||
| final int allowedFailures, final int numberOfSamples) { | ||
| assertThat(miscHelpersFulu.getExtendedSampleCount(UInt64.valueOf(allowedFailures))) |
There was a problem hiding this comment.
I'd clarify in MiscHelpersFulu that called method that it's not actually used anymore to avoid any confusion. It was designed for lossy sampling which is not a part of the spec anymore. But called helper is still part of the spec surprisingly
| Eth2Network.MINIMAL, capellaForkEpoch, denebForkEpoch, electraForkEpoch, fuluForkEpoch); | ||
| return create(config, SpecMilestone.FULU); | ||
| } | ||
|
|
There was a problem hiding this comment.
I'd restore removed javadoc here and change ELECTRA to FULU:
// Our current config files contain FULU params.
// So all specConfigs created from them will be FULU.
// Here we just want to make sure that a given config supports the given milestone
// (which useless in theory because they are all FULU)There was a problem hiding this comment.
Second and final part of the review
- I'm not sure on info, warn, error logging downgrade suggestions. If doesn't come to EventLogger, may be we could keep it? I've started commeinting on it but not sure now. There were several other info logs left that I had not commented (for example, in
DataColumnSidecarAvailabilityChecker,GossipFailureLoggeretc). They should be addressed if we decide to downgrade them all out of info. - We may need to add finals everywhere, especially finals are missing in tests and testFixtures
| * The request may complete with this exception when requested column is no more on our local | ||
| * canonical chain | ||
| */ | ||
| class NotOnCanonicalChainException extends RuntimeException { |
There was a problem hiding this comment.
maybe IllegalStateException is more appropriate for it?
| .toList(); | ||
| } | ||
|
|
||
| LOG.info( |
There was a problem hiding this comment.
not info for production, it happens on every slot
| .engineGetBlobAndCellProofsList(versionedHashes, slotAndBlockRoot.getSlot()) | ||
| .thenAccept( | ||
| blobAndCellProofsList -> { | ||
| LOG.info("Found {} blobs", blobAndCellProofsList.size()); |
| versionedHashes.size(), | ||
| blobAndCellProofsList.size()); | ||
|
|
||
| LOG.info( |
| } | ||
|
|
||
| private void logLocalElBlobsLookupFailure(final Throwable error) { | ||
| LOG.warn("Local EL blobs lookup failed: {}", getRootCauseMessage(error)); |
| @@ -61,6 +62,14 @@ public class InteropOptions { | |||
| description = "Represents the total number of validators in the network") | |||
| private int interopNumberOfValidators = InteropConfig.DEFAULT_INTEROP_NUMBER_OF_VALIDATORS; | |||
|
|
|||
| @Option( | |||
There was a problem hiding this comment.
Implementation of this option was dropped. We could have a separate issue for removal.
| @@ -1,5 +1,5 @@ | |||
| /* | |||
| * Copyright Consensys Software Inc., 2025 | |||
| * Copyright Consensys Software Inc., 2024 | |||
| @@ -147,6 +147,8 @@ private static DBOptions createDBOptions( | |||
| .setMaxBackgroundJobs(configuration.getMaxBackgroundJobs()) | |||
| .setDbWriteBufferSize(configuration.getWriteBufferCapacity()) | |||
| .setMaxOpenFiles(configuration.getMaxOpenFiles()) | |||
| .setBytesPerSync(1_048_576L) // 1MB | |||
There was a problem hiding this comment.
both these settings should be removed as they were intentionally removed from the master and restored here by merge error
| this.nodeId = | ||
| p2pNetwork | ||
| .getDiscoveryNodeId() | ||
| .orElseThrow(() -> new InvalidConfigurationException("NodeID is required")); |
There was a problem hiding this comment.
Maybe something more friendly to user, say "Failed to get NodeId from Discovery System"
| import tech.pegasys.teku.storage.client.RecentChainData; | ||
| import tech.pegasys.teku.storage.store.UpdatableStore; | ||
|
|
||
| public class BlobSidecarsAvailabilityCheckerTest { |
There was a problem hiding this comment.
it duplicates ForkChoiceBlobSidecarsAvailabilityCheckerTest. Remove this one, leave ForkChoiceBlobSidecarsAvailabilityCheckerTest
PR Description
Integrating das branch into master.
Fixed Issue(s)
N/A
Documentation
doc-change-requiredlabel to this PR if updates are required.Changelog