Convert proposer_address from Tendermint RPC to bech32?

Hi,

I’ve been stuck on this one for a while. On the /blockchain endpoint for the Tendermint RPC, it returns the proposer_address as a base64 encoded string. I want to turn this into the cosmosvaloper address but have been unable to figure it out. I’ve tried numerous stuff like amino encoding and then bech32 encoding on top like the docs suggest but I’m never able to get the validators address.

Anyone have any ideas on how to do this? Seems like it should be simple, not sure what I’m missing!

The proposer address field should be a hex encoding of the 20-byte address. You can copy it into any bech32 generator and use the tag/prefix “cosmos” to get the right bech32 address. There should be no amino involved in addresses.

Sorry to bump up this old post, but I’ve been knocking my head on this too [now]. For gaia-1 that I grabbed off interchain.io archives, I pulled block 1 using gaiacli and see this proposer_address: 064CF05857B556FED63AC32821FF904312D0F2C8. The resulting bech32 address I got using the above method is cosmosvaloper1qex0qkzhk4t0a436cv5zrlusgvfdpukgrtznxg, where it is expected to be - cosmosvaloper1rfpar0qx3umnhu0f6wjp4hvnr3x6u5389e094j based on data I found on bigdipper. Could I get a hand with this?

There also seems to be an issue launching the rest server using gaiacli 0.33.2 as there are missing statik files

I got this figured out. Gaiacli issue persists, haven’t had time to correct that particular issue.