forked from hyperledger-labs/mirbft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.go
More file actions
46 lines (39 loc) · 1.65 KB
/
config.go
File metadata and controls
46 lines (39 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Refactored: 1
*/
package mirbft
import "github.com/hyperledger-labs/mirbft/pkg/logger"
// The NodeConfig struct represents configuration parameters of the node
// that are independent of the protocol the Node is executing.
// Th
//ese parameters include various buffer sizes, the choice of the logger, etc.
// TODO: Move the protocol-related parameters (Heartbeat, Suspect, NewEpoch timeouts and BatchSize)
// to a different data structure.
type NodeConfig struct {
// Logger provides the logging functions.
Logger logger.Logger
// BufferSize is the total size of messages which can be held by the state
// machine, pending application, for each node. This is necessary because
// there may be dependencies between messages (for instance, until a checkpoint
// result is computed, watermarks cannot advance). This should be set
// to a minimum of a few MB.
BufferSize uint32
//// BatchSize determines how large a batch may grow (in number of request)
//// before it is cut. (Note, batches may be cut earlier, so this is a max size).
//BatchSize uint32
//
//// HeartbeatTicks is the number of ticks before a heartbeat is emitted
//// by a leader.
//HeartbeatTicks uint32
//
//// SuspectTicks is the number of ticks a bucket may not progress before
//// the node suspects the epoch has gone bad.
//SuspectTicks uint32
//
//// NewEpochTimeoutTicks is the number of ticks a replica will wait until
//// it suspects the epoch leader has failed. This value must be greater
//// than 1, as rebroadcast ticks are computed as half this value.
//NewEpochTimeoutTicks uint32
}