github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/docs/stateroots.md (about)

     1  # NeoGo state validation
     2  
     3  NeoGo supports state validation using N3 stateroots and can also act as state
     4  validator (run state validation service).
     5  
     6  All NeoGo nodes always calculate MPT root hash for data stored by contracts.
     7  Unlike in Neo Legacy, this behavior can't be turned off. They also process
     8  stateroot messages broadcasted through the network and save validated
     9  signatures from them if the state root hash specified there matches the one signed
    10  by validators (or shouts loud in the log if it doesn't because it should be
    11  the same).
    12  
    13  ## State validation service
    14  
    15  The service is configured as `StateRoot` subsection of
    16  `ApplicationConfiguration` section in your node config.
    17  
    18  Parameters:
    19   * `Enabled`: boolean value, enables/disables the service, `true` for service
    20     to be enabled
    21   * `UnlockWallet`: service's wallet configuration:
    22       - `Path`: path to NEP-6 wallet.
    23       - `Password`: password for the account to be used by state validation
    24         node.
    25  
    26  ### Example
    27  
    28  ```
    29    StateRoot:
    30      Enabled: true
    31      UnlockWallet:
    32        Path: "/path/to/stateroot.wallet.json"
    33        Password: "knowyouare"
    34  ```
    35  
    36  ### Operation
    37  
    38  To run state validation service on your network you need to:
    39   * set state validation node keys in `RoleManagement` contract
    40   * configure and run an appropriate number of state validation nodes with the keys
    41     specified in `RoleManagement` contract
    42  
    43  
    44  ## StateRootInHeader option
    45  
    46  NeoGo also supports protocol extension to include state root hashes right into
    47  header blocks. It's not compatible with regular Neo N3 state validation
    48  service and it's not compatible with public Neo N3 networks, but you can use
    49  it on private networks if needed.
    50  
    51  The option is `StateRootInHeader` and it's specified in
    52  `ProtocolConfiguration` section, set it to true and run your network with it
    53  (whole network needs to be configured this way then).