GithubHelp home page GithubHelp logo

gabulhas / protocol-live-testing-tool Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 132.96 MB

Live Protocol Tester built for Tezos. Also includes Proof of Work and Proof of Authority.

Home Page: https://gitlab.com/Gabulhas/tezos

License: MIT License

Makefile 0.03% Dockerfile 0.01% OCaml 84.31% Shell 0.17% Emacs Lisp 0.04% Python 1.84% Nix 0.01% Perl 0.02% C 0.01% JavaScript 2.41% Standard ML 0.08% HTML 0.01% SourcePawn 0.01% WebAssembly 10.91% CSS 0.01% C++ 0.01% Batchfile 0.01% LigoLANG 0.14%
proof-of-work test tezos proof-of-authority

protocol-live-testing-tool's Introduction

Tezos Protocol Live testing Tool

Introduction

This project focuses on the development and testing of blockchain consensus protocols, leveraging the adaptability of the Tezos blockchain. It includes the implementation of two consensus algorithms, Proof of Work (PoW) and Proof of Authority (PoA), and a Live Testing Tool for real-time testing and analysis.

The tool implemented not only serves to get real time information of metrics (TPS, Time To Consensus, etc), to test the protocol execution overall, but also to easily execute and trying out changes on protocols while in a development workflow.

This was developed during my thesis, which can be found here.

Consensus Protocols

Besides the Live Testing tool, 2 protocols were also implemented. This includes both economic protocol, baker and clients.

Proof of Work (PoW)

A consensus algorithm that requires participants (miners) to solve complex cryptographic puzzles to validate transactions and create new blocks. Similar to Bitcoin's original protocol.

The implementation can be found here.

Proof of Authority (PoA)

  • Description: A permissioned consensus algorithm where a set of trusted nodes (validators) are responsible for validating transactions and creating new blocks. Utilizes a round-robin mechanism for validator selection. The rounds are defined by the order of the hash of the validator's address + round number. Basically, for every known validator, it's created an hash using h(validator_address + round_number), and sort by hash. The first on the list is the current validator. If it fails to validate during the round time, the next on the list should be the next validator, and so on.

The implementation can be found here.

Live Testing Tool

Overview

  • Functionality: A web server-based tool that provides a dynamic environment for testing blockchain protocols. It offers various metrics for performance evaluation and allows control over different network aspects.
  • Design: Connects to all nodes in the network, continuously pooling information and controlling them. It exposes HTTP endpoints for test program control and network information retrieval.
  • Uses: As seen here, it's easy to write a testing script (in any language) to interact with the tool, as the tool exposes an HTTP API for interaction.

Some Key Endpoints

  • /start-test, /stop-test, /status: Control the initiation and termination of test networks.
  • /swap-protocol, /change-parameters: Modify the network's protocol and parameters.
  • /start-node/:id, /stop-node/:id: Manage individual nodes in the network.
  • /tps, /time-to-consensus, /propagation-times: Provide metrics like Transactions Per Second and block propagation times.

Getting Started

Instructions on how to set up and run the consensus protocols and the Live Testing Tool.

Follow the tutorial on Tezos' official documentation on how to setup everything for development.

Then all you have to do is execute the build action in the make file.

make build

Usage

After building everything, you just need to execute the following command to get the tool up and running.

./platform_server

If you want to understand how to use this tool, there are examples here.

The main workflow of the testing tool is:

  • Start a network with a defined number of nodes (nodes can be added and removed on-demand).
  • Setup the bakers (if any)
  • Preform actions
  • Retrieve Metrics and other info

Contributing

I don't expect any contributions unless anyone finds this useful.

Let me know through socials if you ever want to contribute and I'm glad to help.

protocol-live-testing-tool's People

Contributors

abate avatar acerone-trilitech avatar acoquereau avatar arvidj avatar chambart avatar clarus avatar dannywillems avatar g-b-fefe avatar gabulhas avatar hnrgrgr avatar iguernl avatar klakplok avatar lthms avatar mbouaziz avatar mebsout avatar nicnomadic avatar paracetamolo avatar picdc avatar raphael-proust avatar remyzorg avatar saroupille avatar sheremetyev avatar smelc avatar smondet avatar sribst avatar sventimir avatar vapourismo avatar vbmithr avatar vch9 avatar vect0r-vicall avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.