Skip to content

TopicInfoQuery test #26 fails when run against TCK server #623

@manishdait

Description

@manishdait

Description

Test #26Verify customFees field with fixed fee:

it("(#26) Verify customFees field with fixed fee", async function () {
      const feeCollectorKey = await generateEd25519PrivateKey(this);
      const feeCollectorAccountId = await createAccount(this, feeCollectorKey);

      const createResponse = await JSONRPCRequest(this, "createTopic", {
        memo: "Test topic",
        customFees: [
          {
            feeCollectorAccountId: feeCollectorAccountId,
            feeCollectorsExempt: false,
            fixedFee: {
              amount: "10",
            },
          },
        ],
        commonTransactionParams: {
          signers: [feeCollectorKey],
        },
      });
      const topicId = createResponse.topicId;

      const response = await JSONRPCRequest(this, "getTopicInfo", {
      topicId: topicId,
       });
      ....
    });

fails when executed against both JS TCK servers due to INSUFFICIENT_TX_FEE

Adding feeCollectorKey increases the network charge fee. Since maxTransactionFee is not explicitly increased, the transaction exceeds the default maximum fee (≈ 25 HBAR) and fails.

When the transaction is signed without feeCollectorKey, it succeeds.

The same behavior is observed when running equivalent logic using the Java SDK with the same parameters, adding an extra signer increases the transaction fee and can cause INSUFFICIENT_TX_FEE if maxTransactionFee is not adjusted.

  1. Tarnasaction sign without feeCollectorKey
Image
  1. Transaction sign with feeCollectorKey
Image

Proposed Solution

  1. Remove feeCollectorKey from commonTransactionParams.signers, as Docs does not state that the fee collector account is required to sign a TopicCreateTransaction
  2. explicitly set maxTransactionFee in commonTransactionParams

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions