Simple Architecture
This commit is contained in:
@@ -9,8 +9,7 @@ type Config struct {
|
||||
PublicKeyPath string
|
||||
PrivateKeyPath string
|
||||
NodeEndpointPort int64
|
||||
IndexerAddresses string
|
||||
NativeIndexerAddresses string // multiaddrs of native indexers, comma-separated; bypasses IndexerAddresses when set
|
||||
IndexerAddresses string
|
||||
|
||||
PeerIDS string // TO REMOVE
|
||||
|
||||
@@ -18,11 +17,19 @@ type Config struct {
|
||||
|
||||
MinIndexer int
|
||||
MaxIndexer int
|
||||
// SearchTimeout is the max duration without a new result before the
|
||||
// distributed peer search stream is closed. Default: 5s.
|
||||
SearchTimeout int // seconds; 0 → use default (5)
|
||||
|
||||
// ConsensusQuorum is the minimum fraction of natives that must agree for a
|
||||
// candidate indexer to be considered confirmed. Range (0, 1]. Default 0.5
|
||||
// (strict majority). Raise to 0.67 for stronger Byzantine resistance.
|
||||
ConsensusQuorum float64
|
||||
// Indexer connection burst guard: max new connections accepted within the window.
|
||||
// 0 → use defaults (20 new peers per 30s).
|
||||
MaxConnPerWindow int // default 20
|
||||
ConnWindowSecs int // default 30
|
||||
|
||||
// Per-node behavioral limits (sliding 60s window). 0 → use built-in defaults.
|
||||
MaxHBPerMinute int // default 5
|
||||
MaxPublishPerMinute int // default 10
|
||||
MaxGetPerMinute int // default 50
|
||||
}
|
||||
|
||||
var instance *Config
|
||||
|
||||
Reference in New Issue
Block a user