Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding documentation #3

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,29 @@

# Section Overview

As Consensus Flow Entry Point, "Proposing" means taking the responsibility of
**receptioning** requests from customers and consortium and **packaging** them into local proposals.
Each of these local proposals are proposed for transactions into the consortium block stream.
`Proposing` means
- **Receptioning** requests from customers and consortium members
- **Staging** these requests packaged into local proposals for being consumed by the consensus.

Each of these local proposals once accepted by the consortium will be uniformly transacted on each consortium node.
The transactions will then be appended into each node ledgers.

A **Section** is a meaningful Set of Pipelines and Junctions put together.

![proposing-overview](documentation/media/proposing-overview.png)

> <img align="center" src="https://via.placeholder.com/15/24A712/000000?text=+"> Worth Mentioning : [Packaging](/packages/packaging/) is the core of this section.
> It's a good example of Pipeline Implementation in Haskell.

- [Receptioning](/packages/receptioning) : Client/Server for collecting requests presenting them for being packaged into a proposal.
- [Detecting Starvation](/packages/detecting-starvation) : Notify the `Packaging` pipeline when all the local proposals produced have been consumed.
- [Packaging](/packages/packaging/) : Produce Local Proposal Files with the following properties
- [Receptioning](/packages/receptioning) : Client/Server for collecting requests.
- [Detecting Flow Tension](/packages/detecting-tension) : Detect if the local proposal flow is tensed, meaning if the consensus has consumed more local proposals than being staged.
- [Staging](/packages/staging) : Stage Local Proposal Files for being consumed by the consensus. Local Proposals have the following properties
- `Proposals are never empty`
- `Proposals file size < configurable size limit`
- Filename - `x.proposal` with `x` the offset of proposal produced
- [Simulating](/packages/simulating) : Simulate the proposing input streams
- Send dummy requests to `Receptioning` and simulate the downstream consumption of local proposal.
- 2 modes are available :
- Send dummy requests to `Receptioning` and simulate the downstream local proposal consumption.
- 2 available modes
- **Overflowing** : Sending more requests than the consortium can consume
- **UnderSupplying** : Sending less request than the consortium can consume


# DevOps

[Zeus](/packages/zeus) : Local Deployment Tool
Expand Down
30 changes: 22 additions & 8 deletions documentation/development-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# Environment Setup

- Install [Docker For Mac](https://docs.docker.com/docker-for-mac/install/)
- Install [Multitail](http://macappstore.org/multitail/)
- Install the Haskell Platform For Mac (GHC, Cabal build system, [Stack tool](https://docs.haskellstack.org/en/stable/README/), ...)

```shell
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
```
Expand All @@ -20,28 +20,28 @@ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
# Run the tests
- Manual
```shell
➜ consensus-proposing git:(master) : stack test
stack test
```
- Automatic (will rebuild and test every time a file changes)
```shell
➜ consensus-proposing git:(master) : stack test --fast --file-watch
stack test --fast --file-watch
```

# Install the executables

- Manual
```shell
➜ consensus-proposing git:(master) : stack install
stack install
```
- Automatic (will rebuild and install every time a file changes)
```shell
➜ consensus-proposing git:(master) : stack install --fast --file-watch
stack install --fast --file-watch
```
You should see something similar at the end :
```shell
Copied executables to /Users/nhenin/.local/bin:
- dolla-consensus-proposing-detecting-starvation
- dolla-consensus-proposing-packaging
- dolla-consensus-proposing-detecting-tension
- dolla-consensus-proposing-staging
- dolla-consensus-proposing-receptioning
- dolla-consensus-proposing-simulating
- dolla-consensus-proposing-zeus
Expand All @@ -53,6 +53,20 @@ Copied executables to /Users/nhenin/.local/bin:
- Make sure you are at the root of the project
- Execute Proposing Zeus

```shell
dolla-consensus-proposing-zeus
```
N.B : If you run it for the first time , it will install the eventstore docker image (eventstore/eventstore:release-5.0.6)
```shell
WARNING: Some next steps will your ADMIN PASSWORD
```
Next Steps :
- Interactivity with the CLI for getting the desired parameters
- Start the Event Store docker container
- Configure the EventStore for running the consensus properly (**REQUIRE ADMIN PASSWORD**)
- Run the proposing executables in another tab


Below, an example about how to run Zeus
```shell
➜ consensus-proposing git:(master) : dolla-consensus-proposing-zeus
Expand Down Expand Up @@ -104,4 +118,4 @@ You can now see the local proposal being produced in `output/nodes/achilles/prop

![proposal-produced](media/proposal-produced.png)

go back to Zeus if you want to stop the Proposing section.
go back to Zeus if you want to stop the Proposing section. (choice 2)
Binary file modified documentation/media/proposing-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
11 changes: 0 additions & 11 deletions packages/detecting-starvation/app/Executables.hs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Empty file.
Loading