Skip to content

Commit d5410b0

Browse files
authored
fix: Whitelist IBC messages + fee-abstraction updated formula (#931)
* Initial commit * Byoass staticcheck and nestif * gofumpted * Added minor upgrade handler + expected module version map * Removed govv1 expected declaration * Added error check * Added bypass fee integration tests * Loosen structure * Debug * Added temporary write directory * Move to child node * Removed pre-declared signers * Added genesis config * Added bypass messages proposal * Explicitly registering * Explicit codec config * Bypassable posthandler ops * Added arguments * Added fee-abstraction context to intentionally bypass decorator * Negative assertion * Added revised fee-abstraction conversion formula * Rearranged posthandler order of execution * Nolint check * Upgrade direct, indirect and release dependencies * Bypass MsgUpdateClient, MsgRecvPacket, MsgTimeout and associated unit, integration and upgrade tests * Update codec * Enhanced extended registry * gofumpted * Added manual codec registration and re-orchestrated gov parameter update * Revert "Added manual codec registration and re-orchestrated gov parameter update" This reverts commit 898c9ce. * Added solomachine IBC app module and explicit interface registration * Reapply "Added manual codec registration and re-orchestrated gov parameter update" . * Removed solomachine explicit registration and MsgUpdateClient CLI integration test case
1 parent 1e04ab7 commit d5410b0

33 files changed

Lines changed: 3233 additions & 1469 deletions

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
runs-on: ubuntu-24.04
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121

22-
- uses: actions/setup-go@v5
22+
- uses: actions/setup-go@v6
2323
with:
2424
go-version-file: ./go.mod
2525
cache: true
@@ -45,7 +45,7 @@ jobs:
4545
IMAGE_NAME: ${{ github.repository }}
4646

4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v5
4949

5050
- name: Setup Docker Buildx
5151
uses: docker/setup-buildx-action@v3

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
languages: 'go'
3030
queries: security-and-quality
3131

32-
- uses: actions/setup-go@v5
32+
- uses: actions/setup-go@v6
3333
with:
3434
go-version: 1.23
3535

36-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@v5
3737
with:
3838
fetch-depth: 0 # Required to fetch version
3939

.github/workflows/lint.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: "Shell pipefail check"
1313
runs-on: ubuntu-24.04
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616

1717
- name: Run 'set -euox pipefail' check
1818
run: bash ./.github/scripts/ensure_set_euox_pipefail.sh
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-24.04
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626

2727
- name: Run Markdown link check
2828
uses: gaurav-nelson/github-action-markdown-link-check@v1
@@ -37,9 +37,9 @@ jobs:
3737
runs-on: ubuntu-24.04
3838

3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v5
4141

42-
- uses: actions/setup-go@v5
42+
- uses: actions/setup-go@v6
4343
with:
4444
go-version-file: ./go.mod
4545
cache: false # temporarily off, as golangci-lint doesn't align 100% with cached setup-go@v4, see: https://github.com/golangci/golangci-lint-action/issues/807
@@ -54,7 +54,7 @@ jobs:
5454
name: "Protobuf"
5555
runs-on: ubuntu-24.04
5656
steps:
57-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v5
5858

5959
# Install the `buf` CLI
6060
- uses: bufbuild/buf-setup-action@v1.50.0
@@ -78,12 +78,12 @@ jobs:
7878
runs-on: ubuntu-24.04
7979

8080
steps:
81-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@v5
8282
with:
8383
fetch-depth: 0 # Required to fetch version
8484

8585
- name: Run Super Linter
86-
uses: super-linter/super-linter/slim@v7
86+
uses: super-linter/super-linter/slim@v8
8787
env:
8888
IGNORE_GITIGNORED_FILES: true
8989
DEFAULT_BRANCH: main

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626

2727
- uses: amannn/action-semantic-pull-request@v5.5.3
2828
env:

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-24.04
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
with:
2020
fetch-depth: 0 # Required to fetch version
2121

@@ -50,7 +50,7 @@ jobs:
5050
EXECUTE_RELEASE: ${{ steps.execute-release.outputs.EXECUTE_RELEASE }}
5151

5252
steps:
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@v5
5454
with:
5555
fetch-depth: 0 # Required to fetch version
5656
persist-credentials: false
@@ -105,12 +105,12 @@ jobs:
105105
if: needs.release-guard.outputs.EXECUTE_RELEASE == 'true'
106106

107107
steps:
108-
- uses: actions/checkout@v4
108+
- uses: actions/checkout@v5
109109
with:
110110
fetch-depth: 0 # Required to fetch version
111111
persist-credentials: false
112112

113-
- uses: actions/setup-go@v5
113+
- uses: actions/setup-go@v6
114114
with:
115115
go-version-file: ./go.mod
116116
cache: true
@@ -155,7 +155,7 @@ jobs:
155155
runs-on: ubuntu-24.04-arm
156156

157157
steps:
158-
- uses: actions/checkout@v4
158+
- uses: actions/checkout@v5
159159
with:
160160
persist-credentials: false
161161

@@ -185,7 +185,7 @@ jobs:
185185
IMAGE_NAME: ${{ github.repository }}
186186

187187
steps:
188-
- uses: actions/checkout@v4
188+
- uses: actions/checkout@v5
189189
with:
190190
persist-credentials: false
191191

.github/workflows/test.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
DEFAULT_DEBUG_BRANCH: ${{ github.ref_name }}
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424

2525
- name: "Modify runner's home directory permissions"
2626
run: "sudo chmod 755 /home/runner"
@@ -52,7 +52,7 @@ jobs:
5252
PYTHONDEVMODE: 1
5353
DEFAULT_DEBUG_BRANCH: ${{ github.ref_name }}
5454
steps:
55-
- uses: actions/checkout@v4
55+
- uses: actions/checkout@v5
5656

5757
- name: "Modify runner's home directory permissions"
5858
run: "sudo chmod 755 /home/runner"
@@ -82,9 +82,9 @@ jobs:
8282
runs-on: ubuntu-24.04
8383

8484
steps:
85-
- uses: actions/checkout@v4
85+
- uses: actions/checkout@v5
8686

87-
- uses: actions/setup-go@v5
87+
- uses: actions/setup-go@v6
8888
with:
8989
go-version-file: ./go.mod
9090
cache: true
@@ -108,10 +108,10 @@ jobs:
108108
runs-on: ubuntu-24.04
109109

110110
steps:
111-
- uses: actions/checkout@v4
111+
- uses: actions/checkout@v5
112112

113113
- name: Download binary artifact
114-
uses: actions/download-artifact@v4
114+
uses: actions/download-artifact@v5
115115
id: download
116116
with:
117117
name: cheqd-noded
@@ -121,7 +121,7 @@ jobs:
121121
run: sudo chmod +x ${{ env.RUNNER_BIN_DIR }}/cheqd-noded
122122

123123
- name: Download node Docker image
124-
uses: actions/download-artifact@v4
124+
uses: actions/download-artifact@v5
125125
with:
126126
name: cheqd-node-build.tar
127127

@@ -144,7 +144,7 @@ jobs:
144144
run: |
145145
bash import-keys.sh
146146
147-
- uses: actions/setup-go@v5
147+
- uses: actions/setup-go@v6
148148
with:
149149
go-version-file: ./go.mod
150150
cache: true
@@ -174,7 +174,7 @@ jobs:
174174
name: "Fee Abstraction Tests"
175175
runs-on: ubuntu-24.04
176176
steps:
177-
- uses: actions/checkout@v4
177+
- uses: actions/checkout@v5
178178

179179
- name: Execute fee-abstraction logic by paying in `uosmo`
180180
working-directory: ./tests/fee-abs
@@ -184,7 +184,7 @@ jobs:
184184
name: "Upgrade Tests"
185185
runs-on: ubuntu-24.04
186186
steps:
187-
- uses: actions/checkout@v4
187+
- uses: actions/checkout@v5
188188

189189
- name: Download old node binary (mainnet-latest)
190190
run: |
@@ -202,7 +202,7 @@ jobs:
202202
username: ${{ github.actor }}
203203
password: ${{ secrets.GITHUB_TOKEN }}
204204

205-
- uses: actions/setup-go@v5
205+
- uses: actions/setup-go@v6
206206
with:
207207
go-version-file: ./go.mod
208208
cache: true
@@ -212,7 +212,7 @@ jobs:
212212
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
213213

214214
- name: Download new version of the Docker image (build-latest)
215-
uses: actions/download-artifact@v4
215+
uses: actions/download-artifact@v5
216216
with:
217217
name: cheqd-node-build.tar
218218

@@ -246,7 +246,7 @@ jobs:
246246
docker ps -a
247247
248248
- name: Download binary artifact (build-latest)
249-
uses: actions/download-artifact@v4
249+
uses: actions/download-artifact@v5
250250
id: download
251251
with:
252252
name: cheqd-noded
@@ -318,39 +318,39 @@ jobs:
318318
if: always()
319319

320320
steps:
321-
- uses: actions/checkout@v4
321+
- uses: actions/checkout@v5
322322

323323
- name: Download unit test
324-
uses: actions/download-artifact@v4
324+
uses: actions/download-artifact@v5
325325
with:
326326
name: report-unit.xml
327327

328328
- name: Download integration test report
329-
uses: actions/download-artifact@v4
329+
uses: actions/download-artifact@v5
330330
with:
331331
name: report-integration.xml
332332

333333
- name: Download pre-upgrade test Report
334-
uses: actions/download-artifact@v4
334+
uses: actions/download-artifact@v5
335335
with:
336336
name: report-pre-upgrade.xml
337337

338338
- name: Download post-upgrade test Report
339-
uses: actions/download-artifact@v4
339+
uses: actions/download-artifact@v5
340340
with:
341341
name: report-post-upgrade.xml
342342

343343
- name: Download upgraded integration test Report
344-
uses: actions/download-artifact@v4
344+
uses: actions/download-artifact@v5
345345
with:
346346
name: report-upgraded-integration.xml
347347

348348
- name: Download pricing proposal test Report
349-
uses: actions/download-artifact@v4
349+
uses: actions/download-artifact@v5
350350
with:
351351
name: report-pricing-proposal.xml
352352
- name: Download pricing change test Report
353-
uses: actions/download-artifact@v4
353+
uses: actions/download-artifact@v5
354354
with:
355355
name: report-pricing-change.xml
356356
- name: Combine test results

ante/fee_abs_bypass_decorator.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package ante
2+
3+
import (
4+
"context"
5+
6+
sdk "github.com/cosmos/cosmos-sdk/types"
7+
"github.com/noble-assets/globalfee/keeper"
8+
feeabstypes "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/types"
9+
)
10+
11+
// feeAbsBypassDecorator annotates the context so the fee abstraction mempool
12+
// decorator skips fee checks for transactions that only contain bypass
13+
// messages.
14+
type feeAbsBypassDecorator struct {
15+
globalFeeKeeper *keeper.Keeper
16+
}
17+
18+
func NewFeeAbsBypassDecorator(globalFeeKeeper *keeper.Keeper) sdk.AnteDecorator {
19+
return feeAbsBypassDecorator{
20+
globalFeeKeeper: globalFeeKeeper,
21+
}
22+
}
23+
24+
func (d feeAbsBypassDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) {
25+
if ShouldBypassFeeMarket(ctx, d.globalFeeKeeper, tx) {
26+
ctx = ctx.WithContext(context.WithValue(ctx.Context(), feeabstypes.ByPassMsgKey{}, true))
27+
}
28+
29+
return next(ctx, tx, simulate)
30+
}

0 commit comments

Comments
 (0)