Skip to content

Commit 6f792fc

Browse files
authored
Merge pull request #2 from arcolife/master
update master with latest
2 parents e171f28 + 8200dcb commit 6f792fc

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

+813
-1282
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Refer to:
44
https://arxiv.org/abs/1805.01457
55
https://eprint.iacr.org/2016/917.pdf
66

7+
## Run
8+
9+
Refer to `trueconsensus/README.md` for further instructions
710

811
### Parameterized by following..
912

doc/DEV.md renamed to docs/DEV.md

File renamed without changes.

docs/TODO.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Generic Infra
2+
3+
- [ ] Separate Dapp architecture: `dapps/bank.py` is currently tightly coupled with node.py.
4+
- [ ] no gRPC communiction between nodes yet
5+
- [ ] add network_latency check
6+
7+
## Fastchain
8+
9+
- [ ] nodes call quits on any error
10+
- [ ] xyz.pem not found error on running client.py. Batch size not playing well in proto_message.message check
11+
- [ ] complete subprotocol.py
12+
- [ ] complete bft_committee.py
13+
- [ ] return blocks of transactions
14+
15+
## Snailchain / Committee election
16+
17+
- [ ] complete minerva/vrf.py function
18+
- [ ] complete snailchain/fpow.py dummy
19+
- [ ] integrate level db wrappers
20+
- [ ] integrate py-evm functionalities

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
bitcoin==1.1.42
22
docopt==0.6.2
33
ecdsa==0.13
4+
protobuf==3.5.2.post1
45
pycrypto==2.6.1
56
pykwalify==1.6.1
67
PySocks==1.6.8

trueconsensus/fastchain/pbft-py/README.md renamed to trueconsensus/README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,51 @@ This is a `Practical Byzantine Fault Tolerance` implementation of Miguel Castro
44

55
### Setup
66

7-
#### Install Google's Protobuf
8-
9-
Download and install [google protobuf](https://github.com/google/protobuf/tree/master/python/google)
10-
11-
```
12-
# brew install protobuf
13-
OR
14-
# pip install protobuf
15-
```
16-
177
#### Configure paths and tunables
188

19-
Fill up the config files `pbft_logistics.cfg` and `pbft_tunables.yaml` or use defaults.
20-
9+
Fill up the config files `conf/pbft_logistics.cfg` and `conf/pbft_tunables.yaml` or use defaults.
2110

2211
#### Install dependencies
2312

2413
__Recommended__: Use a python3 virtual environment
2514

2615
```
2716
virtualenv -p python3 venv
28-
virtualenv -p python3 venv
2917
source venv/bin/activate
3018
pip install -r requirements.txt
3119
```
3220

21+
##### Install Google's Protobuf
22+
23+
Download and install [google protobuf](https://github.com/google/protobuf/tree/master/python/google)
24+
25+
```
26+
# brew install protobuf
27+
OR
28+
# pip install protobuf
29+
```
30+
3331
#### Generate required content as a precusory
3432

3533
Then proceed as follows:
3634

3735
```
38-
# generate requests_pb2.py from requests.proto file
39-
./proto.sh
36+
# change to folder trueconsensus
37+
cd trueconsensus/
38+
39+
# generate proto/requests_pb2.py from proto/requests.proto file
40+
./utils/generate_proto.sh
4041
4142
# generate asymm keypairs
42-
python make_keys.py
43+
python -m utils.make_keys
4344
4445
# generate requests
45-
./generate_requests_dat.py
46+
python -m utils.generate_requests_dat
4647
```
4748

4849
### Run
4950

50-
Server: `./server.py`
51+
Server: `./engine.py`
5152

5253
Client: `./client.py`
5354

trueconsensus/fastchain/pbft-py/client.py renamed to trueconsensus/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import socks
1212
# import time
1313

14-
import request_pb2
15-
from config import client_address, \
14+
from proto import request_pb2
15+
from fastchain.config import client_address, \
1616
client_id, \
1717
RL, \
1818
client_logger, \

trueconsensus/conf/pbft_tunables.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# pbft core configurations
2+
# name: pbft base configuration
3+
testbed_config:
4+
total: 5 # excluding base client
5+
client_id: 5 # total-1 => 0-indexed
6+
server_id_init: 4 # => 0 indexed
7+
threading_enabled: true
8+
requests:
9+
max: 256
10+
batch_size: 32
11+
general:
12+
max_fail: 1
13+
base_port: 49500
14+
tor_socksport_range: 9050,9150
15+
# refer to README.md#parameterized-by-following section for these configurables
16+
slowchain:
17+
csize: 0
18+
bft_committee:
19+
lambda: 1
20+
timeout: 300 # seconds
21+
tbft: 1
22+
csize: 0
23+
th: 10 # adjusted to ⌈csize/3⌉ later
24+
actual_delta: 0
25+
delta: 1 # ms to be adjusted from network ping test
26+
# https://github.com/matthieu-lapeyre/network-benchmark/blob/master/network_test.py
27+
chain: []
28+
alpha: 0 # initial adversary hash power

trueconsensus/dapps/__init__.py

Whitespace-only changes.

trueconsensus/fastchain/pbft-py/bank.py renamed to trueconsensus/dapps/bank.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import proto_message as message
2-
from config import config_general
1+
from proto import proto_message as message
2+
from fastchain.config import config_general
33

44

55
class bank:

0 commit comments

Comments
 (0)