Skip to content

Commit

Permalink
readme with some explanations and how to start
Browse files Browse the repository at this point in the history
  • Loading branch information
Julius278 committed Oct 13, 2024
1 parent 397768e commit cbc26e1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# jlchain
small blockchain project


## prerequisites
install all required node modules<br>
```npm install```


## run the chain
### Run the Bootnode / peer
bootnode / peer starts by default on HTTP_PORT 3001 and P2P_PORT 5001:<br>
```npm run dev```<br>

### run additional peers
second peer which uses the predefined 5001 bootnode port to connect:<br>
```HTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev```

third peer connects to both nodes:<br>
```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.<br>
P2P_PORT: peer-to-peer port used by other nodes to exchange block / transaction information between nodes via websocket connection.<br>

0 comments on commit cbc26e1

Please sign in to comment.