DocsReference@proto-kit/sequencerClassesBlockProductionService

@proto-kit/sequencerDocs


Documentation / @proto-kit/sequencer / BlockProductionService

Class: BlockProductionService

Constructors

new BlockProductionService()

new BlockProductionService(protocol, tracer, blockBuilder, stateServiceProvider): BlockProductionService

Parameters

protocol: Protocol<MandatoryProtocolModulesRecord & ProtocolModulesRecord>

tracer: Tracer

blockBuilder: BlockBuilder

stateServiceProvider: StateServiceProvider

Returns

BlockProductionService

Defined in

packages/sequencer/src/protocol/production/sequencing/BlockProductionService.ts:53

Properties

tracer

readonly tracer: Tracer

Defined in

packages/sequencer/src/protocol/production/sequencing/BlockProductionService.ts:57

Methods

createBlock()

createBlock(asyncStateService, lastBlockWithResult, skipEmptyBlocks): Promise<undefined | object>

Main entry point for creating a unproven block with everything attached that is needed for tracing

Parameters

asyncStateService: AsyncStateService

lastBlockWithResult: BlockWithResult

skipEmptyBlocks: boolean

Returns

Promise<undefined | object>

Defined in

packages/sequencer/src/protocol/production/sequencing/BlockProductionService.ts:102


executeBeforeBlockHook()

executeBeforeBlockHook(args, inputNetworkState, cachedStateService): Promise<RuntimeContextReducedExecutionResult & object>

Parameters

args: BeforeBlockHookArguments

inputNetworkState: NetworkState

cachedStateService: CachedStateService

Returns

Promise<RuntimeContextReducedExecutionResult & object>

Defined in

packages/sequencer/src/protocol/production/sequencing/BlockProductionService.ts:67