Skip to content

Commit

Permalink
merge master-feed into master-tss and patch to .50
Browse files Browse the repository at this point in the history
  • Loading branch information
nkitlabs committed Oct 16, 2024
1 parent bb9736f commit ba804b4
Show file tree
Hide file tree
Showing 523 changed files with 17,582 additions and 15,113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.55.2
args: --timeout=5m0s
version: v1.60
args: --timeout=10m0s
16 changes: 10 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
run:
timeout: 5m
go: '1.22.3'
go: "1.22.3"

linters:
disable-all: true
enable:
- bodyclose
- whitespace
- errcheck
- exportloopref
- copyloopvar
- gci
- gocritic
- gofumpt
Expand All @@ -30,19 +30,24 @@ issues:
- ".*\\.pb\\.gw\\.\\.go$"
- ".*\\.pulsar\\.go$"
exclude-rules:
- text: 'Use of weak random number generator'
- text: "Use of weak random number generator"
linters:
- gosec
- text: 'ST1003:'
- text: "ST1003:"
linters:
- stylecheck

linters-settings:
gci:
custom-order: true
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/cometbft/cometbft) # comet
- prefix(github.com/cosmos) # cosmos org
- prefix(cosmossdk.io) # new modules
- prefix(github.com/cosmos/cosmos-sdk) # cosmos sdk
- prefix(github.com/bandprotocol) # band org
- prefix(github.com/bandprotocol/chain)
gocritic:
disabled-checks:
Expand Down Expand Up @@ -99,4 +104,3 @@ linters-settings:
- G504 # Import blocklist: net/http/cgi
- G505 # Import blocklist: crypto/sha1
- G601 # Implicit memory aliasing of items from a range statement

7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Unreleased

- (bump) Use go 1.22.3
- (bump) Use cosmos-sdk package v0.47.11 / ibc-go v7.5.0
- (bump) replace github.com/tendermint/tendermint by github.com/cometbft/cometbft v0.37.5
- (bump) Use cosmos-sdk package v0.50.10 / ibc-go v8.5.1
- (bump) replace github.com/tendermint/tendermint by github.com/cometbft/cometbft v0.38.12
- (bump) migrated from gogo/protobuf to cosmos/gogoproto
- (bump) Use go-owasm v0.3.1
- (chain) Remove disablefeeless flag
Expand All @@ -16,8 +16,9 @@
- (chain) Set MinimumGasPrice to 0.0025uband
- (chain) Update proof to support newly added module
- (chain) Migrate REST Endpoint to GRPC
- (chain) update oracle params to support cosmos-sdk 0.47
- (chain) update oracle params to support cosmos-sdk 0.47+
- (chain) Add consensus module to handle managing Tendermint consensus parameters
- (chain) Change the allocation of remaining tokens from the community pool to the Proposer
- (chain) Support tss feature
- (chain) Add tss (threshold signature scheme) feature for signing an oracle data.
- (cylinder) provide a new service for supporting tss process
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test:
### Protobuf ###
###############################################################################

protoVer=0.13.0
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

Expand All @@ -102,6 +102,11 @@ proto-lint:
proto-check-breaking:
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main

proto-update-deps:
@echo "Updating Protobuf dependencies"

$(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update

###############################################################################
### Simulation ###
###############################################################################
Expand Down
23 changes: 15 additions & 8 deletions app/ante.go
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
package band

import (
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

bandtsskeeper "github.com/bandprotocol/chain/v2/x/bandtss/keeper"
feedskeeper "github.com/bandprotocol/chain/v2/x/feeds/keeper"
"github.com/bandprotocol/chain/v2/x/globalfee/feechecker"
globalfeekeeper "github.com/bandprotocol/chain/v2/x/globalfee/keeper"
oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper"
tsskeeper "github.com/bandprotocol/chain/v2/x/tss/keeper"
bandtsskeeper "github.com/bandprotocol/chain/v3/x/bandtss/keeper"
feedskeeper "github.com/bandprotocol/chain/v3/x/feeds/keeper"
"github.com/bandprotocol/chain/v3/x/globalfee/feechecker"
globalfeekeeper "github.com/bandprotocol/chain/v3/x/globalfee/keeper"
oraclekeeper "github.com/bandprotocol/chain/v3/x/oracle/keeper"
tsskeeper "github.com/bandprotocol/chain/v3/x/tss/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
// channel keeper.
type HandlerOptions struct {
ante.HandlerOptions
Cdc codec.Codec
AuthzKeeper *authzkeeper.Keeper
OracleKeeper *oraclekeeper.Keeper
IBCKeeper *ibckeeper.Keeper
Expand All @@ -32,6 +35,9 @@ type HandlerOptions struct {
}

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
if options.Cdc == nil {
return nil, sdkerrors.ErrLogic.Wrap("codec is required for AnteHandler")
}
if options.AccountKeeper == nil {
return nil, sdkerrors.ErrLogic.Wrap("account keeper is required for AnteHandler")
}
Expand Down Expand Up @@ -73,6 +79,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {

if options.TxFeeChecker == nil {
feeChecker := feechecker.NewFeeChecker(
options.Cdc,
options.AuthzKeeper,
options.OracleKeeper,
options.GlobalfeeKeeper,
Expand Down
Loading

0 comments on commit ba804b4

Please sign in to comment.