near-api-js - v7.4.0
    Preparing search index...

    Type Alias RpcClientConfigResponse

    ClientConfig where some fields can be updated at runtime.

    type RpcClientConfigResponse = {
        archive?: boolean;
        block_header_fetch_horizon?: number;
        block_production_tracking_delay?: MutableConfigValue;
        catchup_step_period?: [number, number];
        chain_id?: string;
        chunk_distribution_network?: ChunkDistributionNetworkConfig | null;
        chunk_request_retry_period?: [number, number];
        chunk_validation_threads?: number;
        chunk_wait_mult?: MutableConfigValue;
        chunks_cache_height_horizon?: number;
        client_background_migration_threads?: number;
        cloud_archival_writer?: CloudArchivalWriterConfig | null;
        disable_tx_routing?: boolean;
        doomslug_step_period?: MutableConfigValue;
        enable_early_prepare_transactions?: boolean;
        enable_multiline_logging?: boolean;
        enable_statistics_export?: boolean;
        epoch_length?: number;
        epoch_sync?: EpochSyncConfig;
        expected_shutdown?: MutableConfigValue;
        gc?: GcConfig;
        header_sync_expected_height_per_second?: number;
        header_sync_initial_timeout?: [number, number];
        header_sync_progress_timeout?: [number, number];
        header_sync_stall_ban_timeout?: [number, number];
        log_summary_period?: [number, number];
        log_summary_style?: LogSummaryStyle;
        max_block_production_delay?: MutableConfigValue;
        max_block_wait_delay?: MutableConfigValue;
        max_gas_burnt_view?: NearGas | null;
        min_block_production_delay?: MutableConfigValue;
        min_num_peers?: number;
        num_block_producer_seats?: number;
        orphan_state_witness_max_size?: number;
        orphan_state_witness_pool_size?: number;
        produce_chunk_add_transactions_time_limit?: string;
        produce_empty_blocks?: boolean;
        protocol_version_check?: ProtocolVersionCheckConfig;
        receipt_to_tx_max_hint_window?: number;
        receipt_to_tx_max_hop_distance?: number;
        receipt_to_tx_max_outcomes_per_request?: number;
        resharding_config?: MutableConfigValue;
        rpc_addr?: string | null;
        save_invalid_witnesses?: boolean;
        save_latest_witnesses?: boolean;
        save_receipt_to_tx?: boolean;
        save_state_changes?: boolean;
        save_trie_changes?: boolean;
        save_tx_outcomes?: boolean;
        save_untracked_partial_chunks_parts?: boolean;
        skip_sync_wait?: boolean;
        state_request_server_threads?: number;
        state_request_throttle_period?: [number, number];
        state_requests_per_throttle_period?: number;
        state_sync?: StateSyncConfig;
        state_sync_external_backoff?: [number, number];
        state_sync_external_timeout?: [number, number];
        state_sync_p2p_timeout?: [number, number];
        state_sync_retry_backoff?: [number, number];
        sync_check_period?: [number, number];
        sync_height_threshold?: number;
        sync_max_block_requests?: number;
        sync_step_period?: [number, number];
        tracked_shards_config?: TrackedShardsConfig;
        transaction_pool_size_limit?: number | null;
        transaction_pool_strict_nonce_ttl_blocks?: number;
        transaction_request_handler_threads?: number;
        trie_viewer_state_size_limit?: number | null;
        ttl_account_id_router?: [number, number];
        tx_routing_height_horizon?: number;
        version?: Version;
        view_client_threads?: number;
    }
    Index
    archive? block_header_fetch_horizon? block_production_tracking_delay? catchup_step_period? chain_id? chunk_distribution_network? chunk_request_retry_period? chunk_validation_threads? chunk_wait_mult? chunks_cache_height_horizon? client_background_migration_threads? cloud_archival_writer? disable_tx_routing? doomslug_step_period? enable_early_prepare_transactions? enable_multiline_logging? enable_statistics_export? epoch_length? epoch_sync? expected_shutdown? gc? header_sync_expected_height_per_second? header_sync_initial_timeout? header_sync_progress_timeout? header_sync_stall_ban_timeout? log_summary_period? log_summary_style? max_block_production_delay? max_block_wait_delay? max_gas_burnt_view? min_block_production_delay? min_num_peers? num_block_producer_seats? orphan_state_witness_max_size? orphan_state_witness_pool_size? produce_chunk_add_transactions_time_limit? produce_empty_blocks? protocol_version_check? receipt_to_tx_max_hint_window? receipt_to_tx_max_hop_distance? receipt_to_tx_max_outcomes_per_request? resharding_config? rpc_addr? save_invalid_witnesses? save_latest_witnesses? save_receipt_to_tx? save_state_changes? save_trie_changes? save_tx_outcomes? save_untracked_partial_chunks_parts? skip_sync_wait? state_request_server_threads? state_request_throttle_period? state_requests_per_throttle_period? state_sync? state_sync_external_backoff? state_sync_external_timeout? state_sync_p2p_timeout? state_sync_retry_backoff? sync_check_period? sync_height_threshold? sync_max_block_requests? sync_step_period? tracked_shards_config? transaction_pool_size_limit? transaction_pool_strict_nonce_ttl_blocks? transaction_request_handler_threads? trie_viewer_state_size_limit? ttl_account_id_router? tx_routing_height_horizon? version? view_client_threads?
    archive?: boolean

    Not clear old data, set true for archive nodes.

    block_header_fetch_horizon?: number

    Behind this horizon header fetch kicks in.

    block_production_tracking_delay?: MutableConfigValue

    Duration to check for producing / skipping block.

    catchup_step_period?: [number, number]

    Time between check to perform catchup.

    chain_id?: string

    Chain id for status.

    chunk_distribution_network?: ChunkDistributionNetworkConfig | null

    Optional config for the Chunk Distribution Network feature. If set to None then this node does not participate in the Chunk Distribution Network. Nodes not participating will still function fine, but possibly with higher latency due to the need of requesting chunks over the peer-to-peer network.

    chunk_request_retry_period?: [number, number]

    Time between checking to re-request chunks.

    chunk_validation_threads?: number

    Number of threads for ChunkValidationActor pool.

    chunk_wait_mult?: MutableConfigValue

    Multiplier for the wait time for all chunks to be received.

    chunks_cache_height_horizon?: number

    Height horizon for the chunk cache. A chunk is removed from the cache if its height + chunks_cache_height_horizon < largest_seen_height. The default value is given by default_chunks_cache_height_horizon().

    client_background_migration_threads?: number

    Number of threads to execute background migration work in client.

    cloud_archival_writer?: CloudArchivalWriterConfig | null

    Configuration for a cloud-based archival writer. If this config is present, the writer is enabled and writes chunk-related data based on the tracked shards.

    disable_tx_routing?: boolean

    If true, the node won't forward transactions to next the chunk producers.

    doomslug_step_period?: MutableConfigValue

    Time between running doomslug timer.

    enable_early_prepare_transactions?: boolean

    If true, transactions for the next chunk will be prepared early, right after the previous chunk's post-state is ready. This can help produce chunks faster, for high-throughput chains. The current implementation increases latency on low-load chains, which will be fixed in the future. The default is disabled.

    enable_multiline_logging?: boolean
    enable_statistics_export?: boolean

    Re-export storage layer statistics as prometheus metrics.

    epoch_length?: number

    Epoch length.

    epoch_sync?: EpochSyncConfig

    Options for epoch sync.

    expected_shutdown?: MutableConfigValue

    Graceful shutdown at expected block height.

    Garbage collection configuration.

    header_sync_expected_height_per_second?: number

    Expected increase of header head height per second during header sync

    header_sync_initial_timeout?: [number, number]

    How much time to wait after initial header sync

    header_sync_progress_timeout?: [number, number]

    How much time to wait after some progress is made in header sync

    header_sync_stall_ban_timeout?: [number, number]

    How much time to wait before banning a peer in header sync if sync is too slow

    log_summary_period?: [number, number]

    Period between logging summary information.

    log_summary_style?: LogSummaryStyle

    Enable coloring of the logs

    max_block_production_delay?: MutableConfigValue

    Maximum wait for approvals before producing block.

    max_block_wait_delay?: MutableConfigValue

    Maximum duration before skipping given height.

    max_gas_burnt_view?: NearGas | null

    Max burnt gas per view method. If present, overrides value stored in genesis file. The value only affects the RPCs without influencing the protocol thus changing it per-node doesn’t affect the blockchain.

    min_block_production_delay?: MutableConfigValue

    Minimum duration before producing block.

    min_num_peers?: number

    Minimum number of peers to start syncing.

    num_block_producer_seats?: number

    Number of block producer seats

    orphan_state_witness_max_size?: number

    Maximum size of state witnesses in the OrphanStateWitnessPool.

    We keep only orphan witnesses which are smaller than this size. This limits the maximum memory usage of OrphanStateWitnessPool.

    orphan_state_witness_pool_size?: number

    OrphanStateWitnessPool keeps instances of ChunkStateWitness which can't be processed because the previous block isn't available. The witnesses wait in the pool until the required block appears. This variable controls how many witnesses can be stored in the pool.

    produce_chunk_add_transactions_time_limit?: string

    Limit the time of adding transactions to a chunk. A node produces a chunk by adding transactions from the transaction pool until some limit is reached. This time limit ensures that adding transactions won't take longer than the specified duration, which helps to produce the chunk quickly.

    produce_empty_blocks?: boolean

    Produce empty blocks, use false for testing.

    protocol_version_check?: ProtocolVersionCheckConfig

    Determines whether client should exit if the protocol version is not supported for the next or next next epoch.

    receipt_to_tx_max_hint_window?: number

    Max ±window accepted on EXPERIMENTAL_receipt_to_tx requests. Caps caller's window. Applies to pre-first-scan CenterOut against caller's literal hint; ancestor scans use receipt_to_tx_max_hop_distance instead. Operators raising this should also raise receipt_to_tx_max_hop_distance so backward reach matches caller's wider hint scope. Requests with window over this rejected with WindowTooLarge.

    receipt_to_tx_max_hop_distance?: number

    Max block-distance ancestor scan walks per hop once any scan in walk refreshed current_height. Subsequent column-miss scans visit h, h-1, ..., h-max_hop_distance from most-recent scan-refreshed anchor, regardless of column hits between. Anchor included — same-shard local receipts execute in same block as producing outcome. Raise if cold archival traffic shows ancestor misses — gap = scan-refreshed anchor to producer-outcome height of receipt with missing column row (column hits don't reset anchor). Default 20 (matches receipt_to_tx_max_hint_window).

    receipt_to_tx_max_outcomes_per_request?: number

    Per-request ceiling on outcome rows the EXPERIMENTAL_receipt_to_tx hint-fallback scanner reads across hops + shards. Caps cold-RocksDB worst case on unauthenticated public endpoint. Default 20_000. Operators serving cold archival traffic with deep walks or sparse outcomes may raise; benchmark first (see TODO in view_client_actor.rs). Mid-scan exhaustion fails with BudgetExceeded { scanned, limit }.

    resharding_config?: MutableConfigValue
    rpc_addr?: string | null

    Listening rpc port for status.

    save_invalid_witnesses?: boolean

    Save observed instances of invalid ChunkStateWitness to the database in DBCol::InvalidChunkStateWitnesses. Saving invalid witnesses is useful for analysis and debugging. This option can cause extra load on the database and is not recommended for production use.

    save_latest_witnesses?: boolean

    Save observed instances of ChunkStateWitness to the database in DBCol::LatestChunkStateWitnesses. Saving the latest witnesses is useful for analysis and debugging. This option can cause extra load on the database and is not recommended for production use.

    save_receipt_to_tx?: boolean

    Whether to persist receipt-to-tx origin mappings to disk or not.

    save_state_changes?: boolean

    Whether to persist state changes on disk or not.

    save_trie_changes?: boolean

    save_trie_changes should be set to true iff

    • archive if false - non-archival nodes need trie changes to perform garbage collection
    • archive is true, cold_store is configured and migration to split_storage is finished - node working in split storage mode needs trie changes in order to do garbage collection on hot.
    save_tx_outcomes?: boolean

    Whether to persist transaction outcomes to disk or not.

    save_untracked_partial_chunks_parts?: boolean

    Whether to persist partial chunk parts for untracked shards or not.

    skip_sync_wait?: boolean

    Skip waiting for sync (for testing or single node testnet).

    state_request_server_threads?: number

    Number of threads for StateRequestActor pool.

    state_request_throttle_period?: [number, number]

    Number of seconds between state requests for view client. Throttling window for state requests (headers and parts).

    state_requests_per_throttle_period?: number

    Maximum number of state requests served per throttle period

    state_sync?: StateSyncConfig

    Options for syncing state.

    state_sync_external_backoff?: [number, number]

    Additional waiting period after a failed request to external storage

    state_sync_external_timeout?: [number, number]

    How long to wait for a response from centralized state sync

    state_sync_p2p_timeout?: [number, number]

    How long to wait for a response from p2p state sync

    state_sync_retry_backoff?: [number, number]

    How long to wait after a failed state sync request

    sync_check_period?: [number, number]

    How often to check that we are not out of sync.

    sync_height_threshold?: number

    Sync height threshold: below this difference in height don't start syncing.

    sync_max_block_requests?: number

    Maximum number of block requests to send to peers to sync

    sync_step_period?: [number, number]

    While syncing, how long to check for each step.

    tracked_shards_config?: TrackedShardsConfig
    transaction_pool_size_limit?: number | null

    Limit of the size of per-shard transaction pool measured in bytes. If not set, the size will be unbounded.

    transaction_pool_strict_nonce_ttl_blocks?: number

    TTL in blocks for gapped strict-nonce transactions in the pool. Transactions with a nonce gap whose block_hash is older than this many blocks are evicted during prepare_transactions.

    transaction_request_handler_threads?: number
    trie_viewer_state_size_limit?: number | null

    Upper bound of the byte size of contract state that is still viewable. None is no limit

    ttl_account_id_router?: [number, number]

    Time to persist Accounts Id in the router without removing them.

    tx_routing_height_horizon?: number

    If the node is not a chunk producer within that many blocks, then route to upcoming chunk producers.

    version?: Version

    Version of the binary.

    view_client_threads?: number

    Number of threads for ViewClientActor pool.