feat(ffi): batched public upload (single payment) + result cost/chunk parity (V2-645, V2-646) - #219
Merged
Merged
Conversation
…ost/chunk parity V2-645: file_upload_public[_with_progress] now use ant-core's batched file_upload_public_with_mode/_with_progress -- the data-map chunk is paid for in the same payment batch as the file's chunks instead of a second standalone data_map_store payment (wallet-path public uploads previously paid twice). The address comes from FileUploadResult::data_map_address. V2-646: FilePutPublicResult/FilePutPrivateResult gain chunks_stored, storage_cost_atto, gas_cost_wei and payment_mode_used -- parity with ExternalUploadResult/DataPut* results before 0.0.8 freezes the shape. Notes: - the bytes path (data_put_public) still stores the data map as a separate paid call: core has no batched bytes upload at the 0.3.1 pin - record field additions regenerate in Swift/Kotlin at the 0.0.8 release Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Nic-dorman
force-pushed
the
feat/ffi-batched-public-upload-0.0.8
branch
from
July 21, 2026 09:45
0a6fc44 to
f582c94
Compare
This was referenced Jul 21, 2026
Member
Hermes review — ant-sdk PR #219Head: What this PR does (verified against ant-core 0.3.1)
Non-blocking caveats
RecommendationApprove once the maintainer confirms #221 will merge before any 0.0.8 release cut (so mobile never sees the half-state where PartialUpload is still generic). The diff itself is clean. — Hermes Agent (panel review for #219 of the 0.0.8 break-window bundle) |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two tickets from the 0.0.8 break-window bundle (milestone ②):
V2-645 — wallet-path public upload pays twice
file_upload_public/file_upload_public_with_progresspreviously did a private upload (payment 1) followed by a standalone paiddata_map_store(payment 2). They now call ant-core's batchedfile_upload_public_with_mode/file_upload_public_with_progress, which store the serialized data map in the same payment batch as the file's chunks — one payment, and the quote/estimate lines up with what's actually charged (also resolves duplicate V2-610). The shareable address comes fromFileUploadResult::data_map_address(alwaysSomefor public uploads;Noneis surfaced as an internal error).V2-646 — wallet-path results drop cost/chunk fields
FilePutPublicResultandFilePutPrivateResultwere bare (address/data_maponly) whileExternalUploadResultexposes chunk and cost details. Both records now carrychunks_stored,storage_cost_atto,gas_cost_wei,payment_mode_used— matchingExternalUploadResultnaming and theDataPut*results'payment_mode_used. Shape parity done now, before 0.0.8 freezes the record shapes.Notes
data_put_publicstill stores the data map as a separate paid call — core has no batched bytes upload at the 0.3.1 pin. Noted on V2-645; would need an upstream API to fix.cargo fmt --check+clippy --all-targets --all-features -- -D warningsclean, 11/11 tests.Holding merge pending review + Nic's go-ahead.
🤖 Generated with Claude Code