[Feature]: ability to retrieve current validator's consensus address and public key
Summary
Currently, there is no way from the "SDK land" to retrieve what the consensus address (or pub key) of the current CometBFT node is.
This becomes particularly relevant when paired with the Vote Extensions. When a node receives a Vote Extension. The ABCI methods only include the consensus address of the validator, without any way for app developers to recognize if it's themselves.
Problem Definition
No response
Proposed Feature
Since Cosmos SDK has access to the CometBFT Node instance, it can also retrieve its PrivValidator and finally, its PubKey object.
Exposing this PubKey object inside the BaseApp should be enough for Cosmos SDK devs.
It might be related to https://github.com/cosmos/cosmos-sdk/issues/21064.
A use case we have is that we store some informations in the app db, something like val_cons_addr -> payload. And later, I want to retrieve the current node's payload.
Good