import { ReverseBlockFetcher } from './fetcher/index.ts'; import { Synchronizer } from './sync.ts'; import type { Block } from '@ethereumjs/block'; import type { VMExecution } from '../execution/index.ts'; import type { Peer } from '../net/peer/peer.ts'; import type { Skeleton } from '../service/skeleton.ts'; import type { SynchronizerOptions } from './sync.ts'; interface BeaconSynchronizerOptions extends SynchronizerOptions { /** Skeleton chain */ skeleton: Skeleton; /** VM Execution */ execution: VMExecution; } /** * Beacon sync is the post-merge version of the chain synchronization, where the * chain is not downloaded from genesis onward, rather from trusted head backwards. * @memberof module:sync */ export declare class BeaconSynchronizer extends Synchronizer { skeleton: Skeleton; private execution; running: boolean; constructor(options: BeaconSynchronizerOptions); /** * Returns synchronizer type */ get type(): string; get fetcher(): ReverseBlockFetcher | null; set fetcher(fetcher: ReverseBlockFetcher | null); /** * Open synchronizer. Must be called before sync() is called */ open(): Promise; /** * Returns true if peer can be used for syncing */ syncable(peer: Peer): boolean; /** * Finds the best peer to sync with. We will synchronize to this peer's * blockchain. Returns null if no valid peer is found */ best(): Promise; /** * Start synchronizer. * If passed a block, will initialize sync starting from the block. */ start(): Promise; reorged(block: Block): Promise; /** * Returns true if the block successfully extends the chain. */ extendChain(block: Block): Promise; /** * Sets the new head of the skeleton chain. */ setHead(block: Block): Promise; /** * Sync blocks from the skeleton chain tail. * @param peer remote peer to sync with * @return Resolves when sync completed */ syncWithPeer(peer?: Peer): Promise; processSkeletonBlocks(blocks: Block[]): Promise; /** * Runs vm execution on {@link Event.CHAIN_UPDATED} */ runExecution(): Promise; /** * Stop synchronization. Returns a promise that resolves once its stopped. */ stop(): Promise; /** * Close synchronizer. */ close(): Promise; } export {}; //# sourceMappingURL=beaconsync.d.ts.map