The goal of the project is to implement a blockchain peer-to-peer system inspired by Bitcoin, but different.
BLOCKCHAIN NOMENCLATURE
- Block is denoted as Cheese and Blockchain as Cheese Stack.
- Every cheese has the following items -
- Index
- Time Stamp
- Transaction List
- All transactions are stored in a JSON object.
- It has the following attributes -
- Sender
- Receiver
- Amount
- Signature
- Miner name
- Miner reward
- Nonce
- Essence
- Essence of previous Cheese
- ReblochonCheese is the genesis block.
NETWORK
- The Blockchain network has tracker and miners.
- Tracker is a server which contains the list of miners (with IP address and Port number)
- Miners can communicate with the tracker for the list of members in the network.
- The transactions are synchronized between the miners.
Connection
- Miner requests to connect to the tracker and can also ask for miner list.
- A miner generating cheese should broadcast to other miners.
- If there is a conflict between two Cheese indices, then the miner can add the cheese to his stack or request for the full Cheese Stack.
Cheese Validation
- We validate the Cheese to decide whether to accept it or not.
- We check the following:
- If the nonce is giving the essence starting with "0000".
- Previous essence match.
- Order of the index of new cheese.
Mining
- Miners work to find the nonce to generate the essence starting with "000". (proof of work)
- Once approved, he adds it to the longest cheese stack he has and broadcasts it to the network.
- The reward is added in the transaction list in the new cheese with his name.
- Miners collect the new transactions that are broadcasted and they verify transaction by using the digital signature and public keys.
- Once verified, every miner updates his cheese stack.
- Miners can request other miners for the updated cheese stack.
Diagram for the Blockchain architecture
- The idea is to have a tracker and three peers for simulating basic Blockchain working.
- The peers connect to the tracker first and then they are interconnected to eachother.
- After the connection has been established between the three peers, a random transaction is generated.
- This transaction is sent to all the peers and they start the mining process.
- The peer who mines first, broadcasts it to the system and it is added to the blockchain.