From 32ea6e8a7dedb903cb6e681ff47800482f7c2aeb Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 21 May 2020 12:51:45 -0700 Subject: [PATCH] Always enable nonce slot/owner-in-hash --- ledger/src/shred.rs | 2 +- runtime/src/accounts_db.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ledger/src/shred.rs b/ledger/src/shred.rs index c48e96c022fbbc..8c595be145eb26 100644 --- a/ledger/src/shred.rs +++ b/ledger/src/shred.rs @@ -50,7 +50,7 @@ pub const SIZE_OF_NONCE_DATA_SHRED_PAYLOAD: usize = pub const OFFSET_OF_SHRED_SLOT: usize = SIZE_OF_SIGNATURE + SIZE_OF_SHRED_TYPE; pub const OFFSET_OF_SHRED_INDEX: usize = OFFSET_OF_SHRED_SLOT + SIZE_OF_SHRED_SLOT; pub const NONCE_SHRED_PAYLOAD_SIZE: usize = PACKET_DATA_SIZE - SIZE_OF_NONCE; -pub const UNLOCK_NONCE_SLOT: Slot = 14_780_256; +pub const UNLOCK_NONCE_SLOT: Slot = 0; thread_local!(static PAR_THREAD_POOL: RefCell = RefCell::new(rayon::ThreadPoolBuilder::new() .num_threads(get_thread_count()) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 84d3b2a5e07628..d1fdc1c95a6b0c 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1330,10 +1330,8 @@ impl AccountsDB { hasher.result() } - pub fn include_owner_in_hash(slot: Slot) -> bool { - // Account hashing updated to include owner activates at this slot on the testnet - // DANGER: Remove this guard ABSOLUTELY before the mainnet-beta transitions to v1.1. - slot >= 14_000_000 + pub fn include_owner_in_hash(_slot: Slot) -> bool { + true } pub fn hash_account_data(