Skip to content

Commit

Permalink
release: v1.0.0 final (#300)
Browse files Browse the repository at this point in the history
* fix: spelling (#254)

* bug (erc20): Compile built-in contracts in the build process (#246)

* wip

* use the raw value for json (#253)

* use the raw value for json

* use the raw value for json

* check if solc and jq is installed

* feat(erc20): wip iterate over contracts

* feat(erc20): iterate over contracts

* feat(erc20): add ERC20Burnable contract

* feat(erc20): lint Makefile

* feat(erc20): move contracts dir

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Prajjwol Gautam <prajjwol@gmail.com>

* build(deps): bump github.com/cosmos/ibc-go/v3 (#257)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#258)

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.45.0...v0.45.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(inflation): update `bondingIncentive` automatically (#252)

* feat(inflation): update bondedRatio automically and bTarget and maxVariance as params

* feat(inflation): update comments

* feat(inflation): rename b_target to bonding_target

* feat(inflation): set maxVariance to zero at genesis

* feat(inflation): fix test

* feat(inflation): don"t store bondedRatio in store

* feat(inflation): fix unit tests

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* `x/incentives`: integration tests (#256)

* wip

* tests(incentives): add test setup

* tests(inflation): wip

* tests(inflation): wip

* wip

* integration(incentives): setup integration test suite

* integration(incentives): wip debugging distribution

* integration(incentives): fix integration tests distribution

* integration(incentives): remove old integration test folder

* integration(incentives): add check for incentiveProposal if contract exists at address

* remove ethermint replace mod

* ENG 477 Integration Tests - `x/inflation` (#259)

* wip

* tests(incentives): add test setup

* tests(inflation): wip

* tests(inflation): wip

* wip

* wip

* feat(inflation): add integration tests

* feat(inflation): lint

* feat(inflation): remove local ethermint dependency

* test if github ci pipeline fails with failing integration tests

* integration(inflation): Add community pool test

* integration(inflation): fix import

* integration(inflation): fix import

* build(deps): bump github.com/onsi/gomega from 1.17.0 to 1.18.1 (#261)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.17.0 to 1.18.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.17.0...v1.18.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ENG 470 inflation module spec (#263)

* spec(inflation): fixes from writing the spec

* spec(inflation): import md

* spec(inflation): refactor

* spec(inflation): fix lint

* spec(evmos): fix module list (#264)

* spec: claims module (#255)

* claims: spec

* hooks and concepts

* spec client

* swagger

* events

* address comments from review

* decay period update

* fix

* epoch: unit tests (#265)

* tests(epochs): add types tests

* tests(epochs): refactor epoch hook interface

* tests(epochs): tidy

* tests(epochs): remove unused handler

* tests(epochs): remove unused cli test

* tests(epochs): delete simulation file

* tests(epochs): add keeper grpc tests

* tests(epochs): remove unused comment

* docs: grpc gateway docs (#266)

* feat: ibc transfer claims middleware  (#199)

* claims module

* update

* fixes

* actions

* hook

* app setup

* params

* rm spec

* claim fixes

* gRPC fixes

* fix lint

* proto-lint

* tests

* feat: ibc transfer hook middleware

* update version logic

* fixes

* cleanup ibc module

* grpc and genesis

* cli'

* lint

* middleware

* app setup

* grpc

* minor change

* test setup

* swagger update

* claim queries

* claim records tests

* genesis check

* Apply suggestions from code review

* remove dup calls

* Update x/claim/keeper/ibc_callbacks.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* fixes

* fix object order on app.go file (#210)

* claims: tests (#205)

* WIP: finish up claims unit tests

* WIP: if action is completed, no rewards

* fix more tests

* update claim type

* WIP: finish up claims unit tests

* WIP: if action is completed, no rewards

* fix more tests

* bookmark

* rename default denom

* fix moar tests

* change the denom

* bookmark

* comment out the clawback

* claim type permission change

* PR feedback address

* Update x/claim/types/claim_record_test.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* ibc callbacks tests (#214)

* wip ibc callbacks tests

* test fixes

* wip test, send and receive ibc

* OnReceive callback tests

* onAck tests

* fixes to ibc testing

* rm claim

* deps: use IBC-go v3 newest commit

* fixes (wip)

* hook

* merge claim records logic

* ibc transfer claim

* fix out of range

* gitignore

* comments

* ibc fix

* claims module ibctesting (#262)

* change ibc-go version, fix tests errors

* fix claim tests

* update tests

* wip ack not working

* port ibctesting

* fix mergeclaim and test

* port testutil

* replace mint with inflation

* delete unnecessary ibctesting files

* delete more files

* fix claim on ibc-ack

* cleanup

* lint

* claims test

* revert changes to ibctesting app

* claims hooks tests

* ibc callback unittests

* validate params test

* types params tests

* lint

Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>

* tests

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Prajjwol Gautam <prajjwol@gmail.com>
Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com>

* build(deps): bump github.com/onsi/ginkgo/v2 from 2.1.1 to 2.1.2 (#269)

* bug(erc20): wip fix gas estimation (#267)

* bug(erc20): wip fix gas estimation

* bug(erc20): fix gas estimation

* bug(erc20): rename payload to data

* bug(sigverify): fix multisig (#270)

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* deps(ethermint): bump to v0.10.0-beta1 (#272)

* danburck/release changelog (#274)

* release: v1-alpha1 changelog (#251)

* release: v1.0.0-beta1 changelog (#273)

* fix: spelling (#254)

* bug (erc20): Compile built-in contracts in the build process (#246)

* wip

* use the raw value for json (#253)

* use the raw value for json

* use the raw value for json

* check if solc and jq is installed

* feat(erc20): wip iterate over contracts

* feat(erc20): iterate over contracts

* feat(erc20): add ERC20Burnable contract

* feat(erc20): lint Makefile

* feat(erc20): move contracts dir

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Prajjwol Gautam <prajjwol@gmail.com>

* build(deps): bump github.com/cosmos/ibc-go/v3 (#257)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#258)

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.45.0...v0.45.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(inflation): update `bondingIncentive` automatically (#252)

* feat(inflation): update bondedRatio automically and bTarget and maxVariance as params

* feat(inflation): update comments

* feat(inflation): rename b_target to bonding_target

* feat(inflation): set maxVariance to zero at genesis

* feat(inflation): fix test

* feat(inflation): don"t store bondedRatio in store

* feat(inflation): fix unit tests

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* `x/incentives`: integration tests (#256)

* wip

* tests(incentives): add test setup

* tests(inflation): wip

* tests(inflation): wip

* wip

* integration(incentives): setup integration test suite

* integration(incentives): wip debugging distribution

* integration(incentives): fix integration tests distribution

* integration(incentives): remove old integration test folder

* integration(incentives): add check for incentiveProposal if contract exists at address

* remove ethermint replace mod

* ENG 477 Integration Tests - `x/inflation` (#259)

* wip

* tests(incentives): add test setup

* tests(inflation): wip

* tests(inflation): wip

* wip

* wip

* feat(inflation): add integration tests

* feat(inflation): lint

* feat(inflation): remove local ethermint dependency

* test if github ci pipeline fails with failing integration tests

* integration(inflation): Add community pool test

* integration(inflation): fix import

* integration(inflation): fix import

* build(deps): bump github.com/onsi/gomega from 1.17.0 to 1.18.1 (#261)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.17.0 to 1.18.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.17.0...v1.18.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ENG 470 inflation module spec (#263)

* spec(inflation): fixes from writing the spec

* spec(inflation): import md

* spec(inflation): refactor

* spec(inflation): fix lint

* spec(evmos): fix module list (#264)

* spec: claims module (#255)

* claims: spec

* hooks and concepts

* spec client

* swagger

* events

* address comments from review

* decay period update

* fix

* epoch: unit tests (#265)

* tests(epochs): add types tests

* tests(epochs): refactor epoch hook interface

* tests(epochs): tidy

* tests(epochs): remove unused handler

* tests(epochs): remove unused cli test

* tests(epochs): delete simulation file

* tests(epochs): add keeper grpc tests

* tests(epochs): remove unused comment

* docs: grpc gateway docs (#266)

* feat: ibc transfer claims middleware  (#199)

* claims module

* update

* fixes

* actions

* hook

* app setup

* params

* rm spec

* claim fixes

* gRPC fixes

* fix lint

* proto-lint

* tests

* feat: ibc transfer hook middleware

* update version logic

* fixes

* cleanup ibc module

* grpc and genesis

* cli'

* lint

* middleware

* app setup

* grpc

* minor change

* test setup

* swagger update

* claim queries

* claim records tests

* genesis check

* Apply suggestions from code review

* remove dup calls

* Update x/claim/keeper/ibc_callbacks.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* fixes

* fix object order on app.go file (#210)

* claims: tests (#205)

* WIP: finish up claims unit tests

* WIP: if action is completed, no rewards

* fix more tests

* update claim type

* WIP: finish up claims unit tests

* WIP: if action is completed, no rewards

* fix more tests

* bookmark

* rename default denom

* fix moar tests

* change the denom

* bookmark

* comment out the clawback

* claim type permission change

* PR feedback address

* Update x/claim/types/claim_record_test.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* ibc callbacks tests (#214)

* wip ibc callbacks tests

* test fixes

* wip test, send and receive ibc

* OnReceive callback tests

* onAck tests

* fixes to ibc testing

* rm claim

* deps: use IBC-go v3 newest commit

* fixes (wip)

* hook

* merge claim records logic

* ibc transfer claim

* fix out of range

* gitignore

* comments

* ibc fix

* claims module ibctesting (#262)

* change ibc-go version, fix tests errors

* fix claim tests

* update tests

* wip ack not working

* port ibctesting

* fix mergeclaim and test

* port testutil

* replace mint with inflation

* delete unnecessary ibctesting files

* delete more files

* fix claim on ibc-ack

* cleanup

* lint

* claims test

* revert changes to ibctesting app

* claims hooks tests

* ibc callback unittests

* validate params test

* types params tests

* lint

Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>

* tests

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Prajjwol Gautam <prajjwol@gmail.com>
Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com>

* build(deps): bump github.com/onsi/ginkgo/v2 from 2.1.1 to 2.1.2 (#269)

* bug(erc20): wip fix gas estimation (#267)

* bug(erc20): wip fix gas estimation

* bug(erc20): fix gas estimation

* bug(erc20): rename payload to data

* bug(sigverify): fix multisig (#270)

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* deps(ethermint): bump to v0.10.0-beta1 (#272)

* add changelog

Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Prajjwol Gautam <prajjwol@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: Prajjwol Gautam <prajjwol@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>

* build(deps): bump github.com/onsi/ginkgo/v2 from 2.1.2 to 2.1.3 (#275)

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.1.2...v2.1.3)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* tests: add sigverify tests (#277)

* test: sigverify nits (#278)

* deps: bump IBC v3 rc0 (#279)

* feat(vesting): Add BDD tests and `ClawbackVestingAccount` by Agoric (#268)

* integrationTests(Vesting): add vesting tests under icentives module
\

* integrationTests(Vesting): add vesting tests for transfer

* integrationTests(Vesting): correct spelling

* integrationTests(Vesting): update comment

* integrationTests(Vesting): get locked and spendable coins from store

* integrationTests(Vesting): move testing files to new module folder (still with incentives deps) and add Ethereum tx tests

* integrationTests(Vesting): refactor test structure

* integrationTests(Vesting): refactor wording

* integrationTests(Vesting): split cliff and lock cases

* integrationTests(Vesting): split cliff and lock cases

* merge main and add todos

* feat(vesting): copy files and make proto

* feat(vesting): implement custom staking logic and move keeper functions from types to keeper

* feat(vesting): replace keeper types import

* feat(vesting): remove duplicate sdk proto and types

* feat(vesting): fix lint and codec

* feat(vesting): refactor vesting tests to use clawback vesting accounts

* feat(vesting): add lockup tests

* feat(vesting): add governance tests

* feat(vesting): comment out tests

* feat(vesting): delete vesting calculator

* fix IBC test

* rm exported

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>

* ibctesting: use `EthAccounts` for IBC tests (#280)

* ibctesting: use EthAccounts for IBC tests

* fix lint

* impr(vesting): refactor `x/vesting` module (#281)

* feat(vesting): refactor types/msg_test

* feat(vesting): refactor period tests

* feat(vesting): refactor clawback vesting account tests

* feat(vesting): remove init account helper

* feat(vesting): refactore computeClawback tests to TDD

* feat(vesting): wip msg_server_test.go

* feat(vesting): add msg server tests with one open TODO

* feat(vesting): rename clawback address -> accountAddress

* feat(vesting): replace amino codec with cdc in module.go

* feat(vesting): fix EthAccount conversion to Baseaccount

* feat(vesting): add code analysis of post_reward function

* feat(vesting): remove post reward logic

* feat(vesting): remove unsused interface methods

* feat(vesting): fix nil dereference lint

* feat(vesting): fix unchecked assertion lint

* feat(vesting): remove AllowWithdrawAddr hook

* feat(vesting): address PR comments

* feat(vesting): remove unvested slashing logic from addGrant

* feat(vesting): add CreateVesitngAccountCmd to cli

* feat(vesting): add types/utils test

* fix gosec

Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>

* fix(vesting): call correct staking hooks (#285)

* fix(vesting): call correct staking hooks

* fix(vesting): refactor stakinghooks interface

* docs: testnet fixes (#288)

* Update faucet.md

* Update join.md

* docs: update testnet docs (#289)

* feat(vesting): ENG-385 add ante decorators (#286)

* add eth ante

* merge main

* wip

* simplify test

* refactor integration ante test

* fix lint

* remove comments

* add EthVestingTransactionDecorator description`

* add CHANGELOG

* vesting: delegation and gov ante handler (#287)

* feat(vesting): refactor types/msg_test

* feat(vesting): refactor period tests

* feat(vesting): refactor clawback vesting account tests

* feat(vesting): remove init account helper

* feat(vesting): refactore computeClawback tests to TDD

* feat(vesting): wip msg_server_test.go

* feat(vesting): add msg server tests with one open TODO

* feat(vesting): rename clawback address -> accountAddress

* feat(vesting): replace amino codec with cdc in module.go

* vesting delegation first approach

* integration tests

* fix delegation vesting

* governance ante decorator

* test gov vote and cleanup

* delete re-added lines

Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>

* integration(vesting):refactor perform ethTx into separate function

* cleanup ante folder

* fix lint

* errors and comments

* address some comments

* remove governance ante decorator

* replace ethante with new Handler options on evmos

* refactor ante vesting errors

Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com>

* Update config.go

* build(deps): bump golangci/golangci-lint-action from 2.5.2 to 3 (#290)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2.5.2 to 3.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v2.5.2...v3)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps: ethermint upgrade to v0.10.0 (#293)

* Update disk_optimization.md (#294)

* feat(vesting): grpc queries locked, unvested, vested (#291)

* wip vesting queries

* wip add queries

* add grpc query tests

* fix lint

* feat(vesting): add LockedOnly method

* feat(vesting): refactor queries

* fix indentation

* feat(vesting): adress comments

* bug(inflation): multiply daily epoch mint provision calculation by Power reduction (#295)

* bug(inflation): multiply daily epoch mint provision calculation by Power reduction

* bug(inflation): fix tests

* bug(inflation): fix comment

* bug(inflation): use sdk.DefaultPowerReduction

* bug(inflation): fix genesis tests

* vesting: refactor vesting query (#297)

* wip

* bug(vesting): Refactor UnvestedOnly logic

* bug(vesting): clean PR from unrelated changes

* bug(vesting): delete unused genesis proto

* bug(vesting): refactor comments

* Update x/vesting/types/clawback_vesting_account.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* vesting: register gRPC web (#299)

* claims: ignore vesting accounts on clawback (#298)

* swagger

* swagger: add IBC and ethermint (#301)

* swagger: add IBC and ethermint

* add missing modules

* fix inflation

* lint

* fix tests

* ante: add validator min commission decorator (#302)

* ante: add validator min commission decorator

* changelog

* rm decorator

* rm decorator eip712

* cmd: add genaccount flags for vesting with clawback (#303)

* bug(vesting): add clawback vesting account as add-genaccount evmosd cmd

* bug(vesting): add to init.sh

* bug(vesting): refactor into switch statement

* bug(vesting): remove debugging from init.sh

* bug(vesting): update flag description

* bug(vesting): fix init.sh total supply

* bug(vesting): clean init.sh

* bug(vesting): refactor `HasLockedCoins`  (#306)

* bug(vesting): fail delegation if account is locked

* bug(vesting): fix error message

* bug(vesting): make locked && vested coins delegatable again

* docs: add cd step to join doc (#307)

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
Co-authored-by: Prajjwol Gautam <prajjwol@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>
Co-authored-by: litvinsky <60661362+litvinsky@users.noreply.github.com>
Co-authored-by: Joe Schmoe <64335177+jolube@users.noreply.github.com>
  • Loading branch information
11 people committed Feb 28, 2022
1 parent 2c0b385 commit 81abb92
Show file tree
Hide file tree
Showing 193 changed files with 38,918 additions and 10,947 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
.go
.mod
.sum
- uses: golangci/golangci-lint-action@v2.5.2
- uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.42
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ keyring_test_cosmos
./**/dist
secret.yml
artifacts/*
tmp-swagger-gen
# vue/

# Local docker volume mappings
Expand Down
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,29 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v1.0.0-beta1] - 2022-02-15
## [v1.0.0] - 2022-02-28

### State Machine Breaking

- (ante) [\#302](https://github.com/tharsis/evmos/pull/302) Add AnteHandler decorator to enforce global min validator commission rate.
- (app) [\#224](https://github.com/tharsis/evmos/pull/224) Fix power reduction my setting the correct value on app initialization.
- (keys) [\#189](https://github.com/tharsis/evmos/pull/189) Remove support for Tendermint's `secp256k1` keys.
- [\#173](https://github.com/tharsis/evmos/pull/173) Rename `intrarelayer` module to `erc20`
- [\#190](https://github.com/tharsis/evmos/pull/190) Remove governance hook from `erc20` module

### Features

- [\#286](https://github.com/tharsis/evmos/pull/286) Add `x/vesting` module.
- [\#184](https://github.com/tharsis/evmos/pull/184) Add claims module for claiming the airdrop tokens.
- [\#183](https://github.com/tharsis/evmos/pull/183) Add epoch module for incentives.
- [\#202](https://github.com/tharsis/evmos/pull/202) Add custom configuration for state sync snapshots and tendermint p2p peers. This introduces a custom `InitCmd` function.
- [\#176](https://github.com/tharsis/evmos/pull/176) Add `x/incentives` module.

### Improvements

- (deps) Bumped Ethermint to [`v0.10.0-alpha2`](https://github.com/tharsis/ethermint/releases/tag/v0.10.0-alpha2)
- (deps) Bumped IBC-go to `v3.0.0-alpha2`
- (deps) Bumped Cosmos SDK to [`v0.45.0`](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.0)
- (deps) Bumped Ethermint to [`v0.10.0`](https://github.com/tharsis/ethermint/releases/tag/v0.10.0)
- (deps) Bumped IBC-go to `v3.0.0-rc0`
- (deps) Bumped Cosmos SDK to [`v0.45.1`](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.1)
- (deps) bumped Tendermint to `v0.34.15` and tm-db to `v0.6.6`.
- [\#180](https://github.com/tharsis/evmos/pull/180) Delete `TokenPair` if ERC20 contract has been selfdestructed.

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,9 @@ proto-check-breaking:

TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.15/proto/tendermint
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.45.0
ETHERMINT_URL = https://raw.githubusercontent.com/tharsis/ethermint/v0.10.0-alpha2
COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.45.1
ETHERMINT_URL = https://raw.githubusercontent.com/tharsis/ethermint/v0.10.0
IBC_GO_URL = https://raw.githubusercontent.com/cosmos/ibc-go/v3.0.0-rc0
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master

TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto
Expand Down
80 changes: 80 additions & 0 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package ante

import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

ethante "github.com/tharsis/ethermint/app/ante"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
)

const (
secp256k1VerifyCost uint64 = 21000
)

// NewAnteHandler returns an ante handler responsible for attempting to route an
// Ethereum or SDK transaction to an internal ante handler for performing
// transaction-level processing (e.g. fee payment, signature verification) before
// being passed onto it's respective handler.
func NewAnteHandler(options HandlerOptions) sdk.AnteHandler {
return func(
ctx sdk.Context, tx sdk.Tx, sim bool,
) (newCtx sdk.Context, err error) {
var anteHandler sdk.AnteHandler

defer ethante.Recover(ctx.Logger(), &err)

txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx)
if ok {
opts := txWithExtensions.GetExtensionOptions()
if len(opts) > 0 {
switch typeURL := opts[0].GetTypeUrl(); typeURL {
case "/ethermint.evm.v1.ExtensionOptionsEthereumTx":
// handle as *evmtypes.MsgEthereumTx
anteHandler = newEthAnteHandler(options)
case "/ethermint.types.v1.ExtensionOptionsWeb3Tx":
// handle as normal Cosmos SDK tx, except signature is checked for EIP712 representation
anteHandler = newCosmosAnteHandlerEip712(options)
default:
return ctx, sdkerrors.Wrapf(
sdkerrors.ErrUnknownExtensionOptions,
"rejecting tx with unsupported extension option: %s", typeURL,
)
}

return anteHandler(ctx, tx, sim)
}
}

// handle as totally normal Cosmos SDK tx
switch tx.(type) {
case sdk.Tx:
anteHandler = newCosmosAnteHandler(options)
default:
return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "invalid transaction type: %T", tx)
}

return anteHandler(ctx, tx, sim)
}
}

var _ authante.SignatureVerificationGasConsumer = DefaultSigVerificationGasConsumer

// DefaultSigVerificationGasConsumer is the default implementation of SignatureVerificationGasConsumer. It consumes gas
// for signature verification based upon the public key type. The cost is fetched from the given params and is matched
// by the concrete type.
func DefaultSigVerificationGasConsumer(
meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params,
) error {
// support for ethereum ECDSA secp256k1 keys
_, ok := sig.PubKey.(*ethsecp256k1.PubKey)
if ok {
meter.ConsumeGas(secp256k1VerifyCost, "ante verify: eth_secp256k1")
return nil
}

return authante.DefaultSigVerificationGasConsumer(meter, sig, params)
}
46 changes: 46 additions & 0 deletions app/ante/comission.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package ante

import (
sdk "github.com/cosmos/cosmos-sdk/types"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)

var minCommission = sdk.NewDecWithPrec(5, 2) // 5%

// TODO: remove once Cosmos SDK is upgraded to v0.46

// ValidatorCommissionDecorator validates that the validator commission is always
// greater or equal than the min commission rate
type ValidatorCommissionDecorator struct{}

// NewValidatorCommissionDecorator creates a new NewValidatorCommissionDecorator
func NewValidatorCommissionDecorator() ValidatorCommissionDecorator {
return ValidatorCommissionDecorator{}
}

// AnteHandle checks if the tx contains a staking create validator or edit validator.
// It errors if the the commission rate is below the min threshold.
func (vcd ValidatorCommissionDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
for _, msg := range tx.GetMsgs() {
switch msg := msg.(type) {
case *stakingtypes.MsgCreateValidator:
if msg.Commission.Rate.LT(minCommission) {
return ctx, sdkerrors.Wrapf(
sdkerrors.ErrInvalidRequest,
"validator commission %s be lower than minimum of %s", msg.Commission.Rate, minCommission)
}
case *stakingtypes.MsgEditValidator:
if msg.CommissionRate != nil && msg.CommissionRate.LT(minCommission) {
return ctx, sdkerrors.Wrapf(
sdkerrors.ErrInvalidRequest,
"validator commission %s be lower than minimum of %s", msg.CommissionRate, minCommission)
}
default:
continue
}
}

return next(ctx, tx, simulate)
}
11 changes: 11 additions & 0 deletions app/ante/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*Package ante defines the SDK auth module's AnteHandler as well as an internal
AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
During CheckTx, the transaction is passed through a series of
pre-message execution validation checks such as signature and account
verification in addition to minimum fees being checked. Otherwise, during
DeliverTx, the transaction is simply passed to the EVM which will also
perform the same series of checks. The distinction is made in CheckTx to
prevent spam and DoS attacks.
*/
package ante
117 changes: 117 additions & 0 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
package ante

import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
channelkeeper "github.com/cosmos/ibc-go/v3/modules/core/04-channel/keeper"
ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante"

ethante "github.com/tharsis/ethermint/app/ante"
evmtypes "github.com/tharsis/ethermint/x/evm/types"

vestingtypes "github.com/tharsis/evmos/x/vesting/types"
)

// HandlerOptions defines the list of module keepers required to run the Evmos
// AnteHandler decorators.
type HandlerOptions struct {
AccountKeeper evmtypes.AccountKeeper
BankKeeper evmtypes.BankKeeper
IBCChannelKeeper channelkeeper.Keeper
FeeMarketKeeper evmtypes.FeeMarketKeeper
StakingKeeper vestingtypes.StakingKeeper
EvmKeeper ethante.EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
SignModeHandler authsigning.SignModeHandler
SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
}

// Validate checks if the keepers are defined
func (options HandlerOptions) Validate() error {
if options.AccountKeeper == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler")
}
if options.BankKeeper == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
}
if options.StakingKeeper == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "staking keeper is required for AnteHandler")
}
if options.SignModeHandler == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
}
if options.FeeMarketKeeper == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "fee market keeper is required for AnteHandler")
}
if options.EvmKeeper == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "evm keeper is required for AnteHandler")
}
return nil
}

// newCosmosAnteHandler creates the default ante handler for Ethereum transactions
func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ethante.NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first
ethante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against minimal-gas-prices
ethante.NewEthValidateBasicDecorator(options.EvmKeeper),
ethante.NewEthSigVerificationDecorator(options.EvmKeeper),
ethante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.BankKeeper, options.EvmKeeper),
ethante.NewEthGasConsumeDecorator(options.EvmKeeper),
ethante.NewCanTransferDecorator(options.EvmKeeper),
NewEthVestingTransactionDecorator(options.AccountKeeper),
ethante.NewEthIncrementSenderSequenceDecorator(options.AccountKeeper), // innermost AnteDecorator.
)
}

// newCosmosAnteHandler creates the default ante handler for Cosmos transactions
func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ethante.RejectMessagesDecorator{}, // reject MsgEthereumTxs
ante.NewSetUpContextDecorator(),
ante.NewRejectExtensionOptionsDecorator(),
ante.NewMempoolFeeDecorator(),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
NewVestingDelegationDecorator(options.AccountKeeper, options.StakingKeeper),
NewValidatorCommissionDecorator(),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCChannelKeeper),
)
}

// newCosmosAnteHandlerEip712 creates the ante handler for transactions signed with EIP712
func newCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ethante.RejectMessagesDecorator{}, // reject MsgEthereumTxs
ante.NewSetUpContextDecorator(),
ante.NewMempoolFeeDecorator(),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
NewVestingDelegationDecorator(options.AccountKeeper, options.StakingKeeper),
NewValidatorCommissionDecorator(),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
// Note: signature verification uses EIP instead of the cosmos signature validator
ethante.NewEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCChannelKeeper),
)
}

0 comments on commit 81abb92

Please sign in to comment.