Skip to content

Commit 72a369f

Browse files
authored
Merge branch 'main' into multi_grpc
2 parents 7e05c8a + 65900e1 commit 72a369f

File tree

12 files changed

+48
-197
lines changed

12 files changed

+48
-197
lines changed

.github/workflows/check-changelog.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [\#758](https://github.com/cosmos/evm/pull/758) Cleanup precompiles abi.json.
1010
- [\#810](https://github.com/cosmos/evm/pull/810) Fix integration test suite to resolve lock contention problem from external app injection
1111
- [\#811](https://github.com/cosmos/evm/pull/811) Use sdk's DefaultBondDenom for default evm denom in genesis.
12+
- [\#823](https://github.com/cosmos/evm/pull/823) Remove authz dependency from test suite and EvmApp interface
1213

1314
### FEATURES
1415

@@ -28,6 +29,7 @@
2829
- [\#774](https://github.com/cosmos/evm/pull/774) Emit proper allowance amount in erc20 event.
2930
- [\#790](https://github.com/cosmos/evm/pull/790) fix panic in historical query due to missing EvmCoinInfo.
3031
- [\#800](https://github.com/cosmos/evm/pull/800) Fix denom exponent validation in virtual fee deduct in vm module.
32+
- [\#817](https://github.com/cosmos/evm/pull/817) Align GetCoinbaseAddress to handle empty proposer address in contexts like CheckTx where proposer doesn't exist.
3133
- [\#816](https://github.com/cosmos/evm/pull/816) Avoid nil pointer when RPC requests execute before evmCoinInfo initialization in PreBlock with defaultEvmCoinInfo fallback.
3234

3335
## v0.5.0

NOTICE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
NOTICE
2+
3+
About Cosmos Labs
4+
5+
Cosmos Labs is the development and growth organization behind the Cosmos stack of technologies and ecosystem, the world leading blockchain platform powering more than 200 production chains in finance, payments, and real-world assets. Cosmos Labs leads the development of the Cosmos technology stack, including the Cosmos SDK, CometBFT, and IBC protocols that enable sovereign, interoperable blockchains, in tandem with the Interchain Foundation. Cosmos Labs offers blockchain solutions for enterprises and finance, learn more by visiting: https://cosmos.network/, https://cosmoslabs.io/
6+
7+
Licence
8+
9+
This product This product includes software developed by Cosmos Labs and is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
10+
11+
Attribution
12+
13+
If you distribute this software or derivative works, you must include a copy of this NOTICE file (or equivalent attribution) in your distribution, as required by Section 4(d) of the Apache License, Version 2.0.

codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ coverage:
1313
project:
1414
default:
1515
threshold: 1% # allow this much decrease on project
16-
target: 90%
16+
target: auto
1717
changes: false
1818

1919
comment:

evmd/app.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,10 +1022,6 @@ func (app *EVMD) GetAccountKeeper() authkeeper.AccountKeeper {
10221022
return app.AccountKeeper
10231023
}
10241024

1025-
func (app *EVMD) GetAuthzKeeper() authzkeeper.Keeper {
1026-
return app.AuthzKeeper
1027-
}
1028-
10291025
func (app *EVMD) GetDistrKeeper() distrkeeper.Keeper {
10301026
return app.DistrKeeper
10311027
}

interfaces.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
sdk "github.com/cosmos/cosmos-sdk/types"
2222
"github.com/cosmos/cosmos-sdk/types/mempool"
2323
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
24-
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
2524
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
2625
consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
2726
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
@@ -46,7 +45,6 @@ type EvmApp interface { //nolint:revive
4645
GetBankKeeper() bankkeeper.Keeper
4746
GetFeeMarketKeeper() *feemarketkeeper.Keeper
4847
GetAccountKeeper() authkeeper.AccountKeeper
49-
GetAuthzKeeper() authzkeeper.Keeper
5048
GetDistrKeeper() distrkeeper.Keeper
5149
GetStakingKeeper() *stakingkeeper.Keeper
5250
GetMintKeeper() mintkeeper.Keeper

tests/integration/x/vm/test_state_transition.go

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,39 +156,61 @@ func (s *KeeperTestSuite) TestGetCoinbaseAddress() {
156156
msg string
157157
malleate func() sdk.Context
158158
expPass bool
159+
expEmpty bool
159160
}{
161+
{
162+
"empty proposer address - should return empty address without error",
163+
func() sdk.Context {
164+
header := s.Network.GetContext().BlockHeader()
165+
header.ProposerAddress = sdk.ConsAddress{}
166+
return s.Network.GetContext().WithBlockHeader(header)
167+
},
168+
true,
169+
true,
170+
},
160171
{
161172
"validator not found",
162173
func() sdk.Context {
163174
header := s.Network.GetContext().BlockHeader()
164-
header.ProposerAddress = []byte{}
175+
header.ProposerAddress = []byte{1, 2, 3}
165176
return s.Network.GetContext().WithBlockHeader(header)
166177
},
167178
false,
179+
false,
168180
},
169181
{
170182
"success",
171183
func() sdk.Context {
172184
return s.Network.GetContext()
173185
},
174186
true,
187+
false,
175188
},
176189
}
177190

178191
for _, tc := range testCases {
179192
s.Run(fmt.Sprintf("Case %s", tc.msg), func() {
180193
ctx := tc.malleate()
181-
proposerAddress := ctx.BlockHeader().ProposerAddress
194+
var proposerAddress sdk.ConsAddress
195+
if tc.expEmpty {
196+
proposerAddress = sdk.ConsAddress{}
197+
} else {
198+
proposerAddress = ctx.BlockHeader().ProposerAddress
199+
}
182200

183201
// Function being tested
184202
coinbase, err := s.Network.App.GetEVMKeeper().GetCoinbaseAddress(
185203
ctx,
186-
sdk.ConsAddress(proposerAddress),
204+
proposerAddress,
187205
)
188206

189207
if tc.expPass {
190208
s.Require().NoError(err)
191-
s.Require().Equal(proposerAddressHex, coinbase)
209+
if tc.expEmpty {
210+
s.Require().Equal(common.Address{}, coinbase)
211+
} else {
212+
s.Require().Equal(proposerAddressHex, coinbase)
213+
}
192214
} else {
193215
s.Require().Error(err)
194216
}

testutil/integration/base/grpc/authz.go

Lines changed: 0 additions & 114 deletions
This file was deleted.

testutil/integration/base/grpc/grpc.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
precisebanktypes "github.com/cosmos/evm/x/precisebank/types"
66

77
sdk "github.com/cosmos/cosmos-sdk/types"
8-
"github.com/cosmos/cosmos-sdk/x/authz"
98
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
109
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
1110
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
@@ -17,14 +16,6 @@ type Handler interface {
1716
// Account methods
1817
GetAccount(address string) (sdk.AccountI, error)
1918

20-
// Authz methods
21-
GetAuthorizations(grantee, granter string) ([]authz.Authorization, error)
22-
GetAuthorizationsByGrantee(grantee string) ([]authz.Authorization, error)
23-
GetAuthorizationsByGranter(granter string) ([]authz.Authorization, error)
24-
GetGrants(grantee, granter string) ([]*authz.Grant, error)
25-
GetGrantsByGrantee(grantee string) ([]*authz.GrantAuthorization, error)
26-
GetGrantsByGranter(granter string) ([]*authz.GrantAuthorization, error)
27-
2819
// Bank methods
2920
GetBalanceFromBank(address sdk.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error)
3021
GetSpendableBalance(address sdk.AccAddress, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error)

testutil/integration/base/network/network.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
1414
txtypes "github.com/cosmos/cosmos-sdk/types/tx"
1515
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
16-
"github.com/cosmos/cosmos-sdk/x/authz"
1716
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
1817
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
1918
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
@@ -36,7 +35,6 @@ type Network interface {
3635

3736
// Clients
3837
GetAuthClient() authtypes.QueryClient
39-
GetAuthzClient() authz.QueryClient
4038
GetBankClient() banktypes.QueryClient
4139
GetPreciseBankClient() precisebanktypes.QueryClient
4240
GetStakingClient() stakingtypes.QueryClient

0 commit comments

Comments
 (0)