Skip to content

Commit 5765a2b

Browse files
committed
feat(upgrade): setup upgrade info for v2.0.0
Signed-off-by: Artur Troian <[email protected]>
1 parent e566877 commit 5765a2b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+387
-343
lines changed

.github/actions/setup-ubuntu/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
- name: Install dependencies
1515
# Shell must explicitly specify the shell for each step. https://github.com/orgs/community/discussions/18597
1616
shell: bash
17-
run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils
17+
run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils musl-tools
1818
- name: Setup npm
1919
uses: actions/setup-node@v4
2020
with:

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: actions/checkout@v4
4848
- name: Setup environment
4949
uses: ./.github/actions/setup-ubuntu
50-
- run: make bins
50+
- run: BUILD_OPTIONS=static-link make bins
5151
- run: make docker-image
5252

5353
tests:

.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ builds:
1717
- CC=o64-clang
1818
- CXX=o64-clang++
1919
- CGO_CFLAGS=-mmacosx-version-min=10.12
20-
- CGO_LDFLAGS=-L./.cache/lib -mmacosx-version-min=10.12
2120
flags:
2221
- "-mod={{ .Env.MOD }}"
2322
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
@@ -26,6 +25,7 @@ builds:
2625
- "{{ .Env.BUILD_LDFLAGS }}"
2726
- -s -w
2827
- -linkmode=external
28+
- -extldflags "-L./.cache/lib -mmacosx-version-min=10.12"
2929
- id: akash-darwin-arm64
3030
binary: akash
3131
main: ./cmd/akash
@@ -37,7 +37,6 @@ builds:
3737
- CC=oa64-clang
3838
- CXX=oa64-clang++
3939
- CGO_CFLAGS=-mmacosx-version-min=10.12
40-
- CGO_LDFLAGS=-L./.cache/lib -mmacosx-version-min=10.12
4140
flags:
4241
- "-mod={{ .Env.MOD }}"
4342
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
@@ -46,6 +45,7 @@ builds:
4645
- "{{ .Env.BUILD_LDFLAGS }}"
4746
- -s -w
4847
- -linkmode=external
48+
- -extldflags "-L./.cache/lib -mmacosx-version-min=10.12"
4949
- id: akash-linux-amd64
5050
binary: akash
5151
main: ./cmd/akash

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,20 @@ GIT_HEAD_ABBREV := $(shell git rev-parse --abbrev-ref HEAD)
1818

1919
IS_PREREL := $(shell $(ROOT_DIR)/script/is_prerelease.sh "$(RELEASE_TAG)" && echo "true" || echo "false")
2020
IS_MAINNET := $(shell $(ROOT_DIR)/script/mainnet-from-tag.sh "$(RELEASE_TAG)" && echo "true" || echo "false")
21+
IS_STABLE ?= false
22+
23+
ifeq ($(IS_MAINNET), true)
24+
ifeq ($(IS_PREREL), false)
25+
IS_STABLE := true
26+
endif
27+
endif
2128

2229
GOMOD ?= readonly
30+
31+
ifneq ($(UNAME_OS),Darwin)
2332
BUILD_OPTIONS ?= static-link
33+
endif
34+
2435
BUILD_TAGS := osusergo netgo ledger muslc gcc
2536
DB_BACKEND := goleveldb
2637
BUILD_FLAGS :=
@@ -51,8 +62,12 @@ ldflags := -X github.com/cosmos/cosmos-sdk/version.Name=akash \
5162

5263
GORELEASER_LDFLAGS := $(ldflags)
5364

54-
ifeq (,$(findstring static-link,$(BUILD_OPTIONS)))
55-
ldflags += -linkmode=external -extldflags "-Wl,-z,muldefs -static"
65+
ldflags += -linkmode=external
66+
67+
ifeq (static-link,$(findstring static-link,$(BUILD_OPTIONS)))
68+
ldflags += -extldflags "-L$(AKASH_DEVCACHE_LIB) -lm -Wl,-z,muldefs -static"
69+
else
70+
ldflags += -extldflags "-L$(AKASH_DEVCACHE_LIB)"
5671
endif
5772

5873
# check for nostrip option

_build/akash.Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM debian:bullseye
22
LABEL "org.opencontainers.image.source"="https://github.com/akash-network/node"
33

4-
ARG WASMVM_VERSION
5-
64
COPY ./akash /bin/
75

86
EXPOSE 26656 26657 26658

_run/common-commands.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ multisig-send:
2424
"$(AKASH_HOME)/multisig-sig-main.json" \
2525
"$(AKASH_HOME)/multisig-sig-other.json" \
2626
> "$(AKASH_HOME)/multisig-final.json"
27-
$(AKASH) "$(CHAIN_OPTS)" tx broadcast "$(AKASH_HOME)/multisig-final.json"
27+
$(AKASH) $(CHAIN_OPTS) tx broadcast "$(AKASH_HOME)/multisig-final.json"
2828

2929
.PHONY: akash-node-ready
3030
akash-node-ready: SHELL=$(BASH_PATH)
3131
akash-node-ready:
3232
@( \
3333
max_retry=15; \
3434
counter=0; \
35-
while [[ counter -lt max_retry ]]; do \
35+
while [[ $$counter -lt $$max_retry ]]; do \
3636
read block < <(curl -s $(AKASH_NODE)/status | jq -r '.result.sync_info.latest_block_height' 2> /dev/null); \
3737
if [[ $$? -ne 0 || $$block -lt 1 ]]; then \
3838
echo "unable to get node status. sleep for 1s"; \

_run/common.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ client-init-key-multisig:
7575
--multisig "$(subst $(space),$(comma),$(strip $(MULTISIG_SIGNERS)))" \
7676
--multisig-threshold 2
7777

78+
.NOTPARALLEL: node-init
7879
.INTERMEDIATE: node-init
7980
node-init: node-init-genesis node-init-genesis-accounts node-init-genesis-certs node-init-gentx node-init-finalize
8081

app/app.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func NewApp(
141141
if vl, valid := val.([]wasmkeeper.Option); valid {
142142
wasmOpts = append(wasmOpts, vl...)
143143
} else {
144-
panic(fmt.Sprintf("invalid type for aptOpts.Get(\"wasmh\"). expected %s, actual %s", reflect.TypeOf(wasmOpts).String(), reflect.TypeOf(vl).String()))
144+
panic(fmt.Sprintf("invalid type for aptOpts.Get(\"wasm\"). expected %s, actual %s", reflect.TypeOf(wasmOpts).String(), reflect.TypeOf(vl).String()))
145145
}
146146
}
147147

@@ -163,7 +163,6 @@ func NewApp(
163163
panic(fmt.Sprintf("error while reading wasm config: %s", err))
164164
}
165165

166-
wasmConfig.ContractDebugMode = false
167166
// Memory limits - prevent DoS
168167
wasmConfig.MemoryCacheSize = 100 // 100 MB max
169168
// Query gas limit - prevent expensive queries

app/sim_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ func setupSimulationApp(t *testing.T, msg string) (simtypes.Config, sdkutil.Enco
528528

529529
akash.ModuleBasics().RegisterInterfaces(encodingConfig.InterfaceRegistry)
530530

531-
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
531+
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", sim.FlagVerboseValue, sim.FlagEnabledValue)
532532
if skip {
533533
t.Skip(msg)
534534
}
@@ -539,11 +539,11 @@ func setupSimulationApp(t *testing.T, msg string) (simtypes.Config, sdkutil.Enco
539539
require.NoError(t, os.RemoveAll(dir))
540540
})
541541

542-
appOpts := make(simtestutil.AppOptionsMap, 0)
542+
appOpts := make(simtestutil.AppOptionsMap)
543543
appOpts[cflags.FlagHome] = dir // ensure a unique folder
544-
appOpts[cflags.FlagInvCheckPeriod] = simcli.FlagPeriodValue
544+
appOpts[cflags.FlagInvCheckPeriod] = sim.FlagPeriodValue
545545
app := akash.NewApp(logger, db, nil, true, sim.FlagPeriodValue, map[int64]bool{}, encodingConfig, appOpts, fauxMerkleModeOpt, baseapp.SetChainID(AppChainID))
546546

547-
require.Equal(t, "AkashApp", app.Name())
547+
require.Equal(t, akash.AppName, app.Name())
548548
return config, encodingConfig, db, appOpts, logger, app
549549
}

app/types/app.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ import (
4848
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
4949
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
5050
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
51-
icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
52-
icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
53-
icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
54-
icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper"
55-
icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types"
56-
ibccallbacks "github.com/cosmos/ibc-go/v10/modules/apps/callbacks"
5751
"github.com/cosmos/ibc-go/v10/modules/apps/transfer"
5852
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
5953
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
@@ -115,8 +109,6 @@ type AppKeepers struct {
115109
IBC *ibckeeper.Keeper
116110
Evidence *evidencekeeper.Keeper
117111
Transfer ibctransferkeeper.Keeper
118-
ICAController icacontrollerkeeper.Keeper
119-
ICAHost icahostkeeper.Keeper
120112
Wasm *wasmkeeper.Keeper
121113
}
122114

@@ -500,21 +492,6 @@ func (app *App) InitNormalKeepers(
500492
// Create fee enabled wasm ibc Stack
501493
wasmStackIBCHandler := wasm.NewIBCHandler(app.Keepers.Cosmos.Wasm, app.Keepers.Cosmos.IBC.ChannelKeeper, app.Keepers.Cosmos.Transfer, app.Keepers.Cosmos.IBC.ChannelKeeper)
502494

503-
// Create Interchain Accounts Stack
504-
// SendPacket, since it is originating from the application to core IBC:
505-
// icaAuthModuleKeeper.SendTx -> icaController.SendPacket -> fee.SendPacket -> channel.SendPacket
506-
var icaControllerStack porttypes.IBCModule
507-
// integration point for custom authentication modules
508-
// sees https://medium.com/the-interchain-foundation/ibc-go-v6-changes-to-interchain-accounts-and-how-it-impacts-your-chain-806c185300d7
509-
var noAuthzModule porttypes.IBCModule
510-
icaControllerStack = icacontroller.NewIBCMiddlewareWithAuth(noAuthzModule, app.Keepers.Cosmos.ICAController)
511-
// app.ICAAuthModule = icaControllerStack.(ibcmock.IBCModule)
512-
icaControllerStack = icacontroller.NewIBCMiddlewareWithAuth(icaControllerStack, app.Keepers.Cosmos.ICAController)
513-
icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.Keepers.Cosmos.IBC.ChannelKeeper, wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas)
514-
icaICS4Wrapper := icaControllerStack.(porttypes.ICS4Wrapper)
515-
// Since the callback middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper
516-
app.Keepers.Cosmos.ICAController.WithICS4Wrapper(icaICS4Wrapper)
517-
518495
transferIBCModule := transfer.NewIBCModule(app.Keepers.Cosmos.Transfer)
519496

520497
// Create static IBC router, add transfer route, then set and seal it
@@ -540,7 +517,6 @@ func (app *App) SetupHooks() {
540517
app.Keepers.Cosmos.Slashing.Hooks(),
541518
),
542519
)
543-
544520
app.Keepers.Cosmos.Gov.SetHooks(
545521
govtypes.NewMultiGovHooks(
546522
// insert governance hooks receivers here
@@ -573,8 +549,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
573549
paramsKeeper.Subspace(crisistypes.ModuleName).WithKeyTable(crisistypes.ParamKeyTable()) // nolint: staticcheck // SA1019
574550
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
575551
paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(ibctable)
576-
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
577-
paramsKeeper.Subspace(icahosttypes.SubModuleName)
578552

579553
// akash params subspaces
580554
paramsKeeper.Subspace(dtypes.ModuleName).WithKeyTable(dv1beta.ParamKeyTable())

0 commit comments

Comments
 (0)