Git Product home page Git Product logo

workshop5's Introduction

ben-or-consensus-algorithm

Your goal for this exercise is to implement a version of the Ben Or consensus algorithm

This repository already implements the basic structure you need for the consensus network, your goal will be to implement the inner workings of the algorithm.

The Ben-Or decentralized consensus algorithm

The Ben-Or consensus algorithm is making use of randomness to create consensus among a decentralised network of nodes. This type of algorithm is at the core of blockchain networks and other decentralised technologies.

To complete this exercise, you will need to dive into the inner workings of the algorithm and implement it. Here is a list of ressources to learn more about the technicalities of the algorithm:

Setting up the project

You will first need to install the dependencies of the project by running yarn at the root of the project.

Note that the only required dependencies are already specified and no other package should be installed to complete this exercise.

Used packages are

  • body-parser
  • express

You should have Node installed at a version superior to v18.

How to test your code

There are two ways to achieve this.

  1. Run the unit tests with the command yarn test and see how your implementation performs against the given tests
  2. Modify the start.ts file with the parameters you'd like, launch the network manually with yarn start and see the results

Implementing the Ben-Or algorithm

Follow the step by step instructions to complete this workshop.

Grading

You are graded out of 20 points based on the unit tests provided in the __test__/tests/ directory.

Note that not all tests are provided so you can secure a number of points but the rest will be graded after you submit the exercise.

This exercise should be completed individually, you are not allowed to reuse code from other students. Any detected instances of copied code will incur a reduction of your grade.

workshop5's People

Contributors

pybast avatar nandyba avatar

Watchers

Matteo Chianale 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.