Skip to content

Commit

Permalink
chore: make SEDAKeyIndex uint32 to avoid integer overflow conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
hacheigriega committed Nov 26, 2024
1 parent 00a6060 commit 1518b12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/utils/seda_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

// SEDAKeyIndex enumerates the SEDA key indices.
type SEDAKeyIndex uint8
type SEDAKeyIndex uint32

const (
SEDAKeyIndexSecp256k1 SEDAKeyIndex = iota
Expand Down
4 changes: 3 additions & 1 deletion proto/sedachain/batching/v1/batching.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ message DataResultTreeEntries { repeated bytes entries = 1; }

// ValidatorTreeEntry is an entry in the validator tree.
message ValidatorTreeEntry {
bytes validator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
bytes validator_address = 1
[ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.ValAddress" ];
uint32 voting_power_percent = 2;
Secp256k1Entry secp256k1 = 3 [ (gogoproto.nullable) = false ];
}
Expand Down
4 changes: 2 additions & 2 deletions proto/sedachain/batching/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ service Query {
}
}

// BatchWithEntries is used by Batch Query to return a batch with its
// BatchWithEntries is used by Batch Query to return a batch with its
// data result tree entries and validator tree entries.
message BatchWithEntries {
Batch batch = 1 [ (gogoproto.nullable) = false ];
Expand Down Expand Up @@ -66,7 +66,7 @@ message QueryBatchForHeightResponse {
message QueryBatchesRequest {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1;
// with_unsigned indicates whether to return batches without
// with_unsigned indicates whether to return batches without
// signatures or not.
bool with_unsigned = 2;
}
Expand Down

0 comments on commit 1518b12

Please sign in to comment.