feat: privacy-first CLI with human-friendly output#32
Open
grumbach wants to merge 31 commits intoWithAutonomi:mainfrom
Open
feat: privacy-first CLI with human-friendly output#32grumbach wants to merge 31 commits intoWithAutonomi:mainfrom
grumbach wants to merge 31 commits intoWithAutonomi:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d259340 to
e55c590
Compare
Privacy by design: no logs emitted by default. Users opt in with -v. Verbosity: -v info, -vv debug, -vvv trace. Default: silent. Human-friendly output with progress on stderr, results on stdout. JSON mode (--json) suppresses all stderr and outputs valid serde JSON. Global --json works for both upload and download. Error format uses Display (not Debug) to avoid leaking internal details. Stdout flushed before process::exit to prevent lost output. Removes --log-level flag (replaced by -v).
e55c590 to
1133218
Compare
The old default 'local' required --devnet-manifest, giving users a confusing error. Production users should not need to specify the network.
7340c04 to
99bff07
Compare
- Replace --log-level with -v/--verbose in global flags table - Update --evm-network default from 'local' to 'arbitrum-one' - Put production examples first (no --evm-network needed) - Update upload/download output examples to match new human-friendly format - Add devnet wallet key and --evm-network local to devnet examples
99bff07 to
3657d65
Compare
-b 1.2.3.4:10000,5.6.7.8:10000 now works alongside repeated flags. Reverts incomplete total_cost change (needs proper ant-core plumbing).
Wires cost data through the upload pipeline: - batch_pay() now returns gas_cost_wei from the EVM receipt - batch_upload_chunks() accumulates costs across payment waves - FileUploadResult carries storage_cost_atto and gas_cost_wei - CLI displays: 'Cost: 249999999 nano (gas: 0.000106 ETH)' - JSON output includes both fields Cost shows 0 when chunks already existed (no payment made).
- Cost now shows '0.2500 ANT' instead of '249999999 nano' - Re-uploads show 'free (already stored)' instead of '0 (gas: 0 ETH)' - Files < 3 bytes get a clear error instead of a cryptic self-encryption crash - Gas shows as ETH with appropriate precision
- gas_cost_wei now String in JSON output (matches storage_cost_atto, avoids u128 precision loss in JavaScript/Python JSON parsers) - Replace unwrap_or_default() with ? on JSON serialization (surfaces errors instead of silently emitting empty strings)
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.
Privacy-first CLI with human-friendly output
No logs by default. A decentralized network client must not leak metadata. Users opt in with
-v/-vv/-vvv.Human-friendly output:
Re-upload (already stored):
Download:
JSON (clean piping):
Changes
-vinfo,-vvdebug,-vvvtrace. Default: silent. Replaces--log-level.--evm-networkdefaults toarbitrum-one(waslocalwhich always errored without--devnet-manifest)-bsupports comma-separated addresses:-b 1.2.3.4:10000,5.6.7.8:10000free (already stored)when chunks already exist on network--jsonworks globally for both upload and downloadTested locally
12 test cases on a 10-node local devnet: 1-byte file (error), 1KB/1MB/10MB uploads, re-upload (free), public upload, private download with integrity check, JSON upload, JSON download, missing SECRET_KEY error, bad address error, verbose mode.