Repository navigation
Stop the prefix privacy ratio from overflowing for long prefixes - #183
Conversation
|
hi @n13, friendly ping on this one when you have a moment, ci is still waiting for approval. happy to rebase or change anything |
n13
left a comment
There was a problem hiding this comment.
Reviewer model: GPT-6.1 Sol
APPROVE — no blocking findings.
Reviewed head a91abfb59a8aa3fcabaf7e6e65b84931f61fdbef against base a74fd735fdb7cae2381b66dbaaa513630c0d58d9.
Both transfers query and transfers hash-address now share the overflow-safe formatter. Decimal output is preserved for prefixes below 16 hex characters, and longer prefixes correctly use powers of two, including 2^256 for length 64. The regression tests cover the 15/16 boundary and full-length command handling.
Validation:
cargo test --locked --lib cli::transfers::tests: 4 passed.cargo +nightly-2026-08-31 fmt --all -- --check: passed.git diff --checkagainst the recorded base: passed.- GitHub format, Clippy/docs, security audit, and dependency cooldown checks passed. Build/test matrix and examples jobs were still running at review time.
|
Looks good thank you for contributing! |
|
Hi @Iamsohungrynow this is a nice contribution, thank you. If you'd like to connect, please join our telegram and message @yuvilightman |
|
thanks! will message yuvi on telegram |
1u64 << (prefix_len * 4)overflows onceprefix_lenis 16 or more, sotransfers hash-address --prefix-len 64panics in a debug build and query shows a wrong ratio in release. it now prints2^Npast u64, shorter prefixes print the same as before