import { ChainForkConfig } from "@lodestar/config";
import { IForkChoice, ProtoBlock } from "@lodestar/fork-choice";
import { ForkName, ForkPostBellatrix, ForkPostDeneb, ForkPostFulu, ForkPostGloas } from "@lodestar/params";
import { CachedBeaconStateAllForks, CachedBeaconStateExecutions, CachedBeaconStateGloas } from "@lodestar/state-transition";
import { BLSPubkey, BLSSignature, BeaconBlock, BeaconBlockBody, BlindedBeaconBlock, BlindedBeaconBlockBody, BlobsBundle, Bytes32, ExecutionPayload, Root, RootHex, SSEPayloadAttributes, Slot, ValidatorIndex, Wei, electra, fulu } from "@lodestar/types";
import { Logger } from "@lodestar/utils";
import { IExecutionEngine, PayloadId } from "../../execution/index.js";
import type { BeaconChain } from "../chain.js";
import { CommonBlockBody } from "../interface.js";
export declare enum PayloadPreparationType {
    Fresh = "Fresh",
    Cached = "Cached",
    Reorged = "Reorged",
    Blinded = "Blinded"
}
/**
 * Block production steps tracked in metrics
 */
export declare enum BlockProductionStep {
    proposerSlashing = "proposerSlashing",
    attesterSlashings = "attesterSlashings",
    voluntaryExits = "voluntaryExits",
    blsToExecutionChanges = "blsToExecutionChanges",
    attestations = "attestations",
    syncAggregate = "syncAggregate",
    executionPayload = "executionPayload"
}
export type BlockAttributes = {
    randaoReveal: BLSSignature;
    graffiti: Bytes32;
    slot: Slot;
    parentBlock: ProtoBlock;
    feeRecipient?: string;
};
export declare enum BlockType {
    Full = "Full",
    Blinded = "Blinded"
}
export type AssembledBodyType<T extends BlockType> = T extends BlockType.Full ? BeaconBlockBody : BlindedBeaconBlockBody;
export type AssembledBlockType<T extends BlockType> = T extends BlockType.Full ? BeaconBlock : BlindedBeaconBlock;
export type ProduceFullGloas = {
    type: BlockType.Full;
    fork: ForkPostGloas;
    executionPayload: ExecutionPayload<ForkPostGloas>;
    executionRequests: electra.ExecutionRequests;
    blobsBundle: BlobsBundle<ForkPostGloas>;
    cells: fulu.Cell[][];
    /**
     * Cached envelope state root computed during block production.
     * This is the state root after running `processExecutionPayloadEnvelope` on the
     * post-block state, and later used to construct the `ExecutionPayloadEnvelope`.
     */
    envelopeStateRoot: Root;
};
export type ProduceFullFulu = {
    type: BlockType.Full;
    fork: ForkPostFulu;
    executionPayload: ExecutionPayload<ForkPostFulu>;
    blobsBundle: BlobsBundle<ForkPostFulu>;
    cells: fulu.Cell[][];
};
export type ProduceFullDeneb = {
    type: BlockType.Full;
    fork: ForkName.deneb | ForkName.electra;
    executionPayload: ExecutionPayload<ForkPostDeneb>;
    blobsBundle: BlobsBundle<ForkPostDeneb>;
};
export type ProduceFullBellatrix = {
    type: BlockType.Full;
    fork: ForkName.bellatrix | ForkName.capella;
    executionPayload: ExecutionPayload<ForkPostBellatrix>;
};
export type ProduceFullPhase0 = {
    type: BlockType.Full;
    fork: ForkName.phase0 | ForkName.altair;
};
export type ProduceBlinded = {
    type: BlockType.Blinded;
    fork: ForkName;
};
/** The result of local block production, everything that's not the block itself */
export type ProduceResult = ProduceFullGloas | ProduceFullFulu | ProduceFullDeneb | ProduceFullBellatrix | ProduceFullPhase0 | ProduceBlinded;
export declare function produceBlockBody<T extends BlockType>(this: BeaconChain, blockType: T, currentState: CachedBeaconStateAllForks, blockAttr: BlockAttributes & {
    proposerIndex: ValidatorIndex;
    proposerPubKey: BLSPubkey;
    commonBlockBodyPromise: Promise<CommonBlockBody>;
}): Promise<{
    body: AssembledBodyType<T>;
    produceResult: ProduceResult;
    executionPayloadValue: Wei;
    shouldOverrideBuilder?: boolean;
}>;
/**
 * Produce ExecutionPayload for post-merge.
 */
export declare function prepareExecutionPayload(chain: {
    executionEngine: IExecutionEngine;
    config: ChainForkConfig;
}, logger: Logger, fork: ForkPostBellatrix, parentBlockRoot: Root, safeBlockHash: RootHex, finalizedBlockHash: RootHex, state: CachedBeaconStateExecutions | CachedBeaconStateGloas, suggestedFeeRecipient: string): Promise<{
    prepType: PayloadPreparationType;
    payloadId: PayloadId;
}>;
export declare function getPayloadAttributesForSSE(fork: ForkPostBellatrix, chain: {
    config: ChainForkConfig;
    forkChoice: IForkChoice;
}, { prepareState, prepareSlot, parentBlockRoot, feeRecipient }: {
    prepareState: CachedBeaconStateExecutions | CachedBeaconStateGloas;
    prepareSlot: Slot;
    parentBlockRoot: Root;
    feeRecipient: string;
}): SSEPayloadAttributes;
export declare function produceCommonBlockBody<T extends BlockType>(this: BeaconChain, blockType: T, currentState: CachedBeaconStateAllForks, { randaoReveal, graffiti, slot, parentBlock }: BlockAttributes): Promise<CommonBlockBody>;
//# sourceMappingURL=produceBlockBody.d.ts.map