Skip to content

Commit

Permalink
Merge branch 'main' into loredana/ENG-190-fees-min-gas-price
Browse files Browse the repository at this point in the history
* main:
  Correct inflation.proto typo (evmos#608)
  change algolia search key (evmos#607)
  Changing erroneous epoch skips to daily instead of weekly (evmos#554)
  fix: remove dup set claims record + CLI update (evmos#605)
  build(deps): bump github.com/spf13/cast from 1.4.1 to 1.5.0 (evmos#604)
  imp: fees test coverage (evmos#586)
  fees: limit address derivation to 20 iterations at registration (evmos#603)
  • Loading branch information
loredanacirstea committed May 15, 2022
2 parents 41907a8 + ded5d91 commit b0778d8
Show file tree
Hide file tree
Showing 33 changed files with 1,010 additions and 398 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,23 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

### Bug Fixes
- (inflation) [\#554](https://github.com/tharsis/evmos/pull/554) Changing erroneous epoch skips to `daily` instead of `weekly`

### State Machine Breaking

(claims) [\#605](https://github.com/tharsis/evmos/pull/605) Remove duplicated `SetClaimsRecord`.

### API Breaking

(claims) [\#605](https://github.com/tharsis/evmos/pull/605) Remove `claims-` prefix in CLI query commands.
(erc20) [\#592](https://github.com/tharsis/evmos/pull/592) Finish module completeness audit.

## [v4.0.1] - 2022-05-10

### Bug Fixes

(erc20) [\#588](https://github.com/tharsis/evmos/pull/588) Revert PR [\#556](https://github.com/tharsis/evmos/pull/556).
(erc20) [\#592](https://github.com/tharsis/evmos/pull/592) Completeness audit

## [v4.0.0] - 2022-05-09

Expand Down
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ func NewEvmos(

app.FeesKeeper = feeskeeper.NewKeeper(
keys[feestypes.StoreKey], appCodec, app.GetSubspace(feestypes.ModuleName),
app.AccountKeeper, app.BankKeeper, app.EvmKeeper,
app.BankKeeper, app.EvmKeeper,
authtypes.FeeCollectorName,
)

Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ module.exports = {
src: '/evmos-black.svg',
},
algolia: {
id: 'BH4D9OD16A',
key: 'a5d55fe5f540cc3bd28fa2c72f2b5bd8',
id: '03ZGNVGBA8',
key: '56dbc1a7c67f8549b76a383447e246ab',
index: 'evmos'
},
topbar: {
Expand Down
12 changes: 0 additions & 12 deletions docs/protocol/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@

- [evmos/fees/v1/fees.proto](#evmos/fees/v1/fees.proto)
- [DevFeeInfo](#evmos.fees.v1.DevFeeInfo)
- [DevFeeInfosPerDeployer](#evmos.fees.v1.DevFeeInfosPerDeployer)

- [evmos/fees/v1/genesis.proto](#evmos/fees/v1/genesis.proto)
- [GenesisState](#evmos.fees.v1.GenesisState)
Expand Down Expand Up @@ -764,17 +763,6 @@ for the owner of a given smart contract
| `deployer_address` | [string](#string) | | bech32 address of contract deployer |
| `withdraw_address` | [string](#string) | | bech32 address of account receiving the transaction fees it defaults to deployer_address |

<a name="evmos.fees.v1.DevFeeInfosPerDeployer"></a>

### DevFeeInfosPerDeployer

DevFeeInfosPerDeployer defines an instance that keeps track of all
contracts registered by a deployer

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `contract_addresses` | [string](#string) | repeated | |

<!-- end messages -->

<!-- end enums -->
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/onsi/gomega v1.19.0
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.4.1
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.1
github.com/tendermint/tendermint v0.34.19
Expand Down
10 changes: 8 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB
github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo=
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
Expand Down Expand Up @@ -728,8 +730,9 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand Down Expand Up @@ -1016,6 +1019,8 @@ github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
Expand Down Expand Up @@ -1068,8 +1073,9 @@ github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
Expand Down
4 changes: 0 additions & 4 deletions proto/evmos/fees/v1/fees.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ message DevFeeInfo {
// it defaults to deployer_address
string withdraw_address = 3;
}

// DevFeeInfosPerDeployer defines an instance that keeps track of all
// contracts registered by a deployer
message DevFeeInfosPerDeployer { repeated string contract_addresses = 1; }
4 changes: 2 additions & 2 deletions proto/evmos/inflation/v1/inflation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ option go_package = "github.com/tharsis/evmos/v4/x/inflation/types";
// InflationDistribution defines the distribution in which inflation is
// allocated through minting on each epoch (staking, incentives, community). It
// excludes the team vesting distribution, as this is minted once at genesis.
// The initial InflationDistribution can be calculated from the Evmvos Token
// The initial InflationDistribution can be calculated from the Evmos Token
// Model like this:
// mintDistribution1 = distribution1 / (1 - teamVestingDistribution)
// 0.5333333 = 40% / (1 - 25%)
Expand Down Expand Up @@ -64,4 +64,4 @@ message ExponentialCalculation {
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}
}
8 changes: 4 additions & 4 deletions x/claims/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ func GetCmdQueryParams() *cobra.Command {
return cmd
}

// GetCmdQueryClaimsRecords implements the query claim-records command.
// GetCmdQueryClaimsRecords implements the query claim records command.
func GetCmdQueryClaimsRecords() *cobra.Command {
cmd := &cobra.Command{
Use: "claims-records",
Use: "records",
Args: cobra.NoArgs,
Short: "Query all the claims records",
Long: "Query the list of all the claims records",
Expand Down Expand Up @@ -131,10 +131,10 @@ func GetCmdQueryClaimsRecords() *cobra.Command {
return cmd
}

// GetCmdQueryClaimsRecord implements the query claim-record command.
// GetCmdQueryClaimsRecord implements the query claims record command.
func GetCmdQueryClaimsRecord() *cobra.Command {
cmd := &cobra.Command{
Use: "claims-record [address]",
Use: "record [address]",
Args: cobra.ExactArgs(1),
Short: "Query the claims records for an account.",
Long: "Query the claims records for an account.\nThis contains an address' initial claimable amount, and the claims per action.",
Expand Down
5 changes: 3 additions & 2 deletions x/claims/keeper/ibc_callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (k Keeper) OnRecvPacket(
sameAddress := sender.Equals(recipient)
fromEVMChain := params.IsEVMChannel(packet.DestinationChannel)

// If the packet is sent from a non-EVM chain, the sender addresss is not an
// If the packet is sent from a non-EVM chain, the sender address is not an
// ethereum key (i.e. `ethsecp256k1`). Thus, if `sameAddress` is true, the
// recipient address must be a non-ethereum key as well, which is not
// supported on Evmos. To prevent funds getting stuck, return an error, unless
Expand Down Expand Up @@ -184,7 +184,8 @@ func (k Keeper) OnRecvPacket(
break
}

k.SetClaimsRecord(ctx, recipient, senderClaimsRecord)
// delete the claims record from sender
// NOTE: claim record is migrated to the recipient in ClaimCoinsForAction
k.DeleteClaimsRecord(ctx, sender)

logger.Debug(
Expand Down
24 changes: 15 additions & 9 deletions x/claims/keeper/ibc_callbacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
mockpacket := channeltypes.NewPacket(ibcgotesting.MockPacketData, 1, transfertypes.PortID, "channel-0", transfertypes.PortID, "channel-0", timeoutHeight, disabledTimeoutTimestamp)
ack := ibcmock.MockAcknowledgement

triggerAmt := types.IBCTriggerAmt

testCases := []struct {
name string
test func()
Expand Down Expand Up @@ -291,7 +289,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
},
},
{
"case 1: no-op - sender ≠ recipient, but wrong triggerAmt",
"case 1: no-op - sender ≠ recipient, but wrong trigger amount",
func() {
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", "100", senderStr, receiverStr)
bz := transfertypes.ModuleCdc.MustMarshalJSON(&transfer)
Expand All @@ -310,7 +308,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
{
"case 1: fail - not enough funds on escrow account",
func() {
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", triggerAmt, senderStr, receiverStr)
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", types.IBCTriggerAmt, senderStr, receiverStr)
bz := transfertypes.ModuleCdc.MustMarshalJSON(&transfer)
packet := channeltypes.NewPacket(bz, 1, transfertypes.PortID, "channel-0", transfertypes.PortID, "channel-0", timeoutHeight, 0)

Expand All @@ -327,7 +325,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
{
"case 1: pass/merge - sender ≠ recipient",
func() {
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", triggerAmt, senderStr, receiverStr)
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", types.IBCTriggerAmt, senderStr, receiverStr)
bz := transfertypes.ModuleCdc.MustMarshalJSON(&transfer)
packet := channeltypes.NewPacket(bz, 1, transfertypes.PortID, "channel-0", transfertypes.PortID, "channel-0", timeoutHeight, 0)

Expand All @@ -351,7 +349,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
},
},
{
"case 2: no-op - same sender ≠ recipient, sender claims record found, but wrong triggerAmt",
"case 2: no-op - same sender ≠ recipient, sender claims record found, but wrong types.IBCTriggerAmt",
func() {
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", "100", senderStr, receiverStr)
bz := transfertypes.ModuleCdc.MustMarshalJSON(&transfer)
Expand All @@ -370,7 +368,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
{
"case 2: no-op - same sender ≠ recipient, sender claims record found, not enough escowed funds",
func() {
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", triggerAmt, senderStr, receiverStr)
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", types.IBCTriggerAmt, senderStr, receiverStr)
bz := transfertypes.ModuleCdc.MustMarshalJSON(&transfer)
packet := channeltypes.NewPacket(bz, 1, transfertypes.PortID, "channel-0", transfertypes.PortID, "channel-0", timeoutHeight, 0)

Expand All @@ -387,7 +385,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
{
"case 2: pass/migrate - same sender ≠ recipient, sender claims record found",
func() {
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", triggerAmt, senderStr, receiverStr)
transfer := transfertypes.NewFungibleTokenPacketData("aevmos", types.IBCTriggerAmt, senderStr, receiverStr)
bz := transfertypes.ModuleCdc.MustMarshalJSON(&transfer)
packet := channeltypes.NewPacket(bz, 1, transfertypes.PortID, "channel-0", transfertypes.PortID, "channel-0", timeoutHeight, 0)

Expand All @@ -399,6 +397,15 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
// check that the record is migrated
suite.Require().False(suite.app.ClaimsKeeper.HasClaimsRecord(suite.ctx, sender))
suite.Require().True(suite.app.ClaimsKeeper.HasClaimsRecord(suite.ctx, receiver))

expCR := types.ClaimsRecord{
InitialClaimableAmount: sdk.NewInt(100),
ActionsCompleted: []bool{false, false, false, true},
}

cr, found := suite.app.ClaimsKeeper.GetClaimsRecord(suite.ctx, receiver)
suite.Require().True(found)
suite.Require().Equal(expCR, cr)
},
},
{
Expand Down Expand Up @@ -435,7 +442,6 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
suite.Require().True(suite.app.ClaimsKeeper.HasClaimsRecord(suite.ctx, receiver))
},
},
// TODO
{
"case 3: claim - same Address with authorized EVM channel, with claims record",
func() {
Expand Down
8 changes: 6 additions & 2 deletions x/claims/spec/06_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ order: 6

The `x/claims` module contains the parameters described below. All parameters can be modified via governance.

::: danger
🚨 **IMPORTANT**: `time.Duration` store value is in nanoseconds but the JSON / `String` value is in seconds!
:::

| Key | Type | Default Value |
| -------------------- | --------------- | ----------------------------------------------------------- |
| `EnableClaim` | `bool` | `true` |
| `ClaimsDenom` | `string` | `"aevmos"` |
| `AirdropStartTime` | `time.Time` | `time.Time{}` // empty |
| `DurationUntilDecay` | `time.Duration` | `2629800000000000` // 1 month |
| `DurationOfDecay` | `time.Duration` | `5259600000000000` // 2 months |
| `DurationUntilDecay` | `time.Duration` | `2629800000000000` (nanoseconds) // 1 month |
| `DurationOfDecay` | `time.Duration` | `5259600000000000` (nanoseconds) // 2 months |
| `AuthorizedChannels` | `[]string` | `[]string{"channel-0", "channel-3"}` // Osmosis, Cosmos Hub |
| `EVMChannels` | `[]string` | `[]string{"channel-2"}` // Injective |

Expand Down
8 changes: 4 additions & 4 deletions x/claims/spec/07_clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ Allows users to query total amount of unclaimed tokens from the airdrop.
evmosd query claims total-unclaimed [flags]
```

**`claims-records`**
**`records`**

Allows users to query all the claims records available.

```bash
evmosd query claims claims-records [flags]
evmosd query claims records [flags]
```

**`claims-record`**
**`record`**

Allows users to query a claims record for a given user.

```bash
evmosd query claims claims-record [address] [flags]
evmosd query claims record [address] [flags]
```

**`params`**
Expand Down
6 changes: 3 additions & 3 deletions x/fees/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewRegisterDevFeeInfo() *cobra.Command {
deployer := cliCtx.GetFromAddress()

contract := args[0]
if err := ethermint.ValidateAddress(contract); err != nil {
if err := ethermint.ValidateNonZeroAddress(contract); err != nil {
return fmt.Errorf("invalid contract hex address %w", err)
}

Expand Down Expand Up @@ -103,7 +103,7 @@ func NewCancelDevFeeInfo() *cobra.Command {
deployer := cliCtx.GetFromAddress()

contract := args[0]
if err := ethermint.ValidateAddress(contract); err != nil {
if err := ethermint.ValidateNonZeroAddress(contract); err != nil {
return fmt.Errorf("invalid contract hex address %w", err)
}

Expand Down Expand Up @@ -141,7 +141,7 @@ func NewUpdateDevFeeInfo() *cobra.Command {
deployer := cliCtx.GetFromAddress()

contract := args[0]
if err := ethermint.ValidateAddress(contract); err != nil {
if err := ethermint.ValidateNonZeroAddress(contract); err != nil {
return fmt.Errorf("invalid contract hex address %w", err)
}

Expand Down
2 changes: 0 additions & 2 deletions x/fees/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package fees

import (
sdk "github.com/cosmos/cosmos-sdk/types"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
"github.com/ethereum/go-ethereum/common"

"github.com/tharsis/evmos/v4/x/fees/keeper"
Expand All @@ -13,7 +12,6 @@ import (
func InitGenesis(
ctx sdk.Context,
k keeper.Keeper,
accountKeeper authkeeper.AccountKeeper,
data types.GenesisState,
) {
k.SetParams(ctx, data.Params)
Expand Down
Loading

0 comments on commit b0778d8

Please sign in to comment.