Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
chore: regenerate proto and lint proto

chore: lint
  • Loading branch information
hacheigriega committed Sep 9, 2024
1 parent aedfe4f commit e2be9f2
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 70 deletions.
1 change: 0 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ import (

"github.com/sedaprotocol/seda-chain/app/keepers"
appparams "github.com/sedaprotocol/seda-chain/app/params"

// Used in cosmos-sdk when registering the route for swagger docs.
_ "github.com/sedaprotocol/seda-chain/client/docs/statik"
dataproxy "github.com/sedaprotocol/seda-chain/x/data-proxy"
Expand Down
1 change: 0 additions & 1 deletion interchaintest/chain_core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u
height, err := chain.Height(ctx)
require.NoError(t, err)

//nolint:gosec // G115: Test will fail if conversion overflows
searchHeight := int64(height - 1)

hi, err := chain.StakingQueryHistoricalInfo(ctx, searchHeight)
Expand Down
4 changes: 2 additions & 2 deletions interchaintest/chain_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func ValidatorVoting(t *testing.T, ctx context.Context, chain *cosmos.CosmosChai
require.NoError(t, err, "error fetching height before upgrade")

// this should timeout due to chain halt at upgrade height
//nolint:gosec // G115: Test will fail if conversion overflows

_ = testutil.WaitForBlocks(timeoutCtx, int(haltHeight-currentHeight), chain)

currentHeight, err = chain.Height(ctx)
Expand All @@ -227,7 +227,7 @@ func SubmitUpgradeProposal(t *testing.T, ctx context.Context, chain *cosmos.Cosm
Authority: "seda10d07y265gmmuvt4z0w9aw880jnsr700jvvla4j", // gov module account; sedad q auth module-account gov
Plan: upgradetypes.Plan{
Name: upgradeName,
//nolint:gosec // G115: Test will fail if conversion overflows

Height: int64(haltHeight),
},
}
Expand Down
1 change: 0 additions & 1 deletion interchaintest/state_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func TestStateSync(t *testing.T) {
latestHeight, err := chain.Height(ctx)
require.NoError(t, err, "failed to fetch latest chain height")

//nolint:gosec // G115: Test will fail if conversion overflows
trustHeight := int64(latestHeight) - stateSyncSnapshotInterval

firstFullNode := chain.FullNodes[0]
Expand Down
10 changes: 6 additions & 4 deletions proto/sedachain/pubkey/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ option go_package = "github.com/sedaprotocol/seda-chain/x/pubkey/types";

// GenesisState defines pubkey module's genesis state.
message GenesisState {
repeated ValidatorPubKeys validator_pub_keys = 1 [(gogoproto.nullable) = false];
repeated ValidatorPubKeys validator_pub_keys = 1
[ (gogoproto.nullable) = false ];
}

// ValidatorPubKeys defines a validator's list of registered public keys
// primarily used in the x/pubkey genesis state.
// primarily used in the x/pubkey genesis state.
message ValidatorPubKeys {
string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];
repeated IndexedPubKey indexed_pub_keys = 2 [(gogoproto.nullable) = false];
string validator_addr = 1
[ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ];
repeated IndexedPubKey indexed_pub_keys = 2 [ (gogoproto.nullable) = false ];
}
6 changes: 3 additions & 3 deletions proto/sedachain/pubkey/v1/pubkey.proto
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
syntax = "proto3";
package sedachain.pubkey.v1;

import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/sedaprotocol/seda-chain/x/pubkey/types";

// IndexPubKeyPair defines an index - public key pair.
message IndexedPubKey {
uint32 index = 1;
google.protobuf.Any pub_key = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"];
uint32 index = 1;
google.protobuf.Any pub_key = 2
[ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ];
}
14 changes: 9 additions & 5 deletions proto/sedachain/pubkey/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ service Query {
// ValidatorKeys returns a given validator's registered keys.
rpc ValidatorKeys(QueryValidatorKeysRequest)
returns (QueryValidatorKeysResponse) {
option (google.api.http).get = "/seda-chain/pubkey/validator_keys/{validator_addr}";
option (google.api.http).get =
"/seda-chain/pubkey/validator_keys/{validator_addr}";
}
}

// QueryValidatorKeysRequest is request type for the Query/ValidatorKeys RPC method.
// QueryValidatorKeysRequest is request type for the Query/ValidatorKeys RPC
// method.
message QueryValidatorKeysRequest {
string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];
string validator_addr = 1
[ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ];
}

// QueryValidatorKeysResponse is response type for the Query/ValidatorKeys RPC method.
// QueryValidatorKeysResponse is response type for the Query/ValidatorKeys RPC
// method.
message QueryValidatorKeysResponse {
ValidatorPubKeys validator_pub_keys = 1 [(gogoproto.nullable) = false];
ValidatorPubKeys validator_pub_keys = 1 [ (gogoproto.nullable) = false ];
}
9 changes: 4 additions & 5 deletions proto/sedachain/pubkey/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ syntax = "proto3";
package sedachain.pubkey.v1;

import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
import "sedachain/pubkey/v1/pubkey.proto";
Expand All @@ -14,16 +13,16 @@ service Msg {
option (cosmos.msg.v1.service) = true;

// AddKey defines a method for registering a new public key.
rpc AddKey(MsgAddKey)
returns (MsgAddKeyResponse);
rpc AddKey(MsgAddKey) returns (MsgAddKeyResponse);
}

// MsgAddKey defines a message for registering a new public key.
message MsgAddKey {
option (cosmos.msg.v1.signer) = "validator_addr";

string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];
repeated IndexedPubKey indexed_pub_keys = 2 [(gogoproto.nullable) = false];
string validator_addr = 1
[ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ];
repeated IndexedPubKey indexed_pub_keys = 2 [ (gogoproto.nullable) = false ];
}

// MsgAddKeyResponse defines the Msg/MsgAddKey response type.
Expand Down
1 change: 0 additions & 1 deletion x/data-proxy/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion x/data-proxy/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/pubkey/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
cmtos "github.com/cometbft/cometbft/libs/os"

"cosmossdk.io/core/address"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand Down
3 changes: 2 additions & 1 deletion x/pubkey/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"path/filepath"
"testing"

"github.com/stretchr/testify/suite"

abci "github.com/cometbft/cometbft/abci/types"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"

sdkmath "cosmossdk.io/math"

Expand Down
1 change: 1 addition & 0 deletions x/pubkey/keeper/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"cosmossdk.io/core/address"
storetypes "cosmossdk.io/store/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
Expand Down
1 change: 1 addition & 0 deletions x/pubkey/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper_test

import (
"github.com/cometbft/cometbft/crypto/secp256k1"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
3 changes: 2 additions & 1 deletion x/pubkey/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package keeper_test

import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
gomock "go.uber.org/mock/gomock"

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

"github.com/sedaprotocol/seda-chain/x/pubkey/types"
)

Expand Down
1 change: 1 addition & 0 deletions x/pubkey/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"cosmossdk.io/collections"
"cosmossdk.io/core/address"
storetypes "cosmossdk.io/core/store"

"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
Expand Down
1 change: 1 addition & 0 deletions x/pubkey/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/spf13/cobra"

"cosmossdk.io/core/appmodule"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down
30 changes: 14 additions & 16 deletions x/pubkey/types/pubkey.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 24 additions & 26 deletions x/pubkey/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions x/tally/types/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"bytes"
"encoding/binary"

"slices"

"golang.org/x/exp/constraints"
)

Expand Down

0 comments on commit e2be9f2

Please sign in to comment.