Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new flag called
--instance
to initialize port numbers automatically based on the instance count. This flag affects the following ports:http-port
grpc-port
metrics-port
pprof-port
ws-port
Example
Each instance count will increment the default value of the respective ports by 10. For example:
The default value of each port is as follows:
grpc-port
= 6064http-port
= 6060metrics-port
= 9090pprof-port
= 6062ws-port
= 6061Command:
./juno --instance 2
Then the ports would have the following numbers:
grpc-port
= 6074http-port
= 6070metrics-port
= 9100pprof-port
= 6072ws-port
= 6071Rationale
This feature is useful for initializing multiple instances of Juno nodes, without having to care for the port conflict issues.