Skip to content

own small blockchain project, build a proof-of-work chain based on javascript

Notifications You must be signed in to change notification settings

Julius278/jlchain

Repository files navigation

jlchain

small blockchain project

prerequisites

install all required node modules
npm install

run the chain

Run the Bootnode / peer

bootnode / peer starts by default on HTTP_PORT 3001 and P2P_PORT 5001:
npm run dev

run additional peers

second peer which uses the predefined 5001 bootnode port to connect:
HTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev

third peer connects to both nodes:
HTTP_PORT=3003 P2P_PORT=5003 PEERS=ws://localhost:5001,ws://localhost:5002 npm run dev

ports explanation

HTTP_PORT: used to communicate with the node from a users or miners perspective.
P2P_PORT: peer-to-peer port used by other nodes to exchange block / transaction information between nodes via websocket connection.

About

own small blockchain project, build a proof-of-work chain based on javascript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published