Skip to content

Commit 5dbe330

Browse files
eyalrundEyal Rundstein
and
Eyal Rundstein
authored
Main Readme update (#2961)
* Update README.md --------- Co-authored-by: Eyal Rundstein <erundstein@vmware.com>
1 parent fe49703 commit 5dbe330

File tree

4 files changed

+41
-288
lines changed

4 files changed

+41
-288
lines changed

CONTRIBUTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trigger the CI twice (on push and on PR), resulting in unecessary load on Github
2121

2222
Example:
2323

24-
``` shell
24+
```shell
2525
git remote add upstream https://github.com/vmware/concord-bft.git
2626
git checkout -b my-new-feature master
2727
git commit -a
@@ -32,7 +32,7 @@ git push origin my-new-feature
3232

3333
When your branch gets out of sync with the vmware/master branch, use the following to update:
3434

35-
``` shell
35+
```shell
3636
git checkout my-new-feature
3737
git fetch -a
3838
git pull --rebase upstream master
@@ -47,15 +47,15 @@ existing commits.
4747
If your pull request contains a single commit or your changes are related to the most recent commit, you can simply
4848
amend the commit.
4949

50-
``` shell
50+
```shell
5151
git add .
5252
git commit --amend
5353
git push --force-with-lease origin my-new-feature
5454
```
5555

5656
If you need to squash changes into an earlier commit, you can use:
5757

58-
``` shell
58+
```shell
5959
git add .
6060
git commit --fixup <commit>
6161
git rebase -i --autosquash master
@@ -82,9 +82,9 @@ If you use emacs, consider installing
8282

8383
Our code style has the following exceptions that differ from the google C++ style guidelines.
8484

85-
* We use `camelCase` function and method names, rather than `PascalCase`.
86-
* We allow, and encourage the use of exceptions.
87-
* We allow and prefer `#pragma once` over include guards
85+
* We use `camelCase` function and method names, rather than `PascalCase`.
86+
* We allow, and encourage the use of exceptions.
87+
* We allow and prefer `#pragma once` over include guards
8888

8989
## Reporting Bugs and Creating Issues
9090

README.md

+13-218
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<img src="logoConcord.png"/>
22

3-
4-
# Concord-BFT: a Distributed Trust Infrastructure
3+
# Concord-BFT: A Distributed Trust Framework
54

65
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
76
[![clang-tidy](https://github.com/vmware/concord-bft/workflows/clang-tidy/badge.svg)](https://github.com/vmware/concord-bft/actions?query=workflow%3Aclang-tidy)
@@ -15,239 +14,35 @@
1514

1615
<!-- <img src="TODO.jpg" width="200" height="200" /> -->
1716

18-
1917
## Overview
2018

2119
**Concord-bft** is a generic state machine replication library that can handle malicious (byzantine) replicas.
2220

23-
Its implementation is based on the algorithm described in the paper [SBFT: a Scalable Decentralized Trust Infrastructure for
24-
Blockchains](https://arxiv.org/pdf/1804.01626.pdf).
25-
26-
It is designed to be used as a core building block for replicated distributed data stores, and is especially suited to serve as the basis of permissioned Blockchain systems.
27-
28-
For a real-life integration example, please take a look at [Project Concord](https://github.com/vmware/concord), a highly scalable and energy-efficient distributed trust infrastructure for consensus and smart contract execution.
29-
30-
31-
## Releases
32-
33-
We abide by [semantic versioning](https://semver.org/). Public APIs can change
34-
at any time until we reach version 1.0. We will, however, bump the minor version
35-
when a backwards incompatible change is made.
36-
37-
[v0.5](https://github.com/vmware/concord-bft/releases/tag/v0.5)
38-
39-
## Install and Build (Ubuntu Linux 18.04)
40-
41-
Concord-BFT supports two kinds of builds: native and docker.
42-
43-
The docker build is **strongly recommended**.
44-
45-
### Docker
46-
47-
* Install the latest docker.
48-
* Optional: [configure docker as non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).
49-
* Build:
50-
```sh
51-
cd concord-bft
52-
make
53-
make test
54-
```
55-
Run `make help` to see more commands.
56-
57-
Note:
58-
* The output binaries are stored in the host's `concord-bft/build`.
59-
* `Makefile` is configurable.
60-
For example, if you want to use another compiler you may pass it to the `make`:
61-
```
62-
make CONCORD_BFT_CONTAINER_CXX=g++ \
63-
CONCORD_BFT_CONTAINER_CC=gcc \
64-
build
65-
```
66-
67-
Other build options, including passthrough options for CMake, are defined in the Makefile and prefixed with `CONCORD_BFT_`. Variables that are capable of being overridden on the commandline are set with the Make conditional operator `?=` and are at the beginning of [Makefile](Makefile). Please check that file for options.
68-
69-
#### Select comm module
70-
One option that is worth calling out explicitly is the communication (transport) library. Transport defaults to TLS and can be configured explicitly by setting the `CONCORD_BFT_CMAKE_TRANSPORT` flag. The flag defaults to **TLS**, but also supports **UDP** and **TCP**. These can be useful because the use of pinned certificates for TLS requires an out of band setup.
71-
72-
See [create_tls_certs.sh](scripts/linux/create_tls_certs.sh) for an example. This script is used in apollo tests. For production usage, an out of band deployment for each replica must be used to avoid revealing private keys to each replica.
73-
74-
### Native
75-
76-
```sh
77-
git clone https://github.com/vmware/concord-bft
78-
cd concord-bft
79-
sudo ./install_deps_release.sh # Installs all dependencies and 3rd parties
80-
mkdir build
81-
cd build
82-
cmake ..
83-
make
84-
sudo make test
85-
```
86-
87-
By default the build chooses the active compiler on the native build platform. In order to force compilation by clang you can use the following command.
88-
```sh
89-
CC=clang CXX=clang++ cmake ..
90-
```
91-
92-
In order to turn on or off various options, you need to change your cmake configuration. This is
93-
done by passing arguments to cmake with a `-D` prefix: e.g. `cmake -DBUILD_TESTING=OFF`. Note that
94-
make must be run afterwards to build according to the configuration. Please see [CMakeLists.txt](CMakeLists.txt) for configurable options.
95-
96-
#### Select comm module
97-
One option that is worth calling out explicitly is the communication (transport) library.
98-
99-
We support both UDP and TCP communication. UDP is the default. In order to
100-
enable TCP communication, build with `-DBUILD_COMM_TCP_PLAIN=TRUE` in the cmake
101-
instructions shown above. If set, the test client will run using TCP. If you
102-
wish to use TCP in your application, you need to build the TCP module as
103-
mentioned above and then create the communication object using CommFactory and
104-
passing PlainTcpConfig object to it.
105-
106-
We also support TCP over TLS communication. To enable it, change the
107-
`BUILD_COMM_TCP_TLS` flag to `TRUE` in the main CMakeLists.txt file. When
108-
running simpleTest using the testReplicasAndClient.sh - there is no need to create TLS certificates manually. The script will use the `create_tls_certs.sh` (located under the scripts/linux folder) to create certificates. The latter can be used to create TLS files for any number of replicas, e.g. when extending existing tests.
109-
110-
As we used pinned certificates for TLS, the user will have to manually provide these. THey can use the [create_tls_certs.sh](scripts/linux/create_tls_certs.sh) script as an example.
111-
112-
113-
### C++ Linter
114-
115-
The C++ code is statically checked by `clang-tidy` as part of the [CI](https://github.com/vmware/concord-bft/actions?query=workflow%3Aclang-tidy).
116-
<br>To check code before submitting PR, please run `make tidy-check`.
117-
118-
[Detailed information about clang-tidy checks](https://clang.llvm.org/extra/clang-tidy/checks/list.html).
119-
21+
BFT-based systems require substantial communication between nodes and, thus, don’t scale well. Project Concord-bft solves this problem by simplifying and streamlining communication between nodes, enabling greater scalability while increasing overall network throughput.
12022

121-
#### (Optional) Python client
23+
Project Concord’s BFT engine obtains significant scaling improvements via three major advances:
12224

123-
The python client is required for running tests. If you do not want to install python, you can
124-
configure the build of concord-bft by running `cmake -DBUILD_TESTING=OFF ..` from the `build`
125-
directory for native builds, and `CONCORD_BFT_CMAKE_BUILD_TESTING=TRUE make` for docker builds.
25+
1. It uses a linear communication consensus protocol while many other BFT consensus protocols (including PBFT) require quadratic communication
26+
2. It exploits optimism to provide a common case fast-path execution
27+
3. It uses modern cryptographic algorithms (BLS threshold signatures)
12628

127-
The python client requires python3(>= 3.5) and trio, which is installed via pip.
128-
129-
python3 -m pip install --upgrade trio
130-
131-
132-
#### Adding a new dependency or tool
133-
134-
The CI builds and runs tests in a docker container. To add a new dependency or tool, follow the steps below:
135-
136-
* Rebase against master
137-
* In order to add/remove dependencies update the file
138-
[install_deps_release.sh](https://github.com/vmware/concord-bft/blob/master/install_deps_release.sh)
139-
* Build new release/debug images: `make build-docker-images`
140-
* Check images current version in
141-
[Makefile](https://github.com/vmware/concord-bft/blob/master/Makefile#L5)
142-
and
143-
[Makefile](https://github.com/vmware/concord-bft/blob/master/Makefile#L10)
144-
* Tag the new images (at least one):
145-
* For release: `docker tag concord-bft:latest concordbft/concord-bft:<version>`
146-
* For debug: `docker tag concord-bft-debug:latest concordbft/concord-bft-debug:<version>`
147-
<br>where version is `current version + 1`.
148-
* Update the version in the Makefile
149-
* Make sure that Concord-BFT is built and tests pass with the new images: `RUN_WITH_DEBUG_IMAGE=TRUE make
150-
clean build test`
151-
* Ask one of the maintainers for a temporary write permission to Docker Hub
152-
repository(you need to have a [Docker ID](https://docs.docker.com/docker-id/))
153-
* Push the images (at least one):
154-
* For release: `docker push concordbft/concord-bft:<version>`
155-
* For debug: `docker push concordbft/concord-bft-debug:<version>`
156-
* Create a PR for the update:
157-
* The PR must contain only changes related to the updates in the image
158-
* PR's summary has to be similar to `Docker update to version release=<new version> debug=<new version>`
159-
* PR's message has to list the changes made in the image content and
160-
preferably the reason
161-
* Submit the PR
162-
163-
Important notes:
164-
1. Adding dependencies or tools directly to the `Dockerfile` is strongly not recommended because it breaks the native build support.
165-
2. If any tools are installed during the build but not needed for the actual compilation/debugging/test execution(for example, `git`), please remove them(`Dockerfile` is an example). The reason is that the image is supposed to be as tiny as possible.
166-
167-
168-
## Apollo testing framework
169-
170-
171-
The Apollo framework provides utilities and advanced testing scenarios for validating
172-
Concord BFT's correctness properties, regardless of the running application/execution engine.
173-
For the purposes of system testing, we have implemented a "Simple Key-Value Blockchain" (SKVBC)
174-
test application which runs on top of the Concord BFT consensus engine.
175-
<br>
176-
177-
Apollo enables running all test suites (without modification) against any supported BFT network
178-
configuration (in terms of <i>n</i>, <i>f</i>, <i>c</i> and other parameters).
179-
<br>
180-
181-
Various crash or byzantine failure scenarios are also covered
182-
(including faulty replicas and/or network partitioning).
183-
<br>
184-
185-
Apollo test suites run regularly as part of Concord BFT's continuous integration pipeline.
186-
187-
Please find more details about the Apollo framework [here](tests/apollo/README.md)
188-
189-
## Run examples
190-
191-
192-
### Simple test application (4 replicas and 1 client on a single machine)
193-
194-
Tests are compiled into in the build directory and can be run from anywhere as
195-
long as they aren't moved.
196-
197-
Run the following from the top level concord-bft directory:
198-
199-
./build/tests/simpleTest/scripts/testReplicasAndClient.sh
200-
201-
### Using simple test application via Python script
202-
203-
You can use the simpleTest.py script to run various configurations via a simple
204-
command line interface.
205-
Please find more information [here](./tests/simpleTest/README.md)
206-
207-
### Example application
208-
This example demo application shows some capabilities of the Concord-BFT consensus-based byzantine fault-tolerant state machine replication library.
209-
For Concord-BFT users who are interested in learning more about Concord-BFT and its uses, this application offers a demonstration and instruction.
210-
Overall, any blockchain application based on concord-bft consensus may be created using this example application.
211-
<br>
212-
213-
Use the [test_example.sh](example/scripts/test_example.sh) script to run the example application. This script is also used to perform this demo via the command line interface with different configurations.
214-
<br>
215-
216-
Please see [here](example/README.md) for more information about the example/demo application.
217-
218-
## Directory Structure
219-
220-
221-
- [bftengine](./bftengine): concord-bft codebase
222-
- [include](./bftengine/include): external interfaces of concord-bft (to be used by client applications)
223-
- [src](./bftengine/src): internal implementation of concord-bft
224-
- [tests](./bftengine/tests): tests and usage examples
225-
- [threshsign](./threshsign): crypto library that supports digital threshold signatures
226-
- [include](./threshsign/include): external interfaces of threshsign (to be used by client applications)
227-
- [src](./threshsign/src): internal implementation of threshsign
228-
- [tests](./threshsign/tests): tests and usage examples
229-
- [scripts](./scripts): build scripts
230-
- [tests](./tests): BFT engine system tests
29+
Its implementation is based on the algorithm described in the paper [SBFT: a Scalable Decentralized Trust Infrastructure for
30+
Blockchains](https://arxiv.org/pdf/1804.01626.pdf).
23131

232-
## Contributing
32+
It is designed to be used as a core building block for replicated distributed data stores, and is especially suited to serve as the basis of permissioned Blockchain systems.
23333

34+
Start with example usage [here](https://github.com/vmware/concord-bft/tree/master/examples).
23435

235-
The concord-bft project team welcomes contributions from the community. If you wish to contribute code and you have not
236-
signed our contributor license agreement (CLA), our bot will update the issue when you open a Pull Request. For any
237-
questions about the CLA process, please refer to our [FAQ](https://cla.vmware.com/faq). For more detailed information,
238-
refer to [CONTRIBUTING.md](CONTRIBUTING.md).
36+
## Documentation
23937

240-
## Notes
241-
The library calls `std::terminate()` when it cannot continue in a safe manner.
242-
In that way, users can install a handler that does something different than just calling `std::abort()`.
38+
See the github [wiki](https://github.com/vmware/concord-bft/wiki) for detailed explanation.
24339

24440
## Community
24541

246-
24742
[Concord-BFT Slack](https://concordbft.slack.com/).
24843

24944
Request a Slack invitation via <concordbft@gmail.com>.
25045

25146
## License
25247

253-
concord-bft is available under the [Apache 2 license](LICENSE).
48+
Concord-bft is available under the [Apache 2 license](LICENSE).

docs/design.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ explanatory. Important structures will be mentioned explicitly below.
2222
All user interfaces live in the `bftEngine` namespace.
2323

2424
# Clients
25+
2526
A default client,
2627
[SimpleClient](../bftengine/include/bftengine/SimpleClient.hpp), is included
2728
with concord-bft. It is just one manner of implementing a client, and is
@@ -32,6 +33,7 @@ Python](../util/pyclient/bft_client.py) that we use for testing that does just
3233
that.
3334

3435
## Client Messages
36+
3537
Client request and reply messages are prefixed with a `ClientRequestMsgHeader` or
3638
`ClientReplyMsgHeader` respectively. Each header, like all other messages in
3739
concord-bft is implemented as a packed C struct, meaning that there are no padding
@@ -111,7 +113,7 @@ committed. This is the hook that allows arbitrary SMR implemented in concord-bft
111113
to result in execution of application specific operations at all replicas in a
112114
total order.
113115

114-
# ReplicaConfig
116+
## ReplicaConfig
115117
ReplicaConfig contains most configurable attributes of concord-bft and should be
116118
created by the application and passed into `Replica::createReplica(...)`.
117119
Note that other configurable attributes are set as part of the communication

0 commit comments

Comments
 (0)