Change config name from Raft to Cluster
This commit is contained in:
parent
2fa21ff091
commit
2681c2a51a
@ -202,23 +202,23 @@
|
|||||||
#HotStoreFullGCFrequency = 20
|
#HotStoreFullGCFrequency = 20
|
||||||
|
|
||||||
|
|
||||||
[Raft]
|
[Cluster]
|
||||||
# config to enabled node cluster with raft consensus
|
# config to enabled node cluster with raft consensus
|
||||||
#
|
#
|
||||||
# type: bool
|
# type: bool
|
||||||
# env var: LOTUS_RAFT_CLUSTERMODEENABLED
|
# env var: LOTUS_CLUSTER_CLUSTERMODEENABLED
|
||||||
#ClusterModeEnabled = false
|
#ClusterModeEnabled = false
|
||||||
|
|
||||||
# will shutdown libp2p host on shutdown. Useful for testing
|
# will shutdown libp2p host on shutdown. Useful for testing
|
||||||
#
|
#
|
||||||
# type: bool
|
# type: bool
|
||||||
# env var: LOTUS_RAFT_HOSTSHUTDOWN
|
# env var: LOTUS_CLUSTER_HOSTSHUTDOWN
|
||||||
#HostShutdown = false
|
#HostShutdown = false
|
||||||
|
|
||||||
# A folder to store Raft's data.
|
# A folder to store Raft's data.
|
||||||
#
|
#
|
||||||
# type: string
|
# type: string
|
||||||
# env var: LOTUS_RAFT_DATAFOLDER
|
# env var: LOTUS_CLUSTER_DATAFOLDER
|
||||||
#DataFolder = ""
|
#DataFolder = ""
|
||||||
|
|
||||||
# InitPeersetMultiAddr provides the list of initial cluster peers for new Raft
|
# InitPeersetMultiAddr provides the list of initial cluster peers for new Raft
|
||||||
@ -226,53 +226,53 @@
|
|||||||
# initialized or when starting in staging mode.
|
# initialized or when starting in staging mode.
|
||||||
#
|
#
|
||||||
# type: []string
|
# type: []string
|
||||||
# env var: LOTUS_RAFT_INITPEERSETMULTIADDR
|
# env var: LOTUS_CLUSTER_INITPEERSETMULTIADDR
|
||||||
#InitPeersetMultiAddr = []
|
#InitPeersetMultiAddr = []
|
||||||
|
|
||||||
# LeaderTimeout specifies how long to wait for a leader before
|
# LeaderTimeout specifies how long to wait for a leader before
|
||||||
# failing an operation.
|
# failing an operation.
|
||||||
#
|
#
|
||||||
# type: Duration
|
# type: Duration
|
||||||
# env var: LOTUS_RAFT_WAITFORLEADERTIMEOUT
|
# env var: LOTUS_CLUSTER_WAITFORLEADERTIMEOUT
|
||||||
#WaitForLeaderTimeout = "15s"
|
#WaitForLeaderTimeout = "15s"
|
||||||
|
|
||||||
# NetworkTimeout specifies how long before a Raft network
|
# NetworkTimeout specifies how long before a Raft network
|
||||||
# operation is timed out
|
# operation is timed out
|
||||||
#
|
#
|
||||||
# type: Duration
|
# type: Duration
|
||||||
# env var: LOTUS_RAFT_NETWORKTIMEOUT
|
# env var: LOTUS_CLUSTER_NETWORKTIMEOUT
|
||||||
#NetworkTimeout = "1m40s"
|
#NetworkTimeout = "1m40s"
|
||||||
|
|
||||||
# CommitRetries specifies how many times we retry a failed commit until
|
# CommitRetries specifies how many times we retry a failed commit until
|
||||||
# we give up.
|
# we give up.
|
||||||
#
|
#
|
||||||
# type: int
|
# type: int
|
||||||
# env var: LOTUS_RAFT_COMMITRETRIES
|
# env var: LOTUS_CLUSTER_COMMITRETRIES
|
||||||
#CommitRetries = 1
|
#CommitRetries = 1
|
||||||
|
|
||||||
# How long to wait between retries
|
# How long to wait between retries
|
||||||
#
|
#
|
||||||
# type: Duration
|
# type: Duration
|
||||||
# env var: LOTUS_RAFT_COMMITRETRYDELAY
|
# env var: LOTUS_CLUSTER_COMMITRETRYDELAY
|
||||||
#CommitRetryDelay = "200ms"
|
#CommitRetryDelay = "200ms"
|
||||||
|
|
||||||
# BackupsRotate specifies the maximum number of Raft's DataFolder
|
# BackupsRotate specifies the maximum number of Raft's DataFolder
|
||||||
# copies that we keep as backups (renaming) after cleanup.
|
# copies that we keep as backups (renaming) after cleanup.
|
||||||
#
|
#
|
||||||
# type: int
|
# type: int
|
||||||
# env var: LOTUS_RAFT_BACKUPSROTATE
|
# env var: LOTUS_CLUSTER_BACKUPSROTATE
|
||||||
#BackupsRotate = 6
|
#BackupsRotate = 6
|
||||||
|
|
||||||
# Namespace to use when writing keys to the datastore
|
# Namespace to use when writing keys to the datastore
|
||||||
#
|
#
|
||||||
# type: string
|
# type: string
|
||||||
# env var: LOTUS_RAFT_DATASTORENAMESPACE
|
# env var: LOTUS_CLUSTER_DATASTORENAMESPACE
|
||||||
#DatastoreNamespace = "/raft"
|
#DatastoreNamespace = "/raft"
|
||||||
|
|
||||||
# Tracing enables propagation of contexts across binary boundaries.
|
# Tracing enables propagation of contexts across binary boundaries.
|
||||||
#
|
#
|
||||||
# type: bool
|
# type: bool
|
||||||
# env var: LOTUS_RAFT_TRACING
|
# env var: LOTUS_CLUSTER_TRACING
|
||||||
#Tracing = false
|
#Tracing = false
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,9 +242,9 @@ func ConfigFullNode(c interface{}) Option {
|
|||||||
Override(new(wallet.Default), wallet.NilDefault),
|
Override(new(wallet.Default), wallet.NilDefault),
|
||||||
),
|
),
|
||||||
// Chain node cluster enabled
|
// Chain node cluster enabled
|
||||||
If(cfg.Raft.ClusterModeEnabled,
|
If(cfg.Cluster.ClusterModeEnabled,
|
||||||
Override(new(*gorpc.Client), modules.NewRPCClient),
|
Override(new(*gorpc.Client), modules.NewRPCClient),
|
||||||
Override(new(*consensus2.ClusterRaftConfig), consensus2.NewClusterRaftConfig(&cfg.Raft)),
|
Override(new(*consensus2.ClusterRaftConfig), consensus2.NewClusterRaftConfig(&cfg.Cluster)),
|
||||||
Override(new(*consensus2.Consensus), consensus2.NewConsensusWithRPCClient(false)),
|
Override(new(*consensus2.Consensus), consensus2.NewConsensusWithRPCClient(false)),
|
||||||
Override(new(*messagesigner.MessageSignerConsensus), messagesigner.NewMessageSignerConsensus),
|
Override(new(*messagesigner.MessageSignerConsensus), messagesigner.NewMessageSignerConsensus),
|
||||||
Override(new(messagesigner.MsgSigner), From(new(*messagesigner.MessageSignerConsensus))),
|
Override(new(messagesigner.MsgSigner), From(new(*messagesigner.MessageSignerConsensus))),
|
||||||
|
@ -97,7 +97,7 @@ func DefaultFullNode() *FullNode {
|
|||||||
HotStoreFullGCFrequency: 20,
|
HotStoreFullGCFrequency: 20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Raft: *DefaultUserRaftConfig(),
|
Cluster: *DefaultUserRaftConfig(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ see https://lotus.filecoin.io/storage-providers/advanced-configurations/market/#
|
|||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Raft",
|
Name: "Cluster",
|
||||||
Type: "UserRaftConfig",
|
Type: "UserRaftConfig",
|
||||||
|
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
|
@ -26,7 +26,7 @@ type FullNode struct {
|
|||||||
Wallet Wallet
|
Wallet Wallet
|
||||||
Fees FeeConfig
|
Fees FeeConfig
|
||||||
Chainstore Chainstore
|
Chainstore Chainstore
|
||||||
Raft UserRaftConfig
|
Cluster UserRaftConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
// // Common
|
// // Common
|
||||||
|
Loading…
Reference in New Issue
Block a user