Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

southzyzy/DnStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DnStack

Implementing DNS with Blockchain Technology

Installation

Version

Clone

  • Clone this repo to your local machine

Using git command line

git clone https://github.com/southzyzy/DnStack

Setup

  • Install the required dependencies

Using python3-pip

pip3 install pandas gevent flask flask-wtf pycryptodome

Documentation

Flow Diagram

Overall Flow

Concept

DnStack vs DNS

DnStack is following the concept of Blockstack DNS (BNS). The idea is listed in their documentation and DnStack is a Proof-of-Concept (POC) on how BNS works.

Read More

Blockstack vs DNS

Consensus

The whole point of Blockchains is that they should be decentralized. And if they’re decentralized, how on earth do we ensure that they all reflect the same chain? This is called the problem of Consensus, and we’ll have to implement a Consensus Algorithm if we want more than one node in our network.

We then implement this Consensus Algorithm call Proof-of-Work (POW).

"Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains."

In other words, the longest chain on the network is the de-facto one. Using this algorithm, we reach Consensus amongst the nodes in our network.

Inside DnStack

Inside DnStack


Running the Program

This project requires the following script to operate:

  1. Broker.py
  2. run.py (Web UI of Broker) (Optional to run)
  3. miner.py
  4. alice.py
  5. bob.py

Broker.py

This is the Broker script that handles the traffic flow, and the main leader for our Blockchain.

python3 broker.py

run.py

Web UI for the Broker program, to access go to http://localhost:1337

python3 run.py

Miner.py

Mining program to calculate Proofs for nodes and communicates with the Broker.

python3 miner.py

Alice.py & Bob.py

Nodes in our DnStack network.

python3 alice.py
python3 bob.py

Contributors

Gerald Peh Tan Zhao Yea
Gerald Peh Zhao Yea
github.com/hellogeraldpeh github.com/southzyzy

About

[POC] DNS over Blockchain in an Intranet

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors