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

     1  # NeoGo Oracle service
     2  
     3  NeoGo node can act as an oracle service node for https and neofs protocols. It
     4  has to have a wallet with a key belonging to one of the network's designated oracle
     5  nodes (stored in `RoleManagement` native contract).
     6  
     7  It needs [RPC service](rpc.md) to be enabled and configured properly because
     8  RPC is used by oracle nodes to exchange signatures of the resulting
     9  transaction.
    10  
    11  ## Configuration
    12  
    13  To enable oracle service, add `Oracle` subsection to `ApplicationConfiguration`
    14  section of your node config.
    15  
    16  Parameters:
    17   * `Enabled`: boolean value, enables/disables the service, `true` for service
    18     to be enabled
    19   * `AllowPrivateHost`: boolean value, enables/disables private IPs (like
    20     127.0.0.1 or 192.168.0.1) for https requests, it defaults to false and it's
    21     false on public networks, but you can enable it for private ones.
    22   * `AllowedContentTypes`: a list of allowed MIME types. Only `application/json`
    23     is allowed by default. Can be left empty to allow everything.
    24   * `Nodes`: a list of oracle node RPC endpoints, it's used for oracle node
    25     communication. All oracle nodes should be specified there.
    26   * `NeoFS`: a subsection of its own for NeoFS configuration with two
    27     parameters:
    28       - `Timeout`: request timeout, like "5s"
    29       - `Nodes`: a list of NeoFS nodes (their gRPC interfaces) to get data from,
    30         one node is enough to operate, but they're used in round-robin fashion,
    31         so you can spread the load by specifying multiple nodes
    32   * `MaxTaskTimeout`: maximum time a request can be active (retried to
    33     process), defaults to 1 hour if not specified.
    34   * `RefreshInterval`: retry period for requests that aren't yet processed,
    35     defaults to 3 minutes.
    36   * `MaxConcurrentRequests`: maximum number of requests processed in parallel,
    37     defaults to 10.
    38   * `RequestTimeout`: https request timeout, default is 5 seconds.
    39   * `ResponseTimeout`: RPC communication timeout for inter-oracle exchange,
    40     default is 4 seconds.
    41   * `UnlockWallet`: oracle wallet configuration:
    42       - `Path`: path to NEP-6 wallet.
    43       - `Password`: password for the account to be used by oracle node.
    44  
    45  ### Example
    46  
    47  ```
    48    Oracle:
    49      Enabled: true
    50      AllowPrivateHost: false
    51      MaxTaskTimeout: 432000000s
    52      Nodes:
    53        - http://oracle1.example.com:20332
    54        - http://oracle2.example.com:20332
    55        - http://oracle3.example.com:20332
    56        - http://oracle4.example.com:20332
    57      NeoFS:
    58        Nodes:
    59          - st1.storage.fs.neo.org:8080
    60          - st2.storage.fs.neo.org:8080
    61          - st3.storage.fs.neo.org:8080
    62          - st4.storage.fs.neo.org:8080
    63      UnlockWallet:
    64        Path: "/path/to/oracle-wallet.json"
    65        Password: "dontworryaboutthevase"
    66  ```
    67  
    68  ## Operation
    69  
    70  To run oracle service on your network, you need to:
    71   * set oracle node keys in `RoleManagement` contract
    72   * configure and run an appropriate number of oracle nodes with keys specified in
    73     `RoleManagement` contract