pranjalsahu / byzantinechainreplication Goto Github PK
View Code? Open in Web Editor NEWByzantine Chain Replication
Home Page: http://www.cs.cornell.edu/~ns672/publications/2012OPODIS.pdf
Byzantine Chain Replication
Home Page: http://www.cs.cornell.edu/~ns672/publications/2012OPODIS.pdf
README ------ BCR by Pranjal Sahu and Santiago Vargas --------------------------------------------------------------------------------------------------------- PLATFORM. We have used CPython 3.6 We have used DistAlgo version 1.0.11 We have used macOS 10.13 We tested multi host using two laptops in same network --------------------------------------------------------------------------------------------------------- INSTRUCTIONS. To run the system, execute the following command python3 -m da -n (Nodename) src/main.da {config} Where {config} is the configuration file. {Nodename} is the node for example, OlympusNode and ClientNode Run both of these commands in two different hosts for multihost functionality. The OlympusNode command must be run before the ClientNode command. Example: python3 -m da --message-buffer-size 20000000 -M -n OlympusNode -H localip -R remoteip src/main.da ./config/config7.txt python3 -m da --message-buffer-size 20000000 -D -n ClientNode -H localip -R remoteip src/main.da ./config/config7.txt localip: Local node IP address remoteip: IP address of peer To run with Multi-Host replicas (ie. replicas spread on different hosts): 1. Uncomment the code in src/olympus.da that is surrounded by "# UNCOMMENT ME FOR MULTI-HOST REPLICAS" 2. Run the above instructions Log files for olympus and replicas are stored in the ```logs/{test_case_name}.logs``` files and logs for clients are written to ```logs/client{id}.logs``` where test_case_name is replcaed by the test_case_name value in config and id corresponds to the client id in the config as well. --------------------------------------------------------------------------------------------------------- WORKLOAD GENERATION. For pseudorandom workload generation, we previously downloaded a list of words to a file (words.txt). From this list of words, during runtime, we take a subset of words. We then use python's random library, apply the pseudorandom seed, and use random.randint to generate a random operation and a random value. The random value is a word from the words list or corresponding indices in the case of the SLICE command. --------------------------------------------------------------------------------------------------------- BUGS AND LIMITATIONS. 1. We are omitting the trigger forwarded_request 2. We have tested the code for cases when different clients operate on the same key using pseudorandom. However since the number of requests are large therefore we could not check exact result, but the results shows that the multple requests operated on same key and the results in final dictionary demonstrate that since the test for each client fails. --------------------------------------------------------------------------------------------------------- CONTRIBUTIONS. Pranjal: 1. All the failure triggers (Fault injection) 2. All the failures (Fault injection) 3. Olympus creation and replica creation (Creating initial configuration, setup and starting process) 4. pseudorandom workload creation 5. Testing framework creation in client (checking dictionary content) 6. Reading configuration from config file and generating workload from it 7. Writing testing output to log files (Logging) 8. Generating different test cases in config folder 9. Readme and testing.txt 10. Checkpointing (sign, validate, handle checkpoint shuttle, delete history) 11. Check expected content at end of test case 12. send wedge requests 13. Phase 2 triggers and failures Santiago: 1. Sending new requests and retransmission from client 2. Receiving new requests and retransmission from replicas 3. Order Command Shuttle and Result Shuttles 4. Validation or order and result proofs at the client and replicas 5. Logging system 6. Applying order command transition at the replica 8. Send wedge responses from Replicas 9. Validation of wedge responses in Olympus 10. Computing initial running state and replica catchup in Olympus 11. Detection of provable misbehavior 12. Catchup messages at replicas 13. Multi-host replicas 14. Send responses to clients from Olympus --------------------------------------------------------------------------------------------------------- MAIN FILES. All source code files are in src/ --main.da is the code that launched olympus and clients --olympus.da sets up the olympus process and launches replicas --replica.da contains the logic for each replica --request.da contains the data structure for a request/order object --status.da contains constants Configuration files are in config/ --These files contain specific configurations for test cases --------------------------------------------------------------------------------------------------------- CODE SIZE. main.py ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 1 6 1 227 ------------------------------------------------------------------------------- olympus.py ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 1 18 1 259 ------------------------------------------------------------------------------- replica.py ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 1 28 1 703 ------------------------------------------------------------------------------- request.py ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 1 5 1 42 ------------------------------------------------------------------------------- client.py ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 1 18 1 307 ------------------------------------------------------------------------------- status.py ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 1 1 1 7 ------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------- LANGUAGE FEATURE USAGE. Python List comprehensions: > 25 Python dictionary comperehensions: > 12 Dist algo set comprehensions: 5 Dist algo aggregations: > 12 Dist algo Logger --------------------------------------------------------------------------------------------------------- PERFORMANCE 1. raft2.da -> 8.35 seconds 2. single host perform900.txt -> 25 seconds 3. multi host perform900.txt -> 36 seconds
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.