message Peer {
string id = 1; // e.g.: 7786ace6ddb3d771024792a46540c88587e0e8cc
oneof connection {
string tcpAddress = 2; // use a TCP address
HTTPTunnel httpTunnel = 3; // or use an HTTP tunnel
EmptyConnection none = 4; // or don't provide any connection
}
message HTTPTunnel {
string name = 1; // e.g.: chisel (https://github.com/jpillora/chisel)
string address =
2; // for chisel running on Gitpod, e.g.: https://3475-chocolate-capybara-kkiztq32.ws-eu21.gitpod.io/
}
message EmptyConnection {}
}
Requirering the Node ID complicate the workflow from joining a chain with hidden address because fetching the Node ID requires to access the chain which is not required by the command when using a custom gentx path https://github.com/ignite/cli/pull/2556
This value is not used for an empty connection and there is a low chance it becomes in the future, we should remove it now.
Solutions:
Keep the current structure but make id value optional, so it is not filled for empty connection
Put id in tcpAddress and httpTunnel so it's not general to the Peer type
Make Peer nullable, null value means no connection
The empty connection of
Peer
includes the Node IDRequirering the Node ID complicate the workflow from joining a chain with hidden address because fetching the Node ID requires to access the chain which is not required by the command when using a custom gentx path https://github.com/ignite/cli/pull/2556
This value is not used for an empty connection and there is a low chance it becomes in the future, we should remove it now.
Solutions:
id
value optional, so it is not filled for empty connectionid
intcpAddress
andhttpTunnel
so it's not general to thePeer
typePeer
nullable, null value means no connection