Consensus_gRPC

module
v0.0.0-...-880ef2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: MIT

README

Consensus_gRPC

How to run the program

First you should open a couple of terminal windows. Next step is to paste these into the terminal

go run .\node.go -name alice -port 5000 -portfor localhost:5010 -portback localhost:5020 -hasToken true

go run .\node.go -name bob -port 5010 -portfor localhost:5020 -portback localhost:5000

go run .\node.go -name charlie -port 5020 -portfor localhost:5000 -portback localhost:5010

You can have more nodes you simply need to make sure that the last node that is ran has the the portfor has the port of the first.

To explain the arguments a bit:

-name is the name of the client node which gets printed in the log and terminal

-port is the port of the client you are currently creating in the terminal window

-portfor is the forward client port in the token ring aka the guy you pass the token to after you are done

-portback is the backward clients port which is the client you recieve tokens from

-hasToken is a boolean modifier which dictates who starts with the token. !ONLY 1 CLIENT SHOULD EVER HAVE A TOKEN!

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL