You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TCK server does not implement appendFile, so the TCK driver's FileAppendTransaction suite cannot run against the Python SDK. The SDK transaction (src/hiero_sdk_python/file/file_append_transaction.py) already exists and already extends ChunkedTransaction.
Blocked by hiero-ledger#2488 (createFile) — needs the file-service TCK modules and a created file to append to. Soft-blocked by hiero-ledger#2492 (deleteFile) — one spec test ("Appends to a deleted file") needs delete to exist; it can stay skipped until hiero-ledger#2492 lands. Related to bug hiero-ledger#2480 (ChunkedTransaction body-bytes fix) — see chunking notes below.
This is the most involved of the six file-service methods because it exercises chunking — recommended last in the sequence, and better suited to skill: intermediate than the other five.
Solution
Add an appendFile handler wrapping FileAppendTransaction.
Method contract (from the spec):
Input
Type
Required
Notes
fileId
string
optional
contents
string
required
Content to append
maxChunks
number
optional
Default 20
chunkSize
number
optional
Default 4096 (bytes)
commonTransactionParams
object
optional
Output: status — reuse StatusOnlyResponse from tck/response/base.py.
Implementation steps:
Add AppendFileParams(BaseTransactionParams) to tck/param/file.py with fileId, contents, maxChunks, chunkSize (use to_int() for the numerics).
Add unit tests under tests/tck/ covering both single-chunk and multi-chunk paths.
Chunking notes — read before starting:
Do not re-implement chunking.FileAppendTransaction extends ChunkedTransaction and its own defaults (max_chunks=20, chunk_size=4096) match the spec exactly. (The ChunkedTransaction base default is chunk_size=1024 — FileAppendTransaction deliberately overrides it; don't "fix" that.) Just wire set_max_chunks() / set_chunk_size().
Setter order matters: the chunk count derives from len(contents) / chunk_size, so set contents and chunk size before anything reads the chunk count.
execute() vs execute_all():ChunkedTransaction has both; execute() returns the first chunk's response. The spec wants a single status, so execute() is right — but verify a failure in a later chunk still surfaces instead of reporting the first chunk's SUCCESS.
Problem
The TCK server does not implement
appendFile, so the TCK driver'sFileAppendTransactionsuite cannot run against the Python SDK. The SDK transaction (src/hiero_sdk_python/file/file_append_transaction.py) already exists and already extendsChunkedTransaction.Blocked by hiero-ledger#2488 (
createFile) — needs the file-service TCK modules and a created file to append to. Soft-blocked by hiero-ledger#2492 (deleteFile) — one spec test ("Appends to a deleted file") needs delete to exist; it can stay skipped until hiero-ledger#2492 lands. Related to bug hiero-ledger#2480 (ChunkedTransactionbody-bytes fix) — see chunking notes below.This is the most involved of the six file-service methods because it exercises chunking — recommended last in the sequence, and better suited to
skill: intermediatethan the other five.Solution
Add an
appendFilehandler wrappingFileAppendTransaction.Method contract (from the spec):
fileIdcontentsmaxChunkschunkSizecommonTransactionParamsOutput:
status— reuseStatusOnlyResponsefromtck/response/base.py.Implementation steps:
AppendFileParams(BaseTransactionParams)totck/param/file.pywithfileId,contents,maxChunks,chunkSize(useto_int()for the numerics).tck/handlers/file.py:tests/tck/covering both single-chunk and multi-chunk paths.Chunking notes — read before starting:
FileAppendTransactionextendsChunkedTransactionand its own defaults (max_chunks=20,chunk_size=4096) match the spec exactly. (TheChunkedTransactionbase default ischunk_size=1024—FileAppendTransactiondeliberately overrides it; don't "fix" that.) Just wireset_max_chunks()/set_chunk_size().len(contents) / chunk_size, so set contents and chunk size before anything reads the chunk count.execute()vsexecute_all():ChunkedTransactionhas both;execute()returns the first chunk's response. The spec wants a singlestatus, soexecute()is right — but verify a failure in a later chunk still surfaces instead of reporting the first chunk's SUCCESS.signers:apply_common_params()callsfreeze_with(client)then signs. For a chunked transaction that freeze must cover every chunk body — exactly the surface open bug Fix ChunkedTransaction to createtransaction_body_bytesfor all chunks hiero-ledger/hiero-sdk-python#2480 touches ("Fix ChunkedTransaction to createtransaction_body_bytesfor all chunks"). If a multi-chunk append withsignersfails, check Fix ChunkedTransaction to createtransaction_body_bytesfor all chunks hiero-ledger/hiero-sdk-python#2480 before debugging your handler, and coordinate there rather than working around it.signers.Acceptance criteria
appendFileregistered and dispatchablecommonTransactionParams.signersmaxChunks/chunkSizeoverrides honoured; content exceedingmaxChunks * chunkSizesurfaces a proper errorfileIdformat → SDK internal error; non-existent ID → networkINVALID_FILE_IDuv run pytest tests/tck -qpassesSpec: https://github.com/hiero-ledger/hiero-sdk-tck/blob/main/docs/test-specifications/file-service/FileAppendTransaction.md
JS reference: https://github.com/hiero-ledger/hiero-sdk-js/blob/main/tck/methods/file.ts (
appendFile)