The repository represents a blockchain-based ledger system with a user-friendly web interface. This ledger allows partner banks to conduct financial transactions (that is, to transfer money between senders and receivers) and to verify the integrity of the data in the ledger. It is a simple version for learning purposes.
Step 1: Create a Record Data Class that repponsible for hashing.
Step 2: Create Chain class that repsponsible for adding blocks to chain and validation blockchain.
Step 3: Create UI with Streamlit service
Step 4: Testing
This project leverages the following tools for financial analysis:
-
Conda - source package management system and environment management system.
-
Pandas - Python library that’s designed specifically for data analysis.
-
Streamlit - Streamlit turns data scripts into shareable web apps.
-
Python - is a programming language.
Libraries:
import streamlit as st
from dataclasses import dataclass
from typing import Any, List
import datetime as datetime
import pandas as pd
import hashlib
-
Install Streamlit
pip install streamlit
-
Clone the repository
git clone https://github.com/VladislavGlupak/Blockchain-based-ledger-system.git
-
Go to repository folder and run
streamlit run pychain.py
-
You will see simple user interface which allows to learn basic blockchain principles, such as creating block, hashing block, adding block to chain, verificationofthe blockchain.
The user can see several blocks created and added into the chain.
Also, the user can see result of verification of the blockchain (True
).
Step by step:
- Enter values for the sender, receiver, and amount, and then click the
Add Block
button. Do this several times to store several blocks in the ledger.
- Check the chain and click
Validate chain
.
- Full screen
Glupak Vladislav Linkedin