Skip to content
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

feat: implement focil EIP-7805 #7342

Draft
wants to merge 72 commits into
base: unstable
Choose a base branch
from
Draft
Changes from 7 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
092df19
Add focil fork definition and constant
ensi321 Dec 10, 2024
4423f75
lint
ensi321 Dec 10, 2024
93e5525
Add IL committee duty stub
ensi321 Jan 9, 2025
75bb159
Add engine API
ensi321 Jan 9, 2025
6ccd78e
Gossip handling inclusion list
ensi321 Jan 10, 2025
4ae1f28
reqresp
ensi321 Jan 10, 2025
bfb0022
lint
ensi321 Jan 10, 2025
b1f5255
Fix SignedInclusionList container
nflaig Jan 14, 2025
97138af
Add new beacon apis
nflaig Jan 14, 2025
581e08c
Add IL committee to EpochShuffling
ensi321 Jan 15, 2025
253544a
Deduplicate validator index in committee assignments
nflaig Jan 15, 2025
4f6580a
Update execution payload with inclusion list transactions
nflaig Jan 17, 2025
8ec99e4
Subscribe to inclusion list topic
nflaig Jan 17, 2025
ce0615f
Update constant names to match latest spec
nflaig Jan 17, 2025
0032f38
Lint
nflaig Jan 17, 2025
12bbf66
Add remark to minimal preset values
nflaig Jan 17, 2025
7bd39aa
Merge branch 'unstable' into focil
nflaig Jan 18, 2025
3ac7876
Add SingleAttestation focil types by fork
nflaig Jan 18, 2025
d4bfda3
Fix various type issues
nflaig Jan 18, 2025
0e5e6ab
Update ssz types
nflaig Jan 18, 2025
4bc01b8
Add InclusionListPool
nflaig Jan 22, 2025
5656694
Tweak naming
nflaig Jan 22, 2025
a69881d
Merge branch 'unstable' into focil
nflaig Jan 23, 2025
ad54d7b
Merge branch 'unstable' into focil
nflaig Jan 23, 2025
34c225e
Add IL to validatior store
ensi321 Jan 24, 2025
f331c33
Inclusion list service and duty
ensi321 Jan 24, 2025
54901a4
implement publishInclusionList
ensi321 Jan 24, 2025
48200e2
Lint and add todos
ensi321 Jan 24, 2025
ba40039
Add IL to pool during publishing
nflaig Jan 24, 2025
6cc78ac
Fix lint issues
nflaig Jan 24, 2025
72d52c4
Only store transactions in op pool and deduplicate
nflaig Jan 24, 2025
38d1d72
Use MAX_TRANSACTIONS_PER_PAYLOAD value to limit IL container size
nflaig Jan 24, 2025
b6d6627
Reject ILs on gossip that exceed maximum size
nflaig Jan 24, 2025
6b4953e
Merge branch 'unstable' into focil
nflaig Jan 24, 2025
a7a330c
Remove MAX_TRANSACTIONS_PER_INCLUSION_LIST and use bellatrix.Transact…
nflaig Jan 24, 2025
f5210ff
Fix gossip publishing
nflaig Jan 24, 2025
9f48028
Add inclusion_list event
nflaig Jan 24, 2025
f49f1df
Add unit test to sanity check gossip publishing
nflaig Jan 24, 2025
25bfff0
Add version meta to produce and publish api
nflaig Jan 24, 2025
1331488
Add todo regarding resp value of produce api
nflaig Jan 24, 2025
93e73c2
Update config values
nflaig Jan 24, 2025
ce4deb2
Add ILC definition for computing root
ensi321 Jan 24, 2025
1394cfe
Shuffling cache to store ILC root
ensi321 Jan 24, 2025
4960ab6
Check ILC root and validator index in gossip validation
ensi321 Jan 24, 2025
d97fdf8
Add remark regarding transactions list limit
nflaig Jan 27, 2025
211b8f5
Call IL Pool before engine_newPayloadV5
ensi321 Jan 28, 2025
b20b7b3
Call IL Pool before engine_newPayloadV5
ensi321 Jan 28, 2025
467c593
Add focil flag to ProtoBlock
ensi321 Jan 28, 2025
c545627
Update fcstore and add IL equivocators detection
ensi321 Jan 28, 2025
ca38f3c
Update fcstore and add IL equivocators detection
ensi321 Jan 28, 2025
1aedf80
Reorg out IL-invalid head block for attestation and sync committee
ensi321 Jan 28, 2025
8e8fa7b
Handle IL-invalid execution payload
ensi321 Jan 28, 2025
10a68ef
lint
ensi321 Jan 28, 2025
5d40a9a
Wire in forkchoice.onInclusionList
ensi321 Jan 28, 2025
2d680d5
Add committee root to IL duty
ensi321 Jan 28, 2025
feee1a3
Add getInclusionList to execution engine
ensi321 Jan 28, 2025
ec9fecc
produceInclusionList to return lists of transactions
ensi321 Jan 28, 2025
a20f4f2
Fix a bunch of lint errors
nflaig Jan 28, 2025
84f6265
Update fork constants to work with kurtosis
nflaig Jan 28, 2025
5f27657
Update InclusionListDuty to match spec
nflaig Jan 28, 2025
8989b7f
fix InclusionListRpc
ensi321 Feb 4, 2025
8638384
Disable schedulePayloadInclusionListUpdate pre-focil
ensi321 Feb 4, 2025
a2820c1
update engine_updatePayloadWithInclusionListV1 return type
ensi321 Feb 4, 2025
68f0648
Add ILService to Validator
ensi321 Feb 5, 2025
abb8cb3
Fixed time to call engine_updatePayloadWithInclusionListV1
ensi321 Feb 5, 2025
7d45609
fix IL validation
ensi321 Feb 5, 2025
0df5ba8
Use correct parentHash
ensi321 Feb 5, 2025
e6dcd2b
Handle pre-focil api and duty behaviour
ensi321 Feb 5, 2025
5f0182a
Handle pre-focil api and duty behaviour
ensi321 Feb 6, 2025
efbeed9
lint
ensi321 Feb 7, 2025
dffb1ac
Temporary workaround for Dora
ensi321 Feb 7, 2025
2da8cf5
Use eip7805 as fork name instead of focil
nflaig Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions packages/beacon-node/src/chain/errors/inclusionList.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import {Slot} from "@lodestar/types";
import {GossipActionError} from "./gossipValidation.js";

export enum InclusionListErrorCode {
MESSAGE_TOO_LARGE = "INCLUSION_LIST_ERROR_MESSAGE_TOO_LARGE",
INVALID_SLOT = "INCLUSION_LIST_ERROR_INVALID_SLOT",
NOT_TIMELY = "INCLUSION_LIST_ERROR_NOT_TIMELY",
INVALID_COMMITTEE_ROOT = "INCLUSION_LIST_ERROR_INVALID_COMMITTEE_ROOT",
VALIDATOR_NOT_IN_COMMITTEE = "INCLUSION_LIST_ERROR_VALIDATOR_NOT_IN_COMMITTEE",
TOO_MANY_TRANSACTIONS = "INCLUSION_LIST_ERROR_TOO_MANY_TRANSACTIONS",
SPAM = "INCLUSION_LIST_ERROR_SPAM",
INVALID_SIGNATURE = "INCLUSION_LIST_ERROR_INVALID_SIGNATURE",
}
export type InclusionListErrorType =
| {code: InclusionListErrorCode.MESSAGE_TOO_LARGE}
| {code: InclusionListErrorCode.INVALID_SLOT; inclusionListSlot: Slot; currentSlot: Slot}
| {code: InclusionListErrorCode.NOT_TIMELY}
| {code: InclusionListErrorCode.INVALID_COMMITTEE_ROOT}
| {code: InclusionListErrorCode.VALIDATOR_NOT_IN_COMMITTEE}
| {code: InclusionListErrorCode.TOO_MANY_TRANSACTIONS; numTransactions: number; transactionLimit: number}
| {code: InclusionListErrorCode.SPAM}
| {code: InclusionListErrorCode.INVALID_SIGNATURE};

export class InclusionListError extends GossipActionError<InclusionListErrorType> {}
59 changes: 59 additions & 0 deletions packages/beacon-node/src/chain/validation/inclusionList.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import {MAX_TRANSACTIONS_PER_INCLUSION_LIST} from "@lodestar/params";
import {getInclusionListSignatureSet} from "@lodestar/state-transition";
import {focil} from "@lodestar/types";
import {InclusionListError, InclusionListErrorCode} from "../errors/inclusionList.js";
import {GossipAction} from "../errors/index.js";
import {IBeaconChain} from "../index.js";

export async function validateApiInclusionList(
chain: IBeaconChain,
inclusionList: focil.SignedInclusionlist
): Promise<void> {
return validateInclusionList(chain, inclusionList);
}

export async function validateGossipInclusionList(
chain: IBeaconChain,
inclusionList: focil.SignedInclusionlist
): Promise<void> {
return validateInclusionList(chain, inclusionList);
}

async function validateInclusionList(chain: IBeaconChain, inclusionList: focil.SignedInclusionlist): Promise<void> {
const slot = inclusionList.message.slot;
// [REJECT] The size of message is within upperbound MAX_BYTES_PER_INCLUSION_LIST

// [REJECT] The slot message.slot is equal to the previous or current slot.
if (slot !== chain.clock.currentSlot && slot !== chain.clock.currentSlot - 1) {
throw new InclusionListError(GossipAction.REJECT, {
code: InclusionListErrorCode.INVALID_SLOT,
inclusionListSlot: slot,
currentSlot: chain.clock.currentSlot,
});
}

// [IGNORE] The slot message.slot is equal to the current slot, or it is equal to the previous slot and the current time is less than attestation_deadline seconds into the slot.

// [IGNORE] The inclusion_list_committee for slot message.slot on the current branch corresponds to message.inclusion_list_committee_root, as determined by hash_tree_root(inclusion_list_committee) == message.inclusion_list_committee_root.

// [REJECT] The validator index message.validator_index is within the inclusion_list_committee corresponding to message.inclusion_list_committee_root.

// [REJECT] The transactions message.transactions length is within upperbound MAX_TRANSACTIONS_PER_INCLUSION_LIST
if (inclusionList.message.transactions.length > MAX_TRANSACTIONS_PER_INCLUSION_LIST) {
throw new InclusionListError(GossipAction.REJECT, {
code: InclusionListErrorCode.TOO_MANY_TRANSACTIONS,
numTransactions: inclusionList.message.transactions.length,
transactionLimit: MAX_TRANSACTIONS_PER_INCLUSION_LIST,
});
}

// [IGNORE] The message is either the first or second valid message received from the validator with index message.validator_index.

// [REJECT] The signature of inclusion_list.signature is valid with respect to the validator index.
const signatureSet = getInclusionListSignatureSet(chain.getHeadState(), inclusionList);
if (!(await chain.bls.verifySignatureSets([signatureSet], {batchable: true}))) {
throw new InclusionListError(GossipAction.REJECT, {
code: InclusionListErrorCode.INVALID_SIGNATURE,
});
}
}
1 change: 1 addition & 0 deletions packages/beacon-node/src/chain/validation/index.ts
Original file line number Diff line number Diff line change
@@ -7,3 +7,4 @@ export * from "./syncCommittee.js";
export * from "./syncCommitteeContributionAndProof.js";
export * from "./voluntaryExit.js";
export * from "./blsToExecutionChange.js";
export * from "./inclusionList.js";
21 changes: 13 additions & 8 deletions packages/beacon-node/src/execution/engine/http.ts
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ import {
ExecutionEngineState,
ExecutionPayloadStatus,
IExecutionEngine,
InclusionList,
PayloadAttributes,
PayloadId,
VersionedHashes,
@@ -202,19 +203,23 @@ export class ExecutionEngineHttp implements IExecutionEngine {
executionPayload: ExecutionPayload,
versionedHashes?: VersionedHashes,
parentBlockRoot?: Root,
executionRequests?: ExecutionRequests
executionRequests?: ExecutionRequests,
inclusionList?: InclusionList // TODO FOCIL: figure out how to get IL when process_execution_payload
): Promise<ExecutePayloadResponse> {
const method =
ForkSeq[fork] >= ForkSeq.electra
? "engine_newPayloadV4"
: ForkSeq[fork] >= ForkSeq.deneb
? "engine_newPayloadV3"
: ForkSeq[fork] >= ForkSeq.capella
? "engine_newPayloadV2"
: "engine_newPayloadV1";
ForkSeq[fork] >= ForkSeq.focil
? "engine_newPayloadV5"
: ForkSeq[fork] >= ForkSeq.electra
? "engine_newPayloadV4"
: ForkSeq[fork] >= ForkSeq.deneb
? "engine_newPayloadV3"
: ForkSeq[fork] >= ForkSeq.capella
? "engine_newPayloadV2"
: "engine_newPayloadV1";

const serializedExecutionPayload = serializeExecutionPayload(fork, executionPayload);

// TODO FOCIL: Add V5. Current code is ugly with all the nested if
let engineRequest: EngineRequest;
if (ForkSeq[fork] >= ForkSeq.deneb) {
if (versionedHashes === undefined) {
7 changes: 6 additions & 1 deletion packages/beacon-node/src/execution/engine/interface.ts
Original file line number Diff line number Diff line change
@@ -109,6 +109,10 @@ export type ClientVersion = {

export type VersionedHashes = Uint8Array[];

export type InclusionList = {
transactions: Uint8Array[];
};

/**
* Execution engine represents an abstract protocol to interact with execution clients. Potential transports include:
* - JSON RPC over network
@@ -135,7 +139,8 @@ export interface IExecutionEngine {
executionPayload: ExecutionPayload,
versionedHashes?: VersionedHashes,
parentBeaconBlockRoot?: Root,
executionRequests?: ExecutionRequests
executionRequests?: ExecutionRequests,
inclusionList?: InclusionList
): Promise<ExecutePayloadResponse>;

/**
3 changes: 3 additions & 0 deletions packages/beacon-node/src/execution/engine/mock.ts
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
engine_newPayloadV2: this.notifyNewPayload.bind(this),
engine_newPayloadV3: this.notifyNewPayload.bind(this),
engine_newPayloadV4: this.notifyNewPayload.bind(this),
engine_newPayloadV5: this.notifyNewPayload.bind(this),
engine_forkchoiceUpdatedV1: this.notifyForkchoiceUpdate.bind(this),
engine_forkchoiceUpdatedV2: this.notifyForkchoiceUpdate.bind(this),
engine_forkchoiceUpdatedV3: this.notifyForkchoiceUpdate.bind(this),
@@ -100,6 +101,8 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
engine_getPayloadBodiesByRangeV1: this.getPayloadBodiesByRange.bind(this),
engine_getClientVersionV1: this.getClientVersionV1.bind(this),
engine_getBlobsV1: this.getBlobs.bind(this),
engine_getInclusionListV1: () => ({transactions: []}),
engine_updatePayloadWithInclusionListV1: () => ({payloadId: ""}),
};
}

27 changes: 27 additions & 0 deletions packages/beacon-node/src/execution/engine/types.ts
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ export type EngineApiRpcParamTypes = {
engine_newPayloadV2: [ExecutionPayloadRpc];
engine_newPayloadV3: [ExecutionPayloadRpc, VersionedHashesRpc, DATA];
engine_newPayloadV4: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc];
engine_newPayloadV5: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc, InclusionListRpc];
/**
* 1. Object - Payload validity status with respect to the consensus rules:
* - blockHash: DATA, 32 Bytes - block hash value of the payload
@@ -70,6 +71,17 @@ export type EngineApiRpcParamTypes = {
engine_getClientVersionV1: [ClientVersionRpc];

engine_getBlobsV1: [DATA[]];

/**
* 1. DATA - 32 bytes - parent hash which returned inclusion list should be built upon
*/
engine_getInclusionListV1: [DATA];

/**
* 1. DATA - 8 bytes - Identifier of the payload build process
* 2. DATA[] aka InclusionListV1
*/
engine_updatePayloadWithInclusionListV1: [QUANTITY, InclusionListRpc];
};

export type PayloadStatus = {
@@ -87,6 +99,7 @@ export type EngineApiRpcReturnTypes = {
engine_newPayloadV2: PayloadStatus;
engine_newPayloadV3: PayloadStatus;
engine_newPayloadV4: PayloadStatus;
engine_newPayloadV5: PayloadStatus;
engine_forkchoiceUpdatedV1: {
payloadStatus: PayloadStatus;
payloadId: QUANTITY | null;
@@ -114,6 +127,10 @@ export type EngineApiRpcReturnTypes = {
engine_getClientVersionV1: ClientVersionRpc[];

engine_getBlobsV1: (BlobAndProofRpc | null)[];

engine_getInclusionListV1: InclusionListRpc;

engine_updatePayloadWithInclusionListV1: UpdateInclusionListResponse;
};

type ExecutionPayloadRpcWithValue = {
@@ -212,6 +229,16 @@ export interface BlobsBundleRpc {
proofs: DATA[]; // some ELs could also provide proofs, each 48 bytes
}

type InclusionListRpc = {
/** Array of DATA - Array of transaction objects */
transactions: DATA[];
};

type UpdateInclusionListResponse = {
/** DATA, 8 Bytes - Identifier of the payload build process */
payloadId: QUANTITY;
};

export function serializeExecutionPayload(fork: ForkName, data: ExecutionPayload): ExecutionPayloadRpc {
const payload: ExecutionPayloadRpc = {
parentHash: bytesToData(data.parentHash),
4 changes: 4 additions & 0 deletions packages/beacon-node/src/network/gossip/interface.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import {
altair,
capella,
deneb,
focil,
phase0,
} from "@lodestar/types";
import {Logger} from "@lodestar/utils";
@@ -34,6 +35,7 @@ export enum GossipType {
light_client_finality_update = "light_client_finality_update",
light_client_optimistic_update = "light_client_optimistic_update",
bls_to_execution_change = "bls_to_execution_change",
inclusion_list = "inclusion_list",
}

export type SequentialGossipType = Exclude<GossipType, GossipType.beacon_attestation>;
@@ -67,6 +69,7 @@ export type GossipTopicTypeMap = {
[GossipType.light_client_finality_update]: {type: GossipType.light_client_finality_update};
[GossipType.light_client_optimistic_update]: {type: GossipType.light_client_optimistic_update};
[GossipType.bls_to_execution_change]: {type: GossipType.bls_to_execution_change};
[GossipType.inclusion_list]: {type: GossipType.inclusion_list};
};

export type GossipTopicMap = {
@@ -95,6 +98,7 @@ export type GossipTypeMap = {
[GossipType.light_client_finality_update]: LightClientFinalityUpdate;
[GossipType.light_client_optimistic_update]: LightClientOptimisticUpdate;
[GossipType.bls_to_execution_change]: capella.SignedBLSToExecutionChange;
[GossipType.inclusion_list]: focil.SignedInclusionlist;
};

export type GossipFnByType = {
4 changes: 4 additions & 0 deletions packages/beacon-node/src/network/gossip/topic.ts
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@ function stringifyGossipTopicType(topic: GossipTopic): string {
case GossipType.light_client_finality_update:
case GossipType.light_client_optimistic_update:
case GossipType.bls_to_execution_change:
case GossipType.inclusion_list:
return topic.type;
case GossipType.beacon_attestation:
case GossipType.sync_committee:
@@ -109,6 +110,8 @@ export function getGossipSSZType(topic: GossipTopic) {
: ssz.altair.LightClientFinalityUpdate;
case GossipType.bls_to_execution_change:
return ssz.capella.SignedBLSToExecutionChange;
case GossipType.inclusion_list:
return ssz.focil.SignedInclusionlist;
}
}

@@ -273,4 +276,5 @@ export const gossipTopicIgnoreDuplicatePublishError: Record<GossipType, boolean>
[GossipType.light_client_finality_update]: false,
[GossipType.light_client_optimistic_update]: false,
[GossipType.bls_to_execution_change]: true,
[GossipType.inclusion_list]: true,
};
13 changes: 13 additions & 0 deletions packages/beacon-node/src/network/network.ts
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ import {
altair,
capella,
deneb,
focil,
phase0,
} from "@lodestar/types";
import {sleep} from "@lodestar/utils";
@@ -518,6 +519,18 @@ export class Network implements INetwork {
);
}

// TODO FOCIL: add caller to this function
async sendInclusionListByCommitteeIndices(
peerId: PeerIdStr,
request: focil.InclusionListByCommitteeIndicesRequest
): Promise<focil.SignedInclusionlist[]> {
return collectMaxResponseTyped(
this.sendReqRespRequest(peerId, ReqRespMethod.InclusionListByCommitteeIndices, [Version.V1], request),
this.config.MAX_REQUEST_INCLUSION_LIST,
responseSszTypeByMethod[ReqRespMethod.InclusionListByCommitteeIndices]
);
}

private sendReqRespRequest<Req>(
peerId: PeerIdStr,
method: ReqRespMethod,
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ import {
validateGossipAttesterSlashing,
validateGossipBlock,
validateGossipBlsToExecutionChange,
validateGossipInclusionList,
validateGossipProposerSlashing,
validateGossipSyncCommittee,
validateGossipVoluntaryExit,
@@ -596,6 +597,14 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand

chain.emitter.emit(routes.events.EventType.blsToExecutionChange, blsToExecutionChange);
},

[GossipType.inclusion_list]: async ({gossipData, topic}: GossipHandlerParamGeneric<GossipType.inclusion_list>) => {
const {serializedData} = gossipData;
const inclusionList = sszDeserialize(topic, serializedData);
await validateGossipInclusionList(chain, inclusionList);

// TODO FOCIL: Need to add this into a pool
},
};
}

Original file line number Diff line number Diff line change
@@ -62,6 +62,11 @@ const linearGossipQueueOpts: {
type: QueueType.FIFO,
dropOpts: {type: DropType.count, count: 1},
},
[GossipType.inclusion_list]: {
maxLength: 8192, // TODO FOCIL: Verify this number. Unsigned IL uncompressed should be 8192.
type: QueueType.FIFO,
dropOpts: {type: DropType.count, count: 1},
},
};

const indexedGossipQueueOpts: {
1 change: 1 addition & 0 deletions packages/beacon-node/src/network/processor/index.ts
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ const executeGossipWorkOrderObj: Record<GossipType, WorkOpts> = {
[GossipType.sync_committee]: {},
[GossipType.light_client_finality_update]: {},
[GossipType.light_client_optimistic_update]: {},
[GossipType.inclusion_list]: {},
};
const executeGossipWorkOrder = Object.keys(executeGossipWorkOrderObj) as (keyof typeof executeGossipWorkOrderObj)[];

5 changes: 5 additions & 0 deletions packages/beacon-node/src/network/reqresp/handlers/index.ts
Original file line number Diff line number Diff line change
@@ -54,6 +54,11 @@ export function getReqRespHandlers({db, chain}: {db: IBeaconDb; chain: IBeaconCh
},
[ReqRespMethod.LightClientFinalityUpdate]: () => onLightClientFinalityUpdate(chain),
[ReqRespMethod.LightClientOptimisticUpdate]: () => onLightClientOptimisticUpdate(chain),
[ReqRespMethod.InclusionListByCommitteeIndices]: (req) => {
const body = ssz.focil.InclusionListByCommitteeIndicesRequest.deserialize(req.data);
// TODO FOCIL: Implement this
throw Error(`InclusionListByCommitteeIndices is not implemented`);
},
};

return (method) => handlers[method];
4 changes: 4 additions & 0 deletions packages/beacon-node/src/network/reqresp/rateLimit.ts
Original file line number Diff line number Diff line change
@@ -65,6 +65,10 @@ export const rateLimitQuotas: Record<ReqRespMethod, InboundRateLimitQuota> = {
// Allow 2 per slot and a very safe bound until there's more testing of real usage.
byPeer: {quota: 2, quotaTimeMs: 12_000},
},
// TODO FOCIL: Review this limit
[ReqRespMethod.InclusionListByCommitteeIndices]: {
byPeer: {quota: 5, quotaTimeMs: 12_000},
},
};

// Helper to produce a getRequestCount function
Loading
Loading