Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ibc transfer claims middleware #199

Merged
merged 67 commits into from
Feb 12, 2022
Merged

feat: ibc transfer claims middleware #199

merged 67 commits into from
Feb 12, 2022

Conversation

fedekunze
Copy link
Contributor

@fedekunze fedekunze commented Jan 7, 2022

No description provided.

@linear
Copy link

linear bot commented Jan 7, 2022

ENG-389 ICS20 middleware module

Implement IBC middleware module that adds hooks for ICS20 transfers

To be used by ENG-369

Use ICS29 (cosmos/ibc-go#276) as a reference but with ICS20 module instead

@github-actions github-actions bot added the docs label Feb 7, 2022
@fedekunze fedekunze mentioned this pull request Feb 8, 2022
12 tasks
@fedekunze fedekunze marked this pull request as ready for review February 8, 2022 14:37
@fedekunze fedekunze requested a review from prajjwol as a code owner February 8, 2022 14:37
fedekunze and others added 4 commits February 8, 2022 11:44
* 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 <[email protected]>
tmConfig, ok := endpoint.ClientConfig.(*ibctesting.TendermintConfig)
require.True(endpoint.Chain.t, ok)

height := endpoint.Counterparty.Chain.LastHeader.GetHeight().(clienttypes.Height)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unchecked type assertion.

Click here if this comment is not useful

Please address this comment before merging this pull request.
(trailofbits.go.unchecked-type-assertion.unchecked-type-assertion in Rule board)

Comment on lines +94 to +103
go func() {
if err := apiSrv.Start(val.AppConfig.Config); err != nil {
errCh <- err
}
}()

select {
case err := <-errCh:
return err
case <-time.After(srvtypes.ServerStartTime): // assume server started successfully
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential goroutine leak due to unbuffered channel send inside loop or unbuffered channel receive in select block.

Click here if this comment is not useful

Please address this comment before merging this pull request.
(trailofbits.go.hanging-goroutine.hanging-goroutine in Rule board)

func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) {
clientState := chain.GetClientState(clientID)

consensusHeight := clientState.GetLatestHeight().(clienttypes.Height)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unchecked type assertion.

Click here if this comment is not useful

Please address this comment before merging this pull request.
(trailofbits.go.unchecked-type-assertion.unchecked-type-assertion in Rule board)

Copy link
Contributor Author

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the comments below for important code to review

@@ -571,3 +580,143 @@ func (suite *KeeperTestSuite) TestClawbackEmptyAccountsAirdrop() {
}
}
}

func (suite *KeeperTestSuite) TestMergeClaimRecords() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests for claim records

// MergeClaimsRecords merges two claim records from the
// sender and recipient of the IBC transfer while claiming the
// amount for the all the sender actions on behalf of the recipient.
func (k Keeper) MergeClaimsRecords(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the merge logic for when the user has claim records for the sender and recipient of the ibc transfer

@@ -0,0 +1,280 @@
package keeper_test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unit tests for each of the hooks


// OnRecvPacket performs an IBC receive callback. It performs a no-op if
// claims are inactive
func (k Keeper) OnRecvPacket(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

custom middleware receive callback logic when an IBC transfer is processed

senderClaimsRecord, senderRecordFound := k.GetClaimsRecord(ctx, sender)
recipientClaimsRecord, recipientRecordFound := k.GetClaimsRecord(ctx, recipient)

// handle the 4 cases for the recipient and sender claim records
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT to review 👇
@hanchon @khoslaventures @jolube

// the sender of the IBC transfer.
// The function performs a no-op if claims are disabled globally,
// acknowledgment failed, or if sender the sender has no claims record.
func (k Keeper) OnAcknowledgementPacket(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claim the IBC action on transfers

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


## IBC Middleware - IBC Transfer Action

1. The user submits a `MsgTransfer`.
### Send
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spec update

Copy link
Contributor

@jolube jolube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! Thanks!


// validate the sender bech32 address from the counterparty chain
bech32Prefix := strings.Split(data.Sender, "1")[0]
if bech32Prefix == data.Sender {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a common condition to check for? A little confused by what purpose it serves.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a nice to have

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in what cases would the prefix match the sender data? How would this ever happen? Isn't it better to check that the sender data is in a valid format?

mergedRecord.ActionsCompleted[i-1] = true
case !senderCompleted && !recipientCompleted:
// Neither sender or recipient completed the action.
if action != types.ActionIBCTransfer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can someone carry out an IBC transfer from one evmos addr to another? In this case we may not way to claim for them. On the other hand, this may complicate things slightly so I'm ok with this in any case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can

Copy link
Contributor

@jolube jolube Feb 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can

You mean you do not think users can execute IBC transfers to an address on the same chain as the sending address?

case senderRecordFound && recipientRecordFound:
// 1. Both sender and recipient have a claims record
// Merge sender's record with the recipient's record and
// claim actions that have been completed by one or the other
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention in the comment that the IBC action is claimed by default here

// the sender of the IBC transfer.
// The function performs a no-op if claims are disabled globally,
// acknowledgment failed, or if sender the sender has no claims record.
func (k Keeper) OnAcknowledgementPacket(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fedekunze fedekunze merged commit 7e03ec6 into main Feb 12, 2022
@fedekunze fedekunze deleted the ENG-389-middleware branch February 12, 2022 02:07
Copy link
Contributor

@danburck danburck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I'm going to read up on IBC transfers a bit more, to see how acknowledgements work.

khoslaventures pushed a commit that referenced this pull request Feb 15, 2022
* 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 <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>

* 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] <[email protected]>

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 <[email protected]>

* `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] <[email protected]>

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 <[email protected]>

* 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 <[email protected]>

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* 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 <[email protected]>

* tests

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>

* 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 <[email protected]>

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

* add changelog

Co-authored-by: Rajiv Patel-O'Connor <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
danburck added a commit that referenced this pull request Feb 15, 2022
* 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 <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>

* 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] <[email protected]>

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 <[email protected]>

* `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] <[email protected]>

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 <[email protected]>

* 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 <[email protected]>

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* 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 <[email protected]>

* tests

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>

* 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 <[email protected]>

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

* add changelog

Co-authored-by: Rajiv Patel-O'Connor <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Rajiv Patel-O'Connor <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
@fedekunze fedekunze mentioned this pull request Feb 28, 2022
12 tasks
fedekunze added a commit that referenced this pull request Feb 28, 2022
* 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 <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>

* 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] <[email protected]>

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 <[email protected]>

* `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] <[email protected]>

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 <[email protected]>

* 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 <[email protected]>

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* 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 <[email protected]>

* tests

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>

* 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] <[email protected]>

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 <[email protected]>

* `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] <[email protected]>

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 <[email protected]>

* 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 <[email protected]>

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* 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 <[email protected]>

* tests

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>

* 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 <[email protected]>

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

* add changelog

Co-authored-by: Rajiv Patel-O'Connor <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Rajiv Patel-O'Connor <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>

* 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] <[email protected]>

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 <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>

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 <[email protected]>

* 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 <[email protected]>

Co-authored-by: Rajiv Patel-O'Connor <[email protected]>
Co-authored-by: Daniel Burckhardt <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Guillermo Paoletti <[email protected]>
Co-authored-by: Ramiro Carlucho <[email protected]>
Co-authored-by: Prajjwol Gautam <[email protected]>
Co-authored-by: litvinsky <[email protected]>
Co-authored-by: Joe Schmoe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants