Skip to content

Commit 53b1bb9

Browse files
author
Luis Sanchez
committed
[FAB-4185] remove sbft package
Removed all traces of sbft package. Change-Id: Ia3b91b67d69abd8f0c320537ce0f7dfcb4086c1b Signed-off-by: Luis Sanchez <[email protected]>
1 parent ff9e5c6 commit 53b1bb9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4
-7924
lines changed

common/configtx/tool/provisional/provisional.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ const (
6363
ConsensusTypeSolo = "solo"
6464
// ConsensusTypeKafka identifies the Kafka-based consensus implementation.
6565
ConsensusTypeKafka = "kafka"
66-
// ConsensusTypeSbft identifies the SBFT consensus implementation.
67-
ConsensusTypeSbft = "sbft"
6866

6967
// TestChainID is the default value of ChainID. It is used by all testing
7068
// networks. It it necessary to set and export this variable so that test
@@ -131,7 +129,7 @@ func New(conf *genesisconfig.Profile) Generator {
131129
}
132130

133131
switch conf.Orderer.OrdererType {
134-
case ConsensusTypeSolo, ConsensusTypeSbft:
132+
case ConsensusTypeSolo:
135133
case ConsensusTypeKafka:
136134
bs.ordererGroups = append(bs.ordererGroups, config.TemplateKafkaBrokers(conf.Orderer.Kafka.Brokers))
137135
default:

examples/cluster/config/core.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ peer:
240240
# SHA2 is hardcoded in several places, not only BCCSP
241241
Hash: SHA2
242242
Security: 256
243-
# Location of Key Store, can be subdirectory of SbftLocal.DataDir
243+
# Location of Key Store
244244
FileKeyStore:
245245
# If "", defaults to 'mspConfigPath'/keystore
246246
# TODO: Ensure this is read with fabric/core/config.GetPath() once ready

examples/cluster/config/orderer.yaml

-46
Original file line numberDiff line numberDiff line change
@@ -159,49 +159,3 @@ Kafka:
159159
# certificates from the Kafka cluster.
160160
RootCAs:
161161
#File: uncomment to read Certificate from a file
162-
163-
################################################################################
164-
#
165-
# SECTION: SBFT Local
166-
#
167-
# - This section applies to the configuration of the SBFT-based orderer.
168-
#
169-
################################################################################
170-
SbftLocal:
171-
172-
# Address to use for SBFT internal communication
173-
PeerCommAddr: ":6101"
174-
CertFile: "sbft/testdata/cert1.pem"
175-
KeyFile: "sbft/testdata/key.pem"
176-
# Directory for SBFT data (persistence)
177-
DataDir: "/tmp"
178-
179-
################################################################################
180-
#
181-
# SECTION: Genesis
182-
#
183-
# - This section is pending removal but is left to support SBFT
184-
# to be migrated to configtx.yaml.
185-
#
186-
################################################################################
187-
Genesis:
188-
189-
# Deprecated Batch Timeout: The amount of time to wait before creating a
190-
# batch.
191-
DeprecatedBatchTimeout: 10s
192-
193-
# DeprecatedBatchSize: The absolute maximum number of bytes allowed for
194-
# the serialized messages in a batch.
195-
DeprecatedBatchSize: 99 MB
196-
197-
# Defines the SBFT parameters when 'sbft' is specified as the 'OrdererType'
198-
SbftShared:
199-
# Number of peers
200-
"N": 1
201-
# Fault tolerance
202-
F: 0
203-
# Timeout of requests (seconds)
204-
RequestTimeoutNsec: 1000000000
205-
# Peers (PeerCommAddr) with the path of their cert
206-
Peers:
207-
":6101": "sbft/testdata/cert1.pem"

orderer/localconfig/config.go

-42
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ type TopLevel struct {
6464
FileLedger FileLedger
6565
RAMLedger RAMLedger
6666
Kafka Kafka
67-
Genesis Genesis
68-
SbftLocal SbftLocal
6967
}
7068

7169
// General contains config which should be common among all orderer types.
@@ -125,32 +123,6 @@ type Retry struct {
125123
Stop time.Duration
126124
}
127125

128-
// Genesis is a deprecated structure which was used to put
129-
// values into the genesis block, but this is now handled elsewhere.
130-
// SBFT did not reference these values via the genesis block however
131-
// so it is being left here for backwards compatibility purposes.
132-
type Genesis struct {
133-
DeprecatedBatchTimeout time.Duration
134-
DeprecatedBatchSize uint32
135-
SbftShared SbftShared
136-
}
137-
138-
// SbftLocal contains configuration for the SBFT peer/replica.
139-
type SbftLocal struct {
140-
PeerCommAddr string
141-
CertFile string
142-
KeyFile string
143-
DataDir string
144-
}
145-
146-
// SbftShared contains config for the SBFT network.
147-
type SbftShared struct {
148-
N uint64
149-
F uint64
150-
RequestTimeoutNsec uint64
151-
Peers map[string]string // Address to Cert mapping
152-
}
153-
154126
var defaults = TopLevel{
155127
General: General{
156128
LedgerType: "file",
@@ -186,20 +158,6 @@ var defaults = TopLevel{
186158
Enabled: false,
187159
},
188160
},
189-
Genesis: Genesis{
190-
SbftShared: SbftShared{
191-
N: 1,
192-
F: 0,
193-
RequestTimeoutNsec: uint64(time.Second.Nanoseconds()),
194-
Peers: map[string]string{":6101": "sbft/testdata/cert1.pem"},
195-
},
196-
},
197-
SbftLocal: SbftLocal{
198-
PeerCommAddr: ":6101",
199-
CertFile: "sbft/testdata/cert1.pem",
200-
KeyFile: "sbft/testdata/key.pem",
201-
DataDir: "/tmp",
202-
},
203161
}
204162

205163
// Load parses the orderer.yaml file and environment, producing a struct suitable for config use

orderer/main.go

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import (
3535
"github.com/hyperledger/fabric/orderer/ledger"
3636
"github.com/hyperledger/fabric/orderer/localconfig"
3737
"github.com/hyperledger/fabric/orderer/multichain"
38-
"github.com/hyperledger/fabric/orderer/sbft"
3938
"github.com/hyperledger/fabric/orderer/solo"
4039
cb "github.com/hyperledger/fabric/protos/common"
4140
ab "github.com/hyperledger/fabric/protos/orderer"
@@ -194,7 +193,6 @@ func initializeMultiChainManager(conf *config.TopLevel, signer crypto.LocalSigne
194193
consenters := make(map[string]multichain.Consenter)
195194
consenters["solo"] = solo.New()
196195
consenters["kafka"] = kafka.New(conf.Kafka.Version, conf.Kafka.Retry, conf.Kafka.TLS)
197-
consenters["sbft"] = sbft.New(makeSbftConsensusConfig(conf), makeSbftStackConfig(conf))
198196

199197
return multichain.NewManagerImpl(lf, consenters, signer)
200198
}

0 commit comments

Comments
 (0)