1. Introduction
  2. Protocol Specification
  3. 1. Data Structures
    1. 1.1. Access Keys
    2. 1.2. Accounts
    3. 1.3. Block and Block Header
    4. 1.4. Data Types
    5. 1.5. Merkle Proofs
    6. 1.6. Transaction
  4. 2. Chain Specification
    1. 2.1. Block Processing
    2. 2.2. Consensus
    3. 2.3. Light Client
    4. 2.4. Selecting Chunk and Block Producers
    5. 2.5. Transactions in the Blockchain Layer
    6. 2.6. Upgradability
    7. 2.7. Epochs and Staking
      1. 2.7.1. Epoch
      2. 2.7.2. EpochManager
      3. 2.7.3. Staking and slashing
  5. 3. Network Specification
    1. 3.1. Messages
    2. 3.2. Routing Table Exchange Algorithm
  6. 4. Runtime Specification
    1. 4.1. Account Receipt Storage
    2. 4.2. Actions
    3. 4.3. Applying chunk
    4. 4.4. Components
      1. 4.4.1. Runtime Crate
      2. 4.4.2. Bindings Specification
        1. 4.4.2.1. Context API
        2. 4.4.2.2. Economics API
        3. 4.4.2.3. Math API
        4. 4.4.2.4. Miscellaneous API
        5. 4.4.2.5. Promises API
        6. 4.4.2.6. Registers API
        7. 4.4.2.7. Trie API
    5. 4.5. Fees
    6. 4.6. Function Call
    7. 4.7. Contract Preparation
    8. 4.8. Receipts
    9. 4.9. Refunds
    10. 4.10. Runtime
    11. 4.11. Transactions
    12. 4.12. Scenarios
      1. 4.12.1. Cross-ContractCall
      2. 4.12.2. Financial Transaction
  7. 5. Economics
  8. 6. GenesisConfig
    1. 6.1. ExtCostsConfig
    2. 6.2. VMConfig
    3. 6.3. StateRecord
    4. 6.4. RuntimeConfig
    5. 6.5. RuntimeFeeConfig
      1. 6.5.1. AccessKeyCreationConfig
      2. 6.5.2. ActionCreationConfig
      3. 6.5.3. DataReceiptCreationConfig
      4. 6.5.4. Fee
      5. 6.5.5. Fraction
      6. 6.5.6. StorageUsageConfig
  9. Architecture
  10. 7. Overview
  11. 8. How neard works
    1. 8.1. How Sync Works
    2. 8.2. Garbage Collection
    3. 8.3. How Epoch Works
    4. 8.4. Transaction Routing
    5. 8.5. Transactions And Receipts
    6. 8.6. Cross shard transactions - deep dive
    7. 8.7. Gas
    8. 8.8. Receipt Congestion
    9. 8.9. Meta transactions
    10. 8.10. Serialization: Borsh, Json, ProtoBuf
    11. 8.11. Proofs
    12. 8.12. Resharding V2
    13. 8.13. Optimistic block
  12. 9. How neard will work
    1. 9.1. Catchup and state sync improvements
    2. 9.2. Malicious producers and phase 2
  13. 10. Storage
    1. 10.1. Storage Request Flow
    2. 10.2. Trie Storage
    3. 10.3. Database Format
    4. 10.4. Flat Storage
  14. 11. Network
  15. 12. Gas Cost Parameters
    1. 12.1. Parameter Definitions
    2. 12.2. Gas Profile
    3. 12.3. Runtime Parameter Estimator
  16. Practices
  17. 13. Overview
  18. 14. Rust 🦀
  19. 15. Workflows
    1. 15.1. Run a Node
    2. 15.2. Deploy a Contract
    3. 15.3. Run Gas Estimations
    4. 15.4. Localnet on many machines
    5. 15.5. IO tracing
    6. 15.6. Profiling
    7. 15.7. Benchmarks
      1. 15.7.1. Synthetic Workloads
      2. 15.7.2. Native Transfer Chunk Application
    8. 15.8. Working with OpenTelemetry Traces
    9. 15.9. Futex contention
  20. 16. Code Style
  21. 17. Documentation
  22. 18. Tracking Issues
  23. 19. Security Vulnerabilities
  24. 20. Fast Builds
  25. 21. Testing
    1. 21.1. Python Tests
    2. 21.2. Testing Utils
    3. 21.3. Test Coverage
  26. 22. Protocol Upgrade
  27. Advanced configuration
  28. 23. Networking
  29. Custom test networks
  30. 24. Starting a network from mainnet state
  31. Misc
  32. 25. Overview
  33. 26. State Sync Dump
  34. 27. Archival node - recovery of missing data

Guide to Nearcore Development

Overview

This chapter covers the NEAR Protocol runtime specification.

Runtime Specification

  • Account Receipt Storage
  • Actions
  • Applying chunk
  • Components
    • Runtime Crate
    • Bindings Specification
      • Context API
      • Economics API
      • Math API
      • Miscellaneous API
      • Promises API
      • Registers API
      • Trie API
  • Fees
  • Function Call
  • Contract Preparation
  • Receipts
  • Refunds
  • Runtime
  • Transactions
  • Scenarios
    • Cross-ContractCall
    • Financial Transaction