Closed ed-marquez closed 2 years ago
It looks like the FileAppendTransaction.getReceipt
is being continuously mapped here:
to ExecutionState.Retry
.
Hmm, that map is correct as 18
means RECEIPT_NOT_FOUND
which indicates we should try again. I believe this issue is likely to do with regenerating transaction IDs. Can you try disabling it on the transaction using FileAppendTransaction.setRegenerateTransactionIds(false)
. This definitely warrants further investigation though.
Tried running with .setRegenerateTransactionIds(false)
, but I'm getting the same continuous retry behavior.
I believe I've now fixed this on develop
and this will be part of our next release v2.11.0-beta.1. The reason the RECEIPT_NOT_FOUND
was returned every time was because the index for the transaction IDs was incorrectly being left at the last index instead of wrapping back around during FileAppendTransaction.freezeWith()
. I added a mocking test https://github.com/hashgraph/hedera-sdk-js/blob/develop/test/unit/FileAppendMocking.js And made sure our e2e test for a chunked FilleAppendTransaction
worked https://github.com/hashgraph/hedera-sdk-js/blob/develop/test/integration/FileAppendIntegrationTest.js#L78
Description
When the compiled bytecode from a smart contract is too large to be added to Hedera in a single FileCreateTransaction(), then using FileAppendTransaction() with .setMaxChunks is necessary.
In v2.8.0, FileAppendTransaction() hangs and does not finish adding the contents to an existing file. This functionality worked fine in 2.7.0.
Steps to reproduce
See line 74 in index.js in this code sandbox: https://codesandbox.io/s/hedera-example-contract-mint-associate-transfer-hts-li7cz
Fork the sandbox and enter your testnet credentials in .env
Run index.js using v2.8.0 and see FileAppendTransaction hang without any confirmations... (use 2.7.0 and the example completes successfully)
Could also try FileAppendTransaction with any other large file using v2.8.0
Additional context
No response
Hedera network
testnet
Version
v2.8.0
Operating system
Windows