Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Mar 18, 2023
1 parent b5c8c89 commit 866f177
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/chain/validation/blobSidecar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export async function validateGossipBlobSidecar(
// gossip and non-gossip sources) // _[REJECT]_ The blob's block's parent (defined by `sidecar.block_parent_root`) passes validation
// The above validation will happen while importing
const blockState = await chain.regen
.getBlockSlotState(parentRoot, blobSlot, RegenCaller.validateGossipBlob)
.getBlockSlotState(parentRoot, blobSlot, {dontTransferCache: true}, RegenCaller.validateGossipBlob)
.catch(() => {
throw new BlockGossipError(GossipAction.IGNORE, {code: BlockErrorCode.PARENT_UNKNOWN, parentRoot});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/src/network/gossip/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export type GossipModules = {

export type GossipBeaconNode = {
publishBeaconBlock(signedBlock: allForks.SignedBeaconBlock): Promise<void>;
publishSignedBeaconBlockAndBlobsSidecar(item: deneb.SignedBeaconBlockAndBlobsSidecar): Promise<void>;
publishBlobSidecar(item: deneb.SignedBlobSidecar): Promise<void>;
publishBeaconAggregateAndProof(aggregateAndProof: phase0.SignedAggregateAndProof): Promise<number>;
publishBeaconAttestation(attestation: phase0.Attestation, subnet: number): Promise<number>;
publishVoluntaryExit(voluntaryExit: phase0.SignedVoluntaryExit): Promise<void>;
Expand Down
4 changes: 2 additions & 2 deletions packages/beacon-node/src/network/processor/gossipHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {PeerAction, PeerRpcScoreStore} from "../peers/index.js";
import {validateLightClientFinalityUpdate} from "../../chain/validation/lightClientFinalityUpdate.js";
import {validateLightClientOptimisticUpdate} from "../../chain/validation/lightClientOptimisticUpdate.js";
import {validateGossipBlobSidecar} from "../../chain/validation/blobSidecar.js";
import {BlockInput, getBlockInput} from "../../chain/blocks/types.js";
import {BlockInput, getBlockInput, GossipedInputType} from "../../chain/blocks/types.js";
import {AttnetsService} from "../subnets/attnetsService.js";

/**
Expand Down Expand Up @@ -172,7 +172,7 @@ export function getGossipHandlers(modules: ValidatorFnsModules, options: GossipH
// Don't trigger this yet if full block and blobs haven't arrived yet
if (e instanceof BlockGossipError && e.type.code === BlockErrorCode.PARENT_UNKNOWN && blockInput !== null) {
logger.debug("Gossip block has error", {slot, root: blockHex, code: e.type.code});
networkEventBus.emit(NetworkEvent.unknownBlockParent, blockInput, peerIdStr);
events.emit(NetworkEvent.unknownBlockParent, blockInput, peerIdStr);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/src/network/processor/gossipQueues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const gossipQueueOpts: {
// validation gossip block asap
[GossipType.beacon_block]: {maxLength: 1024, type: QueueType.FIFO},
// TODO DENEB: What's a good queue max given that now blocks are much bigger?
[GossipType.blob_sidecar]: {maxLength: 32, type: QueueType.FIFO, noYieldIfOneItem: true},
[GossipType.blob_sidecar]: {maxLength: 32, type: QueueType.FIFO},
// lighthoue has aggregate_queue 4096 and unknown_block_aggregate_queue 1024, we use single queue
[GossipType.beacon_aggregate_and_proof]: {maxLength: 5120, type: QueueType.LIFO},
// lighthouse has attestation_queue 16384 and unknown_block_attestation_queue 8192, we use single queue
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/src/network/processor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type NetworkProcessorOpts = GossipHandlerOpts & {

const executeGossipWorkOrderObj: Record<GossipType, true> = {
[GossipType.beacon_block]: true,
[GossipType.beacon_block_and_blobs_sidecar]: true,
[GossipType.blob_sidecar]: true,
[GossipType.beacon_aggregate_and_proof]: true,
[GossipType.beacon_attestation]: true,
[GossipType.voluntary_exit]: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/test/unit/util/kzg.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("C-KZG", async () => {
// eslint-disable-next-line @typescript-eslint/naming-convention
CAPELLA_FORK_EPOCH: 0,
// eslint-disable-next-line @typescript-eslint/naming-convention
EIP4844_FORK_EPOCH: 0,
DENEB_FORK_EPOCH: 0,
},
});

Expand Down

0 comments on commit 866f177

Please sign in to comment.