Skip to content

Commit de99d7e

Browse files
2xburntedjrozPeartesash-burntjustinbarry
authored
Release/v20 (#348)
This pull request introduces several changes across workflows, configuration files, and the application codebase. The most significant updates include the removal of the fee abstraction module, the addition of the circuit breaker module, updates to workflows for improved dependency management, and enhancements to the integration testing framework. ### Workflow and Configuration Updates: * [`.github/workflows/create-release.yaml`](diffhunk://#diff-a318819fb0ec8889018cbef8e6dd222e317757d95ddd93b62b714ac7c49f04f6L91-L115): Removed unused jobs (`build-release-info` and `update-networks`) to streamline the release workflow. * [`.github/workflows/golangci-lint.yaml`](diffhunk://#diff-663d31008ec91b12d46959a84b8604f87c6be56c98db4dc4278411da292115f0L27-R29): Updated the `golangci-lint` action to version `v8` and increased the linter version to `v2.2.1` for better linting capabilities. * [`.golangci.yml`](diffhunk://#diff-6179837f7df53a6f05c522b6b7bb566d484d5465d9894fb04910dd08bb40dcc9R1-R72): Refactored the configuration to enable additional linters, reorganize settings, and add exclusions for generated files and common false positives. ### Application Codebase Changes: #### Fee Abstraction Removal: * `app/ante.go`, `app/app.go`: Removed all references to the fee abstraction module (`feeabs`) and its associated decorators, keepers, and configurations. [[1]](diffhunk://#diff-5c8651424dbfaa86b2894ea499273a1b26c4e0abf0d534b6b9e103b0822cb2b1L8-R15) [[2]](diffhunk://#diff-0f1d2976054440336a576d47a44a37b80cdf6701dd9113012bce0e3c425819b7L21-L23) [[3]](diffhunk://#diff-0f1d2976054440336a576d47a44a37b80cdf6701dd9113012bce0e3c425819b7L363-R369) #### Circuit Breaker Addition: * `app/ante.go`, `app/app.go`: Introduced the circuit breaker module (`circuit`) with its keeper and decorators for enhanced transaction safety. Integrated it into the ante handler and app initialization. [[1]](diffhunk://#diff-5c8651424dbfaa86b2894ea499273a1b26c4e0abf0d534b6b9e103b0822cb2b1L63-R71) [[2]](diffhunk://#diff-0f1d2976054440336a576d47a44a37b80cdf6701dd9113012bce0e3c425819b7R510-R517) ### Integration Testing Enhancements: * `.github/workflows/integration-tests.yaml`, `Makefile`: Added new test cases for multi-denomination minimum global fees (`MultiDenomMinGlobalFee` and `MultiDenomMinGlobalFeeIBC`) to expand test coverage. [[1]](diffhunk://#diff-213e9bbc551ccc9ca3cbb6b69999a415116e2ee37ccc88e34a98c5dd27bbc31aR29-R30) [[2]](diffhunk://#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R246-R251) ### Release Configuration: * [`.goreleaser/release.yaml`](diffhunk://#diff-c601da1e14a8650711871101995d0d5706a1e463b8d72f076f7bea5817b6c661L57-R58): Moved checksum generation under `nfpms` and added conditional logic to exclude snapshots from certain operations. [[1]](diffhunk://#diff-c601da1e14a8650711871101995d0d5706a1e463b8d72f076f7bea5817b6c661L57-R58) [[2]](diffhunk://#diff-c601da1e14a8650711871101995d0d5706a1e463b8d72f076f7bea5817b6c661R73-R77) [[3]](diffhunk://#diff-c601da1e14a8650711871101995d0d5706a1e463b8d72f076f7bea5817b6c661R87) --------- Signed-off-by: Justin <[email protected]> Signed-off-by: TwiceBurnt <[email protected]> Co-authored-by: Eduardo Díaz <[email protected]> Co-authored-by: Kehinde Faleye <[email protected]> Co-authored-by: Ash <[email protected]> Co-authored-by: Eduardo Diaz <[email protected]> Co-authored-by: Justin <[email protected]> Co-authored-by: Ash <[email protected]>
1 parent 01306d7 commit de99d7e

38 files changed

+1878
-1418
lines changed

.github/workflows/create-release.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,31 +88,13 @@ jobs:
8888
uses: burnt-labs/xion/.github/workflows/goreleaser.yaml@workflows/main
8989
secrets: inherit
9090

91-
# # TODO: move to goreleaser
92-
# build-release-info:
93-
# name: Build Release Info
94-
# needs:
95-
# - build-darwin
96-
# - build-linux
97-
# uses: burnt-labs/xion/.github/workflows/build-release-info.yaml@workflows/main
98-
# secrets: inherit
99-
10091
# TODO: move to goreleaser
10192
publish-types:
10293
name: Publish Typescript Types
10394
needs: build-release
10495
uses: burnt-labs/xion/.github/workflows/publish-types.yaml@workflows/main
10596
secrets: inherit
10697

107-
# TODO: move to triggered action in burnt-networks repo
108-
# update-networks:
109-
# name: Update Networks Repo
110-
# needs:
111-
# - build-release
112-
# - build-release-info
113-
# uses: burnt-labs/xion/.github/workflows/update-networks.yaml@workflows/main
114-
# secrets: inherit
115-
11698
verify-installers:
11799
name: Verify Package Installers
118100
needs: build-release

.github/workflows/golangci-lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
go-version: ${{ env.GO_VERSION }}
2525

2626
- name: golangci-lint-xiond
27-
uses: golangci/golangci-lint-action@v6
27+
uses: golangci/golangci-lint-action@v8
2828
with:
29-
version: v1.64.8
29+
version: v2.2.1
3030
args: --timeout=10m --tests=false

.github/workflows/integration-tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
- "MintModuleInflationLowFees"
2727
- "MintModuleInflationNoFees"
2828
- "MintModuleNoInflationNoFees"
29+
- "MultiDenomMinGlobalFee"
30+
- "MultiDenomMinGlobalFeeIBC"
2931
- "Simulate"
3032
- "SingleAbstractAccountMigration"
3133
- "TreasuryContract"

.golangci.yml

Lines changed: 52 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,72 @@
1+
version: "2"
12
run:
2-
# timeout for analysis, e.g. 30s, 5m, default is 1m
3-
timeout: 10m
43
tests: true
5-
64
linters:
7-
disable-all: true
5+
default: none
86
enable:
97
- bodyclose
8+
- copyloopvar
109
- dogsled
1110
- errcheck
1211
- goconst
1312
- gocritic
14-
- gofumpt
15-
- gci
16-
- revive
1713
- gosec
18-
- gosimple
1914
- govet
2015
- ineffassign
2116
- misspell
2217
- nakedret
23-
- copyloopvar
18+
- revive
2419
- staticcheck
25-
- stylecheck
26-
- typecheck
2720
- unconvert
28-
- unused
2921
- unparam
30-
- misspell
31-
32-
linters-settings:
33-
gci:
34-
custom-order: true
35-
sections:
36-
- standard # Standard section: captures all standard packages.
37-
- default # Default section: contains all imports that could not be matched to another section type.
38-
- blank # blank imports
39-
- dot # dot imports
40-
- prefix(github.com/cometbft/cometbft)
41-
- prefix(github.com/cosmos)
42-
- prefix(cosmossdk.io)
43-
- prefix(github.com/cosmos/cosmos-sdk)
44-
- prefix(github.com/burnt-labs/xion)
45-
gosec:
46-
excludes:
47-
- G404
48-
gocritic:
49-
disabled-checks:
50-
- appendAssign
51-
22+
- unused
23+
settings:
24+
gocritic:
25+
disabled-checks:
26+
- appendAssign
27+
gosec:
28+
excludes:
29+
- G404
30+
revive:
31+
rules:
32+
- name: "var-naming"
33+
disabled: true
34+
severity: "warning"
35+
arguments: []
36+
exclusions:
37+
generated: lax
38+
presets:
39+
- comments
40+
- common-false-positives
41+
- legacy
42+
- std-error-handling
43+
paths:
44+
- third_party$
45+
- builtin$
46+
- examples$
5247
issues:
5348
max-issues-per-linter: 0
5449
max-same-issues: 0
50+
formatters:
51+
enable:
52+
- gci
53+
- gofumpt
54+
settings:
55+
gci:
56+
sections:
57+
- standard
58+
- default
59+
- blank
60+
- dot
61+
- prefix(github.com/cometbft/cometbft)
62+
- prefix(github.com/cosmos)
63+
- prefix(cosmossdk.io)
64+
- prefix(github.com/cosmos/cosmos-sdk)
65+
- prefix(github.com/burnt-labs/xion)
66+
custom-order: true
67+
exclusions:
68+
generated: lax
69+
paths:
70+
- third_party$
71+
- builtin$
72+
- examples$

.goreleaser/release.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,8 @@ archives:
5454
wrap_in_directory: false
5555
strip_binary_directory: false
5656

57-
# docs: https://goreleaser.com/customization/checksum/
58-
checksum:
59-
name_template: "xiond-{{ .Version }}-checksums.txt"
60-
algorithm: sha256
61-
6257
nfpms:
63-
- if: '{{ eq .Os "linux" }}'
58+
- if: '{{ and (eq .Os "linux") (not .IsSnapshot) }}'
6459
formats:
6560
- apk
6661
- deb
@@ -75,6 +70,11 @@ nfpms:
7570
signature:
7671
key_file: "{{ .Env.GPG_KEY_PATH }}"
7772

73+
# docs: https://goreleaser.com/customization/checksum/
74+
checksum:
75+
name_template: "xiond-{{ .Version }}-checksums.txt"
76+
algorithm: sha256
77+
7878
# not used
7979
# signs:
8080
# - artifacts: package
@@ -84,6 +84,7 @@ nfpms:
8484
# docs https://goreleaser.com/customization/fury/
8585
furies:
8686
- account: burnt
87+
disable: "{{ .IsSnapshot }}"
8788

8889
# Docs: https://goreleaser.com/customization/homebrew/
8990
brews:

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ test-integration-xion-abstract-account-event: compile_integration_tests
243243
test-integration-xion-min-default: compile-integration-tests
244244
$(MAKE) run-integration-test TEST_NAME=TestXionMinimumFeeDefault
245245

246+
test-integration-xion-min-multi-denom: compile-integration-tests
247+
$(MAKE) run-integration-test TEST_NAME=TestMultiDenomMinGlobalFee
248+
249+
test-integration-xion-min-multi-denom-ibc: compile-integration-tests
250+
$(MAKE) run-integration-test TEST_NAME=TestMultiDenomMinGlobalFeeIBC
251+
246252
test-integration-xion-min-zero: compile-integration-tests
247253
$(MAKE) run-integration-test TEST_NAME=TestXionMinimumFeeZero
248254

app/ante.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import (
55
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
66
"github.com/larry0x/abstract-account/x/abstractaccount"
77
aakeeper "github.com/larry0x/abstract-account/x/abstractaccount/keeper"
8-
feeabsante "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/ante"
9-
feeabskeeper "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/keeper"
108

119
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
1210
"github.com/cosmos/ibc-go/v8/modules/core/keeper"
1311

1412
corestoretypes "cosmossdk.io/core/store"
1513
errorsmod "cosmossdk.io/errors"
14+
circuitante "cosmossdk.io/x/circuit/ante"
15+
circuitkeeper "cosmossdk.io/x/circuit/keeper"
1616

1717
sdk "github.com/cosmos/cosmos-sdk/types"
1818
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
@@ -35,7 +35,7 @@ type HandlerOptions struct {
3535
GlobalFeeSubspace paramtypes.Subspace
3636
StakingKeeper *stakingkeeper.Keeper
3737
AbstractAccountKeeper aakeeper.Keeper
38-
FeeAbsKeeper *feeabskeeper.Keeper
38+
CircuitKeeper *circuitkeeper.Keeper
3939
}
4040

4141
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
@@ -60,14 +60,15 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
6060
if options.TXCounterStoreService == nil {
6161
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "wasm store service is required for ante builder")
6262
}
63-
if options.FeeAbsKeeper == nil {
64-
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "fee abstraction keeper is required for AnteHandler")
63+
if options.CircuitKeeper == nil {
64+
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "circuit keeper is required for ante builder")
6565
}
6666

6767
anteDecorators := []sdk.AnteDecorator{
6868
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
6969
wasmkeeper.NewLimitSimulationGasDecorator(options.NodeConfig.SimulationGasLimit), // after setup context to enforce limits early
7070
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreService),
71+
circuitante.NewCircuitBreakerDecorator(options.CircuitKeeper),
7172
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
7273
// this changes the minGasFees,
7374
// and must occur before gas fee checks
@@ -78,15 +79,18 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
7879
}
7980
return bondDenom
8081
}),
81-
feeabsante.NewFeeAbstrationMempoolFeeDecorator(*options.FeeAbsKeeper),
8282

8383
// validation checks
8484
ante.NewValidateBasicDecorator(),
8585
ante.NewTxTimeoutHeightDecorator(),
8686
ante.NewValidateMemoDecorator(options.AccountKeeper),
8787
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
88-
// fee abstraction fee deduction replaces sdk fee deduction
89-
feeabsante.NewFeeAbstractionDeductFeeDecorate(options.AccountKeeper, options.BankKeeper, *options.FeeAbsKeeper, options.FeegrantKeeper),
88+
ante.NewDeductFeeDecorator(
89+
options.AccountKeeper,
90+
options.BankKeeper,
91+
options.FeegrantKeeper,
92+
options.TxFeeChecker,
93+
),
9094
ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
9195
ante.NewValidateSigCountDecorator(options.AccountKeeper),
9296
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),

0 commit comments

Comments
 (0)