Add steps to compare TMKMS and validator pubkeys
This commit is contained in:
parent
32fcd6b4f9
commit
9bf9966655
31
docs/demo.md
31
docs/demo.md
@ -117,7 +117,7 @@
|
||||
cat > ./tmkms-first-node/tmkms.toml << EOL
|
||||
[[chain]]
|
||||
id = "laconic-mainnet"
|
||||
key_format = { type = "bech32", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
key_format = { type = "cosmos-json", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
state_file = "$CWD/tmkms-first-node/state/priv_validator_state.json"
|
||||
|
||||
[[validator]]
|
||||
@ -145,6 +145,17 @@
|
||||
tmkms start --config $CWD/tmkms-first-node/tmkms.toml
|
||||
```
|
||||
|
||||
- Expected example output:
|
||||
```bash
|
||||
INFO tmkms::commands::start: tmkms 0.14.0 starting up...
|
||||
INFO tmkms::keyring: [keyring:softsign] added consensus Ed25519 key: {"@type":"/cosmos.crypto.ed25519.PubKey","key":"T24No1A1FmetNRVCOSg2G2XAKWh97oBXuELdAD6DFgw="}
|
||||
INFO tmkms::connection::tcp: KMS node ID: 7f5fd8dae8953e964e7e56edd4700f597ea0d45c
|
||||
ERROR tmkms::client: [laconic-mainnet@tcp://localhost:26659] I/O error: Connection refused (os error 111)
|
||||
```
|
||||
NOTE: The errors dissapear once the laconicd node starts
|
||||
|
||||
- Note the pubkey logged at start for comparing later with validator pubkey on chain
|
||||
|
||||
- In a new terminal export envs
|
||||
```bash
|
||||
export CWD=$(pwd)
|
||||
@ -177,15 +188,15 @@
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR logs laconicd -f
|
||||
```
|
||||
|
||||
- Check that the validator pubkey is different from the key generated in config directory
|
||||
```bash
|
||||
# Check consensus_pubkey in output
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd 'laconicd query staking validators -o json | jq .validators'
|
||||
- Verify that validator and TMKMS pubkeys match
|
||||
|
||||
# Check pub_key in output
|
||||
sudo cat $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json
|
||||
```
|
||||
NOTE: Validator key file is generated by `laconicd start` command if it does not exist, but it is not used since TMKMS is configured
|
||||
- Get validator pubkey on chain
|
||||
```bash
|
||||
# Check consensus_pubkey in output
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd 'laconicd query staking validators -o json | jq .validators'
|
||||
```
|
||||
|
||||
- Compare it with the pubkey noted from logs in TMKMS
|
||||
|
||||
- Check bonds list to confirm that testnet state was transferred properly:
|
||||
|
||||
@ -290,7 +301,7 @@
|
||||
cat > ./tmkms-second-node/tmkms.toml << EOL
|
||||
[[chain]]
|
||||
id = "laconic-mainnet"
|
||||
key_format = { type = "bech32", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
key_format = { type = "cosmos-json", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
state_file = "$CWD/tmkms-second-node/state/priv_validator_state.json"
|
||||
|
||||
[[validator]]
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
```toml
|
||||
[[chain]]
|
||||
id = "laconic-mainnet"
|
||||
key_format = { type = "bech32", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
key_format = { type = "cosmos-json", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
# Replace <TMKMS_HOME> with absolute path to tmkms config directory
|
||||
state_file = "<TMKMS_HOME>/state/priv_validator_state.json"
|
||||
|
||||
@ -183,6 +183,17 @@
|
||||
tmkms start --config $TMKMS_HOME/tmkms.toml
|
||||
```
|
||||
|
||||
- Expected example output:
|
||||
```bash
|
||||
INFO tmkms::commands::start: tmkms 0.14.0 starting up...
|
||||
INFO tmkms::keyring: [keyring:softsign] added consensus Ed25519 key: {"@type":"/cosmos.crypto.ed25519.PubKey","key":"T24No1A1FmetNRVCOSg2G2XAKWh97oBXuELdAD6DFgw="}
|
||||
INFO tmkms::connection::tcp: KMS node ID: 7f5fd8dae8953e964e7e56edd4700f597ea0d45c
|
||||
ERROR tmkms::client: [laconic-mainnet@tcp://localhost:26659] I/O error: Connection refused (os error 111)
|
||||
```
|
||||
NOTE: The errors dissapear once the laconicd node starts
|
||||
|
||||
- Note the pubkey logged at start for comparing later with validator pubkey on chain
|
||||
|
||||
- Enable TMKMS in the laconicd node configuration:
|
||||
```bash
|
||||
# Set TMKMS_ENABLED to true in the node's config.env
|
||||
@ -211,18 +222,15 @@
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR logs laconicd -f
|
||||
```
|
||||
|
||||
- If TMKMS has been configured verify that validator key file generated in config directory is not being used
|
||||
- If TMKMS has been configured verify that validator and TMKMS pubkeys match
|
||||
|
||||
- `laconicd start` command generates a new validator key file if it does not exist (in TMKMS configuration, we remove the validator key file)
|
||||
|
||||
- Compare and verify that the current validator pubkey and that of newly generated validator key are not same
|
||||
- Get validator pubkey on chain
|
||||
```bash
|
||||
# Check consensus_pubkey in output
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd 'laconicd query staking validators -o json | jq .validators'
|
||||
|
||||
# Check pub_key in output
|
||||
sudo cat $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json
|
||||
```
|
||||
|
||||
- Compare it with the pubkey noted from logs in TMKMS
|
||||
|
||||
- Check bonds list to confirm that testnet state was transferred properly:
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
```toml
|
||||
[[chain]]
|
||||
id = "laconic-mainnet"
|
||||
key_format = { type = "bech32", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
key_format = { type = "cosmos-json", account_key_prefix = "laconicpub", consensus_key_prefix = "laconicvalconspub" }
|
||||
# Replace <TMKMS_HOME> with absolute path to tmkms config directory
|
||||
state_file = "<TMKMS_HOME>/state/priv_validator_state.json"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user