tendermint / spn

A blockchain to launch blockchains.
Other
112 stars 41 forks source link

Remove Node ID from `EmptyConnection` peer #923

Open lumtis opened 2 years ago

lumtis commented 2 years ago

The empty connection of Peer includes the Node ID

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: