feat: add sanity_check
implementation for block headers
#5800
Labels
C-enhancement
New feature or request
sanity_check
implementation for block headers
#5800
Describe the feature
Sometimes, we need to protect the system against potential DOS attack. In this sense, it could be nice to have a method to ensure the validity of critical values within the block header. We could implement a global sanity check method for the
Header
structure, similar to the approach demonstrated here.While our block numbers (natively u64) already enforce one aspect, expanding this with additional tests for other header values accompanied by dedicated error handling could significantly enhance our system's security.
Proposed Changes:
Header
structure.These changes are aimed at strengthening our system's defenses and ensuring the integrity of block header data.
Additional context
No response
The text was updated successfully, but these errors were encountered: