mirror of https://github.com/01-edu/public.git
xalava
2 years ago
committed by
Dav Hojt
6 changed files with 344 additions and 47 deletions
@ -0,0 +1,43 @@
|
||||
# A network dashboard and benchmarking tool |
||||
|
||||
Blockchain nodes participate in a common peer-to-peer network retrieving information, executing and validating transactions and blocks. However, software clients differ in their functionalities and resource consumption. The purpose of this project is to create a tool, `benchy` that can launch, monitor and benchmark Ethereum networks. |
||||
|
||||
## launch-network |
||||
|
||||
At first, we will focus on deploying a private Ethereum network while monitoring the nodes. The nodes can be launched directly or within containers. |
||||
|
||||
* The network should consist of five nodes named Alice, Bob, Cassandra, Driss, and Elena. The first three are validating nodes. Each node has a corresponding Ethereum address. |
||||
* Two different clients must be used, for instance, Geth and Nethermind |
||||
* The consensus mechanism must be clique. |
||||
|
||||
The network should be launched with the command `benchy launch-network`. The nodes should be launched in the background and the command should return immediately. |
||||
|
||||
## Infos |
||||
|
||||
Using the `infos` command, Benchy should display information on each node, in the terminal or in a webpage. The information must include: |
||||
|
||||
* Their latest block |
||||
* Their list of connected peers |
||||
* The number of transactions in their mempool |
||||
* Their current CPU and memory consumption (Hint: the outputs of commands such as `docker stats` or `ps` can be used) |
||||
* Their corresponding Ethereum address and its balance. |
||||
|
||||
|
||||
## Scenario |
||||
|
||||
To analyze our network, we need to simulate some transactions. Benchy should propose the following scenarios available with the command `benchy scenario X`. Each scenario must provide feedback on its execution, including updated balances after transfers. |
||||
0. Initialise the network by letting it run for a few minutes. Validating nodes must have Eth available as reward or part of the initial configuration. |
||||
1. Alice sends every 10 seconds 0.1 ETH to Bob |
||||
2. Cassandra deploys an ERC20 smart contract with 3000 tokens BY, and gives 1000 to Driss and 1000 to Elena. |
||||
3. Cassandra tries to send 1 ETH to Driss and immediately tries to cancel it by sending a transaction with a higher fee to send it to Elena. |
||||
|
||||
## temporary-failure |
||||
|
||||
To study our network further, benchy can disrupt the current network by randomly stopping one node of the network. The command “temporary-failure X” stops the node X for 40 seconds and puts it back online. |
||||
|
||||
## Optional |
||||
|
||||
* _an option `-u [time] runs any command continuously each ‘time’ in seconds, 60 by default._ |
||||
* _Add the possibility to connect one node to a testnet network _ |
||||
* _Infos displays information only about this node_ |
||||
* _`Scenario` runs the same scenarios on different addresses_ |
@ -0,0 +1,37 @@
|
||||
## Benchmarking tool audit |
||||
|
||||
#### Read the documentation |
||||
##### Does the README file contains the instructions to launch the project? |
||||
##### Are two different clients launched? |
||||
##### Is clique the consensus algorithm? |
||||
|
||||
#### Launch the network with the `launch-network` and display its status with `infos` |
||||
##### Does the command launch the five nodes? |
||||
##### Does the interface display the latest block of each node? |
||||
##### Does the interface display their Ethereum address and balance? |
||||
##### Does the interface display the CPU and memory consumption of each node? |
||||
|
||||
#### Launch scenario 0 |
||||
##### Does Alice, Bob and Cassandra have a positive balance of ETH? |
||||
|
||||
#### Launch scenario 1 |
||||
##### Does the command provide feedback? |
||||
##### Does the `infos` command show the updated ETH balance? |
||||
##### Does the `infos` command displays transactions in the mempool? |
||||
|
||||
#### Launch scenario 2 |
||||
##### Does the command provide feedback? |
||||
##### Do Driss and Elena appear to have received 1000 BY tokens? |
||||
|
||||
#### Launch scenario 3 |
||||
##### Does the command provide feedback? |
||||
##### Does the `infos` command show the updated balance of Elena receiving one ETH? |
||||
|
||||
#### Run `temporary-failure Alice` and launch `infos` |
||||
##### Is the node disabled in the `infos` output? |
||||
##### Does it come back online after 40 seconds? |
||||
##### Does it appear to be up to date a couple of minutes later? |
||||
|
||||
### Bonus |
||||
##### Does the `-u` option allow you to launch each command with a regular update? |
||||
##### Does the tool offer the possibility of launching a node connected to one of the testnet networks? |
@ -0,0 +1,35 @@
|
||||
## Trading Platform Audit |
||||
|
||||
#### Read the documentation |
||||
##### Does the README file contain or redirect to the instructions to launch the project? |
||||
##### Are the instructions to install and deploy the project usable to you? |
||||
##### Does the documentation contain a description of the architecture of the project? |
||||
##### Does the documentation contain details on the API and smart contract functions? |
||||
|
||||
#### Launch the project |
||||
##### Is a blockchain network running? |
||||
##### Can you display the web interface? |
||||
##### Does the homepage allow you to connect a wallet? |
||||
|
||||
#### Connect a wallet |
||||
##### Were you asked to provide a name and upload a passport picture? |
||||
##### Does your wallet appear to be connected? |
||||
|
||||
#### Use the provided script to populate the platform |
||||
##### Was the documentation clear enough to launch the populating script? |
||||
##### Does the website show the various digital assets? |
||||
##### Did the two accounts receive the corresponding asset looking at the portfolio page once connected? |
||||
|
||||
#### As the first user, Aya, opens the CLV page and offers to sell 10 CLV at 9 TRG |
||||
##### Does the interface reflect the amount of CLV available to Aya? |
||||
##### Does the order validation trigger a transfer of funds? |
||||
|
||||
#### As the second user, Beatriz, open the CLV page and buys 10 CLV at market price |
||||
##### Does the platform correctly offer to buy at 9 TRG? |
||||
##### Does the trade seem to execute? |
||||
##### Does Beatriz have 60 TRG and 10 CLV now? |
||||
##### Does Beatriz portfolio display a withdrawal button for CLV? |
||||
|
||||
#### From the portfolio page, click on withdraw for CLV |
||||
##### Does the transaction execute? |
||||
##### Does Beatriz now have full possession of its assets (in the second column)? |
After Width: | Height: | Size: 40 KiB |
Loading…
Reference in new issue