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
{{ message }}
Repository navigation
Node: apply the zero-address contract guard to the daemon's runtime parse sites (follow-up to #1213) #1219
kind:securitySecurity impact; report a vulnerability to [email protected], not hererustDependabot: a Cargo update; use area: labels for Rust code otherwise
Spun out of the #1213 review. #1213 extended the shared zero-address guard (parse_nonzero_address, from #1153) to every contract address parsed in the decdn CLI. The decdn-node daemon, however, still parses the same logical contracts with a plain .parse() + .with_context() and no zero-address guard:
payment_channel, origin_assignment, and publisher_registry are the same contracts the CLI now guards, so a 0x0000…0000 misconfig on the daemon still surfaces as the opaque late on-chain revert that #1153/#1213 set out to eliminate — the workspace is left with a half-guarded surface (CLI guarded, daemon not).
Suggested fix
Route the daemon's contract-address parse sites through a zero-address guard. Since both binaries need it, the cleanest home is a parse_nonzero-style helper in a leaf crate both can import (e.g. config-types, already on the shared common → config-types, protocol path), replacing the two duplicated copies (cli/src/commands/chain_ctx.rs::parse_nonzero_address and incentive/src/swap_venue.rs::parse_nonzero) with one.
As with #1213, only contract addresses — EOA/account addresses keep the permissive parse. Present-but-zero errors; unset optionals still resolve to None.
kind:securitySecurity impact; report a vulnerability to [email protected], not hererustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity
test(common): reject zero contract addresses at config resolution (#1219
fix(node,common,cli,incentive): guard daemon contract addresses again…