https://github.com/maskedsyntax/blocklite
A basic crypto coin in Python3 using hashlib (sha-256 encryption).
https://github.com/maskedsyntax/blocklite
Last synced: 6 months ago
JSON representation
A basic crypto coin in Python3 using hashlib (sha-256 encryption).
- Host: GitHub
- URL: https://github.com/maskedsyntax/blocklite
- Owner: MaskedSyntax
- Created: 2021-06-26T13:10:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T18:23:26.000Z (over 1 year ago)
- Last Synced: 2024-11-19T22:36:32.320Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
BlockLite
An experimental blockchain implementation written from scratch in Go!
## Overview
BlockLite aims to build a blockchain from the ground up, with plans to introduce a cryptocurrency called **`MaskedCoins`**. The current codebase includes a basic blockchain structure with proof-of-work consensus, RESTful APIs, and supporting utilities, with more features in development.
## Features
- **Blockchain Core**: Implements a simple blockchain with blocks containing index, timestamp, proof, and previous hash.
- **Proof of Work**: Uses a basic PoW algorithm requiring 4 leading zeros in the hash.
- **API Endpoints**: Provides RESTful APIs via Gin to interact with the blockchain (e.g., get blocks, mine new blocks).
## Getting Started
### Prerequisites
- Go (1.18+)
- Git
### Installation
1. Clone the repository:
```bash
git clone https://github.com/maskedsyntax/blocklite.git
cd blocklite
```
2. Install dependencies:
```bash
go mod tidy
```
3. Install `air` for live reloading:
```bash
go install github.com/air-verse/air@latest
```
> [!IMPORTANT]
> Ensure `air` is in your PATH to execute it successfully.
### Run the Project
- Start the server with live reloading:
```bash
air
```
- Access the API at `http://localhost:8080` (configurable via `PORT` environment variable).
## Development
- **Live Reloading**: Changes in `.go` files trigger restarts via `air`. The `/tmp` folder is temporary and ignored in version control.
- **Testing**: Run tests with:
```bash
go test ./...
```
## Contributing
This is a personal project, but feel free to fork and submit pull requests. Feedback is welcome!
## License
This project is licensed under the [MIT License](LICENSE). See the `LICENSE` file for details.
> [!NOTE]
> Updates on `MaskedCoins` and future features will be shared as they progress.