Allow CompactSize to be used for non-length fields (addrv2 and ZSEs) #2173
Labels
A-network
Area: Network protocol updates or fixes
A-rust
Area: Updates to Rust code
C-bug
Category: This is a bug
C-security
Category: Security issues
I-consensus
Zebra breaks a Zcash consensus rule
I-panic
Zebra panics with an internal error message
Milestone
Motivation
In #2155, we reject
CompactSize
s greater than the maximum network message length, as a memory DoS defence-in-depth.But some ZIPs use
CompactSize
for counts and ids that are not array lengths.We might want different compact size types for array lengths, and for non-length values.
We could split the CompactSize into:
Specifications
The following ZIPs use
CompactSize
for counts and ids that are not array lengths:zcash_history
crate, not ZebraAlternative Implementations
We could just use
librustzcash
for these ZIPs, treat its data as opaque, and inherit itsCompactSize
limits.Some parts of
librustzcash
andzcashd
currently have a 32 MB limit, inherited from bitcoin.The text was updated successfully, but these errors were encountered: