Skip to content

Commit

Permalink
Always enable nonce slot/owner-in-hash
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed May 21, 2020
1 parent e29b787 commit 4f9c57d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ledger/src/shred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 5;

thread_local!(static PAR_THREAD_POOL: RefCell<ThreadPool> = RefCell::new(rayon::ThreadPoolBuilder::new()
.num_threads(get_thread_count())
Expand Down
6 changes: 2 additions & 4 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4f9c57d

Please sign in to comment.