Skip to content

Commit

Permalink
merge: merged all master branch changes
Browse files Browse the repository at this point in the history
  • Loading branch information
deepan95dev committed Jan 16, 2024
2 parents f726c79 + 66fb3ff commit 95227b2
Show file tree
Hide file tree
Showing 33 changed files with 1,809 additions and 783 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ rm -r ~/.paloma/data/wasm/cache
### To get the latest prebuilt `palomad` binary:

```shell
wget -O - https://github.com/palomachain/paloma/releases/download/v1.10.2/paloma_Linux_x86_64.tar.gz | \
wget -O - https://github.com/palomachain/paloma/releases/download/v1.11.0/paloma_Linux_x86_64.tar.gz | \
sudo tar -C /usr/local/bin -xvzf - palomad
sudo chmod +x /usr/local/bin/palomad
```
Expand All @@ -86,7 +86,7 @@ sudo chmod +x /usr/local/bin/palomad
```shell
git clone https://github.com/palomachain/paloma.git
cd paloma
git checkout v1.10.2
git checkout v1.11.0
make build
sudo mv ./build/palomad /usr/local/bin/palomad
```
Expand Down
6 changes: 3 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (

"cosmossdk.io/client/v2/autocli"
"cosmossdk.io/core/appmodule"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"

"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
"cosmossdk.io/x/evidence"
Expand Down Expand Up @@ -40,6 +38,7 @@ import (
"github.com/cosmos/cosmos-sdk/codec/address"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/runtime"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/server/api"
"github.com/cosmos/cosmos-sdk/server/config"
Expand Down Expand Up @@ -424,7 +423,7 @@ func New(
app.AccountKeeper,
BlockedAddresses(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
log.NewNopLogger(),
logger,
)
app.StakingKeeper = stakingkeeper.NewKeeper(
appCodec,
Expand Down Expand Up @@ -1235,6 +1234,7 @@ func BlockedAddresses() map[string]bool {

return modAccAddrs
}

func (a *App) Configurator() module.Configurator {
return a.configurator
}
2 changes: 1 addition & 1 deletion cmd/palomad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"github.com/cosmos/cosmos-sdk/codec/address"
"io"
"log"
"net/http"
Expand All @@ -16,6 +15,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec/address"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/x/auth/types"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ require (
)

require (
cosmossdk.io/api v0.7.2
cosmossdk.io/client/v2 v2.0.0-beta.1
cosmossdk.io/core v0.11.0
cosmossdk.io/log v1.2.1
Expand All @@ -56,7 +57,6 @@ require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.4 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/api v0.7.2 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
Expand Down
30 changes: 30 additions & 0 deletions proto/palomachain/paloma/evm/chain_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package palomachain.paloma.evm;

import "palomachain/paloma/evm/relay_weights.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/palomachain/paloma/x/evm/types";

Expand Down Expand Up @@ -71,4 +72,33 @@ message SmartContractDeployment {
WAITING_FOR_ERC20_OWNERSHIP_TRANSFER = 2;
}
Status status = 4;

message ERC20Transfer {
// Paloma denom of the ERC20 token
string denom = 1;
// Address of the ERC20 token on the target chain
string erc20 = 2;
// Message ID of the logic call message created in charge of updating the
// ownership.
uint64 msgID = 3;
enum Status {
// The transfer is still ongoing.
PENDING = 0;
// The transfer has finished successfully.
OK = 1;
// The transfer has failed and needs to be retried.
FAIL = 2;
}
// Current status of the transfer.
Status status = 4;
}

// A set of transfer records for each ERC20 token that
// needs the updated smart contract address before Paloma
// can switch to the new contract.
repeated ERC20Transfer erc20transfers = 5 [(gogoproto.nullable) = false];

// Once deployed, this contains the address of the contract
// on the remote chain.
string newSmartContractAddress = 6;
}
3 changes: 1 addition & 2 deletions tests/integration/evm/keeper/keeper_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,7 @@ var _ = Describe("evm", func() {
}

BeforeEach(func() {

a = initFixture(t) //app.NewTestApp(GinkgoT(), false)
a = initFixture(t) // app.NewTestApp(GinkgoT(), false)
ctx = a.ctx.WithBlockHeight(5)
})

Expand Down
19 changes: 8 additions & 11 deletions tests/integration/evm/keeper/test_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"cosmossdk.io/x/feegrant"
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
upgradetypes "cosmossdk.io/x/upgrade/types"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
db "github.com/cosmos/cosmos-db"
"github.com/cosmos/cosmos-sdk/baseapp"
Expand Down Expand Up @@ -95,7 +94,6 @@ var maccPerms = map[string][]string{
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasmtypes.ModuleName: {authtypes.Burner},
treasurymoduletypes.ModuleName: {authtypes.Burner, authtypes.Minter},
evmmoduletypes.ModuleName: {authtypes.Burner, authtypes.Minter},
}
Expand Down Expand Up @@ -141,14 +139,14 @@ func initFixture(t ginkgo.FullGinkgoTInterface) *fixture {
treasurymoduletypes.StoreKey,
evmmoduletypes.StoreKey,
gravitymoduletypes.StoreKey,
//authtypes.StoreKey, banktypes.StoreKey,
//distrtypes.StoreKey, stakingtypes.StoreKey,
//schedulertypes.StoreKey, evmmoduletypes.StoreKey,
//valsetmoduletypes.StoreKey, consensusmoduletypes.StoreKey,
//slashingtypes.StoreKey,
//gravitymoduletypes.StoreKey,
//upgradetypes.ModuleName,
//distrtypes.ModuleName,
// authtypes.StoreKey, banktypes.StoreKey,
// distrtypes.StoreKey, stakingtypes.StoreKey,
// schedulertypes.StoreKey, evmmoduletypes.StoreKey,
// valsetmoduletypes.StoreKey, consensusmoduletypes.StoreKey,
// slashingtypes.StoreKey,
// gravitymoduletypes.StoreKey,
// upgradetypes.ModuleName,
// distrtypes.ModuleName,
)
cdc := moduletestutil.MakeTestEncodingConfig(
auth.AppModuleBasic{},
Expand Down Expand Up @@ -438,7 +436,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(schedulertypes.ModuleName)
paramsKeeper.Subspace(consensusmoduletypes.ModuleName)
paramsKeeper.Subspace(valsetmoduletypes.ModuleName)
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(evmmoduletypes.ModuleName)
paramsKeeper.Subspace(gravitymoduletypes.ModuleName)

Expand Down
34 changes: 0 additions & 34 deletions tests/integration/paloma/keeper/test_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"cosmossdk.io/x/upgrade"
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
upgradetypes "cosmossdk.io/x/upgrade/types"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
db "github.com/cosmos/cosmos-db"
"github.com/cosmos/cosmos-sdk/baseapp"
Expand Down Expand Up @@ -47,14 +46,8 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
"github.com/onsi/ginkgo/v2"
params2 "github.com/palomachain/paloma/app/params"
xchain "github.com/palomachain/paloma/internal/x-chain"
Expand All @@ -64,14 +57,12 @@ import (
"github.com/palomachain/paloma/x/evm"
evmmodulekeeper "github.com/palomachain/paloma/x/evm/keeper"
evmmoduletypes "github.com/palomachain/paloma/x/evm/types"
gravitymoduletypes "github.com/palomachain/paloma/x/gravity/types"
"github.com/palomachain/paloma/x/paloma"
palomakeeper "github.com/palomachain/paloma/x/paloma/keeper"
palomamoduletypes "github.com/palomachain/paloma/x/paloma/types"
"github.com/palomachain/paloma/x/scheduler"
"github.com/palomachain/paloma/x/scheduler/keeper"
schedulertypes "github.com/palomachain/paloma/x/scheduler/types"
treasurymoduletypes "github.com/palomachain/paloma/x/treasury/types"
"github.com/palomachain/paloma/x/valset"
valsetmodulekeeper "github.com/palomachain/paloma/x/valset/keeper"
valsetmoduletypes "github.com/palomachain/paloma/x/valset/types"
Expand All @@ -89,12 +80,6 @@ var maccPerms = map[string][]string{
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
gravitymoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasmtypes.ModuleName: {authtypes.Burner},
treasurymoduletypes.ModuleName: {authtypes.Burner, authtypes.Minter},
}

type fixture struct {
Expand Down Expand Up @@ -164,18 +149,6 @@ func initFixture(t ginkgo.FullGinkgoTInterface) *fixture {
"paloma",
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
// interfaceRegistry, _ := codecTypes.NewInterfaceRegistryWithOptions(codecTypes.InterfaceRegistryOptions{
// ProtoFiles: proto.HybridResolver,
// SigningOptions: signing.Options{
// CustomGetSigners: make(map[protoreflect.FullName]signing.GetSignersFunc),
// AddressCodec: address.Bech32Codec{
// Bech32Prefix: params2.AccountAddressPrefix,
// },
// ValidatorAddressCodec: address.Bech32Codec{
// Bech32Prefix: params2.ValidatorAddressPrefix,
// },
// },
// })
appCodec := codec.NewProtoCodec(cdc.InterfaceRegistry())
legacyAmino := codec.NewLegacyAmino()
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand Down Expand Up @@ -379,14 +352,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(schedulertypes.ModuleName)
paramsKeeper.Subspace(consensusmoduletypes.ModuleName)
paramsKeeper.Subspace(valsetmoduletypes.ModuleName)
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(evmmoduletypes.ModuleName)
paramsKeeper.Subspace(gravitymoduletypes.ModuleName)

paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable)
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable())
paramsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable())

return paramsKeeper
}
Expand Down
24 changes: 0 additions & 24 deletions tests/integration/scheduler/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
"cosmossdk.io/x/tx/signing"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/address"
Expand All @@ -22,7 +21,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/bank"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
"github.com/cosmos/cosmos-sdk/x/gov"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
Expand All @@ -36,26 +34,18 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/gogoproto/proto"
icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
"github.com/onsi/ginkgo/v2"
params2 "github.com/palomachain/paloma/app/params"
xchain "github.com/palomachain/paloma/internal/x-chain"
consensusmodulekeeper "github.com/palomachain/paloma/x/consensus/keeper"
consensusmoduletypes "github.com/palomachain/paloma/x/consensus/types"
evmmodulekeeper "github.com/palomachain/paloma/x/evm/keeper"
evmmoduletypes "github.com/palomachain/paloma/x/evm/types"
gravitymoduletypes "github.com/palomachain/paloma/x/gravity/types"
"github.com/palomachain/paloma/x/scheduler"
"github.com/palomachain/paloma/x/scheduler/keeper"
"github.com/palomachain/paloma/x/scheduler/types"
treasurymoduletypes "github.com/palomachain/paloma/x/treasury/types"
valsetmodulekeeper "github.com/palomachain/paloma/x/valset/keeper"
valsetmoduletypes "github.com/palomachain/paloma/x/valset/types"
"google.golang.org/protobuf/reflect/protoreflect"
Expand All @@ -72,12 +62,6 @@ var maccPerms = map[string][]string{
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
gravitymoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasmtypes.ModuleName: {authtypes.Burner},
treasurymoduletypes.ModuleName: {authtypes.Burner, authtypes.Minter},
}

type fixture struct {
Expand Down Expand Up @@ -270,18 +254,10 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(distrtypes.ModuleName)
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(govtypes.ModuleName)
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(types.ModuleName)
paramsKeeper.Subspace(consensusmoduletypes.ModuleName)
paramsKeeper.Subspace(valsetmoduletypes.ModuleName)
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(evmmoduletypes.ModuleName)
paramsKeeper.Subspace(gravitymoduletypes.ModuleName)

paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable)
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable())
paramsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable())

return paramsKeeper
}
Expand Down
Loading

0 comments on commit 95227b2

Please sign in to comment.