Skip to content

TIMING_CONSTANTS

const TIMING_CONSTANTS: object;

Defined in: packages/synapse-sdk/src/utils/constants.ts:227

Timing constants for blockchain operations

readonly DATA_SET_CREATION_POLL_INTERVAL_MS: 2000 = 2000;

How often to poll for data set creation status

readonly DATA_SET_CREATION_TIMEOUT_MS: number;

Maximum time to wait for a data set creation to complete This includes transaction mining and the data set becoming live on-chain

readonly PERMIT_DEADLINE_DURATION: 3600 = 3600;

Default expiry time for EIP-2612 permit signatures (in seconds) Permits are time-limited approvals that expire after this duration

readonly PIECE_ADDITION_POLL_INTERVAL_MS: 1000 = 1000;

How often to poll for piece addition status

readonly PIECE_ADDITION_TIMEOUT_MS: number;

Maximum time to wait for a piece addition to be confirmed and acknowledged This includes transaction confirmation and server verification

readonly PIECE_PARKING_POLL_INTERVAL_MS: 5000 = 5000;

How often to poll for piece parking status Less frequent than blockchain polling as uploads take longer

readonly PIECE_PARKING_TIMEOUT_MS: number;

Maximum time to wait for a piece to be parked (uploaded) to storage This is typically slower than blockchain operations as it involves data transfer

readonly TRANSACTION_CONFIRMATIONS: 1 = 1;

Number of confirmations to wait for when calling transaction.wait() Set to 1 by default to ensure the transaction is mined, could be increased in the future, or aligned to F3 expectations

readonly TRANSACTION_PROPAGATION_POLL_INTERVAL_MS: 2000 = 2000;

How often to poll when waiting for a transaction to appear

readonly TRANSACTION_PROPAGATION_TIMEOUT_MS: 30000 = 30000;

How long to wait for a transaction to appear on the network This is used when we have a transaction hash but need to fetch the transaction object Filecoin has 30-second epochs, so this gives one full epoch for propagation