You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Related Github tickets
- VolumeFi/paloma#857
- VolumeFi/paloma#934
- palomachain/paloma#1025
# Background
In order to support multiple signing keys for Pigeons, we recently released a change for Paloma that introduced message metadata fields for all Paloma messages, allowing Pigeons to define signers other than the creator address.
This change includes:
- Removing lens as a dependency, replacing it with a slimmed down in-house solution called `ion`
- Support to define multiple signature keys in the pigeon config, see below for additional details
- Automatic key rotation when sending messages to Paloma
- Automatic metadata injection into messages
- Introducing `validator-key` as a configuration field for the paloma chain inside Pigeon. This used to be the `signing-key` field, which remains to be supported for now
The new signing keys are completely optional. In case there's no change to the configuration, Pigeon will read the old existing `signature-key` field and use it for both the message creator and signer when injecting metadata. See below on how to enable support for multiple signing keys.
Going forward, we'll be referring to the old `signing-key` as `validator-key`.
#### Support for multiple signing keys
By default, Pigeon will use your validator key to sign any transactions sent to Paloma. In high throughput environments, this may lead to `account sequence mismatch` errors.
It's possible to define more than one signing key to be used in rotation to combat this issue. In order to do so, you will need to create a number of new keys and register them with Pigeon like this:
```bash
# First, create a number of new keys. You may create an arbitrary amount of keys.
palomad keys add pigeon-operator-alpha
palomad keys add pigeon-operator-bravo
palomad keys add pigeon-operator-charlie
# Second, your new addresses will need to receive an active feegrant from your validator address.
# This step is very important. It's not enough to simply fund those addresses manually.
# The active feegrant is considered a "permission" to send transactions from your validator address".
palomad tx feegrant grant $VALIDATOR_ADDRESS pigeon-operator-alpha --fees 500ugrain -y
palomad tx feegrant grant $VALIDATOR_ADDRESS pigeon-operator-bravo --fees 500ugrain -y
palomad tx feegrant grant $VALIDATOR_ADDRESS pigeon-operator-charlie --fees 500ugrain -y
```
After creating your signing keys, all you need to do is register them with Pigeon by adding the following to your pigeon config. Make sure to restart the service after making these changes.
```yaml
paloma:
signing-keys:
- pigeon-operator-alpha
- pigeon-operator-bravo
- pigeon-operator-charlie
```
# Testing completed
- [x] test coverage exists or has been added/updated
- [x] tested in a private testnet
# Breaking changes
- [x] I have checked my code for breaking changes
---
* feat: support multiple signing keys with rotation
* fix: use master address when sending messages
* fix: dead lock on mutex acquisition
* feat: add fee grant
* chore: add logging
* feat: inject message metadata
* fix: retrieve signer address for metadata
* fix: remove superfluous logging
* feat: remove locking from paloma calls
* fix: use paloma wrapper constructor
* chore: remove all lens dependencies
* fix: CI pipeline
* chore: move signature keys configuration to paloma only
* chore: update go.mod paloma reference
* doc: update README
Copy file name to clipboardexpand all lines: README.md
+29-1
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,7 @@ paloma:
176
176
keyring-dir: ~/.paloma
177
177
keyring-pass-env-name: PALOMA_KEYRING_PASS
178
178
keyring-type: os
179
-
signing-key: ${VALIDATOR}
179
+
validator-key: ${VALIDATOR}
180
180
base-rpc-url: http://localhost:26657
181
181
gas-adjustment: 3.0
182
182
gas-prices: 0.01ugrain
@@ -256,6 +256,34 @@ evm:
256
256
tx-type: 2
257
257
```
258
258
259
+
#### Support for multiple signing keys
260
+
261
+
By default, Pigeon will use your validator key to sign any transactions sent to Paloma. In high throughput environments, this may lead to `account sequence mismatch` errors.
262
+
It's possible to define more than one signing key to be used in rotation to combat this issue. In order to do so, you will need to create a number of new keys and register them with Pigeon like this:
263
+
264
+
```bash
265
+
# First, create a number of new keys. You may create an arbitrary amount of keys.
266
+
palomad keys add pigeon-operator-alpha
267
+
palomad keys add pigeon-operator-bravo
268
+
palomad keys add pigeon-operator-charlie
269
+
270
+
# Second, your new addresses will need to receive an active feegrant from your validator address.
271
+
# This step is very important. It's not enough to simply fund those addresses manually.
272
+
# The active feegrant is considered a "permission" to send transactions from your validator address".
273
+
palomad tx feegrant grant $VALIDATOR_ADDRESS pigeon-operator-alpha --fees 500ugrain -y
274
+
palomad tx feegrant grant $VALIDATOR_ADDRESS pigeon-operator-bravo --fees 500ugrain -y
275
+
palomad tx feegrant grant $VALIDATOR_ADDRESS pigeon-operator-charlie --fees 500ugrain -y
276
+
```
277
+
278
+
After creating your signing keys, all you need to do is register them with Pigeon by adding the following to your pigeon config. Make sure to restart the service after making these changes.
// HACK: \n is added at the end of a password because github.com/cosmos/[email protected]/client/input/input.go at line 93 would return an EOF error which then would fail
134
143
// Should be fixed with https://github.com/cosmos/cosmos-sdk/pull/11796
0 commit comments