From 02960e9ee204116583963251ca03f7d015c68c92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:49:08 +0200 Subject: [PATCH 1/3] chore(deps): bump JamesIves/github-pages-deploy-action (#7548) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.8 to 4.6.9. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.6.8...v4.6.9) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 24226ac5c7a..fd8d516afa1 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -27,7 +27,7 @@ jobs: run: make build-docs - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.6.8 + uses: JamesIves/github-pages-deploy-action@v4.6.9 with: branch: gh-pages folder: docs/build From 84c176ae8d6f144f9a6d32953fd5502611dc6eb9 Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:42:14 +0800 Subject: [PATCH 2/3] docs: land on v9 by default (#7553) --- docs/docusaurus.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 0620421a31a..e953a05c3c8 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -49,13 +49,17 @@ const config = { // Exclude template markdown files from the docs exclude: ["**/*.template.md"], // Select the latest version - lastVersion: "v8.5.x", + lastVersion: "v9.0.x", // Assign banners to specific versions versions: { current: { path: "main", banner: "unreleased", }, + "v9.0.x": { + path: "v9", + banner: "none", + }, "v8.5.x": { path: "v8", banner: "none", From 083cfb17d1a4128809a523c5d352eba695b96dc0 Mon Sep 17 00:00:00 2001 From: Vasilev Ivan <20002mc@gmail.com> Date: Tue, 12 Nov 2024 13:58:42 +0300 Subject: [PATCH 3/3] test: ensure that the packet commit changes if the packed fields changes (#7514) * test: ensure that the packet commit changes if the packed fields changes * test: fix lint and sequence * test: tweak test slightly * chore: fix linter complaint. --------- Co-authored-by: DimitrisJim --- modules/core/04-channel/types/packet_test.go | 34 +++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/modules/core/04-channel/types/packet_test.go b/modules/core/04-channel/types/packet_test.go index 1338f45c8d1..fca1d9a357d 100644 --- a/modules/core/04-channel/types/packet_test.go +++ b/modules/core/04-channel/types/packet_test.go @@ -13,16 +13,44 @@ import ( ) func TestCommitPacket(t *testing.T) { - packet := types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp) - registry := codectypes.NewInterfaceRegistry() clienttypes.RegisterInterfaces(registry) types.RegisterInterfaces(registry) cdc := codec.NewProtoCodec(registry) + packet := types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp) commitment := types.CommitPacket(cdc, packet) require.NotNil(t, commitment) + + testCases := []struct { + name string + packet types.Packet + }{ + { + name: "diff data", + packet: types.NewPacket(unknownPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp), + }, + { + name: "diff timeout revision number", + packet: types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, clienttypes.NewHeight(timeoutHeight.RevisionNumber+1, timeoutHeight.RevisionHeight), timeoutTimestamp), + }, + { + name: "diff timeout revision height", + packet: types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, clienttypes.NewHeight(timeoutHeight.RevisionNumber, timeoutHeight.RevisionHeight+1), timeoutTimestamp), + }, + { + name: "diff timeout timestamp", + packet: types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, uint64(1)), + }, + } + + for _, tc := range testCases { + testCommitment := types.CommitPacket(cdc, tc.packet) + require.NotNil(t, testCommitment) + + require.NotEqual(t, commitment, testCommitment) + } } func TestPacketValidateBasic(t *testing.T) { @@ -44,8 +72,6 @@ func TestPacketValidateBasic(t *testing.T) { } for i, tc := range testCases { - tc := tc - err := tc.packet.ValidateBasic() if tc.expPass { require.NoError(t, err, "Msg %d failed: %s", i, tc.errMsg)