import { Logger as Log4jsLogger } from 'log4js'; import StateManager from '.'; import Crypto from '../crypto'; import Logger from '../logger'; import { P2PModuleContext as P2P } from '../p2p/Context'; import * as Shardus from '../shardus/shardus-types'; import Storage from '../storage'; import Profiler from '../utils/profiler'; import { PartitionCycleReport, PartitionObject, PartitionResult, TempTxRecord, TxTallyList } from './state-manager-types'; declare class PartitionObjects { app: Shardus.App; crypto: Crypto; config: Shardus.StrictServerConfiguration; profiler: Profiler; logger: Logger; p2p: P2P; storage: Storage; stateManager: StateManager; mainLogger: Log4jsLogger; fatalLogger: Log4jsLogger; shardLogger: Log4jsLogger; statsLogger: Log4jsLogger; statemanager_fatal: (key: string, log: string) => void; nextCycleReportToSend: PartitionCycleReport; lastCycleReported: number; partitionReportDirty: boolean; /** partition objects by cycle. index by cycle counter key to get an array */ partitionObjectsByCycle: { [cycleKey: string]: PartitionObject[]; }; /** our partition Results by cycle. index by cycle counter key to get an array */ ourPartitionResultsByCycle: { [cycleKey: string]: PartitionResult[]; }; /** partition objects by cycle by hash. */ recentPartitionObjectsByCycleByHash: { [cycleKey: string]: { [hash: string]: PartitionObject; }; }; /** temporary store for TXs that we put in a partition object after a cycle is complete. an array that holds any TXs (i.e. from different cycles), code will filter out what it needs @see TempTxRecord */ tempTXRecords: TempTxRecord[]; /** TxTallyList data indexed by cycle key and partition key. @see TxTallyList */ txByCycleByPartition: { [cycleKey: string]: { [partitionKey: string]: TxTallyList; }; }; /** Stores the partition responses that other nodes push to us. Index by cycle key, then index by partition id */ allPartitionResponsesByCycleByPartition: { [cycleKey: string]: { [partitionKey: string]: PartitionResult[]; }; }; resetAndApplyPerPartition: boolean; constructor(stateManager: StateManager, profiler: Profiler, app: Shardus.App, logger: Logger, storage: Storage, p2p: P2P, crypto: Crypto, config: Shardus.StrictServerConfiguration); /*** * ######## ### ######## ######## #### ######## #### ####### ## ## ######## ######## ######## ####### ######## ######## ###### * ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## * ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## ## ## * ######## ## ## ######## ## ## ## ## ## ## ## ## ## ######## ###### ######## ## ## ######## ## ###### * ## ######### ## ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## * ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## * ## ## ## ## ## ## #### ## #### ####### ## ## ## ## ######## ## ####### ## ## ## ###### */ /** * getPartitionReport used by reporting (monitor server) to query if there is a partition report ready * @param {boolean} consensusOnly * @param {boolean} smallHashes * @returns {any} */ getPartitionReport(consensusOnly: boolean, smallHashes: boolean): PartitionCycleReport; /*** * ######## ## ## ######## ######## ####### #### ## ## ######## ###### * ## ### ## ## ## ## ## ## ## ## ### ## ## ## ## * ## #### ## ## ## ## ## ## ## ## #### ## ## ## * ###### ## ## ## ## ## ######## ## ## ## ## ## ## ## ###### * ## ## #### ## ## ## ## ## ## ## #### ## ## * ## ## ### ## ## ## ## ## ## ## ### ## ## ## * ######## ## ## ######## ## ####### #### ## ## ## ###### */ setupHandlers(): void; } export default PartitionObjects;