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 |
@ -1,93 +1,93 @@
|
||||
### Functional |
||||
### Functional |
||||
|
||||
##### Try to create a new user and login. |
||||
##### Try to create a new user and login. |
||||
|
||||
###### Can you confirm that the user was created? |
||||
###### Can you confirm that the user was created? |
||||
|
||||
##### Navigate to the homepage using the user you created. Try to erase products that were |
||||
##### Navigate to the homepage using the user you created. Try to erase products that were |
||||
|
||||
##### not created by the user. |
||||
##### not created by the user. |
||||
|
||||
###### Is it impossible to edit and delete products that were not created by your user? |
||||
###### Is it impossible to edit and delete products that were not created by your user? |
||||
|
||||
##### Try to sell a product by creating an add with the user created. |
||||
##### Try to sell a product by creating an add with the user created. |
||||
|
||||
###### Is it possible to create adds and sell a product using your user? |
||||
###### Is it possible to create adds and sell a product using your user? |
||||
|
||||
##### Navigate to the homepage and try to edit the add that you have created. |
||||
##### Navigate to the homepage and try to edit the add that you have created. |
||||
|
||||
###### Is it possible for you to edit your own add? |
||||
###### Is it possible for you to edit your own add? |
||||
|
||||
##### Try to create another new user, login and create at least two new adds. |
||||
##### Try to create another new user, login and create at least two new adds. |
||||
|
||||
###### Can you confirm that the new user and the adds were created? |
||||
###### Can you confirm that the new user and the adds were created? |
||||
|
||||
##### Login in with the first user and check if the adds created by the second user are there. |
||||
##### Login in with the first user and check if the adds created by the second user are there. |
||||
|
||||
###### Can you confirm that the adds created by the second user are present? |
||||
###### Can you confirm that the adds created by the second user are present? |
||||
|
||||
##### Navigate to the homepage with a user of your choice and try to delete an add that you have created. |
||||
##### Navigate to the homepage with a user of your choice and try to delete an add that you have created. |
||||
|
||||
###### Is it possible for you to delete your own add? |
||||
###### Is it possible for you to delete your own add? |
||||
|
||||
##### Navigate to the homepage with any user and try to check who is selling each product. |
||||
##### Navigate to the homepage with any user and try to check who is selling each product. |
||||
|
||||
###### Is it possible for you to see who is selling the products without opening the add? |
||||
###### Is it possible for you to see who is selling the products without opening the add? |
||||
|
||||
##### Navigate to the homepage and try to find the cart icon. |
||||
##### Navigate to the homepage and try to find the cart icon. |
||||
|
||||
###### Can you confirm that the cart icon is present in the homepage? |
||||
###### Can you confirm that the cart icon is present in the homepage? |
||||
|
||||
##### Try to add one item to the cart using the first user. |
||||
##### Try to add one item to the cart using the first user. |
||||
|
||||
###### Can you confirm that the item was added to the cart of the first user? |
||||
###### Can you confirm that the item was added to the cart of the first user? |
||||
|
||||
###### Did the message "Added to your cart" appear on the screen when you added something to the cart? |
||||
###### Did the message "Added to your cart" appear on the screen when you added something to the cart? |
||||
|
||||
###### Can you confirm that the cart icon in the homepage shows the number "1", meaning that you have one product in the cart? |
||||
###### Can you confirm that the cart icon in the homepage shows the number "1", meaning that you have one product in the cart? |
||||
|
||||
##### Try to add four more items to the cart. |
||||
##### Try to add four more items to the cart. |
||||
|
||||
###### Can you confirm that all the added items are present in the cart? |
||||
###### Can you confirm that all the added items are present in the cart? |
||||
|
||||
###### Can you confirm that the cart icon in the homepage shows the number "5", meaning that you have five products in the cart? |
||||
###### Can you confirm that the cart icon in the homepage shows the number "5", meaning that you have five products in the cart? |
||||
|
||||
##### Try to open your cart and check if you can see how much you have to pay for all the products in your cart. |
||||
##### Try to open your cart and check if you can see how much you have to pay for all the products in your cart. |
||||
|
||||
###### Can you confirm that the cart displays the total of all the products in your cart? |
||||
###### Can you confirm that the cart displays the total of all the products in your cart? |
||||
|
||||
##### Try to open your cart and remove one item from it. |
||||
##### Try to open your cart and remove one item from it. |
||||
|
||||
###### Can you confirm that the product was removed from the cart and the message "Removed from your cart" appeared on the screen? |
||||
###### Can you confirm that the product was removed from the cart and the message "Removed from your cart" appeared on the screen? |
||||
|
||||
##### Try to go to the cart and check the total. |
||||
##### Try to go to the cart and check the total. |
||||
|
||||
###### Can you confirm that the total was updated accordingly when you removed the item? |
||||
###### Can you confirm that the total was updated accordingly when you removed the item? |
||||
|
||||
###### Can you confirm that the cart item in the homepage was updated an shows the number "4", meaning that you have four products in the cart? |
||||
###### Can you confirm that the cart item in the homepage was updated an shows the number "4", meaning that you have four products in the cart? |
||||
|
||||
##### Try to login with the second user and check if the cart is empty. |
||||
##### Try to login with the second user and check if the cart is empty. |
||||
|
||||
###### Can you confirm that the cart is empty, and the cart from the first user was not carried to the second user? |
||||
###### Can you confirm that the cart is empty, and the cart from the first user was not carried to the second user? |
||||
|
||||
##### Try to logout and add items in the cart without any user. Now after you add items to the cart, login to one user of your choice. |
||||
##### Try to logout and add items in the cart without any user. Now after you add items to the cart, login to one user of your choice. |
||||
|
||||
###### Can you confirm that the items that you added to the cart are present in the user cart? |
||||
###### Can you confirm that the items that you added to the cart are present in the user cart? |
||||
|
||||
##### Try to add some items to the cart and then push the button `Empty cart`. After the message appears, confirm that you want to empty the cart. |
||||
##### Try to add some items to the cart and then push the button `Empty cart`. After the message appears, confirm that you want to empty the cart. |
||||
|
||||
###### Did the message "Are you sure?" appeared on the screen for you to confirm the action? |
||||
###### Did the message "Are you sure?" appeared on the screen for you to confirm the action? |
||||
|
||||
###### After the confirmation were you redirected to the homepage? |
||||
###### After the confirmation were you redirected to the homepage? |
||||
|
||||
### Bonus |
||||
### Bonus |
||||
|
||||
###### +Can you confirm that the student created or added something new like a new brand or the category field? |
||||
###### +Can you confirm that the student created or added something new like a new brand or the category field? |
||||
|
||||
###### +Can you add a product to the cart without opening the add? |
||||
###### +Can you add a product to the cart without opening the add? |
||||
|
||||
###### +If you add four products to the cart from the same seller, can you remove just one from the cart and keep the other three? |
||||
###### +If you add four products to the cart from the same seller, can you remove just one from the cart and keep the other three? |
||||
|
||||
###### +Did the student implement its own display and design? |
||||
###### +Did the student implement its own display and design? |
||||
|
||||
###### +Did the student implement a payment method? |
||||
###### +Did the student implement a payment method? |
||||
|
Loading…
Reference in new issue