Skip to content

Commit

Permalink
fix: remove remaining wasm references (#953)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored Nov 15, 2024
1 parent deaf2eb commit 621040e
Show file tree
Hide file tree
Showing 55 changed files with 328 additions and 1,227 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
VERSION:
BINARY:
DBENGINE: pebbledb
COSMWASM_VERSION:
NAME_WITH_VERSION:
steps:
- name: Checking repository
Expand Down Expand Up @@ -47,11 +46,6 @@ jobs:
run: |
echo Building elysd binary
COSMWASM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v2 | sed 's/.* //')
echo $COSMWASM_VERSION
sudo wget https://github.com/CosmWasm/wasmvm/releases/download/${COSMWASM_VERSION}/libwasmvm_muslc.x86_64.a -O /usr/lib/libwasmvm.x86_64.a
sudo GOOS=linux GOARCH=amd64 go build -mod=readonly -trimpath -o elysd -ldflags "-X github.com/cosmos/cosmos-sdk/version.Name=${NAME} \
-X github.com/cosmos/cosmos-sdk/version.AppName=${NAME} \
-X github.com/cosmos/cosmos-sdk/version.ServerName=${BINARY} \
Expand All @@ -60,10 +54,10 @@ jobs:
-X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \
-X github.com/cosmos/cosmos-sdk/types.DBBackend=${DBENGINE} \
-X github.com/elys-network/elys/app.NextVersion=${VERSION} \
-X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo,${DBENGINE} \
-X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,osusergo,${DBENGINE} \
-w -s \
-linkmode=external \
-extldflags '-Wl,-z,muldefs -static -lm'" -tags "ledger,${DBENGINE}" ./cmd/${BINARY}
" -tags "ledger,${DBENGINE}" ./cmd/${BINARY}
echo "Version of elysd: $(./elysd version)"
- name: Compressing elys binary
run: |
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,27 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(NAME) \
-X github.com/cosmos/cosmos-sdk/types.DBBackend=$(DBENGINE) \
-X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo,$(DBENGINE)
BUILD_FLAGS := -ldflags '$(ldflags)' -tags '$(GOTAGS)'
BUILD_FOLDER = ./build

## install: Install elysd binary in $GOBIN
install: check-version go.sum
@echo Installing Elysd binary...
@GOFLAGS=$(GOFLAGS) go install $(BUILD_FLAGS) ./cmd/$(BINARY)
@elysd version

$(BUILDDIR)/:
@-mkdir -p $(BUILDDIR) 2> /dev/null

## build: Build the binary
build: check-version go.sum
build: check-version go.sum $(BUILDDIR)/
@echo Building Elysd binary...
@-mkdir -p $(BUILD_FOLDER) 2> /dev/null
@GOFLAGS=$(GOFLAGS) go build $(BUILD_FLAGS) -o $(BUILD_FOLDER) ./cmd/$(BINARY)
@GOFLAGS=$(GOFLAGS) go build $(BUILD_FLAGS) -o $(BUILDDIR) ./cmd/$(BINARY)

## build-all: Build binaries for all platforms
build-all:
build-all: $(BUILDDIR)/
@echo Building Elysd binaries for all platforms...
@-mkdir -p $(BUILD_FOLDER) 2> /dev/null
@GOFLAGS=$(GOFLAGS) GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_FOLDER)/$(BINARY)-linux-amd64 ./cmd/$(BINARY)
@GOFLAGS=$(GOFLAGS) GOOS=linux GOARCH=arm64 go build $(BUILD_FLAGS) -o $(BUILD_FOLDER)/$(BINARY)-linux-arm64 ./cmd/$(BINARY)
@GOFLAGS=$(GOFLAGS) GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_FOLDER)/$(BINARY)-darwin-amd64 ./cmd/$(BINARY)
@GOFLAGS=$(GOFLAGS) GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(BINARY)-linux-amd64 ./cmd/$(BINARY)
@GOFLAGS=$(GOFLAGS) GOOS=linux GOARCH=arm64 go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(BINARY)-linux-arm64 ./cmd/$(BINARY)
@GOFLAGS=$(GOFLAGS) GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(BINARY)-darwin-amd64 ./cmd/$(BINARY)

## do-checksum: Generate checksums for all binaries
do-checksum:
Expand All @@ -79,7 +79,7 @@ do-checksum:
## build-with-checksum: Build binaries for all platforms and generate checksums
build-with-checksum: build-all do-checksum

.PHONY: install build build-all do-checksum build-with-checksum
.PHONY: install build build-all do-checksum build-with-checksum $(BUILDDIR)/

## mocks: Generate mocks
mocks:
Expand All @@ -103,7 +103,7 @@ ci-test-unit:
## clean: Clean build files. Runs `go clean` internally.
clean:
@echo Cleaning build cache...
@rm -rf $(BUILD_FOLDER) 2> /dev/null
@rm -rf $(BUILDDIR) 2> /dev/null
@go clean ./...

.PHONY: mocks test-unit ci-test-unit clean
Expand Down
1 change: 0 additions & 1 deletion app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func (appKeepers *AppKeepers) GenerateKeys() {
authz.ModuleName,
group.StoreKey,
consensusparamtypes.StoreKey,
"wasm", // TODO: to remove post-upgrade

//ccvconsumertypes.StoreKey,

Expand Down
12 changes: 3 additions & 9 deletions app/setup_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
)

// make sure to update these when you upgrade the version
var NextVersion = "v0.50.0"
var NextVersion = "v0.51.0"

func (app *ElysApp) setUpgradeHandler() {
app.UpgradeKeeper.SetUpgradeHandler(
Expand All @@ -31,13 +31,7 @@ func (app *ElysApp) setUpgradeHandler() {
if version.Version == NextVersion || version.Version == LocalNetVersion {

// Add any logic here to run when the chain is upgraded to the new version
// Update consensus params in order to safely enable comet pruning
consensusParams, err := app.ConsensusParamsKeeper.ParamsStore.Get(ctx)
if err != nil {
return nil, err
}
consensusParams.Block.MaxBytes = NewMaxBytes
app.ConsensusParamsKeeper.ParamsStore.Set(ctx, consensusParams)

}

return app.mm.RunMigrations(ctx, app.configurator, vm)
Expand All @@ -60,7 +54,7 @@ func (app *ElysApp) setUpgradeStore() {
if shouldLoadUpgradeStore(app, upgradeInfo) {
storeUpgrades := storetypes.StoreUpgrades{
// Added: []string{},
Deleted: []string{"clock", "wasm"},
// Deleted: []string{},
}
app.Logger().Info(fmt.Sprintf("Setting store loader with height %d and store upgrades: %+v\n", upgradeInfo.Height, storeUpgrades))

Expand Down
25 changes: 13 additions & 12 deletions proto/elys/parameter/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ message Params {
string broker_address = 4;
int64 total_blocks_per_year = 5;
int64 rewards_data_lifetime = 6; // default 1 day = 86400
string wasm_max_label_size = 7 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string wasm_max_size = 8 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string wasm_max_proposal_wasm_size = 9 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
}

message LegacyParams {
Expand All @@ -55,4 +43,17 @@ message LegacyParams {
];
string broker_address = 4;
int64 total_blocks_per_year = 5;
int64 rewards_data_lifetime = 6; // default 1 day = 86400
string wasm_max_label_size = 7 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string wasm_max_size = 8 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string wasm_max_proposal_wasm_size = 9 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
}
13 changes: 0 additions & 13 deletions proto/elys/parameter/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ service Msg {
returns (MsgUpdateBrokerAddressResponse);
rpc UpdateTotalBlocksPerYear(MsgUpdateTotalBlocksPerYear)
returns (MsgUpdateTotalBlocksPerYearResponse);
rpc UpdateWasmConfig(MsgUpdateWasmConfig)
returns (MsgUpdateWasmConfigResponse);
rpc UpdateRewardsDataLifetime(MsgUpdateRewardsDataLifetime)
returns (MsgUpdateRewardsDataLifetimeResponse);
}
Expand Down Expand Up @@ -71,17 +69,6 @@ message MsgUpdateTotalBlocksPerYear {

message MsgUpdateTotalBlocksPerYearResponse {}

message MsgUpdateWasmConfig {
option (cosmos.msg.v1.signer) = "creator";
option (amino.name) = "parameter/MsgUpdateWasmConfig";
string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
string wasm_max_label_size = 2;
string wasm_max_size = 3;
string wasm_max_proposal_wasm_size = 4;
}

message MsgUpdateWasmConfigResponse {}

message MsgUpdateRewardsDataLifetime {
option (cosmos.msg.v1.signer) = "creator";
option (amino.name) = "parameter/MsgUpdateRewardsDataLifetime";
Expand Down
7 changes: 0 additions & 7 deletions scripts/test_scripts/parameter/tx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ sh ${current_dir}/scripts/test_tx_query/parameter/query.sh

# sleep 10s

# echo "Tx: Create and vote on gov Proposal for MsgUpdateWasmConfig"
# $BINARY tx gov submit-proposal ${current_dir}/scripts/test_tx_query/parameter/update_wasm_config.json --from=$MY_VALIDATOR_ADDRESS --keyring-backend=test --chain-id=elys --gas=1000000
# query_tx "create gov proposal"
# sh ${current_dir}/scripts/test_tx_query/vote.sh

# sleep 10s

# echo "Tx: Create and vote on gov Proposal for MsgUpdateRewardsDataLifetime"
# $BINARY tx gov submit-proposal ${current_dir}/scripts/test_tx_query/parameter/update_rewards_data_lifetime.json --from=$MY_VALIDATOR_ADDRESS --keyring-backend=test --chain-id=elys --gas=1000000
# query_tx "create gov proposal"
Expand Down
16 changes: 0 additions & 16 deletions scripts/test_scripts/parameter/update_wasm_config.json

This file was deleted.

1 change: 1 addition & 0 deletions x/accountedpool/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/accountedpool/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/amm/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/amm/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/assetprofile/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/assetprofile/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/burner/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/burner/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/commitment/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/commitment/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/epochs/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/estaking/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/estaking/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 1 addition & 63 deletions x/leveragelp/spec/04_endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,66 +194,4 @@ Queries position open estimation result.

### CloseEst

Queries position close estimation result.

## Wasmbindings

### Messages

#### LeveragelpOpen

Connect wasmbinding to `MsgOpen`

#### LeveragelpClose

Connect wasmbinding to `MsgClose`

### Queries

#### LeveragelpParams

Connect wasmbinding to `Params` query.

#### LeveragelpQueryPositions

Connect wasmbinding to `QueryPositions` query.

#### LeveragelpQueryPositionsByPool

Connect wasmbinding to `QueryPositionsByPool` query.

#### LeveragelpGetStatus

Connect wasmbinding to `GetStatus` query.

#### LeveragelpQueryPositionsForAddress

Connect wasmbinding to `QueryPositionsForAddress` query.

#### LeveragelpGetWhitelist

Connect wasmbinding to `GetWhitelist` query.

#### LeveragelpIsWhitelisted

Connect wasmbinding to `IsWhitelisted` query.

#### LeveragelpPool

Connect wasmbinding to `Pool` query.

#### LeveragelpPools

Connect wasmbinding to `Pools` query.

#### LeveragelpPosition

Connect wasmbinding to `Position` query.

#### LeveragelpOpenEst

Connect wasmbinding to `OpenEst` query.

#### LeveragelpCloseEst

Connect wasmbinding to `CloseEst` query.
Queries position close estimation result.
Loading

0 comments on commit 621040e

Please sign in to comment.