Use DateTime32 for block times and lock times #2211
Labels
A-network
Area: Network protocol updates or fixes
C-security
Category: Security issues
I-consensus
Zebra breaks a Zcash consensus rule
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
I-panic
Zebra panics with an internal error message
I-slow
Problems with performance or responsiveness
I-usability
Zebra is hard to understand or use
Scheduling
This risk is acceptable for the stable release, but we need to fix it before we support lightwalletd.
Is your feature request related to a problem? Please describe.
In #2210, we created a
DateTime32
type, and used it inMetaAddr
.But Zcash also uses 32-bit times in the block header and transaction lock time. This risks panics or networking bugs, particularly when Zebra starts generating transactions.
Describe the solution you'd like
block::Header.time
withDateTime32
Transaction
lock times withDateTime32
, across all versionsWe should also change any APIs that use those fields.
These changes should allow us to simplify some related code.
Describe alternatives you've considered
We could not do this, and accept the risk.
We could use a
u32
, but then we'd have to do a bunch of conversions manually.The text was updated successfully, but these errors were encountered: