How riyanda-s/blockchain-technology works
This repository contains several independent blockchain exercises rather than one integrated product: a Flask-based proof-of-work node, two similar in-memory Python chain prototypes, and a CourseReward smart contract with deployment and interaction scripts. The main user workflows are submitting transactions and mining/synchronizing blocks, or deploying the reward contract, managing student eligibility, and claiming tiered rewards. Solidity implementation details are unsampled, so its internal behavior is represented only at the level evidenced by the interaction script.
Main entry points: blockchain-1.py HTTP Routes · interact.js Reward Interaction · deploy.js Deployment Script · blockchain.py Chain Prototype
Components 13
Blockchain API
- HTTP Routes
task-1/blockchain-1.py - Chain Engine
task-1/blockchain-1.py - Peer Synchronization
task-1/blockchain-1.py
Python Prototypes
- Chain Prototype
task-1/blockchain.py - Template Chain
template.py
Course Rewards
- Deployment Script
task-2/scripts/deploy.js - Reward Contract
task-2/contracts/CourseReward.sol - Reward Interaction
task-2/scripts/interact.js
Other components
- API Client
- Peer Nodes
- Contract Owner
- Students
- EVM Network
Connections 14
- API Client → HTTP Routes: calls endpoints
task-1/blockchain-1.py - HTTP Routes → Chain Engine: handles transactions
task-1/blockchain-1.py - HTTP Routes → Chain Engine: mines blocks
task-1/blockchain-1.py - HTTP Routes → Peer Synchronization: requests sync
task-1/blockchain-1.py - Peer Synchronization → Peer Nodes: fetches chains
task-1/blockchain-1.py - Peer Synchronization → Chain Engine: replaces chain
task-1/blockchain-1.py - Deployment Script → Reward Contract: deploys
task-2/scripts/deploy.js - Deployment Script → EVM Network: submits deployment
task-2/scripts/deploy.js - Contract Owner → Reward Interaction: uses workflow
task-2/scripts/interact.js - Students → Reward Interaction: uses workflow
task-2/scripts/interact.js - Reward Interaction → Reward Contract: reads and updates
task-2/scripts/interact.js - Reward Interaction → EVM Network: sends transactions
- Chain Prototype → Chain Prototype: mines pending
task-1/blockchain.py - Template Chain → Template Chain: mines pending
template.py