Skip to content

Commit

Permalink
fix: backport remarshal (#8066)
Browse files Browse the repository at this point in the history
* fix: remove packet data remarshaling

* chore: update upload artifact

* chore: update download artifact

* redact 7.9.0
  • Loading branch information
gjermundgaraba authored Feb 27, 2025
1 parent 37ab926 commit 9869b3c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ jobs:
- name: Split pkgs into 4 files
run: split -d -n l/4 pkgs.txt pkgs.txt.part.
# cache multiple
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-00"
path: ./pkgs.txt.part.00
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-01"
path: ./pkgs.txt.part.01
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-02"
path: ./pkgs.txt.part.02
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-03"
path: ./pkgs.txt.part.03
Expand All @@ -103,15 +103,15 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-${{ matrix.part }}"
if: env.GIT_DIFF
- name: test & coverage report creation
run: |
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
Expand All @@ -127,19 +127,19 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-00-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-01-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-02-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-03-coverage"
if: env.GIT_DIFF
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v7.9.0](https://github.com/cosmos/ibc-go/releases/tag/v7.9.0) - 2025-02-27
## [v7.9.1](https://github.com/cosmos/ibc-go/releases/tag/v7.9.1) - 2025-02-27

- [ASA-2025-004](https://github.com/cosmos/ibc-go/security/advisories/GHSA-jg6f-48ff-5xrw) Fix ASA-2025-004

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ go 1.19

retract (
// contains ASA-2025-004
[v7.0.0, v7.8.0]
[v7.0.0, v7.9.0]
)

module github.com/cosmos/ibc-go/v7
Expand Down
6 changes: 0 additions & 6 deletions modules/apps/transfer/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,6 @@ func (im IBCModule) OnRecvPacket(
ackErr = sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot unmarshal ICS-20 transfer packet data")
ack = channeltypes.NewErrorAcknowledgement(ackErr)
}
bz := data.GetBytes()
if !bytes.Equal(bz, packet.GetData()) {
ackErr = errorsmod.Wrapf(ibcerrors.ErrInvalidType, "packet data did not marshal to expected bytes: %X ≠ %X", bz, packet.GetData())
ack = channeltypes.NewErrorAcknowledgement(ackErr)
im.keeper.Logger(ctx).Error(fmt.Sprintf("%s sequence %d", ackErr.Error(), packet.Sequence))
}

// only attempt the application logic if the packet data
// was successfully decoded
Expand Down

0 comments on commit 9869b3c

Please sign in to comment.