Skip to content

Backend Implementation for Bitcoin-like Server Project #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

axatbhardwaj
Copy link

This pull request includes the backend implementation for a Bitcoin-like server project. The PR introduces the following key components:

Central Server (centralServer.js):
    Implements the central WebSocket server responsible for broadcasting new transactions to all connected miners.
    Manages connections
    Broadcasts newly minted blocks to rest of the miners 
    Adjusts difficulty accordingly to match the desired average blocktime
    Manages txn pool for the chain and keeps it in sync (removes txns which are included in the block from pool)

Miner Server (minerServer.js):
    Implements the miner server code where each miner maintains its own transaction pool.
    Handles block mining and interacts with the central server to receive new transactions.
    Mines blocks according to a fixed interval (e.g., every 30 seconds)

Blockchain Utilities (blockchainUtils.js):
    Provides utility functions for blockchain operations, including block creation, transaction handling, and other essential blockchain-related operations.

Important Notes:

This PR is strictly for the backend implementation and does not include any frontend components.
The mining process has been designed to operate independently on each miner server, ensuring decentralized processing.

Please review the implementation and provide feedback or suggestions

@sachinshrmaa
Copy link

do u want me to build the UI? @axatbhardwaj ?

@rahmatdeep
Copy link

is the gitignore file autogenerated or is there some tool to generate this, kindly share

@axatbhardwaj
Copy link
Author

is the gitignore file autogenerated or is there some tool to generate this, kindly share

https://github.com/github/gitignore

@rahmatdeep
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants