Skip to content

Commit e53a31f

Browse files
committed
Revert "Merge branch 'release/v1.6.x' into fix/staking-optimization"
This reverts commit 61271ea, reversing changes made to 00e49d6.
1 parent 65fb87c commit e53a31f

32 files changed

+2593
-6436
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,7 @@ lint-py:
148148
lint-nix:
149149
find . -name "*.nix" ! -path './integration_tests/contracts/*' ! -path "./contracts/*" | xargs nixfmt -c
150150

151-
lint-nix-fix:
152-
find . -name "*.nix" ! -path './integration_tests/contracts/*' ! -path "./contracts/*" | xargs nixfmt
153-
154-
.PHONY: lint-install lint lint-fix lint-py lint-nix lint-nix-fix
151+
.PHONY: lint lint-fix lint-py
155152

156153
###############################################################################
157154
### Releasing ###

app/proposal.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"filippo.io/age"
1111
abci "github.com/cometbft/cometbft/abci/types"
12-
evmtypes "github.com/evmos/ethermint/x/evm/types"
1312

1413
"cosmossdk.io/core/address"
1514

@@ -174,25 +173,6 @@ func (h *ProposalHandler) ValidateTransaction(tx sdk.Tx, txBz []byte) error {
174173
return fmt.Errorf("signer is blocked: %s", encoded)
175174
}
176175
}
177-
178-
// check EIP-7702 authorisation list
179-
for _, msg := range tx.GetMsgs() {
180-
msgEthTx, ok := msg.(*evmtypes.MsgEthereumTx)
181-
if ok {
182-
ethTx := msgEthTx.AsTransaction()
183-
if ethTx.SetCodeAuthorizations() != nil {
184-
for _, auth := range ethTx.SetCodeAuthorizations() {
185-
addr, err := auth.Authority()
186-
if err == nil {
187-
if _, ok := h.blocklist[sdk.AccAddress(addr.Bytes()).String()]; ok {
188-
return fmt.Errorf("signer is blocked: %s", addr.String())
189-
}
190-
}
191-
}
192-
}
193-
}
194-
}
195-
196176
return nil
197177
}
198178

app/upgrades.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package app
22

33
import (
44
"context"
5+
"fmt"
56

7+
storetypes "cosmossdk.io/store/types"
68
upgradetypes "cosmossdk.io/x/upgrade/types"
79

810
"github.com/cosmos/cosmos-sdk/codec"
@@ -11,9 +13,24 @@ import (
1113

1214
// RegisterUpgradeHandlers returns if store loader is overridden
1315
func (app *App) RegisterUpgradeHandlers(cdc codec.BinaryCodec, maxVersion int64) bool {
14-
planName := "v1.6" // TBD
16+
planName := "v1.5" // TBD
1517
app.UpgradeKeeper.SetUpgradeHandler(planName, func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
1618
return app.ModuleManager.RunMigrations(ctx, app.configurator, fromVM)
1719
})
20+
21+
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
22+
if err != nil {
23+
panic(fmt.Sprintf("failed to read upgrade info from disk %s", err))
24+
}
25+
26+
if !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
27+
if upgradeInfo.Name == planName {
28+
app.SetStoreLoader(MaxVersionUpgradeStoreLoader(maxVersion, upgradeInfo.Height, &storetypes.StoreUpgrades{
29+
Deleted: []string{"capability", "feeibc"},
30+
}))
31+
return true
32+
}
33+
}
34+
1835
return false
1936
}

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
nativeByteOrder ? true, # nativeByteOrder mode will panic on big endian machines
1212
}:
1313
let
14-
version = "v1.6.0";
14+
version = "v1.5.4";
1515
pname = "cronosd";
1616
tags = [
1717
"ledger"

integration_tests/configs/upgrade-test-package.nix

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ let
2424
# release/v1.4.8
2525
released1_4 =
2626
(fetchFlake "crypto-org-chain/cronos" "513fda768eb6d0602df1abe48abd4d2cda7a2a11").default;
27-
# release/v1.5.4
28-
released1_5 =
29-
(fetchFlake "crypto-org-chain/cronos" "5ccd423a14f100f4e485d0fb6aa8fa4b96d11b60").default;
3027
current = pkgs.callPackage ../../. { };
3128
in
3229
pkgs.linkFarm "upgrade-test-package" [
@@ -52,10 +49,6 @@ pkgs.linkFarm "upgrade-test-package" [
5249
}
5350
{
5451
name = "v1.5";
55-
path = released1_5;
56-
}
57-
{
58-
name = "v1.6";
5952
path = current;
6053
}
6154
]

integration_tests/contracts/contracts/Counter.sol

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

integration_tests/contracts/contracts/Gravity.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import "@openzeppelin/contracts/access/Ownable.sol";
55
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
66
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
77
import "@openzeppelin/contracts/utils/Address.sol";
8-
import "@openzeppelin/contracts/utils/Pausable.sol";
9-
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
8+
import "@openzeppelin/contracts/security/Pausable.sol";
9+
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
1010
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
1111
import "./CosmosToken.sol";
1212

@@ -787,7 +787,7 @@ contract Gravity is ReentrancyGuard, AccessControl, Pausable, Ownable {
787787
address[] memory _validators,
788788
uint256[] memory _powers,
789789
address relayerAdmin
790-
) Ownable(relayerAdmin) {
790+
) {
791791
// CHECKS
792792

793793
// Check that validators, powers, and signatures (v,r,s) set is well-formed
@@ -825,7 +825,7 @@ contract Gravity is ReentrancyGuard, AccessControl, Pausable, Ownable {
825825

826826
// ACL
827827

828-
_grantRole(RELAYER_ADMIN, relayerAdmin);
828+
_setupRole(RELAYER_ADMIN, relayerAdmin);
829829
_setRoleAdmin(RELAYER, RELAYER_ADMIN);
830830
_setRoleAdmin(RELAYER_ADMIN, RELAYER_ADMIN);
831831

integration_tests/contracts/contracts/Simple7702Account.sol

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

integration_tests/contracts/contracts/Simple7702Counter.sol

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

integration_tests/contracts/contracts/TestERC20A.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.8.20;
1+
pragma solidity 0.8.10;
22
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
33

44
contract TestERC20A is ERC20 {

0 commit comments

Comments
 (0)