coderscoin/miner
This is the official mining software for CSC cryptocurrency. CodersCoin uses the Proof of Work consensus algorithm to validate blocks, but due to the lightweight nature of the blockchain, hashing and the proof of work process do not require too much computing capacity unlike other cryptocurrencies.
CodersCoin Miner
This is the official mining software for CSC cryptocurrency. CodersCoin uses the Proof of Work consensus algorithm to validate blocks, but due to the lightweight nature of the blockchain, hashing and the proof of work process do not require too much computing capacity unlike other cryptocurrencies.
Important!
Since there are still few transactions on the network, at first it is enough to run the mining script once a day. If no new transaction takes place, the miner script wants to mine the last transaction which does not exists yet so it will scan for net transactions.
Installation
Clone the project
git clone https://github.com/coderscoin/miner.gitGo to the project directory
cd minerInstall dependencies
npm installAdd a seed peer to the peer list. Modify the PEERLIST variable at line 83!
const PEERLIST = [
{host:"NODE_IP", port:3000}
];Run the miner script:
node index.jsScreenshots
Features
- Standalone executable file
- Platform-independence
Roadmap
- Miner script version
- Testnet testing
- Mainnet update
- Bundled executable file
- Public release
FAQ
Question 1
Answer 1
Question 2
Answer 2
Mining API reference
Get the latest block
GET /api/get/latestblock
This returns the latest block on the chain in JSON format.
Example Response
{"index":12,"transactions":[{"fromAddress":"user1","toAddress":"user2","amount":10}],"timestamp":1688201520,"previousHash":"00329e3f7babcfc4dece5d7e2052b7eadf901b208e305d31f971145a85a5fe2c","nonce":270}Submit mined block
POST /mine/
Request
| Parameter | Type | Description |
|---|---|---|
latesthash |
string |
Required. The computed hash of the latest block |
proof |
string |
Required. The proof returned from the PoW algorithm |
newblock |
list |
Required. The newly mined block's details |
miner |
string |
Required. The username of the miner |
Response
| Code | Description |
|---|---|
200 |
The mining is successful and has been accepted by the network. |
403 |
The user was banned from the platform due to fraud detected or the last block was not validated |
500 |
Mining failed, the network rejected the request because it is incorrect. |
Run Locally
Clone the project
git clone https://link-to-projectGo to the project directory
cd my-projectInstall dependencies
npm installStart the server
npm run startContributing
Contributions are always welcome!
See contributing.md for ways to get started.
Please adhere to this project's code of conduct.
Support
For support, email fake@fake.com or join our Slack channel.