Commit Graph

179 Commits

Author SHA1 Message Date
Christoph Otter
244c55a4ba Reduce gas factor 2024-02-15 14:30:37 +01:00
Christoph Otter
cca0005c71 Fix lint 2024-02-15 14:30:37 +01:00
Christoph Otter
e4d95c2453 Fix StoreCode gas usage 2024-02-15 14:30:37 +01:00
Christoph Otter
d4e6417dc7 Adjust to nested results 2024-02-15 14:30:37 +01:00
Christoph Otter
c7ba88f81d Adjust to type changes and renamings 2024-02-15 14:30:37 +01:00
Christoph Otter
b1c5bfb230 Update to wasmvm 2.0.0-rc.1 2024-02-15 14:30:37 +01:00
Simon Warta
3206540319 Adapt tests to gas value changes 2024-01-27 16:12:03 +01:00
Simon Warta
315bf5ca18 Generalize "pinned" to "discount" for cases where contract is in memory 2024-01-26 17:18:28 +01:00
Simon Warta
ce0dafad39 Remove NewContractInstanceCosts
We do not have entry-point specific gas metering and
NewContractInstanceCosts is just an alias for setup cost. No need to
maintain it. If we really need it, we should better explain why.
2024-01-25 10:09:40 +01:00
Simon Warta
18ff23339a Rename InstantiateContractCosts -> SetupContractCost 2024-01-25 10:02:20 +01:00
Not Jeremy Liu
651abcff89 Add Build Address gRPC Query (#1753)
* add and generate build address query protos

* change init args to bytes

* implement BuildAddress grpc query

* Add unit tests

* Update x/wasm/keeper/querier_test.go

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>

* more verbose error messages

* make CmdBuildAddress use query client instead of keeper

* src instead of srcQuery in tests

* add more test cases

* add test for invalid init args

---------

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>
2024-01-09 10:48:16 +01:00
Alexander Peters
dffa3212fc Fix migrate legacy params (#1729)
* Fix migrate legacy params

* Better tests

* Handle upgrade from wasmd 33 chains
2023-11-21 08:56:41 +01:00
Alexander Peters
2a82e35243 Fix gov v1beta1 support for legacy propsals (#1715)
* Revert "Remove gov v1beta1 dependencies and deprecated proposals (#1646)"

This reverts commit e0da419409.

* Rename legacy propsal files

* Ensure gov store support for v1beta1 types

* Linter

* Cleanup alias
2023-11-15 08:29:33 +01:00
pinosu
4313d7f3ee Upgrade to SDK v0.50.1 (#1696)
* Upgrade to SDK v0.50.1

* Update dependencies

* Upgrade ibc-go

* Remove GetSigners() method

* Update deps
2023-11-13 12:31:36 +01:00
pinosu
1a22c29ea4 Add label validation for non printable chars (#1650)
* Add label validation for non printable chars

* Fix printable chars check
2023-10-09 11:36:09 +02:00
Augusto Elesbão
6b8b45c32b fix: propagate funds validation errors
The validation functions on the `tx` type masquerade the root error
message for the `Funds` validation. Having the original error helps to
save time when debugging the cause for a failed tx.

One example is if someone sends multiple funds to a contract execution
without sorting the denoms, which is one of the validations in the
`Coins.Validate` method. With the error propagation, the developer can
quickly determine why the tx failed.
2023-10-04 11:36:22 +02:00
pinosu
e0da419409 Remove gov v1beta1 dependencies and deprecated proposals (#1646) 2023-10-04 09:31:48 +02:00
dependabot[bot]
b845e14491 Bump github.com/cosmos/ibc-go/v8 from 8.0.0-beta.0 to 8.0.0-beta.1 (#1648)
* Bump github.com/cosmos/ibc-go/v8 from 8.0.0-beta.0 to 8.0.0-beta.1

Bumps [github.com/cosmos/ibc-go/v8](https://github.com/cosmos/ibc-go) from 8.0.0-beta.0 to 8.0.0-beta.1.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cosmos/ibc-go/compare/v8.0.0-beta.0...v8.0.0-beta.1)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix conflicts

* Fix lint

* Make lint pass

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pino' Surace <pino.surace@live.it>
2023-10-03 14:13:19 +02:00
dependabot[bot]
ca682c085e Bump github.com/docker/distribution from 2.8.2+incompatible to 2.8.3+incompatible (#1647)
* Bump github.com/docker/distribution

Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.2+incompatible to 2.8.3+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.2...v2.8.3)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix lint

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pino' Surace <pino.surace@live.it>
2023-10-03 13:04:54 +02:00
pinosu
e65480838a Add msg update contract label (#1640)
* Add msg update contract label

* fix tests
2023-09-28 10:49:44 +02:00
Alexander Peters
cd66f786b2 SDK upgrade to v0.50 (branch) (#1611)
* Start implementation

* Add implementation + some e2e test

* Fix lint

* Squashed: sdk upgrade to v0.50

* rebuild protos with newer proto builder

(cherry picked from commit fd8f4c1d0d2163f0a504356c16cd2d250f6218f3)

* update ibc-go

(cherry picked from commit fb8667960fbeedb7d242baa644572986a154d4b6)

* bump cosmos-sdk and ibc in the v50 branch (#1616)

* tidy

* upgade ibc

* remove the toolchain command

* Bump sdk version

* Use correct bech32 prefix

* Bump SDK

* Enable fraud system test again

* Fix genesis param name

* Fix import/export simulations

* set log level for benchmarks

(cherry picked from commit 1cfb93008c596db62d22aba882f37a469546bfb9)

* Apply review comments

* Remove gov beta1 helpers

* Bump sdk version to latest in branch

* Fix linter

* Setup mergify for main

* Update mergify for better branch name

---------

Co-authored-by: Pino' Surace <pino.surace@live.it>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
2023-09-25 10:42:35 +02:00
Alexander Peters
7dba5c7c73 Merge pull request #1624 from CosmWasm/upper_limit
Ensure some contraints and limits on pin/unpin code ids
2023-09-18 05:23:55 +02:00
pinosu
6a2bffd479 Add grant system tests (#1626)
* Add grant system tests

* Add unpermissioned chain test case

* Fix tests

* Update cli and fix feedbacks

* Revisit CLI and system tests (#1627)

* Restructure CLI; fix system test

* Review feedback

---------

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
2023-09-15 16:59:27 +02:00
Alex Peters
b72d182d2a Ensure some contraints and limits on pin/unpin code ids 2023-09-15 11:11:01 +02:00
Alexander Peters
e0bfaa5231 Merge pull request #1620 from CosmWasm/channel_query
Start rework channel query
2023-09-14 15:09:52 +02:00
pinosu
dd22204644 Add store code authz (#1591)
* Start implementation

* Add implementation + some e2e test

* Fix lint

* Fix comments

* Add ante handler

* Add cli cmd + more test cases

* Add cli tests

* Add ante handler test

* Add more tests

* Fix comments

* Enable empty permissions for the grant

* Fix lint

* Update version
2023-09-14 13:28:57 +02:00
Alex Peters
e81d655287 Start rework channel query 2023-09-12 11:30:04 +02:00
Alexander Peters
0f82c95b6d Linter only (#1609)
* Linter only

* Bump linter version
2023-09-07 13:04:28 +02:00
Alexander Peters
3d9d92c770 Wasmvm 1.4 upgrade (#1590)
* Start wasmvm 1.4 upgrade

* Checksum lowercase

* Start distribution query tests

* Use wasmvm 1.4.0

* Implement remaining distribution queries

* Update test

* Update to burner v1.4; minor updates

* Add dec coin test

* Fix merge conflict
2023-09-07 09:14:51 +02:00
pinosu
87dce540ec Add StoreAndMigrateContract proposal (#1539)
* Add StoreAndMigrateContract msg

* Add tests

* Add proposal cli

* Fix comments
2023-09-07 08:42:00 +02:00
Pino' Surace
ffcfa8dfa0 Remove Wasmer references 2023-09-04 17:01:29 +02:00
Alex Peters
0d3bfceeeb Rename key store key attribute to be more concrete
Please enter the commit message for your changes. Lines starting
2023-08-30 15:25:52 +02:00
pinosu
08c517b110 Fix label validation error (#1555) 2023-08-17 09:41:25 +02:00
Jacob Gadikian
8627f85275 style: lint wasmd in the same manner as cosmos-sdk (#1537)
* golangci-lint run ./... --fix

* linting completed

* use the CosmWasm repo as part of the gci config
2023-07-31 15:53:20 +02:00
Jacob Gadikian
2d54a1d3d6 fix: use a constant for badAddress in tx_test.go (#1533)
* use a constant

* use a constant for badAddress
2023-07-24 15:16:33 +02:00
pinosu
19c17cbf15 Add/Remove addresses for code upload params (#1493)
* Start implementation

* Add tests

* Add fix

* Fix comments

* Minor chore (#1522)

* Minor chore

* Remove duplicate tests

---------

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
2023-07-19 18:00:16 +02:00
Alex Peters
a17f5f2fbf Add distribution query 2023-07-18 15:29:16 +02:00
Christoph Otter
d2e9aceaaf Add AllDenomMetadata BankQuery (#1426)
* x/wasm: add AllDenomMetadata BankQuery

* x/wasm: fix AllDenomMetadata BankQuery to have pagination and add DenomMetadata BankQuery

* Use simplified pagination

* Fix request conversion

* Add unknown denom test cases

* Add test for pagination conversion

* Fix nits

* Use wasmvm 1.3.0-rc.0

* Fix test

---------

Co-authored-by: Nikhil Suri <nikhilsuri@comcast.net>
2023-07-06 14:57:05 +02:00
pinosu
1a5a2d96e5 Upgrade to wasmvm 1.3.0-rc.0 (#1486)
* Upgrade to wasmvm 1.3.0-rc.0

* Fix comments
2023-07-06 13:07:48 +02:00
Alexander Peters
63f73d3e6c Gov authorization propagation for sub-messages (#1482)
* Add gov authorization propagation for sub-messages

* Minor update
2023-07-06 11:42:01 +02:00
pinosu
6937409740 Update changelog for v0.40.1 release (#1436)
* Update changelog for v0.40.1 release

* Make lint pass
2023-06-07 16:32:33 +02:00
pinosu
e6d451bf9d Add migration for AccessConfig (#1395)
* Add migration for AccessConfig

* Add more tests

* Make migration more resilient and remove "old" types

* cleanup legacy types

* fix comments
2023-05-26 13:08:48 +02:00
ruthishvitwit
e563a10cfa Feat : Trimmed label to prevent white spaces (#1412)
* Merge pull request #1397 from CosmWasm/ext_wasmibctesting

Decouple testing from app with an interface

* Feat : Trimmed label to prevent white spaces

* Fix: Made required nit changes

* Added test files to validate untrimmed labels
2023-05-26 13:06:33 +02:00
mergify[bot]
e3699209d7 Use ICS4Wrapper to send raw IBC packets & fix Fee middleware in wasm stack (backport #1375) (#1379)
* Use ICS4Wrapper to send raw IBC packets & fix Fee in wasm stack

(cherry picked from commit 6dfa5cb41c52180d30c2d0e1aed3fa2685a68c33)

# Conflicts:
#	app/app.go
#	x/wasm/keeper/handler_plugin.go
#	x/wasm/keeper/keeper_cgo.go
#	x/wasm/keeper/keeper_test.go
#	x/wasm/keeper/options_test.go
#	x/wasm/keeper/test_common.go

* Fix merge conflicts

* Inline ibc packet sender interface and minor chore

* Rename IBCPacketSender

---------

Co-authored-by: Assaf Morami <assaf.morami@gmail.com>
Co-authored-by: Alex Peters <alpe@users.noreply.github.com>
2023-05-08 18:57:26 +02:00
Alexander Peters
c2bb27d289 Merge pull request #1353 from CosmWasm/ibc_packet_recv
Redesign IBC on packet recv error/ result.Err handling
2023-04-21 18:35:44 +02:00
pinosu
52996dbf0e Add wasm command to support v1 gov proposals (#1326)
* Add wasm command to support v1 gov proposals

* fix lint issues

* fix comments

* Minor tweak and test files

---------

Co-authored-by: Alex Peters <alpe@users.noreply.github.com>
2023-04-21 18:28:19 +02:00
Alex Peters
7cd5893ef3 Redesign IBC on packet recv error/ result.Err handling 2023-04-21 11:29:24 +02:00
vishal-kanna
4c906d5a53 fix : removed the unnecessary usage of ErrInvalidMsg (#1311)
* feat:added a new error type

* feat:added a new error type

* fix: removed unnecessary usage of error type ErrInvalidMsg

---------

Co-authored-by: Vishal <kannavish329@gamil.com>
2023-04-04 11:14:57 +02:00
Alexander Peters
887ee0ee3e Add amino annotations to proto (#1280)
* Add amino annotations to proto

* Formatting only
2023-03-31 08:29:10 +02:00
pinosu
674eceb31e Use gov v1 instead of v1beta1 for new proposals (#1269)
* Deprecate proposal types

* Fix simulations

* Update cli

* Fix implementation

* Fix cli tests

* Fix lint errors

* Fix simulations

* fix comments

* Add integration tests

* Add more integration tests

* Add tests

* Remove legacy proposal CLI

* fix comments
2023-03-30 10:25:42 +02:00