Modules§
Structs§
- Chunk
Distribution Network Config - 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.
- Chunk
Distribution Uris - URIs for the Chunk Distribution Network feature.
- Client
Config - ClientConfig where some fields can be updated at runtime.
- Dump
Config - Configures how to dump state to external storage.
- Epoch
Sync Config - External
Storage Config - GCConfig
- Configuration for garbage collection.
- Genesis
Genesis
has an invariant thattotal_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 totest_loading_localnet_genesis
to see an example of serialized Genesis JSON.- Genesis
Change Config - Config for changes applied to state dump.
- Genesis
Config - Genesis
Records - Records in storage at genesis (get split into shards at genesis creation).
- Mutable
Config Value - 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. Seeexpected_shutdown
for an example how to use it. - Protocol
Config - Protocol
Config View - Resharding
Config - Configuration for resharding.
- Resharding
Handle - State
Sync Config - Options for dumping state to S3.
- Updatable
Client Config - A subset of Config that can be updated white the node is running.
Enums§
- External
Storage Location - Genesis
Contents - Genesis
Validation Mode - LogSummary
Style - Sync
Config - 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