diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c074781b928..727bfba99a7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Bug Fixes + +* [#15243](https://github.com/cosmos/cosmos-sdk/pull/15243) `LatestBlockResponse` & `BlockByHeightResponse` types' field `sdk_block` was incorrectly cast `proposer_address` bytes to validator operator address, now to consensus address + ## [v0.47.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0-rc3) - 2023-03-01 ### Features diff --git a/client/grpc/tmservice/util.go b/client/grpc/tmservice/util.go index ef5083a3a364..21e7ec76ef0f 100644 --- a/client/grpc/tmservice/util.go +++ b/client/grpc/tmservice/util.go @@ -21,7 +21,7 @@ func convertHeader(h tmprototypes.Header) Header { EvidenceHash: h.EvidenceHash, LastResultsHash: h.LastResultsHash, LastCommitHash: h.LastCommitHash, - ProposerAddress: sdk.ValAddress(h.ProposerAddress).String(), + ProposerAddress: sdk.ConsAddress(h.ProposerAddress).String(), } } diff --git a/tests/e2e/client/grpc/tmservice/service_test.go b/tests/e2e/client/grpc/tmservice/service_test.go index 65a48ea97db1..31342a94ec96 100644 --- a/tests/e2e/client/grpc/tmservice/service_test.go +++ b/tests/e2e/client/grpc/tmservice/service_test.go @@ -91,8 +91,8 @@ func (s *E2ETestSuite) TestQueryLatestBlock() { s.Require().NoError(err) var blockInfoRes tmservice.GetLatestBlockResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) - s.Require().Equal(types.ValAddress(blockInfoRes.Block.Header.ProposerAddress).String(), blockInfoRes.SdkBlock.Header.ProposerAddress) - s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") + s.Require().Equal(types.ConsAddress(blockInfoRes.Block.Header.ProposerAddress).String(), blockInfoRes.SdkBlock.Header.ProposerAddress) + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvalcons") } func (s *E2ETestSuite) TestQueryBlockByHeight() { @@ -104,7 +104,7 @@ func (s *E2ETestSuite) TestQueryBlockByHeight() { s.Require().NoError(err) var blockInfoRes tmservice.GetBlockByHeightResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) - s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvalcons") } func (s *E2ETestSuite) TestQueryLatestValidatorSet() {