kwilteam / kwil-db

Kwil DB, the database for web3
https://www.kwil.com/
Other
36 stars 12 forks source link

setup genesis command does not validate public keys of validators #1055

Open jchappelow opened 1 month ago

jchappelow commented 1 month ago

In kwil-admin setup genesis --validator "node0:2a8b9eb0d94be766ad34cb2591f2924477fc397c:1", I have accidentally used the node ID instead of public key. The command does not complain, writing an invalid genesis file:

"validators": [
    {
      "pub_key": "2a8b9eb0d94be766ad34cb2591f2924477fc397c",
      "power": 1,
      "name": "node0"
    }
]

The command should check that the provided key value is an ed25519 public key.