feat: file upload cost reporting and ClientConfig CLI flags#24
Merged
Nic-dorman merged 6 commits intomainfrom Apr 15, 2026
Merged
feat: file upload cost reporting and ClientConfig CLI flags#24Nic-dorman merged 6 commits intomainfrom
Nic-dorman merged 6 commits intomainfrom
Conversation
Updates antd to latest ant-core and pulls in ant-node 0.10.0 (now published on crates.io instead of a git rev), removing the need for a sibling ant-node checkout to build the daemon. ClientConfig field renames (timeout_secs -> quote/store_timeout_secs, chunk_concurrency -> quote/store_concurrency) do not affect antd because it constructs ClientConfig via ::default(). DataUploadResult and FileUploadResult public fields used by antd are unchanged, so no source changes are required for this bump. ffi/rust is intentionally left at its existing pin — it has pre-existing source drift from the ant-core external-signer refactor and needs a dedicated migration pass before it can track c7d9ee1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Surfaces the storage_cost_atto and gas_cost_wei fields that ant-core now returns on FileUploadResult. Adds them alongside chunks_stored and payment_mode_used (parity with data upload responses) on the file and directory public upload responses in REST, gRPC, and OpenAPI. The existing "cost" field is retained as a deprecated alias populated with storage_cost_atto, so any consumer that was parsing the previously empty string now gets a meaningful value without a hard break. u128 gas cost is serialized as a decimal string because values can exceed the JSON safe-integer range. Adds four new antd CLI flags / env vars exposing ant-core's split timeout and concurrency knobs: --quote-timeout-secs, --store-timeout-secs, --quote-concurrency, --store-concurrency. When unset the ant-core defaults apply (quote_timeout=10s, store_timeout=10s, quote_concurrency=32, store_concurrency=8). All 6 antd unit tests pass. SDK propagation follows in a separate commit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removes the always-empty 'cost' alias from FileUploadPublicResponse and DirUploadPublicResponse across REST, gRPC, and OpenAPI. Verified no external consumer (indelible, ant-webex, other sibling projects) reads the field before dropping — indelible uses the external-signer flow with different response fields, ant-webex is download-only. Proto field number 1 and name 'cost' are reserved to prevent any cached generated stubs from colliding on the wire. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updates every SDK's file_upload_public and dir_upload_public return shape to match the daemon's new response: address, storage_cost_atto, gas_cost_wei, chunks_stored, payment_mode_used. The old empty 'cost' field is removed everywhere. Most SDKs grew a new FileUploadResult type distinct from the existing PutResult (which still carries .cost for data/chunk puts, unchanged). Where gRPC stubs are checked in, they were regenerated to reflect the proto's reserved field 1. Examples and tests updated to assert the new shape; the deprecated 'cost' references in data/chunk examples are intentionally retained — those endpoints still return PutResult. Spot-checked: antd-go (build + vet + test clean), antd-rust (cargo check clean aside from a pre-existing dead_code warning), antd-js (tsup build ok), antd-py (46 passed, 7 skipped network tests). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The antd-dart gRPC client has always imported lib/src/generated/** stubs that were never checked in, so the gRPC surface didn't analyze or run. Generate them once with protoc + protoc_plugin and commit. protoc_plugin's current output calls \$_clearField / \$_setField which only exist in protobuf 4.x, so bump the dependency from ^3.1.0 to ^4.1.0. grpc 4.0.1 already coexists with protobuf 4.x. Adds tool/generate_proto.sh so future regenerations are a single command; includes the Windows hint about PATH for protoc-gen-dart.bat. Verified: dart analyze clean (only two pre-existing unrelated warnings about a missing lints package and an unused _doHead), dart test 40/40 passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two X.509 Name Constraints validation advisories were published against rustls-webpki 0.103.10 after main's last CI run. 0.103.12 is the semver-compatible patch; rustls' ^0.103 constraint already permits it, so this is a lockfile-only bump — no Cargo.toml edits. Real-world exploitability for antd is narrow (impacts only trust chains that rely on Name-Constrained CAs, which public WebPKI and our p2p QUIC transport generally don't use) but the advisory is legitimate and CI should stay green. ant-client's lockfile is already at 0.103.12. ant-node's lockfile is still at 0.103.10; a follow-up PR there will apply the same fix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nic-dorman
added a commit
that referenced
this pull request
Apr 16, 2026
Prepares the first cross-platform daemon binary release. 0.3.0 under pre-1.0 semver is the minor bump for the breaking REST/gRPC contract change that landed in PR #24: FileUploadPublicResponse and DirUploadPublicResponse (and the UploadPublicResponse proto message) dropped the always-empty 'cost' field in favour of explicit storage_cost_atto, gas_cost_wei, chunks_stored, and payment_mode_used. Parallel to the antd-go/v0.3.0 Go-module tag cut earlier so the daemon binary and the Go SDK stay on the same version line. After merge, pushing tag v0.3.0 at the merge commit will trigger .github/workflows/release.yml for its first real run, producing antd-linux-amd64 / antd-darwin-arm64 / antd-windows-amd64.exe plus SHA256SUMS on the GitHub Release. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
ant-coretoc7d9ee1(ant-cli v0.1.2) and surfaces the newFileUploadResultcost fields —storage_cost_atto,gas_cost_wei,chunks_stored,payment_mode_used— through the daemon REST/gRPC/OpenAPI and all 16 SDKs. The always-emptycostfield is dropped (proto field 1 reserved); verified no external consumer reads it (indelible uses the external-signer flow with different fields, ant-webex is download-only).--quote-timeout-secs,--store-timeout-secs,--quote-concurrency,--store-concurrency(backed byANTD_QUOTE_TIMEOUT_SECSetc.). Defaults come fromClientConfig::default(); unset flags do nothing.protoc_plugin, bumpsprotobufdep from ^3.1.0 → ^4.1.0 to match the plugin's$_clearField/$_setFieldcalls. Addsantd-dart/tool/generate_proto.shfor reproducible regen.ant-node is now published on crates.io (0.10.0) so a sibling
../ant-nodecheckout is no longer required for daemon or ffi builds.Test plan
cargo test --bin antd— 6/6 passgo build ./... && go vet ./... && go test ./...— cleancargo check --tests --examples— clean (1 pre-existing dead_code warning ondo_head)npm run build— tsup build okpython -m pytest tests/— 46 passed, 7 skipped (network-dependent)dart analyze && dart test— clean aside from 2 pre-existing unrelated warnings; 40/40 tests passFileUploadPublicResponse/DirUploadPublicResponse/UploadPublicResponseproto🤖 Generated with Claude Code