Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unused prival pubKey back to node info #111

Merged
merged 1 commit into from
Apr 6, 2023
Merged

Conversation

LCyson
Copy link
Contributor

@LCyson LCyson commented Apr 6, 2023

Describe your changes and provide context

TM 0.35 removes unused pubKey from node.rpcEnv and only validator nodes will return validator_info in the/status tm rpc endpoint. This update, however, breaks many auxiliary packages' interface as they cannot correctly serialize the default validator_info.address:

TM 0.34:

...
"validator_info":{
    "address":"E7996BE5125FBF866A3136F15072F2DAB31094FD",
    "pub_key":{
        "type":"tendermint/PubKeyEd25519",
        "value":"AC4vhXhevEYEFktkNQib6prIoSh6YDeZp7yn0kEqO1o="
    },
    "voting_power":"0"
}

TM 0.35:

...
"validator_info":{
    "address":"",
    "pub_key":null,
    "voting_power":"0"
}

=> ERROR failed to spawn chain runtime: relayer error: RPC error to endpoint http://:26657/: serde parse error: expected 40-character hex string, got "" at line 1 column 1298

This PR reverts the change and add back the unused pubKey & address of any node type.

Note that the other option to fix the interface incompatibility is to add a default dummy address (a 40 character hex string), but that may be confusing for any future reader / relevant issue or error.

Testing performed to validate your change

  • e2e test with IBC on sei-devnet-3
  • unit tests

@LCyson LCyson merged commit 1e67899 into main Apr 6, 2023
Timwood0x10 pushed a commit to Timwood0x10/sei-tendermint that referenced this pull request Jun 7, 2023
## Describe your changes and provide context
This adds a constant string selector for dependency generation, useful
for cases when store keys use bech32 addresses as literal strings
instead of account address bytes.

## Testing performed to validate your change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants