Skip to content

GemsGame/hash-layer-miner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hash Layer Banner

⛏ Hash Layer Miner

This is a Node.js CPU miner for Hash Layer — a permissionless Proof-of-Work layer built on top of Sui. It allows anyone to contribute raw computation to a decentralized chain of blocks, each linked by hash and validated through transparent difficulty rules. The miner connects to the Sui network, reads the current chain state, constructs candidate blocks, and searches for a valid nonce that satisfies the current difficulty target. Once a valid block is found, it submits the result to the network.

Hash Layer Banner


📦 Requirements


🚀 Getting Started

1. Install node.js

Node.js Logo Node.js official website

2. Download the miner

If you're using Git:

git clone https://github.com/GemsGame/hash-layer-miner.git
cd hash-layer-miner

Or just download the ZIP and unzip it.

3. Install dependencies

npm install

4. Create a .env.secrets file near the .env file with text

MNEMONIC="word word word word word word word word word word" # Write your seed-phrase here (12 words)

5. Start mining

npm run start

6. Mint coins

After mining you can mint your reward by that command.

npm run mint

🔗 Useful Links

🌐 Hash Layer Network Features

  • Permissionless Mining
    Anyone can participate in mining without registration, permissions, or centralized coordination.

  • On-Chain Events Instead of Objects
    Each block is emitted as an event, reducing gas costs and simplifying verification.

  • Linear Emission Model
    Smooth reward decay over time without abrupt halvings, enabling predictable token distribution.

  • Dynamic Difficulty Adjustment
    Difficulty recalibrates every 1440 blocks to maintain a stable mining tempo.

  • Transparent Verification
    The full block history is accessible via RPC, from genesis to the latest block.

  • Programmable Data Layer
    Each block includes a data field for storing messages, NFT triggers, or other on-chain payloads.

  • Minimal Overhead
    The architecture avoids shared objects and persistent storage, enabling scalable mining with low cost.

  • Cryptographic Integrity
    Every block includes a previous_hash, forming a verifiable chain of computational work.

  • Sui Integration
    Built on Sui’s object-oriented architecture for high throughput and secure execution.