forked from TrueCloudLab/neoneo-go
config: move P2P options to a separate config section
And convert time-related settings to a Duration format along the way.
This commit is contained in:
parent
9cf6cc61f4
commit
54c2aa8582
19 changed files with 340 additions and 192 deletions
27
ROADMAP.md
27
ROADMAP.md
|
@ -113,10 +113,25 @@ array of "address:port:announcedPort" tuples in the `ApplicationConfiguration`'s
|
|||
`Addresses` node config section. Deprecated `Address` and `Port` sections of
|
||||
`RPC`, `Prometheus`, `Pprof` subsections of the `ApplicationConfiguration`
|
||||
as far as the one of RPC server's `TLSConfig` are still available, but will be
|
||||
removed, so please convert your node configuration file to use new `Addresses`
|
||||
section for the node services. Deprecated `Address`, `NodePort` and `AnnouncedPort`
|
||||
sections of `ApplicationConfiguration` will also be removed eventually, so please
|
||||
update your node configuration file to use `Addresses` section for the P2P
|
||||
addresses configuration.
|
||||
removed, so please convert your node configuration file to use new `P2P`-level
|
||||
`Addresses` section for the node services. Deprecated `Address`, `NodePort` and
|
||||
`AnnouncedPort` sections of `ApplicationConfiguration` will also be removed
|
||||
eventually, so please update your node configuration file to use `Addresses`
|
||||
section for the P2P addresses configuration.
|
||||
|
||||
Removal of these config sections is scheduled for May-June 2023 (~0.103.0 release).
|
||||
Removal of these config sections is scheduled for May-June 2023 (~0.103.0 release).
|
||||
|
||||
## P2P application settings configuration
|
||||
|
||||
Version 0.100.0 of NeoGo marks the following P2P application settings as
|
||||
deprecated: `AttemptConnPeers`, `BroadcastFactor`, `DialTimeout`,
|
||||
`ExtensiblePoolSize`, `MaxPeers`, `MinPeers`, `PingInterval`, `PingTimeout`,
|
||||
`ProtoTickInterval`. These settings are moved to a separate `P2P` section of
|
||||
`ApplicationConfiguration`. The `DialTimeout`, `PingInterval`, `PingTimeout`,
|
||||
`ProtoTickInterval` settings are converted to more precise `Duration` format
|
||||
(allowing for subsecond time). Please, update your node configuration (all you
|
||||
need is to move specified settings under the `P2P` section and convert
|
||||
time-related settings to `Duration` format).
|
||||
|
||||
Removal of deprecated P2P related application settings is scheduled for May-June
|
||||
2023 (~0.103.0 release).
|
|
@ -47,16 +47,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "./chains/mainnet.neofs"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/mainnet.bolt"
|
||||
Addresses:
|
||||
- ":40333" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":40333" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 5
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 5
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -59,16 +59,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "./chains/mainnet"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/mainnet.bolt"
|
||||
Addresses:
|
||||
- ":10333" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":10333" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 10
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 10
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -38,17 +38,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "/chains/four"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
Addresses:
|
||||
- ":20336" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20336" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -38,16 +38,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "/chains/one"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -32,16 +32,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "/chains/single"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 0
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 0
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -38,16 +38,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "/chains/three"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
Addresses:
|
||||
- ":20335" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20335" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -38,16 +38,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "/chains/two"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
Addresses:
|
||||
- ":20334" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20334" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -38,16 +38,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "./chains/privnet"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
Addresses:
|
||||
- ":20332" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20332" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 3
|
||||
P2PNotary:
|
||||
Enabled: false
|
||||
UnlockWallet:
|
||||
|
|
|
@ -47,16 +47,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "./chains/testnet.neofs"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/testnet.bolt"
|
||||
Addresses:
|
||||
- ":50333" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":50333" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 5
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 5
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -62,16 +62,17 @@ ApplicationConfiguration:
|
|||
DataDirectoryPath: "./chains/testnet"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/testnet.bolt"
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 10
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 100
|
||||
AttemptConnPeers: 20
|
||||
MinPeers: 10
|
||||
Oracle:
|
||||
Enabled: false
|
||||
AllowedContentTypes:
|
||||
|
|
|
@ -33,16 +33,17 @@ ApplicationConfiguration:
|
|||
# DataDirectoryPath: "./chains/unit_testnet"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/unit_testnet.bolt"
|
||||
Addresses:
|
||||
- ":0" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":0" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MinPeers: 0
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MinPeers: 0
|
||||
MaxPeers: 10
|
||||
AttemptConnPeers: 5
|
||||
UnlockWallet:
|
||||
Path: "../testdata/wallet1_solo.json"
|
||||
Password: "one"
|
||||
|
|
|
@ -42,16 +42,17 @@ ApplicationConfiguration:
|
|||
# DataDirectoryPath: "./chains/unit_testnet"
|
||||
# BoltDBOptions:
|
||||
# FilePath: "./chains/unit_testnet.bolt"
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
P2P:
|
||||
Addresses:
|
||||
- ":20333" # in form of "[host]:[port][:announcedPort]"
|
||||
DialTimeout: 3s
|
||||
ProtoTickInterval: 2s
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
MaxPeers: 50
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 0
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
ProtoTickInterval: 2
|
||||
PingInterval: 30
|
||||
PingTimeout: 90
|
||||
MaxPeers: 50
|
||||
AttemptConnPeers: 5
|
||||
MinPeers: 0
|
||||
P2PNotary:
|
||||
Enabled: false
|
||||
UnlockWallet:
|
||||
|
|
|
@ -18,29 +18,75 @@ node-related settings described in the table below.
|
|||
| --- | --- | --- | --- |
|
||||
| Address | `string` | `0.0.0.0` | Node address that P2P protocol handler binds to. Warning: this field is deprecated, please, use `Addresses` instead. |
|
||||
| AnnouncedPort | `uint16` | Same as `NodePort` | Node port which should be used to announce node's port on P2P layer, it can differ from the `NodePort` the node is bound to (for example, if your node is behind NAT). Warning: this field is deprecated, please, use `Addresses` instead. |
|
||||
| Addresses | `[]string` | `["0.0.0.0:0"]`, which is any free port on all available addresses | List of the node addresses that P2P protocol handler binds to. Each address has the form of `[address]:[nodePort][:announcedPort]` where `address` is the address itself, `nodePort` is the actual P2P port node listens at; `announcedPort` is the node port which should be used to announce node's port on P2P layer, it can differ from the `nodePort` the node is bound to if specified (for example, if your node is behind NAT).|
|
||||
| AttemptConnPeers | `int` | `20` | Number of connection to try to establish when the connection count drops below the `MinPeers` value.|
|
||||
| BroadcastFactor | `int` | `0` | Multiplier that is used to determine the number of optimal gossip fan-out peer number for broadcasted messages (0-100). By default it's zero, node uses the most optimized value depending on the estimated network size (`2.5×log(size)`), so the node may have 20 peers and calculate that it needs to broadcast messages to just 10 of them. With BroadcastFactor set to 100 it will always send messages to all peers, any value in-between 0 and 100 is used for weighted calculation, for example if it's 30 then 13 neighbors will be used in the previous case. |
|
||||
| AttemptConnPeers | `int` | `20` | Number of connection to try to establish when the connection count drops below the `MinPeers` value. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| BroadcastFactor | `int` | `0` | Multiplier that is used to determine the number of optimal gossip fan-out peer number for broadcasted messages (0-100). By default it's zero, node uses the most optimized value depending on the estimated network size (`2.5×log(size)`), so the node may have 20 peers and calculate that it needs to broadcast messages to just 10 of them. With BroadcastFactor set to 100 it will always send messages to all peers, any value in-between 0 and 100 is used for weighted calculation, for example if it's 30 then 13 neighbors will be used in the previous case. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| DBConfiguration | [DB Configuration](#DB-Configuration) | | Describes configuration for database. See the [DB Configuration](#DB-Configuration) section for details. |
|
||||
| DialTimeout | `int64` | `0` | Maximum duration a single dial may take in seconds. |
|
||||
| ExtensiblePoolSize | `int` | `20` | Maximum amount of the extensible payloads from a single sender stored in a local pool. |
|
||||
| DialTimeout | `int64` | `0` | Maximum duration a single dial may take in seconds. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| ExtensiblePoolSize | `int` | `20` | Maximum amount of the extensible payloads from a single sender stored in a local pool. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| LogLevel | `string` | "info" | Minimal logged messages level (can be "debug", "info", "warn", "error", "dpanic", "panic" or "fatal"). |
|
||||
| LogPath | `string` | "", so only console logging | File path where to store node logs. |
|
||||
| MaxPeers | `int` | `100` | Maximum numbers of peers that can be connected to the server. |
|
||||
| MinPeers | `int` | `5` | Minimum number of peers for normal operation; when the node has less than this number of peers it tries to connect with some new ones. |
|
||||
| MaxPeers | `int` | `100` | Maximum numbers of peers that can be connected to the server. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| MinPeers | `int` | `5` | Minimum number of peers for normal operation; when the node has less than this number of peers it tries to connect with some new ones. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| NodePort | `uint16` | `0`, which is any free port | The actual node port it is bound to. Warning: this field is deprecated, please, use `Addresses` instead. |
|
||||
| Oracle | [Oracle Configuration](#Oracle-Configuration) | | Oracle module configuration. See the [Oracle Configuration](#Oracle-Configuration) section for details. |
|
||||
| P2P | [P2P Configuration](#P2P-Configuration) | | Configuration values for P2P network interaction. See the [P2P Configuration](#P2P-Configuration) section for details. |
|
||||
| P2PNotary | [P2P Notary Configuration](#P2P-Notary-Configuration) | | P2P Notary module configuration. See the [P2P Notary Configuration](#P2P-Notary-Configuration) section for details. |
|
||||
| PingInterval | `int64` | `30` | Interval in seconds used in pinging mechanism for syncing blocks. |
|
||||
| PingTimeout | `int64` | `90` | Time to wait for pong (response for sent ping request). |
|
||||
| PingInterval | `int64` | `30` | Interval in seconds used in pinging mechanism for syncing blocks. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| PingTimeout | `int64` | `90` | Time to wait for pong (response for sent ping request). Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| Pprof | [Metrics Services Configuration](#Metrics-Services-Configuration) | | Configuration for pprof service (profiling statistics gathering). See the [Metrics Services Configuration](#Metrics-Services-Configuration) section for details. |
|
||||
| Prometheus | [Metrics Services Configuration](#Metrics-Services-Configuration) | | Configuration for Prometheus (monitoring system). See the [Metrics Services Configuration](#Metrics-Services-Configuration) section for details |
|
||||
| ProtoTickInterval | `int64` | `5` | Duration in seconds between protocol ticks with each connected peer. |
|
||||
| ProtoTickInterval | `int64` | `5` | Duration in seconds between protocol ticks with each connected peer. Warning: this field is deprecated and moved to `P2P` section. |
|
||||
| Relay | `bool` | `true` | Determines whether the server is forwarding its inventory. |
|
||||
| RPC | [RPC Configuration](#RPC-Configuration) | | Describes [RPC subsystem](rpc.md) configuration. See the [RPC Configuration](#RPC-Configuration) for details. |
|
||||
| StateRoot | [State Root Configuration](#State-Root-Configuration) | | State root module configuration. See the [State Root Configuration](#State-Root-Configuration) section for details. |
|
||||
| UnlockWallet | [Unlock Wallet Configuration](#Unlock-Wallet-Configuration) | | Node wallet configuration used for consensus (dBFT) operation. See the [Unlock Wallet Configuration](#Unlock-Wallet-Configuration) section for details. |
|
||||
|
||||
### P2P Configuration
|
||||
|
||||
`P2P` section contains configuration for peer-to-peer node communications and has
|
||||
the following format:
|
||||
```
|
||||
P2P:
|
||||
Addresses:
|
||||
- "0.0.0.0:0" # any free port on all available addresses (in form of "[host]:[port][:announcedPort]")
|
||||
AttemptConnPeers: 20
|
||||
BroadcastFactor: 0
|
||||
DialTimeout: 0s
|
||||
MaxPeers: 100
|
||||
MinPeers: 5
|
||||
PingInterval: 30s
|
||||
PingTimeout: 90s
|
||||
ProtoTickInterval: 5s
|
||||
ExtensiblePoolSize: 20
|
||||
```
|
||||
where:
|
||||
- `Addresses` (`[]string`) is the list of the node addresses that P2P protocol
|
||||
handler binds to. Each address has the form of `[address]:[nodePort][:announcedPort]`
|
||||
where `address` is the address itself, `nodePort` is the actual P2P port node listens at;
|
||||
`announcedPort` is the node port which should be used to announce node's port on P2P layer,
|
||||
it can differ from the `nodePort` the node is bound to if specified (for example, if your
|
||||
node is behind NAT).
|
||||
- `AttemptConnPeers` (`int`) is the number of connection to try to establish when the
|
||||
connection count drops below the `MinPeers` value.
|
||||
- `BroadcastFactor` (`int`) is the multiplier that is used to determine the number of
|
||||
optimal gossip fan-out peer number for broadcasted messages (0-100). By default, it's
|
||||
zero, node uses the most optimized value depending on the estimated network size
|
||||
(`2.5×log(size)`), so the node may have 20 peers and calculate that it needs to broadcast
|
||||
messages to just 10 of them. With BroadcastFactor set to 100 it will always send messages
|
||||
to all peers, any value in-between 0 and 100 is used for weighted calculation, for example
|
||||
if it's 30 then 13 neighbors will be used in the previous case.
|
||||
- `DialTimeout` (`Duration`) is the maximum duration a single dial may take.
|
||||
- `ExtensiblePoolSize` (`int`) is the maximum amount of the extensible payloads from a single
|
||||
sender stored in a local pool.
|
||||
- `MaxPeers` (`int`) is the maximum numbers of peers that can be connected to the server.
|
||||
- `MinPeers` (`int`) is the minimum number of peers for normal operation; when the node has
|
||||
less than this number of peers it tries to connect with some new ones.
|
||||
- `PingInterval` (`Duration`) is the interval used in pinging mechanism for syncing
|
||||
blocks.
|
||||
- `PingTimeout` (`Duration`) is the time to wait for pong (response for sent ping request).
|
||||
- `ProtoTickInterval` (`Duration`) is the duration between protocol ticks with each
|
||||
connected peer.
|
||||
|
||||
### DB Configuration
|
||||
|
||||
`DBConfiguration` section describes configuration for node database and has
|
||||
|
|
|
@ -12,27 +12,35 @@ import (
|
|||
|
||||
// ApplicationConfiguration config specific to the node.
|
||||
type ApplicationConfiguration struct {
|
||||
// Deprecated: please, use Addresses instead, this field will be removed in future versions.
|
||||
// Deprecated: please, use Addresses field of P2P section instead, this field will be removed in future versions.
|
||||
Address *string `yaml:"Address,omitempty"`
|
||||
// Addresses stores the node address list in the form of "[host]:[port][:announcedPort]".
|
||||
Addresses []string `yaml:"Addresses"`
|
||||
// Deprecated: please, use Addresses instead, this field will be removed in future versions.
|
||||
// Deprecated: please, use Addresses field of P2P section instead, this field will be removed in future versions.
|
||||
AnnouncedNodePort *uint16 `yaml:"AnnouncedPort,omitempty"`
|
||||
AttemptConnPeers int `yaml:"AttemptConnPeers"`
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
AttemptConnPeers int `yaml:"AttemptConnPeers"`
|
||||
// BroadcastFactor is the factor (0-100) controlling gossip fan-out number optimization.
|
||||
//
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
BroadcastFactor int `yaml:"BroadcastFactor"`
|
||||
DBConfiguration dbconfig.DBConfiguration `yaml:"DBConfiguration"`
|
||||
DialTimeout int64 `yaml:"DialTimeout"`
|
||||
LogLevel string `yaml:"LogLevel"`
|
||||
LogPath string `yaml:"LogPath"`
|
||||
MaxPeers int `yaml:"MaxPeers"`
|
||||
MinPeers int `yaml:"MinPeers"`
|
||||
// Deprecated: please, use Addresses instead, this field will be removed in future versions.
|
||||
NodePort *uint16 `yaml:"NodePort,omitempty"`
|
||||
PingInterval int64 `yaml:"PingInterval"`
|
||||
PingTimeout int64 `yaml:"PingTimeout"`
|
||||
Pprof BasicService `yaml:"Pprof"`
|
||||
Prometheus BasicService `yaml:"Prometheus"`
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
DialTimeout int64 `yaml:"DialTimeout"`
|
||||
LogLevel string `yaml:"LogLevel"`
|
||||
LogPath string `yaml:"LogPath"`
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
MaxPeers int `yaml:"MaxPeers"`
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
MinPeers int `yaml:"MinPeers"`
|
||||
// Deprecated: please, use Addresses field of P2P section instead, this field will be removed in future versions.
|
||||
NodePort *uint16 `yaml:"NodePort,omitempty"`
|
||||
P2P P2P `yaml:"P2P"`
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
PingInterval int64 `yaml:"PingInterval"`
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
PingTimeout int64 `yaml:"PingTimeout"`
|
||||
Pprof BasicService `yaml:"Pprof"`
|
||||
Prometheus BasicService `yaml:"Prometheus"`
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
ProtoTickInterval int64 `yaml:"ProtoTickInterval"`
|
||||
Relay bool `yaml:"Relay"`
|
||||
RPC RPC `yaml:"RPC"`
|
||||
|
@ -41,6 +49,8 @@ type ApplicationConfiguration struct {
|
|||
P2PNotary P2PNotary `yaml:"P2PNotary"`
|
||||
StateRoot StateRoot `yaml:"StateRoot"`
|
||||
// ExtensiblePoolSize is the maximum amount of the extensible payloads from a single sender.
|
||||
//
|
||||
// Deprecated: this option is moved to the P2P section.
|
||||
ExtensiblePoolSize int `yaml:"ExtensiblePoolSize"`
|
||||
}
|
||||
|
||||
|
@ -48,13 +58,13 @@ type ApplicationConfiguration struct {
|
|||
// (Oracle, P2PNotary, Pprof, Prometheus, RPC, StateRoot and UnlockWallet sections)
|
||||
// and LogLevel field.
|
||||
func (a *ApplicationConfiguration) EqualsButServices(o *ApplicationConfiguration) bool {
|
||||
if len(a.Addresses) != len(o.Addresses) {
|
||||
if len(a.P2P.Addresses) != len(o.P2P.Addresses) {
|
||||
return false
|
||||
}
|
||||
aCp := make([]string, len(a.Addresses))
|
||||
oCp := make([]string, len(o.Addresses))
|
||||
copy(aCp, a.Addresses)
|
||||
copy(oCp, o.Addresses)
|
||||
aCp := make([]string, len(a.P2P.Addresses))
|
||||
oCp := make([]string, len(o.P2P.Addresses))
|
||||
copy(aCp, a.P2P.Addresses)
|
||||
copy(oCp, o.P2P.Addresses)
|
||||
sort.Strings(aCp)
|
||||
sort.Strings(oCp)
|
||||
for i := range aCp {
|
||||
|
@ -62,20 +72,29 @@ func (a *ApplicationConfiguration) EqualsButServices(o *ApplicationConfiguration
|
|||
return false
|
||||
}
|
||||
}
|
||||
if a.Address != o.Address ||
|
||||
a.AnnouncedNodePort != o.AnnouncedNodePort ||
|
||||
a.AttemptConnPeers != o.AttemptConnPeers ||
|
||||
a.BroadcastFactor != o.BroadcastFactor ||
|
||||
if a.Address != o.Address || //nolint:staticcheck // SA1019: a.Address is deprecated
|
||||
a.AnnouncedNodePort != o.AnnouncedNodePort || //nolint:staticcheck // SA1019: a.AnnouncedNodePort is deprecated
|
||||
a.AttemptConnPeers != o.AttemptConnPeers || //nolint:staticcheck // SA1019: a.AttemptConnPeers is deprecated
|
||||
a.P2P.AttemptConnPeers != o.P2P.AttemptConnPeers ||
|
||||
a.BroadcastFactor != o.BroadcastFactor || //nolint:staticcheck // SA1019: a.BroadcastFactor is deprecated
|
||||
a.P2P.BroadcastFactor != o.P2P.BroadcastFactor ||
|
||||
a.DBConfiguration != o.DBConfiguration ||
|
||||
a.DialTimeout != o.DialTimeout ||
|
||||
a.ExtensiblePoolSize != o.ExtensiblePoolSize ||
|
||||
a.DialTimeout != o.DialTimeout || //nolint:staticcheck // SA1019: a.DialTimeout is deprecated
|
||||
a.P2P.DialTimeout != o.P2P.DialTimeout ||
|
||||
a.ExtensiblePoolSize != o.ExtensiblePoolSize || //nolint:staticcheck // SA1019: a.ExtensiblePoolSize is deprecated
|
||||
a.P2P.ExtensiblePoolSize != o.P2P.ExtensiblePoolSize ||
|
||||
a.LogPath != o.LogPath ||
|
||||
a.MaxPeers != o.MaxPeers ||
|
||||
a.MinPeers != o.MinPeers ||
|
||||
a.NodePort != o.NodePort ||
|
||||
a.PingInterval != o.PingInterval ||
|
||||
a.PingTimeout != o.PingTimeout ||
|
||||
a.ProtoTickInterval != o.ProtoTickInterval ||
|
||||
a.MaxPeers != o.MaxPeers || //nolint:staticcheck // SA1019: a.MaxPeers is deprecated
|
||||
a.P2P.MaxPeers != o.P2P.MaxPeers ||
|
||||
a.MinPeers != o.MinPeers || //nolint:staticcheck // SA1019: a.MinPeers is deprecated
|
||||
a.P2P.MinPeers != o.P2P.MinPeers ||
|
||||
a.NodePort != o.NodePort || //nolint:staticcheck // SA1019: a.NodePort is deprecated
|
||||
a.PingInterval != o.PingInterval || //nolint:staticcheck // SA1019: a.PingInterval is deprecated
|
||||
a.P2P.PingInterval != o.P2P.PingInterval ||
|
||||
a.PingTimeout != o.PingTimeout || //nolint:staticcheck // SA1019: a.PingTimeout is deprecated
|
||||
a.P2P.PingTimeout != o.P2P.PingTimeout ||
|
||||
a.ProtoTickInterval != o.ProtoTickInterval || //nolint:staticcheck // SA1019: a.ProtoTickInterval is deprecated
|
||||
a.P2P.ProtoTickInterval != o.P2P.ProtoTickInterval ||
|
||||
a.Relay != o.Relay {
|
||||
return false
|
||||
}
|
||||
|
@ -93,25 +112,25 @@ type AnnounceableAddress struct {
|
|||
// gathered from both deprecated Address / NodePort / AnnouncedNodePort and newly
|
||||
// created Addresses fields.
|
||||
func (a *ApplicationConfiguration) GetAddresses() ([]AnnounceableAddress, error) {
|
||||
addrs := make([]AnnounceableAddress, 0, len(a.Addresses)+1)
|
||||
if a.Address != nil || a.NodePort != nil || a.AnnouncedNodePort != nil {
|
||||
addrs := make([]AnnounceableAddress, 0, len(a.P2P.Addresses)+1)
|
||||
if a.Address != nil || a.NodePort != nil || a.AnnouncedNodePort != nil { //nolint:staticcheck // SA1019: a.Address is deprecated
|
||||
var (
|
||||
host string
|
||||
nodePort uint16
|
||||
)
|
||||
if a.Address != nil {
|
||||
host = *a.Address
|
||||
if a.Address != nil { //nolint:staticcheck // SA1019: a.Address is deprecated
|
||||
host = *a.Address //nolint:staticcheck // SA1019: a.Address is deprecated
|
||||
}
|
||||
if a.NodePort != nil {
|
||||
nodePort = *a.NodePort
|
||||
if a.NodePort != nil { //nolint:staticcheck // SA1019: a.NodePort is deprecated
|
||||
nodePort = *a.NodePort //nolint:staticcheck // SA1019: a.NodePort is deprecated
|
||||
}
|
||||
addr := AnnounceableAddress{Address: net.JoinHostPort(host, strconv.Itoa(int(nodePort)))}
|
||||
if a.AnnouncedNodePort != nil {
|
||||
addr.AnnouncedPort = *a.AnnouncedNodePort
|
||||
if a.AnnouncedNodePort != nil { //nolint:staticcheck // SA1019: a.AnnouncedNodePort is deprecated
|
||||
addr.AnnouncedPort = *a.AnnouncedNodePort //nolint:staticcheck // SA1019: a.AnnouncedNodePort is deprecated
|
||||
}
|
||||
addrs = append(addrs, addr)
|
||||
}
|
||||
for i, addrStr := range a.Addresses {
|
||||
for i, addrStr := range a.P2P.Addresses {
|
||||
if len(addrStr) == 0 {
|
||||
return nil, fmt.Errorf("address #%d is empty", i)
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Address: &addr1, NodePort: &port1, AnnouncedNodePort: &port2,
|
||||
Addresses: []string{addr1, addr2 + ":3", addr3 + ":1:3"},
|
||||
P2P: P2P{Addresses: []string{addr1, addr2 + ":3", addr3 + ":1:3"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: addr1 + ":1", AnnouncedPort: port2},
|
||||
|
@ -92,7 +92,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
// Multi-addresses checks.
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{addr1},
|
||||
P2P: P2P{Addresses: []string{addr1}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: addr1},
|
||||
|
@ -100,7 +100,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{":1"},
|
||||
P2P: P2P{Addresses: []string{":1"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: ":1"},
|
||||
|
@ -108,7 +108,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{"::1"},
|
||||
P2P: P2P{Addresses: []string{"::1"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: ":", AnnouncedPort: port1},
|
||||
|
@ -116,7 +116,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{addr1 + ":1"},
|
||||
P2P: P2P{Addresses: []string{addr1 + ":1"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: addr1 + ":1"},
|
||||
|
@ -124,7 +124,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{addr1 + "::1"},
|
||||
P2P: P2P{Addresses: []string{addr1 + "::1"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: addr1 + ":", AnnouncedPort: port1},
|
||||
|
@ -132,7 +132,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{addr1 + ":1:2"},
|
||||
P2P: P2P{Addresses: []string{addr1 + ":1:2"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: addr1 + ":1", AnnouncedPort: port2},
|
||||
|
@ -140,7 +140,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{addr1 + ":1", addr2 + "::2"},
|
||||
P2P: P2P{Addresses: []string{addr1 + ":1", addr2 + "::2"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: addr1 + ":1"},
|
||||
|
@ -149,7 +149,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{v6Plain0, v6Plain1, v6Plain2, v6Plain3, v6Plain4},
|
||||
P2P: P2P{Addresses: []string{v6Plain0, v6Plain1, v6Plain2, v6Plain3, v6Plain4}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: v6Plain0},
|
||||
|
@ -161,7 +161,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{"[3731:54:65fe:2::]:123", "[3731:54:65fe:2::]:123:124"},
|
||||
P2P: P2P{Addresses: []string{"[3731:54:65fe:2::]:123", "[3731:54:65fe:2::]:123:124"}},
|
||||
},
|
||||
expected: []AnnounceableAddress{
|
||||
{Address: "[3731:54:65fe:2::]:123"},
|
||||
|
@ -170,7 +170,7 @@ func TestGetAddresses(t *testing.T) {
|
|||
},
|
||||
{
|
||||
cfg: &ApplicationConfiguration{
|
||||
Addresses: []string{"127.0.0.1:QWER:123"},
|
||||
P2P: P2P{Addresses: []string{"127.0.0.1:QWER:123"}},
|
||||
},
|
||||
shouldFail: true,
|
||||
},
|
||||
|
|
|
@ -55,8 +55,10 @@ func LoadFile(configPath string) (Config, error) {
|
|||
|
||||
config := Config{
|
||||
ApplicationConfiguration: ApplicationConfiguration{
|
||||
PingInterval: 30,
|
||||
PingTimeout: 90,
|
||||
P2P: P2P{
|
||||
PingInterval: 30,
|
||||
PingTimeout: 30,
|
||||
},
|
||||
RPC: RPC{
|
||||
MaxIteratorResultItems: DefaultMaxIteratorResultItems,
|
||||
MaxFindResultItems: 100,
|
||||
|
|
19
pkg/config/p2p.go
Normal file
19
pkg/config/p2p.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package config
|
||||
|
||||
import "time"
|
||||
|
||||
// P2P holds P2P node settings.
|
||||
type P2P struct {
|
||||
// Addresses stores the node address list in the form of "[host]:[port][:announcedPort]".
|
||||
Addresses []string `yaml:"Addresses"`
|
||||
AttemptConnPeers int `yaml:"AttemptConnPeers"`
|
||||
// BroadcastFactor is the factor (0-100) controlling gossip fan-out number optimization.
|
||||
BroadcastFactor int `yaml:"BroadcastFactor"`
|
||||
DialTimeout time.Duration `yaml:"DialTimeout"`
|
||||
ExtensiblePoolSize int `yaml:"ExtensiblePoolSize"`
|
||||
MaxPeers int `yaml:"MaxPeers"`
|
||||
MinPeers int `yaml:"MinPeers"`
|
||||
PingInterval time.Duration `yaml:"PingInterval"`
|
||||
PingTimeout time.Duration `yaml:"PingTimeout"`
|
||||
ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"`
|
||||
}
|
|
@ -88,29 +88,65 @@ func NewServerConfig(cfg config.Config) (ServerConfig, error) {
|
|||
if timePerBlock == 0 && protoConfig.SecondsPerBlock > 0 { //nolint:staticcheck // SA1019: protoConfig.SecondsPerBlock is deprecated
|
||||
timePerBlock = time.Duration(protoConfig.SecondsPerBlock) * time.Second //nolint:staticcheck // SA1019: protoConfig.SecondsPerBlock is deprecated
|
||||
}
|
||||
|
||||
dialTimeout := appConfig.P2P.DialTimeout
|
||||
if dialTimeout == 0 && appConfig.DialTimeout > 0 { //nolint:staticcheck // SA1019: appConfig.DialTimeout is deprecated
|
||||
dialTimeout = time.Duration(appConfig.DialTimeout) * time.Second //nolint:staticcheck // SA1019: appConfig.DialTimeout is deprecated
|
||||
}
|
||||
protoTickInterval := appConfig.P2P.ProtoTickInterval
|
||||
if protoTickInterval == 0 && appConfig.ProtoTickInterval > 0 { //nolint:staticcheck // SA1019: appConfig.ProtoTickInterval is deprecated
|
||||
protoTickInterval = time.Duration(appConfig.ProtoTickInterval) * time.Second //nolint:staticcheck // SA1019: appConfig.ProtoTickInterval is deprecated
|
||||
}
|
||||
pingInterval := appConfig.P2P.PingInterval
|
||||
if pingInterval == 0 && appConfig.PingInterval > 0 { //nolint:staticcheck // SA1019: appConfig.PingInterval is deprecated
|
||||
pingInterval = time.Duration(appConfig.PingInterval) * time.Second //nolint:staticcheck // SA1019: appConfig.PingInterval is deprecated
|
||||
}
|
||||
pingTimeout := appConfig.P2P.PingTimeout
|
||||
if pingTimeout == 0 && appConfig.PingTimeout > 0 { //nolint:staticcheck // SA1019: appConfig.PingTimeout is deprecated
|
||||
pingTimeout = time.Duration(appConfig.PingTimeout) * time.Second //nolint:staticcheck // SA1019: appConfig.PingTimeout is deprecated
|
||||
}
|
||||
maxPeers := appConfig.P2P.MaxPeers
|
||||
if maxPeers == 0 && appConfig.MaxPeers > 0 { //nolint:staticcheck // SA1019: appConfig.MaxPeers is deprecated
|
||||
maxPeers = appConfig.MaxPeers //nolint:staticcheck // SA1019: appConfig.MaxPeers is deprecated
|
||||
}
|
||||
attemptConnPeers := appConfig.P2P.AttemptConnPeers
|
||||
if attemptConnPeers == 0 && appConfig.AttemptConnPeers > 0 { //nolint:staticcheck // SA1019: appConfig.AttemptConnPeers is deprecated
|
||||
attemptConnPeers = appConfig.AttemptConnPeers //nolint:staticcheck // SA1019: appConfig.AttemptConnPeers is deprecated
|
||||
}
|
||||
minPeers := appConfig.P2P.MinPeers
|
||||
if minPeers == 0 && appConfig.MinPeers > 0 { //nolint:staticcheck // SA1019: appConfig.MinPeers is deprecated
|
||||
minPeers = appConfig.MinPeers //nolint:staticcheck // SA1019: appConfig.MinPeers is deprecated
|
||||
}
|
||||
extPoolSize := appConfig.P2P.ExtensiblePoolSize
|
||||
if extPoolSize == 0 && appConfig.ExtensiblePoolSize > 0 { //nolint:staticcheck // SA1019: appConfig.ExtensiblePoolSize is deprecated
|
||||
extPoolSize = appConfig.ExtensiblePoolSize //nolint:staticcheck // SA1019: appConfig.ExtensiblePoolSize is deprecated
|
||||
}
|
||||
broadcastFactor := appConfig.P2P.BroadcastFactor
|
||||
if broadcastFactor > 0 && appConfig.BroadcastFactor > 0 { //nolint:staticcheck // SA1019: appConfig.BroadcastFactor is deprecated
|
||||
broadcastFactor = appConfig.BroadcastFactor //nolint:staticcheck // SA1019: appConfig.BroadcastFactor is deprecated
|
||||
}
|
||||
addrs, err := appConfig.GetAddresses()
|
||||
if err != nil {
|
||||
return ServerConfig{}, fmt.Errorf("failed to parse addresses: %w", err)
|
||||
}
|
||||
return ServerConfig{
|
||||
c := ServerConfig{
|
||||
UserAgent: cfg.GenerateUserAgent(),
|
||||
Addresses: addrs,
|
||||
Net: protoConfig.Magic,
|
||||
Relay: appConfig.Relay,
|
||||
Seeds: protoConfig.SeedList,
|
||||
DialTimeout: time.Duration(appConfig.DialTimeout) * time.Second,
|
||||
ProtoTickInterval: time.Duration(appConfig.ProtoTickInterval) * time.Second,
|
||||
PingInterval: time.Duration(appConfig.PingInterval) * time.Second,
|
||||
PingTimeout: time.Duration(appConfig.PingTimeout) * time.Second,
|
||||
MaxPeers: appConfig.MaxPeers,
|
||||
AttemptConnPeers: appConfig.AttemptConnPeers,
|
||||
MinPeers: appConfig.MinPeers,
|
||||
DialTimeout: dialTimeout,
|
||||
ProtoTickInterval: protoTickInterval,
|
||||
PingInterval: pingInterval,
|
||||
PingTimeout: pingTimeout,
|
||||
MaxPeers: maxPeers,
|
||||
AttemptConnPeers: attemptConnPeers,
|
||||
MinPeers: minPeers,
|
||||
TimePerBlock: timePerBlock,
|
||||
OracleCfg: appConfig.Oracle,
|
||||
P2PNotaryCfg: appConfig.P2PNotary,
|
||||
StateRootCfg: appConfig.StateRoot,
|
||||
ExtensiblePoolSize: appConfig.ExtensiblePoolSize,
|
||||
BroadcastFactor: appConfig.BroadcastFactor,
|
||||
}, nil
|
||||
ExtensiblePoolSize: extPoolSize,
|
||||
BroadcastFactor: broadcastFactor,
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue