You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `sync` section contains options for controlling how the node synchronizes with the network.
986
+
987
+
### Trusted Height
983
988
984
989
**Description:**
985
-
The passphrase required to decrypt or access the signer key, particularly if using a `file` signer and the key is encrypted, or if the aggregator mode is enabled and requires it. This flag is not directly a field in the `SignerConfig` struct but is used in conjunction with it.
990
+
Trusted height allows a syncing node to start synchronization from a known, verified block height instead of from genesis. This can significantly speed up the initial sync process for new nodes. When using trusted height, you must also provide the corresponding header hash for security verification.
991
+
992
+
This is particularly useful when:
993
+
994
+
- Joining a long-running network and wanting to skip the history
995
+
- Restoring from a backup at a specific height
996
+
- Testing with a known good state
997
+
998
+
**Security Consideration:** When using trusted height, you must provide the `trusted_header_hash` to prevent against history rewrites or malicious nodes trying to sync from an invalid state.
986
999
987
1000
**YAML:**
988
-
This is typically not stored in the YAML file for security reasons but provided via flag or environment variable.
_Note:_ Be cautious with providing passphrases directly on the command line in shared environments due to history logging. Environment variables or secure input methods are often preferred.
1002
+
```yaml
1003
+
sync:
1004
+
trusted_height: 100000 # Block height to trust for sync initialization
1005
+
trusted_header_hash: "a1b2c3d4e5f6..." # Hex-encoded hash of the header at trusted_height
1006
+
```
996
1007
997
-
---
1008
+
**Command-line Flags:**
1009
+
1010
+
- `--evnode.sync.trusted_height <uint64>`- Block height to trust for sync initialization
1011
+
- `--evnode.sync.trusted_header_hash <string>`- Hash of the trusted header for security verification (hex-encoded)
This reference should help you configure your Evolve node effectively. Always refer to the specific version of Evolve you are using, as options and defaults may change over time.
// P2PConfig contains all peer-to-peer networking configuration parameters
274
278
typeP2PConfigstruct {
275
-
ListenAddressstring`mapstructure:"listen_address" yaml:"listen_address" comment:"Address to listen for incoming connections (host:port)"`
276
-
Peersstring`mapstructure:"peers" yaml:"peers" comment:"Comma-separated list of peers to connect to"`
277
-
BlockedPeersstring`mapstructure:"blocked_peers" yaml:"blocked_peers" comment:"Comma-separated list of peer IDs to block from connecting"`
278
-
AllowedPeersstring`mapstructure:"allowed_peers" yaml:"allowed_peers" comment:"Comma-separated list of peer IDs to allow connections from"`
279
+
ListenAddressstring`mapstructure:"listen_address" yaml:"listen_address" comment:"Address to listen for incoming connections (host:port)"`
280
+
Peersstring`mapstructure:"peers" yaml:"peers" comment:"Comma-separated list of peers to connect to"`
281
+
BlockedPeersstring`mapstructure:"blocked_peers" yaml:"blocked_peers" comment:"Comma-separated list of peer IDs to block from connecting"`
282
+
AllowedPeersstring`mapstructure:"allowed_peers" yaml:"allowed_peers" comment:"Comma-separated list of peer IDs to allow connections from"`
283
+
TrustedHeightuint64`mapstructure:"trusted_height" yaml:"trusted_height" comment:"Block height to trust for sync initialization. When set, sync starts from this height instead of genesis. Must be accompanied by trusted_header_hash for security."`
284
+
TrustedHeaderHashstring`mapstructure:"trusted_header_hash" yaml:"trusted_header_hash" comment:"Hash of the trusted header for security verification. This should be the hex-encoded hash of the header at trusted_height. Prevents against history rewrites during sync."`
279
285
}
280
286
281
287
// SignerConfig contains all signer configuration parameters
returnfmt.Errorf("trusted_height (%d) is set but trusted_header_hash is empty. When using trusted_height, trusted_header_hash must also be provided for security verification",
0 commit comments