From 66a82553f1f705ae14d93df28364575460b119d5 Mon Sep 17 00:00:00 2001 From: Filip Djokic <87134019+filipdjokic@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:30:11 +0100 Subject: [PATCH 01/10] docs: Add v4-minor testnet upgrade binaries file (#936) * docs: Add v4-minor upgrade binaries file * Switch to v4.1.6 instead of beta release --- networks/testnet/upgrades/upgrade-v4-minor.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 networks/testnet/upgrades/upgrade-v4-minor.json diff --git a/networks/testnet/upgrades/upgrade-v4-minor.json b/networks/testnet/upgrades/upgrade-v4-minor.json new file mode 100644 index 000000000..c15e8b0f7 --- /dev/null +++ b/networks/testnet/upgrades/upgrade-v4-minor.json @@ -0,0 +1,6 @@ +{ + "binaries": { + "linux/amd64": "https://github.com/cheqd/cheqd-node/releases/download/v4.1.6/cheqd-noded-4.1.6-linux-amd64.tar.gz?checksum=sha256:a1a967caba0cc9e06dc86378bdd7126e6fb91ee0080117f4c1b7acd1cd525842", + "linux/arm64": "https://github.com/cheqd/cheqd-node/releases/download/v4.1.6/cheqd-noded-4.1.6-linux-arm64.tar.gz?checksum=sha256:88232d36ecb9216ee128121784c966efe69841e4e98368f201e6b5d07f93dd11" + } +} From a2f97a7bb07c0b19c2d5b1bb2cd9f621eeaad5b2 Mon Sep 17 00:00:00 2001 From: Filip Djokic <87134019+filipdjokic@users.noreply.github.com> Date: Thu, 20 Nov 2025 11:56:01 +0100 Subject: [PATCH 02/10] docs: Add mainnet v4-minor upgrade binaries file (#940) * docs: Add v4-minor upgrade binaries file * Switch to v4.1.6 instead of beta release * Add mainnet v4-minor binaries --- networks/mainnet/upgrades/upgrade-v4-minor.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 networks/mainnet/upgrades/upgrade-v4-minor.json diff --git a/networks/mainnet/upgrades/upgrade-v4-minor.json b/networks/mainnet/upgrades/upgrade-v4-minor.json new file mode 100644 index 000000000..c15e8b0f7 --- /dev/null +++ b/networks/mainnet/upgrades/upgrade-v4-minor.json @@ -0,0 +1,6 @@ +{ + "binaries": { + "linux/amd64": "https://github.com/cheqd/cheqd-node/releases/download/v4.1.6/cheqd-noded-4.1.6-linux-amd64.tar.gz?checksum=sha256:a1a967caba0cc9e06dc86378bdd7126e6fb91ee0080117f4c1b7acd1cd525842", + "linux/arm64": "https://github.com/cheqd/cheqd-node/releases/download/v4.1.6/cheqd-noded-4.1.6-linux-arm64.tar.gz?checksum=sha256:88232d36ecb9216ee128121784c966efe69841e4e98368f201e6b5d07f93dd11" + } +} From dc390de1b21d30ebce802d07eaa231f93c14b6a8 Mon Sep 17 00:00:00 2001 From: Kaustubh K <54210167+kaustubhkapatral@users.noreply.github.com> Date: Tue, 25 Nov 2025 23:50:41 +0530 Subject: [PATCH 03/10] fix: Optimise sleep and wait functions in upgrade tests [DEV-5514] & Optimise sleep funtions in fee abs tests [DEV-5515] (#942) * optimized sleep and wait functions in tests * revert wait time --- tests/fee-abs/fee-abs-test.sh | 4 ++-- .../integration/v4/param_change_proposal_test.go | 6 +++--- tests/upgrade/integration/v4/post_test.go | 4 ++-- tests/upgrade/integration/v4/pre_test.go | 16 ++++++++-------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/fee-abs/fee-abs-test.sh b/tests/fee-abs/fee-abs-test.sh index 0c778010d..a95ca5dac 100755 --- a/tests/fee-abs/fee-abs-test.sh +++ b/tests/fee-abs/fee-abs-test.sh @@ -82,7 +82,7 @@ docker compose exec -d osmosis osmosisd start info "Waiting for chains" # TODO: Get rid of this -sleep 20 +sleep 10 info "Checking statuses" CHEQD_STATUS=$(docker compose exec cheqd cheqd-noded status 2>&1) @@ -211,7 +211,7 @@ RES=$(docker compose exec cheqd cheqd-noded tx feeabs fund 200000000000000000nch assert_tx_successful "${RES}" info "wait for exchange rate to be updated" -sleep 600 +sleep 150 info "pay fees using osmo in cheqd (recursively)" # shellcheck disable=SC2034 diff --git a/tests/upgrade/integration/v4/param_change_proposal_test.go b/tests/upgrade/integration/v4/param_change_proposal_test.go index 34ea1739e..b2ea25ecb 100644 --- a/tests/upgrade/integration/v4/param_change_proposal_test.go +++ b/tests/upgrade/integration/v4/param_change_proposal_test.go @@ -43,7 +43,7 @@ var _ = Describe("Upgrade - Fee parameter change proposal", func() { Expect(err).To(BeNil()) By("waiting for the proposal to be included in a block") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+2, cli.VotingPeriod*3) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+2, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) @@ -81,7 +81,7 @@ var _ = Describe("Upgrade - Fee parameter change proposal", func() { Expect(err).To(BeNil()) By("waiting for the proposal to pass") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+10, cli.VotingPeriod*2) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+10, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) @@ -129,7 +129,7 @@ var _ = Describe("Upgrade - Fee parameter change proposal", func() { Expect(err).To(BeNil()) By("waiting for the proposal to be included in a block") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+2, cli.VotingPeriod*2) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+2, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) diff --git a/tests/upgrade/integration/v4/post_test.go b/tests/upgrade/integration/v4/post_test.go index 2590645af..93aafc790 100644 --- a/tests/upgrade/integration/v4/post_test.go +++ b/tests/upgrade/integration/v4/post_test.go @@ -50,7 +50,7 @@ var _ = Describe("Upgrade - Post", func() { Expect(err).To(BeNil()) By("waiting for 10 blocks to be produced on top, after the upgrade") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+10, cli.VotingPeriod*6) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+10, cli.VotingPeriod*2) Expect(err).To(BeNil()) }) @@ -83,7 +83,7 @@ var _ = Describe("Upgrade - Post", func() { Expect(err).To(BeNil()) By("waiting for 10 blocks to be produced on top") - err = cli.WaitForChainHeight(cli.Validator2, cli.CliBinaryName, currentHeight+10, cli.VotingPeriod*8) + err = cli.WaitForChainHeight(cli.Validator2, cli.CliBinaryName, currentHeight+10, cli.VotingPeriod*2) Expect(err).To(BeNil()) }) diff --git a/tests/upgrade/integration/v4/pre_test.go b/tests/upgrade/integration/v4/pre_test.go index bc48efd7b..bc773ff11 100644 --- a/tests/upgrade/integration/v4/pre_test.go +++ b/tests/upgrade/integration/v4/pre_test.go @@ -39,7 +39,7 @@ var _ = Describe("Upgrade - Pre", func() { Context("Before a software upgrade execution is initiated", func() { It("should wait for chain to bootstrap", func() { By("pinging the node status until the voting end height is reached") - err := cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, cli.BootstrapHeight, cli.BootstrapPeriod+20) + err := cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, cli.BootstrapHeight, cli.BootstrapPeriod+5) Expect(err).To(BeNil()) }) @@ -67,7 +67,7 @@ var _ = Describe("Upgrade - Pre", func() { By("waiting for an additional set of blocks to be produced") height, err := cli.GetCurrentBlockHeight(cli.Validator0, cli.CliBinaryName) Expect(err).To(BeNil()) - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, height+5, cli.VotingPeriod*6) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, height+5, cli.VotingPeriod*2) Expect(err).To(BeNil()) } }) @@ -107,7 +107,7 @@ var _ = Describe("Upgrade - Pre", func() { By("waiting for an additional set of blocks to be produced") height, err := cli.GetCurrentBlockHeight(cli.Validator0, cli.CliBinaryName) Expect(err).To(BeNil()) - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, height+5, cli.VotingPeriod*6) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, height+5, cli.VotingPeriod*2) Expect(err).To(BeNil()) } }) @@ -137,7 +137,7 @@ var _ = Describe("Upgrade - Pre", func() { Expect(err).To(BeNil()) By("waiting for 10 blocks to be produced on top, after the upgrade") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+3, cli.VotingPeriod*3) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+3, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) @@ -154,7 +154,7 @@ var _ = Describe("Upgrade - Pre", func() { Expect(err).To(BeNil()) By("waiting for the proposal to be included in a block") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+3, cli.VotingPeriod*3) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+3, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) @@ -171,7 +171,7 @@ var _ = Describe("Upgrade - Pre", func() { Expect(err).To(BeNil()) By("waiting for 10 blocks to be produced on top, after the upgrade") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+1, cli.VotingPeriod*2) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+1, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) @@ -188,7 +188,7 @@ var _ = Describe("Upgrade - Pre", func() { Expect(err).To(BeNil()) By("waiting for 10 blocks to be produced on top, after the upgrade") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+1, cli.VotingPeriod*2) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+1, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) @@ -205,7 +205,7 @@ var _ = Describe("Upgrade - Pre", func() { Expect(err).To(BeNil()) By("waiting for 10 blocks to be produced on top, after the upgrade") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+1, cli.VotingPeriod*2) + err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+1, cli.VotingPeriod*1) Expect(err).To(BeNil()) }) From decd0d7c42912fc94f165860fb398259de8282bd Mon Sep 17 00:00:00 2001 From: kaustubhkapatral Date: Fri, 28 Nov 2025 09:48:06 +0530 Subject: [PATCH 04/10] split docker tag approach --- .github/workflows/release.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab8f1f7de..47ece89a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,6 +48,7 @@ jobs: outputs: RELEASE_VERSION: ${{ steps.set-version.outputs.RELEASE_VERSION }} EXECUTE_RELEASE: ${{ steps.execute-release.outputs.EXECUTE_RELEASE }} + LATEST_TAG: ${{ steps.release-type.outputs.LATEST_TAG }} steps: - uses: actions/checkout@v5 @@ -97,6 +98,26 @@ jobs: RELEASE_VERSION=$( git describe --tags "${{ github.sha }}") echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" + # Set release type + - name: Determine release type + id: release-type + if: steps.execute-release.outputs.EXECUTE_RELEASE == 'true' + run: | + TAG=$(git describe --tags --exact-match 2>/dev/null || echo "") + git fetch --all --tags --quiet || true + if git branch -r --contains "$TAG" 2>/dev/null | grep -qE "(origin/main$|origin/HEAD.*main)" || \ + git merge-base --is-ancestor "$TAG" origin/main 2>/dev/null; then + # Tag is on main branch - tagging production release + echo "LATEST_TAG=production-latest" >> "$GITHUB_OUTPUT" + echo "Detected production release from main branch (tag: $TAG)" + + else + + # Tag is not on main branch - tagging staging release + echo "LATEST_TAG=staging-latest" >> "$GITHUB_OUTPUT" + echo "Detected staging release from non-main branch (tag: $TAG)" + fi + release-binary: name: "Node binary" runs-on: ubuntu-24.04 @@ -212,7 +233,7 @@ jobs: latest=auto tags: | type=semver,pattern={{version}},value=${{ needs.release-guard.outputs.RELEASE_VERSION }} - type=raw,value=production-latest + type=raw,value=${{ needs.release-guard.outputs.LATEST_TAG }} type=sha,format=long labels: | org.opencontainers.image.vendor="Cheqd Foundation Limited" From 6f20b831577290a3f84f2202e7b7b3b67cb4a11a Mon Sep 17 00:00:00 2001 From: kaustubhkapatral Date: Fri, 28 Nov 2025 09:50:22 +0530 Subject: [PATCH 05/10] split docker tag approach --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47ece89a0..cd52451d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: # Tag is not on main branch - tagging staging release echo "LATEST_TAG=staging-latest" >> "$GITHUB_OUTPUT" - echo "Detected staging release from non-main branch (tag: $TAG)" + echo "Detected staging release from develop branch (tag: $TAG)" fi release-binary: From be5b2b70c69eea111a8a73b7d4bb3631c8a7e511 Mon Sep 17 00:00:00 2001 From: kaustubhkapatral Date: Tue, 2 Dec 2025 16:44:36 +0530 Subject: [PATCH 06/10] switch to tag based approach --- .github/workflows/release.yml | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd52451d4..beec4c9eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,6 @@ jobs: outputs: RELEASE_VERSION: ${{ steps.set-version.outputs.RELEASE_VERSION }} EXECUTE_RELEASE: ${{ steps.execute-release.outputs.EXECUTE_RELEASE }} - LATEST_TAG: ${{ steps.release-type.outputs.LATEST_TAG }} steps: - uses: actions/checkout@v5 @@ -98,26 +97,6 @@ jobs: RELEASE_VERSION=$( git describe --tags "${{ github.sha }}") echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" - # Set release type - - name: Determine release type - id: release-type - if: steps.execute-release.outputs.EXECUTE_RELEASE == 'true' - run: | - TAG=$(git describe --tags --exact-match 2>/dev/null || echo "") - git fetch --all --tags --quiet || true - if git branch -r --contains "$TAG" 2>/dev/null | grep -qE "(origin/main$|origin/HEAD.*main)" || \ - git merge-base --is-ancestor "$TAG" origin/main 2>/dev/null; then - # Tag is on main branch - tagging production release - echo "LATEST_TAG=production-latest" >> "$GITHUB_OUTPUT" - echo "Detected production release from main branch (tag: $TAG)" - - else - - # Tag is not on main branch - tagging staging release - echo "LATEST_TAG=staging-latest" >> "$GITHUB_OUTPUT" - echo "Detected staging release from develop branch (tag: $TAG)" - fi - release-binary: name: "Node binary" runs-on: ubuntu-24.04 @@ -233,7 +212,8 @@ jobs: latest=auto tags: | type=semver,pattern={{version}},value=${{ needs.release-guard.outputs.RELEASE_VERSION }} - type=raw,value=${{ needs.release-guard.outputs.LATEST_TAG }} + type=raw,value=production-latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') }} + type=raw,value=staging-latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') }} type=sha,format=long labels: | org.opencontainers.image.vendor="Cheqd Foundation Limited" From 4cebbf320781c487c375c6a9e8dec193aa445e38 Mon Sep 17 00:00:00 2001 From: kaustubhkapatral Date: Wed, 3 Dec 2025 19:31:10 +0530 Subject: [PATCH 07/10] fixed readable events slice --- tests/integration/helpers/event.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/helpers/event.go b/tests/integration/helpers/event.go index 1ffc7629f..7829316ed 100644 --- a/tests/integration/helpers/event.go +++ b/tests/integration/helpers/event.go @@ -16,7 +16,7 @@ type HumanReadableEvent struct { } func ReadableEvents(events []types.Event) []HumanReadableEvent { - readableEvents := make([]HumanReadableEvent, len(events)) + readableEvents := make([]HumanReadableEvent, 0, len(events)) for _, event := range events { readableAttributes := make([]HumanReadableEventAttribute, len(event.Attributes)) for i, attribute := range event.Attributes { From dc1947af6e9d521972f2b086b1d6f05f9bc2f1e3 Mon Sep 17 00:00:00 2001 From: kaustubhkapatral Date: Thu, 4 Dec 2025 11:54:47 +0530 Subject: [PATCH 08/10] fix panic due to negative tax amount --- tests/integration/cli_resource_pricing_negative_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration/cli_resource_pricing_negative_test.go b/tests/integration/cli_resource_pricing_negative_test.go index fc9248d84..d02b28a87 100644 --- a/tests/integration/cli_resource_pricing_negative_test.go +++ b/tests/integration/cli_resource_pricing_negative_test.go @@ -187,7 +187,8 @@ var _ = Describe("cheqd cli - negative resource pricing", func() { useMin := true tax, err := cli.ResolveFeeFromParams(resourceFeeParams.Json, useMin) Expect(err).To(BeNil()) - lowerTax := sdk.NewCoin(tax.Denom, sdkmath.NewInt(tax.Amount.Int64()-1000000000)) + lowerAmount := sdkmath.MaxInt(sdkmath.NewInt(1), sdkmath.NewInt(tax.Amount.Int64()-1000000000)) + lowerTax := sdk.NewCoin(tax.Denom, lowerAmount) res, err := cli.CreateResource(tmpDir, resourcetypes.MsgCreateResourcePayload{ CollectionId: collectionID, Id: resourceID, @@ -212,7 +213,8 @@ var _ = Describe("cheqd cli - negative resource pricing", func() { useMin := true tax, err := cli.ResolveFeeFromParams(resourceFeeParams.Image, useMin) Expect(err).To(BeNil()) - lowerTax := sdk.NewCoin(tax.Denom, sdkmath.NewInt(tax.Amount.Int64()-1000000000)) + lowerAmount := sdkmath.MaxInt(sdkmath.NewInt(1), sdkmath.NewInt(tax.Amount.Int64()-1000000000)) + lowerTax := sdk.NewCoin(tax.Denom, lowerAmount) res, err := cli.CreateResource(tmpDir, resourcetypes.MsgCreateResourcePayload{ CollectionId: collectionID, @@ -238,7 +240,8 @@ var _ = Describe("cheqd cli - negative resource pricing", func() { useMin := true tax, err := cli.ResolveFeeFromParams(resourceFeeParams.Default, useMin) Expect(err).To(BeNil()) - lowerTax := sdk.NewCoin(tax.Denom, sdkmath.NewInt(tax.Amount.Int64()-1000000000)) + lowerAmount := sdkmath.MaxInt(sdkmath.NewInt(1), sdkmath.NewInt(tax.Amount.Int64()-1000000000)) + lowerTax := sdk.NewCoin(tax.Denom, lowerAmount) res, err := cli.CreateResource(tmpDir, resourcetypes.MsgCreateResourcePayload{ CollectionId: collectionID, Id: resourceID, From 2b142e0a2d01c82c7a6c88c1b2cab94e7f427635 Mon Sep 17 00:00:00 2001 From: Tasos Derisiotis Date: Thu, 4 Dec 2025 18:44:25 +0200 Subject: [PATCH 09/10] Added failsafe assertion adjustment --- .../cli_diddoc_pricing_negative_test.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/integration/cli_diddoc_pricing_negative_test.go b/tests/integration/cli_diddoc_pricing_negative_test.go index ec9e208fd..f40bda6ac 100644 --- a/tests/integration/cli_diddoc_pricing_negative_test.go +++ b/tests/integration/cli_diddoc_pricing_negative_test.go @@ -45,6 +45,15 @@ var _ = Describe("cheqd cli - negative diddoc pricing", func() { var payload didcli.DIDDocument var signInputs []didcli.SignInput + makeLowerFee := func(required sdk.Coin) sdk.Coin { + lower := required.Amount.Sub(sdkmath.NewInt(1)) + if lower.IsNegative() { + lower = sdkmath.ZeroInt() + } + + return sdk.NewCoin(required.Denom, lower) + } + BeforeEach(func() { tmpDir = GinkgoT().TempDir() @@ -151,7 +160,7 @@ var _ = Describe("cheqd cli - negative diddoc pricing", func() { feeInNCheq, err := cli.ResolveFeeFromParams(feeParams.CreateDid, useMin) Expect(err).To(BeNil()) - lowerTax := sdk.NewCoin(feeInNCheq.Denom, sdkmath.NewInt(feeInNCheq.Amount.Int64()-10000000000)) + lowerTax := makeLowerFee(feeInNCheq) res, err := cli.CreateDidDoc(tmpDir, payload, signInputs, "", testdata.BASE_ACCOUNT_4, helpers.GenerateFees(lowerTax.String())) Expect(err).To(BeNil()) Expect(res.Code).To(BeEquivalentTo(1)) @@ -185,7 +194,7 @@ var _ = Describe("cheqd cli - negative diddoc pricing", func() { useMin = true feeInNCheq, err = cli.ResolveFeeFromParams(feeParams.UpdateDid, useMin) Expect(err).To(BeNil()) - lowerTax := sdk.NewCoin(feeInNCheq.Denom, sdkmath.NewInt(feeInNCheq.Amount.Int64()-10000000000)) + lowerTax := makeLowerFee(feeInNCheq) res, err = cli.UpdateDidDoc(tmpDir, payload2, signInputs, "", testdata.BASE_ACCOUNT_5, helpers.GenerateFees(lowerTax.String())) Expect(err).To(BeNil()) Expect(res.Code).To(BeEquivalentTo(1)) @@ -209,7 +218,7 @@ var _ = Describe("cheqd cli - negative diddoc pricing", func() { useMin = true feeInNCheq, err = cli.ResolveFeeFromParams(feeParams.DeactivateDid, useMin) Expect(err).To(BeNil()) - lowerTax := sdk.NewCoin(feeInNCheq.Denom, sdkmath.NewInt(feeInNCheq.Amount.Int64()-1000000000)) + lowerTax := makeLowerFee(feeInNCheq) res, err = cli.DeactivateDidDoc(tmpDir, payload2, signInputs, "", testdata.BASE_ACCOUNT_5, helpers.GenerateFees(lowerTax.String())) Expect(err).To(BeNil()) Expect(res.Code).To(BeEquivalentTo(1)) From 2acaa34286963088d07d6773dd1bdec62c833f15 Mon Sep 17 00:00:00 2001 From: Tasos Derisiotis Date: Thu, 4 Dec 2025 19:25:28 +0200 Subject: [PATCH 10/10] Increase decrement to counter jitter --- tests/integration/cli_diddoc_pricing_negative_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/cli_diddoc_pricing_negative_test.go b/tests/integration/cli_diddoc_pricing_negative_test.go index f40bda6ac..abab540d5 100644 --- a/tests/integration/cli_diddoc_pricing_negative_test.go +++ b/tests/integration/cli_diddoc_pricing_negative_test.go @@ -46,7 +46,7 @@ var _ = Describe("cheqd cli - negative diddoc pricing", func() { var signInputs []didcli.SignInput makeLowerFee := func(required sdk.Coin) sdk.Coin { - lower := required.Amount.Sub(sdkmath.NewInt(1)) + lower := required.Amount.Sub(sdkmath.NewInt(1_000_000_000)) // subtract 1 CHEQ if lower.IsNegative() { lower = sdkmath.ZeroInt() }