Introducing a new way to review your PRs.

Read the announcement

near / nearcore

Reference client for NEAR Protocol

View on GitHub

20 documents · Updated Nov 23, 2026

docs / protocol-configuration

Protocol configuration

Protocol configuration is the set of versioned chain rules and node settings that keeps block production, validation, execution, and upgrades consistent. It connects chain start data, epoch rules, runtime parameters, feature gates, and compatibility checks while keeping local node settings separate from network-wide protocol state.

Configuration model

Protocol versions

A ProtocolVersion names the consensus rules used by an epoch. The active version comes from chain epoch data. A binary also declares the range it can process, so a node can detect whether it is ready for a future upgrade.

The version values have distinct roles:

  • The genesis version records the rules used when a chain starts.
  • The minimum supported version defines the oldest rules that the binary can safely process for state-changing work.
  • The client protocol version defines the newest rules that the binary can advertise and use.
  • A feature activation version defines when one network behavior becomes active.

VmGeneration is separate from ProtocolVersion. It changes only when a VM configuration change can invalidate compiled contracts. This keeps compiled-code validity separate from the wider set of consensus rules named by the protocol version.

The stable binary currently supports protocol version 89. The minimum supported version is 85. Nightly and SPICE builds expose higher ceilings of 159 and 200 for unreleased features. A higher build ceiling only makes a binary ready; the chain must still select the matching epoch version before the rules are active. The feature table covers transaction and action forms, account creation, signatures, shard data, execution behavior, node coordination, and later rejection of unsafe older forms. It also records fixes for cost accounting, contract calls, bandwidth requests, global contracts, receipt limits, shard assignment, block-header validity, receipt fee pinning, register input, contract compilation, trie accounting, and newer execution behavior as versioned network rules.

References: core/…/types.rs• L44-64 core/…/version.rs• L3-180 core/…/version.rs• L182-232 core/…/Cargo.toml• L39-48

Protocol configuration bundle

ProtocolConfig is the historical configuration for one epoch. It combines chain-wide values with the runtime rules selected for that epoch's protocol version. Epoch-specific validator and shard values are applied to the view so callers see the rules that were active at the requested point in the chain.

The bundle has three boundaries:

  • Genesis values describe chain identity, initial economics, validator policy, and shard layout.
  • Epoch values describe rules that can change with validator or shard layout changes.
  • Runtime values describe transaction costs, storage costs, execution limits, account creation, congestion control, witness limits, and runtime host features.

Congestion control is part of the runtime contract because its limits affect shard admission and cross-shard work. Chunk application records preserve the congestion inputs and receipt totals used to explain that work. Receipt size and congestion gas are calculated from the selected runtime configuration before a receipt enters state. These calculations are protocol rules and must change only with an upgrade.

Protocol actions and transactions follow the same contract. An action type needs matching validation, execution, cost, and client-view rules. Transaction V0 remains readable in its established form, while V1 adds gas-key nonce data and nonce mode under feature rules. Fee calculation covers both direct and nested delegate actions. State-init actions also contribute bounded receipt costs through one shared count of entries and keys.

References: core/…/genesis_config.rs• L108-232 core/…/genesis_config.rs• L793-873 core/…/epoch_manager.rs• L62-72 core/…/epoch_manager.rs• L98-150 core/…/epoch_manager.rs• L309-369 core/…/config.rs• L15-47 core/…/parameter_table.rs• L409-501 core/…/congestion_info.rs• L9-25 core/…/congestion_info.rs• L168-189 core/…/fees.rs• L24-46 core/…/fees.rs• L464-548 core/…/fees.rs• L574-621 core/…/fees.rs• L700-776 core/…/receipt.rs• L116-138 core/…/mod.rs• L375-397 core/…/mod.rs• L531-581 core/…/transaction.rs• L121-154

Core execution configuration

home/…/config.rs defines small configuration types that cross the boundary between protocol primitives and execution services. The flat-state inline threshold affects how stored values are represented and therefore affects related read costs. A change is a protocol change, not an uncoordinated local setting.

ViewConfig carries the gas cap for a read-only view call. The runtime uses it to bound user-facing view execution without placing the request on the block-production path. This keeps a request limit separate from the rules used to execute state-changing work.

References: core/…/config.rs• L4-21 core/…/state.rs• L140-187 runtime/…/mod.rs• L501-506 runtime/…/pipelining.rs• L440-451

Protocol primitive surface

The primitives crate is the shared boundary for protocol data and rules. It exposes versioned actions, transactions, receipts, state records, chunk statistics, validator assignment state, witnesses, and views to the chain and runtime services. The module surface matters because these types are reused by consensus, execution, storage, and network paths rather than owned by one service.

The changed primitive areas reinforce three protocol boundaries:

  • Fee and admission logic derives transaction, action, receipt, signature, and size costs from the selected runtime configuration and protocol version.
  • Chunk headers, transactions, and state witnesses retain versioned forms when their fields or meanings change across epochs and network messages.
  • State and client views map internal protocol data into forms that remain usable by state transfer, RPC clients, and monitoring tools.
  • Network identities and validation errors are also shared protocol types. A peer identity is the serialized public key used at node boundaries, while errors report rule failures without exposing private implementation types.

References: core/…/lib.rs• L13-62 core/…/mod.rs• L375-397 core/…/transaction.rs• L696-780 core/…/sharding.rs• L393-400 core/…/state_witness.rs• L92-106 core/…/state_witness.rs• L14-33 core/…/views.rs• L1-5 core/…/network.rs• L8-33 core/…/errors.rs• L206-317 core/…/errors.rs• L367-512

Configuration sources

Genesis configuration

The genesis configuration establishes the chain's starting contract. It provides the chain ID and start height, initial protocol version, validator and shard policy, epoch timing, gas bounds, and economic policy. Genesis data is validated before it becomes the basis for epoch and runtime behavior.

The chain ID also selects compatibility behavior for known networks. Mainnet and testnet use maintained production configuration paths. Other chains can use test or custom paths. A genesis value therefore has both a direct role at chain start and a role in choosing later configuration sources.

References: core/…/genesis_config.rs• L108-232 core/…/genesis_config.rs• L235-270 chain/…/lib.rs• L484-526

Epoch configuration

Epoch configuration holds rules for validator selection, rewards, epoch timing, and shard assignment. The epoch manager maps a protocol version to the epoch configuration that applies to that version.

Production chains use maintained epoch history for their chain ID. Custom chains can load epoch configurations from the node home directory. If no custom history exists, the node creates a test configuration from genesis. A new protocol version therefore needs a suitable epoch rule set, either as a new entry or through valid inheritance. Configurations above the binary ceiling are not loaded from a custom directory.

References: core/…/epoch_manager.rs• L301-369 core/…/epoch_manager.rs• L402-438 core/…/epoch_manager.rs• L446-532 chain/…/lib.rs• L484-526

Runtime parameter history

Runtime parameters describe the rules used while the runtime processes transactions and receipts. The history starts with one base set and applies registered diffs at protocol versions where the rules change. A lookup reconstructs the applicable state from the latest change point at or below the requested version.

Each diff records the value it expects to replace. This prevents an earlier edit from silently changing later protocol rules. Parameter changes must agree with the feature gates that select the matching behavior. Fee accounting also separates gas from compute where the protocol needs to meter execution work independently from token cost.

References: core/…/config_store.rs• L20-36 core/…/config_store.rs• L45-126 core/…/config_store.rs• L129-169 core/…/config_store.rs• L200-220 core/…/parameter_table.rs• L17-40 core/…/parameter_table.rs• L529-563 core/…/fees.rs• L574-621 core/…/parameters.yaml• L1-4 core/…/87.yaml• L1-24

Node configuration

Node configuration controls local operation. It covers syncing, shard tracking, storage retention, RPC limits, transaction pools, timing, resharding work, and archival services. These settings can change how a node serves requests or uses resources without changing the rules that validators must use.

The node reads its local JSON configuration, applies defaults, validates the resulting values, and assembles them into the runtime and client settings used by node services. Deprecated fields can still be recognized for migration warnings, while current fields take precedence. Mutable node values are shared with the services that use them so a live update does not leave a service with an old copy.

One node setting crosses into upgrade safety: ProtocolVersionCheckConfig chooses whether the node checks the next epoch or the next-next epoch for a protocol version above its binary capability. The default next-next check is stricter because it avoids persisting an epoch record that the node may not be able to recover. Operators can choose the next-epoch check when they accept the less strict boundary. See Node startup and lifecycle for how this local configuration enters node startup.

References: nearcore/…/config.rs• L223-265 nearcore/…/config.rs• L425-472 nearcore/…/config.rs• L558-606 nearcore/…/config.rs• L732-874 core/…/client_config.rs• L646-653 core/…/updatable_config.rs• L15-25 core/…/updatable_config.rs• L110-158

The following diagram shows how configuration sources join at an epoch boundary to produce the rules used by chain processing and execution.

flowchart LR
    G[Genesis configuration] --> E[Epoch rules]
    H[Protocol version for epoch] --> E
    P[Runtime parameter history] --> R[Runtime rules]
    H --> R
    E --> C[Protocol configuration for epoch]
    R --> C
    C --> V[Block processing and execution]
    N[Node configuration] --> V

Feature and upgrade rules

Feature activation

ProtocolFeature names behavior that must change as one network rule. Each feature has an activation protocol version. The feature is enabled when the active epoch version is at least that value. This monotonic rule keeps nodes on the same side of a feature boundary after activation.

Feature gates protect execution, fees, transactions, block or chunk data, shard behavior, node coordination, and new action capabilities. Some gates add a new form or behavior. Others reject an older form after a safety issue is found. The current rules cover universal accounts, external contract calls, global-contract behavior, gas-key and delegate safety, storage-proof limits, cost accounting, receipt and register input bounds, shard assignment and shuffling, bandwidth requests, contract compilation, trie accounting, receipt fee selection, block-header validity, and foreign-shard transaction handling. Action checks use exhaustive classification so a new action cannot silently bypass a feature rule. A build feature can include code or raise the binary ceiling, but consensus code still needs the protocol-version gate when behavior must match across nodes.

Feature failures are part of the protocol-facing error contract. The error type distinguishes a feature that is not active yet from one that has been removed, and it carries the protocol version that explains the decision. The serialized error uses the feature name rather than the internal feature type so clients can observe the rule without depending on implementation details. A feature can also disable an unsafe form after release, so compatibility checks must cover both newly enabled behavior and later rejection rules.

References: core/…/version.rs• L3-188 core/…/vm.rs• L223-225 core/…/config_store.rs• L420-431 core/…/Cargo.toml• L76-87 core/…/mod.rs• L430-529 core/…/transaction.rs• L480-520 core/…/errors.rs• L367-512 core/…/errors.rs• L650-675

Epoch version selection

The epoch manager selects future protocol versions from validator reports weighted by stake. A reported version becomes the next selected version only after it passes the chain's upgrade stake threshold. The selected version then drives epoch configuration, runtime configuration, and feature gates for the future epoch.

The process separates binary readiness from network activation. Operators first deploy a binary that supports the new version. Validator voting and an epoch transition then make that version active. See Protocol parameters and upgrades for the upgrade schedule and voting flow. See Epoch and validator management for the validator-side epoch process.

References: chain/…/lib.rs• L868-907 core/…/genesis_config.rs• L108-130 core/…/epoch_manager.rs• L372-384

Upgrade boundaries

A protocol change takes effect at a defined boundary rather than when one node reads a new local file. Parameter changes belong to a protocol version. Consensus behavior needs a feature gate and an active epoch version. Stored or network data needs a compatible representation.

The chain checks the selected future version against the binary ceiling at an epoch transition. The default check looks ahead to the next-next epoch because the chain can persist epoch information before the upgrade becomes active. A node can use the next-epoch check when an operator accepts the less strict safety boundary.

References: chain/…/chain_update.rs• L67-88 chain/…/chain.rs• L1887-1905 core/…/client_config.rs• L646-653 nearcore/…/config.rs• L434-439 nearcore/…/config.rs• L862-864

Compatibility boundaries

Supported protocol range

The current binary supports protocol versions from 85 through its build-specific maximum for normal processing. These limits protect consensus work from rules that the binary cannot reproduce.

Some archival read-only requests can refer to protocol versions older than the support floor. Such requests can clamp the version to the oldest fully supported rules because they do not create on-chain state. Callee boundaries assert that this normalization happened before processing. State-changing or consensus-sensitive paths must reject an unsupported version.

References: core/…/version.rs• L190-219 chain/…/mod.rs• L1804-1839

Universal account identity

Universal accounts use a 0u account ID encoded from a 32-byte hash. The encoder emits a fixed 54-character address with a lowercase Crockford base32 body. Its prefix, alphabet, length, and final padding rule are part of the account identity boundary.

The account ID is derived from the SHA3-256 hash of the exact raw state-init bytes. The typed state init is a decoded view for validation, installation, and pricing, but re-serializing it can produce a different identity when the input bytes are not canonical. A UniversalStateInit action must use the derived receiver ID and must be accepted only when the matching feature is active.

Account validation reports malformed state-init bytes, size and key-count violations, and a receiver ID that does not match the raw payload. These errors keep protocol incompatibility visible at the transaction boundary instead of turning it into a generic execution failure.

References: core/…/universal_account_id.rs• L1-7 core/…/universal_account_id.rs• L19-40 core/…/universal_account_id.rs• L42-63 core/…/universal_account_id.rs• L128-220 core/…/universal_state_init.rs• L34-53 core/…/universal_state_init.rs• L121-145 core/…/utils.rs• L482-506 core/…/mod.rs• L220-247 core/…/mod.rs• L471-529 core/…/errors.rs• L434-512 core/…/views.rs• L77-109

Versioned protocol records

Protocol records that cross an epoch, storage, archive, or node boundary keep old forms beside newer forms. The record version tells readers which fields and meanings apply. A new field or meaning must not silently change the interpretation of bytes already written by an older node.

Receipt records preserve the established plain receipt form while stored receipts use a tagged versioned form with congestion metadata. Action receipts and global-contract distribution receipts can add fields through explicit variants. Chunk application statistics keep their old archive form readable while new records can include new balance information.

Transactions preserve the established signed encoding for V0 and add a tagged V1 form for newer nonce rules. TransactionEnvelope keeps signed transactions directly readable while using a separate escape form for unsigned external contract calls. State witnesses and chunk headers also use explicit versions. Spice has a boundary witness for the last pre-Spice block and a new witness form for Spice execution, while chunk headers reject inner forms that do not match the active protocol feature.

ShardId remains a distinct type from a shard index because shard identifiers can be non-sequential. Its serialized form remains the same as the prior integer representation, so the type transition does not by itself create a protocol upgrade. This preserves the meaning of shard identifiers while callers use shard-layout data to map them to array positions.

Protocol errors and peer identities follow the same rule. Their explicit serialized forms are shared with clients and nodes, so enum discriminants and public fields are compatibility boundaries. New error meaning must be added without changing the meaning of existing values, and a peer identity must continue to represent the same public-key identity across node upgrades.

References: core/…/types.rs• L66-94 core/…/types.rs• L232-245 core/…/transaction.rs• L121-154 core/…/transaction.rs• L265-315 core/…/transaction.rs• L584-711 core/…/receipt.rs• L70-114 core/…/receipt.rs• L141-237 core/…/receipt.rs• L450-473 core/…/receipt.rs• L759-777 core/…/chunk_apply_stats.rs• L14-68 core/…/chunk_apply_stats.rs• L225-254 core/…/sharding.rs• L393-400 core/…/sharding.rs• L615-641 core/…/state_witness.rs• L92-106 core/…/state_witness.rs• L14-33 core/…/state_witness.rs• L69-95 core/…/validator_assignment.rs• L18-24 core/…/validator_assignment.rs• L54-113 core/…/errors.rs• L15-35 core/…/errors.rs• L206-317 core/…/network.rs• L8-33

Stored and network data

Protocol data has a second compatibility boundary beyond behavior. Data stored on disk or sent between nodes must keep a stable meaning during a rolling upgrade. If its shape or meaning changes, the change needs an explicit versioned form or a migration instead of an in-place byte change.

State dumps and fork-network transfers use StateRecord as a common state item. It represents accounts, contract data, code, keys, gas-key nonces, received data, and pending receipts. Raw trie records map to the same logical record that JSON and Borsh consumers can round-trip. Receipt parsing also keeps delayed and postponed records distinct from ordinary state records.

Chunk headers and state witnesses carry protocol-sensitive data across the network. Header fields for dynamic resharding and Spice are not interchangeable with older fields. Witnesses carry the state and receipt evidence needed to reproduce a chunk transition, and their size and compression limits bound peer-supplied data. These boundaries connect directly to Chain data processing and Peer-to-peer networking.

Erasure-coded network payloads have the same boundary. Reed-Solomon encoding splits serialized data into data and parity parts, while one-part payloads retain their direct serialization form because that form is already part of the networking protocol. Decoding bounds peer-supplied encoded length before reconstruction and completes only after enough distinct parts arrive.

The protocol schema check makes this boundary visible by comparing registered protocol types with the accepted schema. A schema change is a design signal: decide whether the data needs a migration, a new wire or storage version, or coordinated protocol activation before accepting the new schema.

References: core/…/state.rs• L9-77 core/…/state.rs• L140-187 core/…/state_record.rs• L21-69 core/…/state_record.rs• L95-166 core/…/state_record.rs• L234-259 core/…/sharding.rs• L235-390 core/…/state_witness.rs• L18-46 core/…/state_witness.rs• L92-167 core/…/state_witness.rs• L32-67 core/…/chunk_apply_stats.rs• L14-68 core/…/chunk_apply_stats.rs• L225-254 core/…/receipt.rs• L88-125 core/…/reed_solomon.rs• L10-15 core/…/reed_solomon.rs• L46-74 core/…/reed_solomon.rs• L90-165 core/…/reed_solomon.rs• L191-270 core/…/lib.rs• L9-30 core/…/lib.rs• L49-81 tools/…/main.rs• L107-155 docs/…/Upgradability.md• L35-56

Stable view types

Stable view types are the read boundary between internal protocol data and clients. They preserve the public shape while mapping newer internal state into compatible fields. This lets node and account changes roll out without forcing every client to understand each internal type change.

Account views distinguish initialized and uninitialized universal accounts and expose the bootstrap nonce needed by an uninitialized account. Access-key views expose gas-key details and use a handle form for post-quantum keys whose full public key is not stored on-chain. Action views map protocol action variants into stable client values.

Chunk header views preserve old and new header fields, including congestion information, bandwidth requests, and shard-split states. Status views expose both the active protocol version and the latest version supported by the binary. These fields describe protocol compatibility to clients. New fields can extend a view, but renaming or removing fields breaks consumers.

Runtime configuration views follow the same rule. Their JSON shape is guarded as a stable RPC contract and includes the cost and host-feature data needed to describe execution at a protocol version.

References: core/…/views.rs• L1-5 core/…/views.rs• L77-109 core/…/views.rs• L151-183 core/…/views.rs• L309-340 core/…/views.rs• L861-895 core/…/views.rs• L1120-1203 core/…/views.rs• L1520-1568 core/…/views.rs• L3121-3180 core/…/views.rs• L3222-3233 core/…/congestion_info.rs• L323-347 core/…/near_primitives__views__tests__runtime_config_view.snap• L1-305

Historical configuration interface

The protocol configuration view is the external boundary for asking which rules applied to a block. The view client resolves the block reference to an epoch, combines that epoch's protocol and runtime settings, and returns a serializable ProtocolConfigView.

The EXPERIMENTAL_protocol_config RPC exposes this view to clients. Consumers that inspect historical blocks should use the configuration tied to the block rather than assume that the node's latest runtime settings describe the past.

References: chain/…/view_client_actor.rs• L1862-1881 chain/…/mod.rs• L1598-1631 chain/…/lib.rs• L1370-1380 core/…/view.rs• L8-34 core/…/view.rs• L156-224 core/…/views.rs• L860-871 core/…/views.rs• L3222-3233 core/…/near_primitives__views__tests__runtime_config_view.snap• L1-305

Change checklist

When these files or sections are changed, remember to consider these:

  • A new protocol version must have matching feature activation, runtime parameter history, epoch rules, and a binary version ceiling.
  • A new runtime parameter must exist in the typed parameter list, base or diff data, runtime configuration assembly, and stable view when clients need to see it.
  • A change to congestion thresholds, receipt cost calculations, or chunk congestion data must keep runtime rules, stored metadata, chunk records, and client views aligned.
  • A feature that changes action or transaction validity must update the type, feature gate, cost path, error path, and external view as one contract.
  • A new action variant must be classified by exhaustive feature, deposit, gas, state-init, and nested-action accounting.
  • A new transaction or envelope form must preserve old signed bytes and keep its discriminator separate from existing transaction versions.
  • A change to a receipt, chunk header, or state-witness record must preserve old readers and keep new fields behind the correct storage, network, or protocol boundary.
  • A change to VmGeneration or ShardId must preserve the boundary between VM invalidation, shard layout, and serialized protocol data.
  • A change to state-record variants or raw trie parsing must preserve JSON and Borsh round trips for state dumps, fork-network transfers, and uninitialized accounts.
  • A change to validator endorsement rules must preserve assignment order, stake thresholds, and the rule that unendorsed signatures are not treated as valid endorsement data.
  • A change to serialized protocol errors must preserve enum discriminants, client-visible error meaning, and the distinction between inactive and removed features.
  • A change to peer identity serialization must preserve its public-key identity across network messages and node views.
  • A stored or wire type change must be paired with a migration or explicit versioned representation before the schema baseline changes.
  • A change to the protocol version safety check must account for next-versus-next-next epoch timing and node recovery behavior.
  • A historical configuration, account, access-key, chunk, or status field added to a stable view must remain aligned with the protocol bundle and its RPC response.
  • A new local configuration field must preserve defaulting, semantic validation, deprecated-field handling, and the settings passed into ClientConfig and node services.

Important failure modes

TriggerConsequenceGuard
The chain selects a protocol version above the binary ceilingThe node stops at the epoch check instead of processing an unknown rule setFuture-version check against PROTOCOL_VERSION
A feature uses the binary maximum instead of the active epoch versionNodes can apply new behavior before the network activates itMonotonic ProtocolFeature::enabled checks
A runtime diff does not match the value it expects to replaceRuntime configuration assembly fails instead of creating a silent history forkOld-value validation while applying parameter diffs
A protocol version has no valid epoch or runtime configurationBlock processing or historical replay cannot obtain the rules for that versionVersioned stores with inherited lookup and chain-specific loading
A V1 transaction, strict nonce, post-quantum signature, or external contract call arrives before its featureThe transaction is admitted under rules that cannot reproduce its meaningProtocol-version checks in transaction admission
A fee or receipt-congestion calculation omits a new direct or nested actionNodes can disagree about gas, compute, receipt limits, or token costShared exhaustive action accounting from RuntimeConfig
A chunk header inner form does not match the active protocol featureA node accepts fields from an inactive shard or execution rule setShardChunkHeader::validate_version
A receipt, chunk header, or state-witness record changes without a new versionHistorical state or network peers cannot read it with its old meaningPreserve old variants and add an explicit version or migration
A ShardId transition changes its serialized integer formStored or network shard references no longer identify the same shardPreserve Borsh compatibility with the prior integer form
A state record does not map a trie key to its logical recordState dumps or fork-network transfers lose or misread account, key, or receipt dataCentral raw-key conversion and JSON/Borsh round-trip checks
Endorsement stake is compared with the wrong thresholdA chunk can be accepted or rejected with a different validator setStrict more-than-two-thirds and more-than-one-third stake checks
A universal account ID is derived from re-serialized state instead of exact input bytesThe payload can target a different account from the one the sender intendedHash the raw state-init bytes and validate the receiver ID
A historical request uses the node's current configurationA client can interpret old blocks with rules from the wrong protocol eraBlock-reference lookup through EXPERIMENTAL_protocol_config
A stable view field is renamed or loses old optional behaviorExisting RPC clients fail to decode or misread protocol stateAdd compatible fields and preserve the stable view shape
A serialized protocol error changes an existing discriminant or merges inactive and removed feature errorsClients or nodes misread the reason for a rejected protocol operationPreserve explicit discriminants and keep feature state in the error contract
Peer identity encoding changes while the underlying public key does notNetwork messages no longer match the known node identityKeep PeerId as the protocol representation of the public key
A local configuration field is missing or invalidThe node uses an unintended default or fails during startupJSON deserialization, defaults, semantic validation, and migration warnings

Key files

FileWhy to read it
core/…/version.rsDefines protocol versions, feature activation, and support boundaries
core/…/types.rsDefines shared protocol types for VM generations, protocol versions, and shard identities
core/…/config.rsDefines shared view-call limits and flat-state representation thresholds
core/…/genesis_config.rsDefines chain-start values and the combined protocol configuration view
core/…/epoch_manager.rsDefines versioned epoch rules, shard-layout policy, and epoch configuration sources
core/…/config_store.rsShows versioned runtime parameter history and lookup rules
core/…/config.rsGroups runtime fees, execution, congestion, witness, and bandwidth settings
core/…/parameter_table.rsShows how parameter data becomes typed runtime configuration
core/…/mod.rsDefines action variants and the exhaustive protocol checks that classify them
core/…/transaction.rsDefines transaction versions, envelopes, admission gates, and execution records
core/…/sharding.rsDefines versioned chunk headers and protocol-specific shard data
core/…/state_witness.rsDefines the state-witness boundary for ordinary stateless validation
core/…/state_witness.rsDefines the pre-Spice boundary and Spice witness form
core/…/fees.rsDefines protocol cost accounting for actions, receipts, signatures, and congestion
core/…/receipt.rsDefines receipt forms and stored-receipt compatibility boundaries
core/…/chunk_apply_stats.rsDefines versioned chunk-application records used by archive storage
core/…/state_record.rsDefines the common state representation for trie records and state transfer
core/…/validator_assignment.rsDefines stake-weighted chunk endorsement decisions
core/…/views.rsDefines stable client views for accounts, actions, chunks, and protocol data
core/…/errors.rsDefines serialized validation and execution errors that expose protocol rule failures
core/…/network.rsDefines the serialized peer identity used at node boundaries
core/…/test_utils.rsBuilds version-pinned transactions, chunk headers, and blocks for boundary checks
nearcore/…/config.rsLoads and validates node-local settings, applies defaults, and assembles protocol safety checks
chain/…/lib.rsSelects future protocol versions from stake-weighted validator reports
chain/…/chain_update.rsEnforces the node's future protocol compatibility boundary
chain/…/mod.rsResolves epoch versions into runtime and historical configuration
chain/…/view_client_actor.rsServes protocol configuration for a requested block reference
chain/…/lib.rsExposes the historical protocol configuration RPC
tools/…/main.rsChecks compatibility of registered stored and network protocol types
docs/protocol-parameters-and-upgrades.mdExplains parameter evolution, upgrade voting, and schema safety in more detail
docs/node-startup-and-lifecycle.mdExplains how node-local configuration enters startup and runtime operation
docs/epoch-and-validator-management.mdExplains validator selection and epoch transitions that activate protocol versions
docs/runtime-execution.mdExplains how selected protocol and runtime rules affect execution
docs/chain-data-processing.mdExplains how versioned rules are used while processing chain data
docs/peer-to-peer-networking.mdExplains how versioned protocol data crosses node boundaries