vielite's blog

C-01: Hardcoded Global Hasher Type Creates Governance and Upgrade Risks

March 19, 2026
1 min read
Table of Contents
monad-c-01-hardcoded-global-hasher-type

Summary

The codebase hardcodes Blake3 as the global hasher via pub type HasherType = Blake3Hash.

Vulnerability details

2025-09-monad/bft/monad-crypto/src/hasher.rs
/// The global hasher type
pub type HasherType = Blake3Hash;
pub struct Sha256Hash(sha2::Sha256);
pub struct Blake3Hash(blake3::Hasher);
impl Hasher for Blake3Hash {
fn new() -> Self {
Self(blake3::Hasher::new())
}

Impact

That design couples consensus-relevant hashing behavior to a compile-time type alias. Any future algorithm migration would require broad code changes and tightly coordinated rollout, which raises governance and upgrade risk.

Recommendation

Move hashing behind configuration-driven selection or an abstraction layer that can support protocol transitions explicitly.