Skip to content

Commit

Permalink
comment on serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi committed Feb 28, 2024
1 parent 620f6e4 commit c8ff511
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions accounts-db/src/accounts_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,15 @@ const _: () = assert!(std::mem::size_of::<AccountHash>() == std::mem::size_of::<
/// with zero lamport are treated to have the "identity" hash. add/sub such
/// element don't impact the accumulated hash.
///
/// ## Are we going to serialize/deserialize Lattice hash into DB storage?
/// This is an open question. Unlike 32 byte Hash, Lattice hash is 2K. Too
/// expensive to store on disk? Therefore, in current implementation, we don't
/// Serialize Lattice hash into disk. Lattice hash is just computed from the
/// account.
/// In future, when we decide to serialize Lattice hash, we can add
/// [Serialize, Deserialize, BorshSerialize, BorshDeserialize, BorshSchema]
/// to the struct.
///
/// Lattice hash
pub const LT_HASH_BYTES: usize = 2048;
pub const LT_HASH_ELEMENT: usize = 1024;
Expand Down

0 comments on commit c8ff511

Please sign in to comment.