Start node(s):
cd backend/DCRApi/
dotnet build (only needed once)
dotnet run --no-build localhost 4300 (seed node, must be running for any other node to connect)
dotnet run --no-build localhost 4301
dotnet run --no-build localhost 4302
...
Contains:
New NetworkController for handling Node connection communication
New BlockchainController for handing network communication related to blockchain elements
Network discovery using a centralized DNS server for finding seed nodes (each node can be connected to at most 125 neighbors, and upon connecting to a new neighbor, the node tries to connect to the neighbors neighbors.
Graceful shutdown; on shutdown, the node will send a disconnect message to all neighbors, so that the neighbor can remove the node from their list of neighbors.
Bugs:
Field "Timestamp" from when it is being sent to when it is received by a neighbor. E.g. the block that was created at timestamp "12:00:00" will have the timestamp field set to e.g. "12:00:05" upon arrival. This is an error in serialization of the Timestamp field.
For some reason, the same block is sometimes broadcasted multiple times? This happened with 5 node running at the same time, so maybe there is a concurrency issue of overlapping, since they all access the same blockchain.json?
HOW TO USE: Start DNS: cd dns/ dotnet run
Start node(s): cd backend/DCRApi/ dotnet build (only needed once) dotnet run --no-build localhost 4300 (seed node, must be running for any other node to connect) dotnet run --no-build localhost 4301 dotnet run --no-build localhost 4302 ...
Contains:
Bugs: