AleoNet / snarkOS

A Decentralized Operating System for ZK Applications
http://snarkos.org
Apache License 2.0
4.24k stars 2.59k forks source link

[Fix] Make --rest optional to prevent auto-change of REST port with --dev #3221

Closed christianwwwwwwww closed 1 month ago

christianwwwwwwww commented 3 months ago

Motivation

Solves Issue #3220 wherein specified rest port was overwritten by the default when the --dev flag was being used.

Test Plan

This will only change a node's behavior when both --dev and --rest are used.

Tested locally.

Related PRs

(Link any related PRs here)

damons commented 2 months ago

I'm not sure of the scope of this change, but no matter what, I want to make sure that anytime we require a port that we can set both host:port to a specific values. There's a tendency for us to simply bind to 0.0.0.0:port and this breaks multi-homed deployments in production environments. Dev environments, I understand, are special, but for everything else, these values, at a minimum, should be configurable either via command line or in a config file.