Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 committed Aug 9, 2023
2 parents f901421 + 50fa378 commit 3dceaac
Show file tree
Hide file tree
Showing 21 changed files with 210 additions and 4,399 deletions.
51 changes: 9 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ jobs:
skip_python: "true"
skip_aws_cli: "true"
skip_docker_compose: "true"

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

- name: Test
uses: nick-fields/retry@v2
Expand Down Expand Up @@ -128,11 +123,6 @@ jobs:
skip_aws_cli: "true"
skip_docker_compose: "true"

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

# - uses: buildjet/cache
# timeout-minutes: 5
# with:
Expand Down Expand Up @@ -235,28 +225,15 @@ jobs:
git
shell-name: alpine.sh

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

# - name: Test
# shell: alpine.sh --root {0}
# run: |
# echo "Running Build Tests"
# apk add --no-cache --update
# make clean
# make test

- name: Test
uses: nick-fields/retry@v2
with:
timeout_minutes: 20
max_attempts: 2
retry_on: error
shell: alpine.sh --root {0}
command: |
env:
CGO_ENABLED: 1
GOOS: linux
GOARCH: ${{ env.CPU_ARCH }}
shell: alpine.sh --root {0}
run: |
echo "Running Build Tests"
apk add --no-cache --update
make clean
make test
Expand Down Expand Up @@ -371,11 +348,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

- name: Install Pipeline Dependencies
uses: ./.github/actions/install-dependencies
timeout-minutes: 8
Expand Down Expand Up @@ -519,11 +491,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

- name: Install Pipeline Dependencies
uses: ./.github/actions/install-dependencies
timeout-minutes: 8
Expand Down Expand Up @@ -584,10 +551,10 @@ jobs:
discord_token: "${{ secrets.DISCORD_TOKEN }}"
discord_channel_id: "${{ secrets.DISCORD_CHANNEL_ID }}"
discord_message: |
Hey <@&1122981184255840306>! A new version of the zetachain node has been released.
Hey <@&1122981184255840306>! A new version of the ZetaChain software has been released.
Major Version Upgrade (e.g. v5.x.x to V6.x.x) must be completed through a governance proposal.
We will submit a governance proposal in the next few days with a 12-hour voting period.
We will submit a governance proposal in the next few days.
More specific information including block height will be shared as part of the governance proposal.
See the release notes for more details. https://github.com/zeta-chain/node/releases/tag/${{ env.BINARY_VERSION }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/chain-operations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:

- name: Install Pipeline Dependencies
uses: ./.github/actions/install-dependencies

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
- name: Install Pipeline Dependencies
uses: ./.github/actions/install-dependencies

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
# - name: setup-git-credentials
# uses: de-vri-es/setup-git-credentials@v2.0.8
# with:
# credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ jobs:
with:
fetch-depth: 0

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}


- name: Set up Go
uses: actions/setup-go@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
# - name: Install Pipeline Dependencies
# uses: ./.github/actions/install-dependencies

- name: setup-git-credentials
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
# - name: setup-git-credentials
# uses: de-vri-es/setup-git-credentials@v2.0.8
# with:
# credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

- name: Set up Go
uses: actions/setup-go@v3
Expand Down
98 changes: 41 additions & 57 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,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"
"github.com/cosmos/cosmos-sdk/x/capability"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
Expand Down Expand Up @@ -167,7 +164,6 @@ var (
auth.AppModuleBasic{},
genutil.AppModuleBasic{},
bank.AppModuleBasic{},
capability.AppModuleBasic{},
staking.AppModuleBasic{},
distr.AppModuleBasic{},
gov.NewAppModuleBasic(getGovProposalHandlers()),
Expand Down Expand Up @@ -222,30 +218,27 @@ type App struct {
memKeys map[string]*storetypes.MemoryStoreKey

// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
CrisisKeeper crisiskeeper.Keeper
UpgradeKeeper upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ZetaCoreKeeper zetaCoreModuleKeeper.Keeper
ZetaObserverKeeper *zetaObserverModuleKeeper.Keeper
mm *module.Manager
sm *module.SimulationManager
configurator module.Configurator
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper
FungibleKeeper fungibleModuleKeeper.Keeper
EmissionsKeeper emissionsModuleKeeper.Keeper
GroupKeeper groupkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
CrisisKeeper crisiskeeper.Keeper
UpgradeKeeper upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
ZetaCoreKeeper zetaCoreModuleKeeper.Keeper
ZetaObserverKeeper *zetaObserverModuleKeeper.Keeper
mm *module.Manager
sm *module.SimulationManager
configurator module.Configurator
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper
FungibleKeeper fungibleModuleKeeper.Keeper
EmissionsKeeper emissionsModuleKeeper.Keeper
GroupKeeper groupkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
}

// New returns a reference to an initialized ZetaApp.
Expand Down Expand Up @@ -277,7 +270,6 @@ func New(
group.StoreKey,
upgradetypes.StoreKey,
evidencetypes.StoreKey,
capabilitytypes.StoreKey,
zetaCoreModuleTypes.StoreKey,
zetaObserverModuleTypes.StoreKey,
evmtypes.StoreKey, feemarkettypes.StoreKey,
Expand All @@ -286,7 +278,7 @@ func New(
authzkeeper.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
memKeys := sdk.NewMemoryStoreKeys()

app := &App{
BaseApp: bApp,
Expand All @@ -306,11 +298,6 @@ func New(
// set the BaseApp's parameter store
bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()))

// add capability keeper and ScopeToModule for ibc module
app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey])

app.CapabilityKeeper.Seal()

// add keepers
// use custom Ethermint account for contracts
app.AccountKeeper = authkeeper.NewAccountKeeper(
Expand Down Expand Up @@ -460,7 +447,6 @@ func New(
auth.NewAppModule(appCodec, app.AccountKeeper, nil),
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants),
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
Expand All @@ -486,7 +472,6 @@ func New(

app.mm.SetOrderBeginBlockers(
upgradetypes.ModuleName,
capabilitytypes.ModuleName,
evmtypes.ModuleName,
distrtypes.ModuleName,
slashingtypes.ModuleName,
Expand All @@ -508,16 +493,26 @@ func New(
authz.ModuleName,
)
app.mm.SetOrderEndBlockers(
banktypes.ModuleName, authtypes.ModuleName,
upgradetypes.ModuleName, capabilitytypes.ModuleName, distrtypes.ModuleName,
slashingtypes.ModuleName, evidencetypes.ModuleName,
banktypes.ModuleName,
authtypes.ModuleName,
upgradetypes.ModuleName,
distrtypes.ModuleName,
slashingtypes.ModuleName,
evidencetypes.ModuleName,
stakingtypes.ModuleName,
vestingtypes.ModuleName, govtypes.ModuleName,
paramstypes.ModuleName, genutiltypes.ModuleName, group.ModuleName,
vestingtypes.ModuleName,
govtypes.ModuleName,
paramstypes.ModuleName,
genutiltypes.ModuleName,
group.ModuleName,
crisistypes.ModuleName,
evmtypes.ModuleName, feemarkettypes.ModuleName,
zetaCoreModuleTypes.ModuleName, zetaObserverModuleTypes.ModuleName,
fungibleModuleTypes.ModuleName, emissionsModuleTypes.ModuleName, authz.ModuleName,
evmtypes.ModuleName,
feemarkettypes.ModuleName,
zetaCoreModuleTypes.ModuleName,
zetaObserverModuleTypes.ModuleName,
fungibleModuleTypes.ModuleName,
emissionsModuleTypes.ModuleName,
authz.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
Expand All @@ -526,7 +521,6 @@ func New(
// so that other modules that want to create or claim capabilities afterwards in InitChain
// can do so safely.
app.mm.SetOrderInitGenesis(
capabilitytypes.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
distrtypes.ModuleName,
Expand Down Expand Up @@ -586,16 +580,6 @@ func New(
if err := app.LoadLatestVersion(); err != nil {
tmos.Exit(err.Error())
}

// Initialize and seal the capability keeper so all persistent capabilities
// are loaded in-memory and prevent any further modules from creating scoped
// sub-keepers.
// This must be done during creation of baseapp rather than in InitChain so
// that in-memory capabilities get regenerated on app restart.
// Note that since this reads from the store, we can only perform it when
// `loadLatest` is set to true.
//ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{})
//app.CapabilityKeeper.InitializeAndSeal(ctx)
}

return app
Expand Down Expand Up @@ -764,7 +748,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
return paramsKeeper
}

// VerifyAddressFormat verifis the address is compatible with ethereum
// VerifyAddressFormat verifies the address is compatible with ethereum
func VerifyAddressFormat(bz []byte) error {
if len(bz) == 0 {
return sdkerrors.Wrap(sdkerrors.ErrUnknownAddress, "invalid address; cannot be empty")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@
],
"denom_metadata": []
},
"capability": {
"index": "1",
"owners": []
},
"crisis": {
"constant_fee": {
"denom": "azeta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@
],
"denom_metadata": []
},
"capability": {
"index": "1",
"owners": []
},
"crisis": {
"constant_fee": {
"denom": "azeta",
Expand Down
Loading

0 comments on commit 3dceaac

Please sign in to comment.