-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: governance (#431) * docs: governance * docs updates * revert * revert * fix: docs build (#434) * add UML diagrams * rm tx flow * build(deps): bump github.com/onsi/gomega from 1.18.1 to 1.19.0 (#438) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.18.1 to 1.19.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.18.1...v1.19.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp: remove unnecesary unpack public key (#440) * docs: update testnet docs (#442) * ENG-109 - impr(claims): remove claims merge/migrate cases where sender already completed an action as they are never reached (#443) * impr(claims): remove claims merge/migrate cases where sender alreayd completed an action as they are never reached * add CHANGELOG * fix changelog * impr(claims): address PR comments * docs: add warnings for `keyring-backend test` (#444) * docs: add warnings for keyring-backend test * fix lint * deps: bump ethermint to v0.12.1 (#445) * impr(init.sh): remove increased blocktime (#447) * audit(recovery): api and state machine (#439) * audit(recovery): improve comments and move GetIBCDenomDestinationIdentifiers method * audit(recovery): refactor ibc_callback to use recipient where sender == recipient * audit(recovery): remove pubkey nil check * cleanup * dont redeclare err * impr(claims): address PR comments * impr(claims): address PR comments * impr(claims): address PR comments * go mod tidy Co-authored-by: ramacarlucho <ramirocarlucho@gmail.com> * imp: recovery fail transfer tests (#450) * audit(recovery): improve comments and move GetIBCDenomDestinationIdentifiers method * audit(recovery): refactor ibc_callback to use recipient where sender == recipient * audit(recovery): remove pubkey nil check * cleanup * dont redeclare err * Add fail transfer cases * add case * delete comment Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> * tests(recovery): add genesis and partial recovery tests (#451) * add partial recovery test * tests(recovery): add genesis_test * build(deps): bump github.com/tharsis/ethermint from 0.12.1 to 0.12.2 (#452) * integration(recovery): add behaviour driven tests (#453) * add bdd test structure * start replacing tests * refactor 3 chain cases * add claims no merge case and clean up * address comments * deps: bump Cosmos SDK to v0.45.2 (#457) * deps: bump Cosmos SDK to v0.45.2 * changelog * fix * fix: v3 migration (#446) * fix: v3 migration * fix * fix * fix 2 * fix empty basefee * upgrade ethermint * dont force migration * [ENG-139] add v3testnet migrator (#456) * add v3testnet migrator * fix lint * address comments * set store loader * add constants * forced upgrade code * Update app/forks.go Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * changelog * fix comment * remove existing modules from upgrade * rm TODO Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com> * deps: bump ethermint to v0.13.0 (#458) * deps: bump ethermint to v0.13.0 * changelog * fix * changelog * fix lint * fix Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: ramacarlucho <ramirocarlucho@gmail.com>
- Loading branch information
1 parent
2e886b2
commit 7710992
Showing
71 changed files
with
7,892 additions
and
2,570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# Evmos Upgrade | ||
# Evmos Upgrades | ||
|
||
- v2 contains code to update the ERC20 EVM hook to `true`. | ||
### Mainnet | ||
|
||
- `v2`: | ||
- updates the ERC20 EVM hook to `true`. | ||
- `v3`: | ||
- moves the `x/feemarket` `BaseFee` from the store to the parameters | ||
- adds the `x/recovery` module | ||
|
||
### Testnet | ||
|
||
- `tv3`: | ||
- moves the `x/feemarket` `BaseFee` from the store to the parameters | ||
- adds claims `AuthorizedChannels` and `EVMChannels` param fields | ||
- adds the `x/recovery` module |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package v3 | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/client" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
"github.com/cosmos/cosmos-sdk/x/genutil/types" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
|
||
feemarketv010 "github.com/tharsis/ethermint/x/feemarket/migrations/v010" | ||
feemarketv09types "github.com/tharsis/ethermint/x/feemarket/migrations/v09/types" | ||
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" | ||
) | ||
|
||
const UpgradeName = "v3" | ||
|
||
// CreateUpgradeHandler creates an SDK upgrade handler for v3 | ||
func CreateUpgradeHandler( | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
// Refs: | ||
// - https://docs.cosmos.network/master/building-modules/upgrade.html#registering-migrations | ||
// - https://docs.cosmos.network/master/migrations/chain-upgrade-guide-044.html#chain-upgrade | ||
|
||
// migrate fee market module, other modules are left as-is to | ||
// avoid running InitGenesis. | ||
vm[feemarkettypes.ModuleName] = 1 | ||
|
||
return mm.RunMigrations(ctx, configurator, vm) | ||
} | ||
} | ||
|
||
// MigrateGenesis migrates exported state from v2 to v3 genesis state. It performs a no-op if the migration errors. | ||
func MigrateGenesis(appState types.AppMap, clientCtx client.Context) types.AppMap { | ||
// Migrate x/feemarket. | ||
if appState[feemarkettypes.ModuleName] == nil { | ||
return appState | ||
} | ||
|
||
// unmarshal relative source genesis application state | ||
var oldFeeMarketState feemarketv09types.GenesisState | ||
if err := clientCtx.Codec.UnmarshalJSON(appState[feemarkettypes.ModuleName], &oldFeeMarketState); err != nil { | ||
return appState | ||
} | ||
|
||
// delete deprecated x/feemarket genesis state | ||
delete(appState, feemarkettypes.ModuleName) | ||
|
||
// Migrate relative source genesis application state and marshal it into | ||
// the respective key. | ||
newFeeMarketState := feemarketv010.MigrateJSON(oldFeeMarketState) | ||
|
||
feeMarketBz, err := clientCtx.Codec.MarshalJSON(&newFeeMarketState) | ||
if err != nil { | ||
return appState | ||
} | ||
|
||
appState[feemarkettypes.ModuleName] = feeMarketBz | ||
|
||
return appState | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package v3 | ||
|
||
const ( | ||
UpgradeName = "tv3" | ||
UpgradeHeight = 0 | ||
UpgradeInfo = `` | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package v3 | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/client" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
"github.com/cosmos/cosmos-sdk/x/genutil/types" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
|
||
feemarketv010 "github.com/tharsis/ethermint/x/feemarket/migrations/v010" | ||
feemarketv09types "github.com/tharsis/ethermint/x/feemarket/migrations/v09/types" | ||
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" | ||
v1claims "github.com/tharsis/evmos/v3/x/claims/migrations/v1/types" | ||
v2claims "github.com/tharsis/evmos/v3/x/claims/migrations/v2" | ||
claimstypes "github.com/tharsis/evmos/v3/x/claims/types" | ||
) | ||
|
||
// CreateUpgradeHandler creates an SDK upgrade handler for v3 | ||
func CreateUpgradeHandler( | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
// Refs: | ||
// - https://docs.cosmos.network/master/building-modules/upgrade.html#registering-migrations | ||
// - https://docs.cosmos.network/master/migrations/chain-upgrade-guide-044.html#chain-upgrade | ||
|
||
// migrate fee market module and the claims module | ||
// avoid running InitGenesis. | ||
vm[feemarkettypes.ModuleName] = 1 | ||
vm[claimstypes.ModuleName] = 1 | ||
|
||
return mm.RunMigrations(ctx, configurator, vm) | ||
} | ||
} | ||
|
||
// MigrateGenesis migrates exported state from v2 to v3 genesis state. It performs a no-op if the migration errors. | ||
func MigrateGenesis(appState types.AppMap, clientCtx client.Context) types.AppMap { | ||
// Migrate x/feemarket. | ||
if appState[feemarkettypes.ModuleName] == nil { | ||
return appState | ||
} | ||
|
||
// unmarshal relative source genesis application state | ||
var oldFeeMarketState feemarketv09types.GenesisState | ||
if err := clientCtx.Codec.UnmarshalJSON(appState[feemarkettypes.ModuleName], &oldFeeMarketState); err != nil { | ||
return appState | ||
} | ||
|
||
// delete deprecated x/feemarket genesis state | ||
delete(appState, feemarkettypes.ModuleName) | ||
|
||
// Migrate relative source genesis application state and marshal it into | ||
// the respective key. | ||
newFeeMarketState := feemarketv010.MigrateJSON(oldFeeMarketState) | ||
|
||
feeMarketBz, err := clientCtx.Codec.MarshalJSON(&newFeeMarketState) | ||
if err != nil { | ||
return appState | ||
} | ||
|
||
appState[feemarkettypes.ModuleName] = feeMarketBz | ||
|
||
// unmarshal relative source genesis application state | ||
var oldClaimsState v1claims.GenesisState | ||
if err := clientCtx.Codec.UnmarshalJSON(appState[claimstypes.ModuleName], &oldClaimsState); err != nil { | ||
return appState | ||
} | ||
|
||
// delete deprecated x/feemarket genesis state | ||
delete(appState, claimstypes.ModuleName) | ||
|
||
// Migrate relative source genesis application state and marshal it into | ||
// the respective key. | ||
newClaimsState := v2claims.MigrateJSON(oldClaimsState) | ||
|
||
claimsBz, err := clientCtx.Codec.MarshalJSON(&newClaimsState) | ||
if err != nil { | ||
return appState | ||
} | ||
|
||
appState[claimstypes.ModuleName] = claimsBz | ||
|
||
return appState | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.