Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/smiric/ics-custom-infraction' in…
Browse files Browse the repository at this point in the history
…to smiric/ics-custom-infraction
  • Loading branch information
stana-miric committed Dec 11, 2024
2 parents ad71048 + 9bee2de commit 61b65ca
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .changelog/v21.0.1/bug-fixes/3418-bump-cosmossdk-math.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- Bump [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk/tree/main/math) to
[v1.4.0](https://github.com/cosmos/cosmos-sdk/tree/math/v1.4.0) in order to
address the the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
address the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
security advisory.
([\#3418](https://github.com/cosmos/gaia/pull/3418))
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Please go the the `Preview` tab and select the appropriate sub-template:
Please go the `Preview` tab and select the appropriate sub-template:

* [Production code](?expand=1&template=production.md) - for types `fix`, `feat`, and `refactor`.
* [Docs](?expand=1&template=docs.md) - for documentation changes.
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- Bump [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk/tree/main/math) to
[v1.4.0](https://github.com/cosmos/cosmos-sdk/tree/math/v1.4.0) in order to
address the the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
address the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
security advisory.
([\#3418](https://github.com/cosmos/gaia/pull/3418))

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ When proposing an architecture decision for Gaia, please start by opening an [is

If your architecture decision is a simple change, you may contribute directly without writing an ADR. However, if you are proposing a significant change, please include a corresponding ADR.

To create an ADR, follow the [template](./docs/architecture/adr-template.md) and [doc](./docs/architecture/README.md). If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/gaia/tree/main/docs/architecture).
To create an ADR, follow the [template](https://github.com/cosmos/gaia/blob/main/docs/docs/architecture/templates/adr-template.md) and [doc](https://github.com/cosmos/gaia/blob/main/docs/docs/architecture/README.md). If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/gaia/tree/main/docs/docs/architecture).

## Development Procedure

Expand Down
4 changes: 2 additions & 2 deletions STATE-COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func someInternalMethod(ctx sdk.Context) {
- It will run out of gas with `gasUsed = 2100` where 2100 is getting merkelized
into the tx results.

Therefore, we introduced a state-incompatibility by merklezing diverging gas
Therefore, we introduced a state-incompatibility by merkelizing diverging gas
usage.

## Secondary Limitations To Keep In Mind
Expand Down Expand Up @@ -208,4 +208,4 @@ to predict when the multi-threaded state can be updated.

### Hardware Errors

This is out of the developer's control but is mentioned for completeness.
This is out of the developer's control but is mentioned for completeness.
4 changes: 2 additions & 2 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package keepers

import (
"fmt"
"errors"
"os"

feemarketkeeper "github.com/skip-mev/feemarket/x/feemarket/keeper"
Expand Down Expand Up @@ -600,7 +600,7 @@ func (r *DefaultFeemarketDenomResolver) ConvertToDenom(_ sdk.Context, coin sdk.D
return coin, nil
}

return sdk.DecCoin{}, fmt.Errorf("error resolving denom")
return sdk.DecCoin{}, errors.New("error resolving denom")
}

func (r *DefaultFeemarketDenomResolver) ExtraDenoms(_ sdk.Context) ([]string, error) {
Expand Down
3 changes: 2 additions & 1 deletion app/sim/sim_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sim

import (
"encoding/json"
"errors"
"fmt"
"io"
"math/rand"
Expand Down Expand Up @@ -245,7 +246,7 @@ func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile str

a, ok := acc.GetCachedValue().(sdk.AccountI)
if !ok {
return genesis, nil, fmt.Errorf("expected account")
return genesis, nil, errors.New("expected account")
}

// create simulator accounts
Expand Down
6 changes: 3 additions & 3 deletions cmd/gaiad/cmd/testnet_set_local_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func getCommandArgs(appOpts servertypes.AppOptions) (valArgs, error) {
// validate and set validator operator address
valoperAddress := cast.ToString(appOpts.Get(flagValidatorOperatorAddress))
if valoperAddress == "" {
return args, fmt.Errorf("invalid validator operator address string")
return args, errors.New("invalid validator operator address string")
}
_, err := sdk.ValAddressFromBech32(valoperAddress)
if err != nil {
Expand All @@ -100,7 +100,7 @@ func getCommandArgs(appOpts servertypes.AppOptions) (valArgs, error) {
// validate and set validator pubkey
validatorPubKey := cast.ToString(appOpts.Get(flagValidatorPubKey))
if validatorPubKey == "" {
return args, fmt.Errorf("invalid validator pubkey string")
return args, errors.New("invalid validator pubkey string")
}
decPubKey, err := base64.StdEncoding.DecodeString(validatorPubKey)
if err != nil {
Expand Down Expand Up @@ -135,7 +135,7 @@ func getCommandArgs(appOpts servertypes.AppOptions) (valArgs, error) {
// home dir
homeDir := cast.ToString(appOpts.Get(flags.FlagHome))
if homeDir == "" {
return args, fmt.Errorf("invalid home dir")
return args, errors.New("invalid home dir")
}
args.homeDir = homeDir

Expand Down
2 changes: 1 addition & 1 deletion docs/DOCS_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ After building the docs website you can start it with `npm run serve`.
2. Edit API docs
1. Directly Edit API docs manually: `cmd/gaiad/swagger-ui/swagger.yaml`.
2. Edit API docs within the [Swagger Editor](https://editor.swagger.io/). Please refer to this [document](https://swagger.io/docs/specification/2-0/basic-structure/) for the correct structure in `.yaml`.
3. Download `swagger.yaml` and replace the old `swagger.yaml` under fold `cmd/gaiad/swagger-ui`.
3. Download `swagger.yaml` and replace the old `swagger.yaml` under folder `cmd/gaiad/swagger-ui`.
4. Compile gaiad

```bash
Expand Down
5 changes: 3 additions & 2 deletions tests/e2e/http_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package e2e

import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
Expand All @@ -27,13 +28,13 @@ func readJSON(resp *http.Response) (map[string]interface{}, error) {

body, readErr := io.ReadAll(resp.Body)
if readErr != nil {
return nil, fmt.Errorf("failed to read Body")
return nil, errors.New("failed to read Body")
}

var data map[string]interface{}
err := json.Unmarshal(body, &data)
if err != nil {
return nil, fmt.Errorf("failed to unmarshal response body")
return nil, errors.New("failed to unmarshal response body")
}

return data, nil
Expand Down
5 changes: 3 additions & 2 deletions tests/interchain/chainsuite/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package chainsuite
import (
"context"
"encoding/json"
"errors"
"fmt"
"strconv"
"strings"
Expand Down Expand Up @@ -194,9 +195,9 @@ func (c *Chain) Upgrade(ctx context.Context, upgradeName, version string) error
defer timeoutCtxCancel()
err = testutil.WaitForBlocks(timeoutCtx, int(haltHeight-height)+3, c)
if err == nil {
return fmt.Errorf("chain should not produce blocks after halt height")
return errors.New("chain should not produce blocks after halt height")
} else if timeoutCtx.Err() == nil {
return fmt.Errorf("chain should not produce blocks after halt height")
return errors.New("chain should not produce blocks after halt height")
}

height, err = c.Height(ctx)
Expand Down
3 changes: 2 additions & 1 deletion tests/interchain/chainsuite/chain_ics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package chainsuite
import (
"context"
"encoding/json"
"errors"
"fmt"
"path"
"strconv"
Expand Down Expand Up @@ -569,7 +570,7 @@ func (p *Chain) CheckCCV(ctx context.Context, consumer *Chain, relayer *Relayer,
return err
}
if providerPowerBefore >= providerPower {
return fmt.Errorf("provider power did not increase after delegation")
return errors.New("provider power did not increase after delegation")
}
consumerPower, err := consumer.GetValidatorPower(ctx, consumerHex)
if err != nil {
Expand Down

0 comments on commit 61b65ca

Please sign in to comment.