input-output-hk / testnet-stake-pool-registry-validator

Testnet stake pool registry validator.
Apache License 2.0
3 stars 0 forks source link

Validator adjustments #3

Closed KtorZ closed 4 years ago

KtorZ commented 4 years ago

See also: https://github.com/input-output-hk/testnet-stake-pool-registry-validator/issues/2

I highly suggest reviewing this commit-by-commit, the git history is somewhat meaningful and should help make the review little easier.

I did some smoke tests, fiddling a bit with the CLI, looks okay:

$ stack exec -- registry prepare-submission --name "My Awesome Pool" --ticker KTORZ --homepage https://ktorz.dev --pledge-address addr1svklmf8yl78x9cw30ystvprhxtm790k4380xlsjrjqn2p8nekup8uvzfezl --public-key-file key.pub
Writing submission to ed25519_pk1vjtm38up3t8u2dr0rkhe4gr53xy70xy8k7c25w5qcdte4l6vt20skacgsf.json
You'll need to provide a signature in ed25519_pk1vjtm38up3t8u2dr0rkhe4gr53xy70xy8k7c25w5qcdte4l6vt20skacgsf.sig
$ stack exec -- registry prepare-submission --name "My Awesome Pool" --ticker KTORZ --homepage https://ktorz.dev --pledge-address addr1svklmf8yl78x9cw30ystvprhxtm790k4380xlsjrjqn2p8nekup8uvzfezl --description patate --public-key-file key.pub
Writing submission to ed25519_pk1vjtm38up3t8u2dr0rkhe4gr53xy70xy8k7c25w5qcdte4l6vt20skacgsf.json
You'll need to provide a signature in ed25519_pk1vjtm38up3t8u2dr0rkhe4gr53xy70xy8k7c25w5qcdte4l6vt20skacgsf.sig
$ stack exec -- registry prepare-submission --name "My Awesome Pool" --ticker KTORZ --homepage https://ktorz.dev --pledge-address addr1ad78w5qj8tcfxectg0cxkcsu8lxedasd2fx6ycxqmwkfs6l0j9zq0lw2ug --public-key-file key.pub
option --pledge-address: Unrecognized network discriminant for the given address.
$ stack exec -- registry prepare-submission --name "My Awesome Pool" --ticker KTORZ --homepage https://ktorz.dev --pledge-address ed25519_sk1ad78w5qj8tcfxectg0cxkcsu8lxedasd2fx6ycxqmwkfs6l0j9zq04d2up --public-key-file key.pub
option --pledge-address: Pledge address has an unexpected human-readable part ( "ed25519_sk" ). Expected prefix is: "addr"
deepfire commented 4 years ago

@KtorZ, @dcoutts, so we no longer store the stake pool ID in the registry?

Shouldn't a single owner keypair be usable for several stake pools, in principle?

I agree this is probably a can of worms we might not necessarily want to open..

deepfire commented 4 years ago

Shouldn't a single owner keypair be usable for several stake pools, in principle?

Also, cc @disassembler, as he's got stake in this question (pun, most likely not intended, probably, maybe).

KtorZ commented 4 years ago

@deepfire also note that these validation only applies to Jörmungandr and the incentivized testnet. Haskell nodes are working based on a different model and do not require all this.

KtorZ commented 4 years ago

@KtorZ, @dcoutts, so we no longer store the stake pool ID in the registry?

Indeed. We store the owner public key.

Shouldn't a single owner keypair be usable for several stake pools, in principle?

I am not sure about the answer here for it depends on Jörmungandr's design. Both options seem plausible (allowing it or, rejecting an already known public key). The registry as updated with this PR would work with both option.

deepfire commented 4 years ago

Merging, as per Matthias' suggestion.

Although I wonder if we might have another change because of @disassembler's requirements.