Java · Python · JavaScript · TypeScript

Difficulty: Hard

In the last Eurovision edition (International European singing competition), the organization was the victim of a series of cyberattacks aimed at cutting off communications between countries to prevent voting.

Due to these incidents, the organization has decided to develop a new voting system to ensure security in future editions.

The organizers hired you to bring your talent and create a new voting system based on Blockchain, providing a decentralized database and ensuring the immutability of the data. It's time to give your best!

How it works?

The aim of this REST API is to add and retrieve the votes between countries and show the current state of these votes. To do so, you have to build an API that allows the countries to submit a vote to another country and also retrieve the votes submitted from all countries.

To provide a good security layer, all the countries will be attached to that Blockchain network (with a P2P network) sharing the transactions. This will give you an extra security layer against any kind of cyberattack, but also traceability of what's happening.

So, when the voting endpoint is called, the API will store the vote as a transaction and then generates a new block that will be added to the Blockchain. Finally, the node will update the Blockchain to all nodes that are connected to the P2P network.