Crate near_chain_configs

Source

Modules§

genesis_validate

Structs§

ChunkDistributionNetworkConfig
Config for the Chunk Distribution Network feature. This allows nodes to push and pull chunks from a central stream. The two benefits of this approach are: (1) less request/response traffic on the peer-to-peer network and (2) lower latency for RPC nodes indexing the chain.
ChunkDistributionUris
URIs for the Chunk Distribution Network feature.
ClientConfig
ClientConfig where some fields can be updated at runtime.
DumpConfig
Configures how to dump state to external storage.
EpochSyncConfig
ExternalStorageConfig
GCConfig
Configuration for garbage collection.
Genesis
Genesis has an invariant that total_supply is equal to the supply seen in the records. However, we can’t enforce that invariant. All fields are public, but the clients are expected to use the provided methods for instantiation, serialization and deserialization. Refer to test_loading_localnet_genesis to see an example of serialized Genesis JSON.
GenesisChangeConfig
Config for changes applied to state dump.
GenesisConfig
GenesisRecords
Records in storage at genesis (get split into shards at genesis creation).
MutableConfigValue
A wrapper for a config value that can be updated while the node is running. When initializing sub-objects (e.g. ShardsManager), please make sure to pass this wrapper instead of passing a value from a single moment in time. See expected_shutdown for an example how to use it.
ProtocolConfig
ProtocolConfigView
ReshardingConfig
Configuration for resharding.
ReshardingHandle
StateSyncConfig
Options for dumping state to S3.
UpdatableClientConfig
A subset of Config that can be updated white the node is running.

Enums§

ExternalStorageLocation
GenesisContents
GenesisValidationMode
LogSummaryStyle
SyncConfig
Configures how to fetch state parts during state sync.

Constants§

BLOCK_PRODUCER_KICKOUT_THRESHOLD
Criterion for kicking out block producers.
CHUNK_PRODUCER_KICKOUT_THRESHOLD
Criterion for kicking out chunk producers.
CHUNK_VALIDATOR_ONLY_KICKOUT_THRESHOLD
Criterion for kicking out chunk validators.
DEFAULT_GC_NUM_EPOCHS_TO_KEEP
Default number of epochs for which we keep store data
DEFAULT_STATE_SYNC_NUM_CONCURRENT_REQUESTS_EXTERNAL
Default number of concurrent requests to external storage to fetch state parts.
DEFAULT_STATE_SYNC_NUM_CONCURRENT_REQUESTS_ON_CATCHUP_EXTERNAL
EXPECTED_EPOCH_LENGTH
Expected epoch length.
FAST_EPOCH_LENGTH
FISHERMEN_THRESHOLD
Fishermen stake threshold.
GAS_PRICE_ADJUSTMENT_RATE
The rate at which the gas price can be adjusted (alpha in the formula). The formula is gas_price_t = gas_price_{t-1} * (1 + (gas_used/gas_limit - 1/2) * alpha))
GENESIS_CONFIG_FILENAME
INITIAL_GAS_LIMIT
Initial gas limit.
MAX_INFLATION_RATE
Maximum inflation rate per year
MIN_BLOCK_PRODUCTION_DELAY
Expected block production time in ms.
MIN_GAS_PRICE
Initial and minimum gas price.
MIN_GC_NUM_EPOCHS_TO_KEEP
Minimum number of epochs for which we keep store data
NEAR_BASE
One NEAR, divisible by 10^24.
NUM_BLOCKS_PER_YEAR
Expected number of blocks per year
NUM_BLOCK_PRODUCER_SEATS
Number of seats for block producers
PROTOCOL_REWARD_RATE
Protocol treasury reward
PROTOCOL_TREASURY_ACCOUNT
Protocol treasury account
PROTOCOL_UPGRADE_STAKE_THRESHOLD
Protocol upgrade stake threshold.
TEST_STATE_SYNC_TIMEOUT
TRANSACTION_VALIDITY_PERIOD
Number of blocks for which a given transaction is valid

Functions§

default_chunk_wait_mult
default_enable_multiline_logging
default_epoch_sync
default_header_sync_expected_height_per_second
default_header_sync_initial_timeout
default_header_sync_progress_timeout
default_header_sync_stall_ban_timeout
default_log_summary_period
default_orphan_state_witness_max_size
Returns the default value for maximum data-size (bytes) for a state witness to be included in the OrphanStateWitnessPool.
default_orphan_state_witness_pool_size
Returns the default size of the OrphanStateWitnessPool, ie. the maximum number of state-witnesses that can be accommodated in OrphanStateWitnessPool.
default_produce_chunk_add_transactions_time_limit
default_state_sync_enabled
default_state_sync_external_backoff
default_state_sync_external_timeout
default_state_sync_p2p_timeout
default_state_sync_retry_backoff
default_sync_check_period
default_sync_height_threshold
default_sync_max_block_requests
default_sync_step_period
default_transaction_pool_size_limit
default_trie_viewer_state_size_limit
default_tx_routing_height_horizon
default_view_client_threads
default_view_client_throttle_period
get_initial_supply
stream_records_from_file
The file can be a JSON with comments

Type Aliases§

MutableValidatorSigner