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

Save HEX pubkey as well as the pubkey for each validator #41

Closed
HarleyAppleChoi opened this issue Aug 27, 2020 · 6 comments
Closed

Save HEX pubkey as well as the pubkey for each validator #41

HarleyAppleChoi opened this issue Aug 27, 2020 · 6 comments

Comments

@HarleyAppleChoi
Copy link
Contributor

Feature description

Saving HEX pubkey into database so that we do not need to calculate that everytime we want to get HEX from pubkey

Implementation proposal

When adding a validator we can map to a HEX pubkey as well.

@kwunyeung
Copy link
Member

@RiccardoM @bragaz do you know if there are methods in the SDK which convert the validator bech32 pubkey back the Tendermint validator hex address? We need this in BDJuno to map the signatures in the block.

@RiccardoM
Copy link
Contributor

RiccardoM commented Sep 1, 2020

@kwunyeung If you have the public key, you can use the .Address() method that's inside the PubKey interface.

BTW, where do you need to map it? There might be easier ways of doing it using GraphQL

@kwunyeung
Copy link
Member

@RiccardoM it's to record if the validator's precommit signature exists in the current block. For example, http://lcd.morpheus.desmos.network:1317/blocks/5000 the signatures are referencing the validators in hex address but what we can get from validator list are the addresses in bech32. We should save the hex address along with the validator information.

@RiccardoM
Copy link
Contributor

RiccardoM commented Sep 1, 2020

@kwunyeung I guess that can be done easily by changing how Juno saves the data, adding the HEX address and pub key to the validator table. Should I take care of that?

@HarleyAppleChoi
Copy link
Contributor Author

@RiccardoM Yes, please take care of that inside Juno, feeling that is better than doing it in BDJuno🧐

@RiccardoM
Copy link
Contributor

RiccardoM commented Sep 2, 2020

Moved to forbole/juno#4

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

No branches or pull requests

3 participants