diff --git a/accounts-db/src/accounts_hash.rs b/accounts-db/src/accounts_hash.rs index 66e609dcb979d0..fe0469c33de0e5 100644 --- a/accounts-db/src/accounts_hash.rs +++ b/accounts-db/src/accounts_hash.rs @@ -1272,6 +1272,15 @@ const _: () = assert!(std::mem::size_of::() == 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; diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 9cf2c45a84b110..e1352a02f9c432 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -6399,7 +6399,7 @@ impl Bank { .get_bank_hash_stats(slot) .expect("No bank hash stats were found for this bank, that should not be possible"); info!( - "bank frozen: {slot} hash: {hash} accounts_delta: {} signature_count: {} last_blockhash: {} capitalization: {}{}, stats: {bank_hash_stats:?}", + "bank frozen: {slot} hash: {hash} accounts_delta: {} signature_count: {} last_blockhash: {} capitalization: {}{}, lt_hash: {:?}, stats: {bank_hash_stats:?}", accounts_delta_hash.0, self.signature_count(), self.last_blockhash(), @@ -6408,10 +6408,7 @@ impl Bank { format!(", epoch_accounts_hash: {:?}", epoch_accounts_hash.as_ref()) } else { "".to_string() - } - ); - info!( - "lt_hash: {}", + }, self.accumulated_accounts_hash.read().unwrap() ); hash