Skip to content

Commit 1c18f83

Browse files
author
Jason Yellick
committed
FAB-15754 Deprecate solo orderer
This CR removes many Solo references from the docs, it notably does not touch the chaincode tutorial, or the first network tutorial, as these are in flux. It also adds a warning which is emitted when starting a channel with the Solo consensus type, and removes the default 'SampleInsecureSolo' profile from configtxgen. Signed-off-by: Jason Yellick <jyellick@us.ibm.com> Change-Id: Ide57e8ca4109e7d31d7f363dc088205a6b5683b5
1 parent 18dbbb0 commit 1c18f83

File tree

10 files changed

+29
-82
lines changed

10 files changed

+29
-82
lines changed

cmd/configtxgen/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func main() {
213213
flag.StringVar(&channelID, "channelID", "", "The channel ID to use in the configtx")
214214
flag.StringVar(&outputChannelCreateTx, "outputCreateChannelTx", "", "The path to write a channel creation configtx to (if set)")
215215
flag.StringVar(&channelCreateTxBaseProfile, "channelCreateTxBaseProfile", "", "Specifies a profile to consider as the orderer system channel current state to allow modification of non-application parameters during channel create tx generation. Only valid in conjunction with 'outputCreateChannelTx'.")
216-
flag.StringVar(&profile, "profile", genesisconfig.SampleInsecureSoloProfile, "The profile from configtx.yaml to use for generation.")
216+
flag.StringVar(&profile, "profile", "", "The profile from configtx.yaml to use for generation.")
217217
flag.StringVar(&configPath, "configPath", "", "The path containing the configuration to use (if set)")
218218
flag.StringVar(&inspectBlock, "inspectBlock", "", "Prints the configuration contained in the block at the specified path")
219219
flag.StringVar(&inspectChannelCreateTx, "inspectChannelCreateTx", "", "Prints the configuration contained in the transaction at the specified path")
@@ -258,6 +258,10 @@ func main() {
258258
factory.InitFactories(nil)
259259
var profileConfig *genesisconfig.Profile
260260
if outputBlock != "" || outputChannelCreateTx != "" || outputAnchorPeersUpdate != "" {
261+
if profile == "" {
262+
logger.Fatalf("The '-profile' is required when '-outputBlock', '-outputChannelCreateTx', or '-outputAnchorPeersUpdate' is specified")
263+
}
264+
261265
if configPath != "" {
262266
profileConfig = genesisconfig.Load(profile, configPath)
263267
} else {

docs/source/Fabric-FAQ.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ Ordering Service
243243
:Answer:
244244
A consensus plugin needs to implement the ``Consenter`` and ``Chain``
245245
interfaces defined in the `consensus package`_. There are two plugins built
246-
against these interfaces already: solo_ and kafka_. You can study them to take
246+
against these interfaces already: raft_ and kafka_. You can study them to take
247247
cues for your own implementation. The ordering service code can be found under
248248
the `orderer package`_.
249249

250250
.. _consensus package: https://github.com/hyperledger/fabric/blob/master/orderer/consensus/consensus.go
251-
.. _solo: https://github.com/hyperledger/fabric/tree/master/orderer/consensus/solo
251+
.. _raft: https://github.com/hyperledger/fabric/tree/master/orderer/consensus/etcdraft
252252
.. _kafka: https://github.com/hyperledger/fabric/tree/master/orderer/consensus/kafka
253253
.. _orderer package: https://github.com/hyperledger/fabric/tree/master/orderer
254254

@@ -270,7 +270,8 @@ Solo
270270

271271
:Answer:
272272
Solo is not intended for production. It is not, and will never be, fault
273-
tolerant.
273+
tolerant. It has been deprecated in favor of Raft and may be removed in a
274+
future release.
274275

275276
Kafka
276277
~~~~~

docs/source/blockchain.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ that are highly structured in their relationships to those that are more
216216
peer-to-peer.
217217

218218
We’ll learn more about the Hyperledger Fabric consensus mechanisms, which
219-
currently include SOLO, Kafka, and Raft.
219+
currently include Kafka, and Raft.
220220

221221
Where can I learn more?
222222
-----------------------

docs/source/capability_requirements.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ it for your network. For example:
6666
6767
.. code:: bash
6868
69-
SampleSingleMSPSoloV1_1:
69+
SampleSingleMSPRaftV1_1:
7070
Capabilities:
7171
<<: *GlobalCapabilities
7272
Orderer:

docs/source/commands/configtxgen.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Usage of configtxgen:
3333
-printOrg string
3434
Prints the definition of an organization as JSON. (useful for adding an org to a channel manually)
3535
-profile string
36-
The profile from configtx.yaml to use for generation. (default "SampleInsecureSolo")
36+
The profile from configtx.yaml to use for generation.
3737
-version
3838
Show version information
3939
```
@@ -43,10 +43,10 @@ Usage of configtxgen:
4343
### Output a genesis block
4444

4545
Write a genesis block to `genesis_block.pb` for channel `orderer-system-channel`
46-
for profile `SampleSingleMSPSoloV1_1`.
46+
for profile `SampleSingleMSPRaftV1_1`.
4747

4848
```
49-
configtxgen -outputBlock genesis_block.pb -profile SampleSingleMSPSoloV1_1 -channelID orderer-system-channel
49+
configtxgen -outputBlock genesis_block.pb -profile SampleSingleMSPRaftV1_1 -channelID orderer-system-channel
5050
```
5151

5252
### Output a channel creation tx
@@ -102,26 +102,6 @@ The `configtxgen` tool's output is largely controlled by the content of
102102
`configtx.yaml`. This file is searched for at `FABRIC_CFG_PATH` and must be
103103
present for `configtxgen` to operate.
104104

105-
This configuration file may be edited, or, individual properties may be
106-
overridden by setting environment variables, such as
107-
`CONFIGTX_ORDERER_ORDERERTYPE=kafka`.
108-
109-
For many `configtxgen` operations, a profile name must be supplied. Profiles
110-
are a way to express multiple similar configurations in a single file. For
111-
instance, one profile might define a channel with 3 orgs, and another might
112-
define one with 4 orgs. To accomplish this without the length of the file
113-
becoming burdensome, `configtx.yaml` depends on the standard YAML feature of
114-
anchors and references. Base parts of the configuration are tagged with an
115-
anchor like `&OrdererDefaults` and then merged into a profile with a reference
116-
like `<<: *OrdererDefaults`. Note, when `configtxgen` is operating under a
117-
profile, environment variable overrides do not need to include the profile
118-
prefix and may be referenced relative to the root element of the profile. For
119-
instance, do not specify
120-
`CONFIGTX_PROFILE_SAMPLEINSECURESOLO_ORDERER_ORDERERTYPE`,
121-
instead simply omit the profile specifics and use the `CONFIGTX` prefix
122-
followed by the elements relative to the profile name such as
123-
`CONFIGTX_ORDERER_ORDERERTYPE`.
124-
125105
Refer to the sample `configtx.yaml` shipped with Fabric for all possible
126106
configuration options. You may find this file in the `config` directory of
127107
the release artifacts tar, or you may find it under the `sampleconfig` folder

docs/source/glossary.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,11 @@ Ordering Service
440440
----------------
441441

442442
Also known as **orderer**. A defined collective of nodes that orders transactions into a block
443-
and then distributes blocks to connected peers for validation and commit. The ordering service
444-
exists independent of the peer processes and orders transactions on a first-come-first-serve basis
445-
for all channels on the network. It is designed to support pluggable implementations beyond the
446-
out-of-the-box SOLO, Kafka, and Raft varieties. It is a common binding for the overall network;
447-
it contains the cryptographic identity material tied to each Member_.
443+
and then distributes blocks to connected peers for validation and commit. The ordering service
444+
exists independent of the peer processes and orders transactions on a first-come-first-serve basis
445+
for all channels on the network. It is designed to support pluggable implementations beyond the
446+
out-of-the-box Kafka and Raft varieties. It is a common binding for the overall network; it
447+
contains the cryptographic identity material tied to each Member_.
448448

449449
.. _Organization:
450450

docs/source/orderer/ordering_service.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,6 @@ between ordering service nodes.
203203
For information about how to stand up an ordering node (regardless of the
204204
implementation the node will be used in), check out [our documentation on standing up an ordering node](../orderer_deploy.html).
205205

206-
* **Solo**
207-
208-
The Solo implementation of the ordering service is aptly named: it features
209-
only a single ordering node. As a result, it is not, and never will be, fault
210-
tolerant. For that reason, Solo implementations cannot be considered for
211-
production, but they are a good choice for testing applications and smart
212-
contracts, or for creating proofs of concept. However, if you ever want to
213-
extend this PoC network into production, you might want to start with a single
214-
node Raft cluster, as it may be reconfigured to add additional nodes.
215-
216-
217206
* **Raft**
218207

219208
New as of v1.4.1, Raft is a crash fault tolerant (CFT) ordering service
@@ -233,19 +222,12 @@ implementation the node will be used in), check out [our documentation on standi
233222
available since Fabric v1.0, but many users may find the additional
234223
administrative overhead of managing a Kafka cluster intimidating or undesirable.
235224

236-
## Solo
237-
238-
As stated above, a Solo ordering service is a good choice when developing test,
239-
development, or proofs-of-concept networks. For that reason, it is the default
240-
ordering service deployed in our [Build your first network tutorial](../build_network.html)),
241-
as, from the perspective of other network components, a Solo ordering service
242-
processes transactions identically to the more elaborate Kafka and Raft
243-
implementations while saving on the administrative overhead of maintaining and
244-
upgrading multiple nodes and clusters. Because a Solo ordering service is not
245-
crash-fault tolerant, it should never be considered a viable alternative for a
246-
production blockchain network. For networks which wish to start with only a
247-
single ordering node but might wish to grow in the future, a single node Raft
248-
cluster is a better option.
225+
* **Solo**
226+
227+
The Solo implementation of the ordering service is intended for test only and
228+
consists only of a single ordering node. It has been deprecated and may be
229+
removed entirely in a future release. Existing users of Solo should move to
230+
a single node Raft network for equivalent function.
249231

250232
## Raft
251233

docs/source/whatsnew.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ across the world to contribute nodes to a decentralized ordering service.
124124

125125
* :doc:`orderer/ordering_service`:
126126
Describes the role of an ordering service in Fabric and an overview of the
127-
three ordering service implementations currently available: Solo, Kafka, and
128-
Raft.
127+
two ordering service implementations currently available: Kafka and Raft.
129128

130129
* :doc:`raft_configuration`:
131130
Shows the configuration parameters and considerations when deploying a Raft

docs/wrappers/configtxgen_postscript.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
### Output a genesis block
44

55
Write a genesis block to `genesis_block.pb` for channel `orderer-system-channel`
6-
for profile `SampleSingleMSPSoloV1_1`.
6+
for profile `SampleSingleMSPRaftV1_1`.
77

88
```
9-
configtxgen -outputBlock genesis_block.pb -profile SampleSingleMSPSoloV1_1 -channelID orderer-system-channel
9+
configtxgen -outputBlock genesis_block.pb -profile SampleSingleMSPRaftV1_1 -channelID orderer-system-channel
1010
```
1111

1212
### Output a channel creation tx
@@ -62,26 +62,6 @@ The `configtxgen` tool's output is largely controlled by the content of
6262
`configtx.yaml`. This file is searched for at `FABRIC_CFG_PATH` and must be
6363
present for `configtxgen` to operate.
6464

65-
This configuration file may be edited, or, individual properties may be
66-
overridden by setting environment variables, such as
67-
`CONFIGTX_ORDERER_ORDERERTYPE=kafka`.
68-
69-
For many `configtxgen` operations, a profile name must be supplied. Profiles
70-
are a way to express multiple similar configurations in a single file. For
71-
instance, one profile might define a channel with 3 orgs, and another might
72-
define one with 4 orgs. To accomplish this without the length of the file
73-
becoming burdensome, `configtx.yaml` depends on the standard YAML feature of
74-
anchors and references. Base parts of the configuration are tagged with an
75-
anchor like `&OrdererDefaults` and then merged into a profile with a reference
76-
like `<<: *OrdererDefaults`. Note, when `configtxgen` is operating under a
77-
profile, environment variable overrides do not need to include the profile
78-
prefix and may be referenced relative to the root element of the profile. For
79-
instance, do not specify
80-
`CONFIGTX_PROFILE_SAMPLEINSECURESOLO_ORDERER_ORDERERTYPE`,
81-
instead simply omit the profile specifics and use the `CONFIGTX` prefix
82-
followed by the elements relative to the profile name such as
83-
`CONFIGTX_ORDERER_ORDERERTYPE`.
84-
8565
Refer to the sample `configtx.yaml` shipped with Fabric for all possible
8666
configuration options. You may find this file in the `config` directory of
8767
the release artifacts tar, or you may find it under the `sampleconfig` folder

orderer/consensus/solo/consensus.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func New() consensus.Consenter {
4040
}
4141

4242
func (solo *consenter) HandleChain(support consensus.ConsenterSupport, metadata *cb.Metadata) (consensus.Chain, error) {
43+
logger.Warningf("Use of the Solo orderer is deprecated and remains only for use in test environments but may be removed in the future.")
4344
return newChain(support), nil
4445
}
4546

0 commit comments

Comments
 (0)