Skip to content

Removes update_accounts_hash() family of fns#7091

Merged
brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo:lthash/update_accounts_hash
Jul 23, 2025
Merged

Removes update_accounts_hash() family of fns#7091
brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo:lthash/update_accounts_hash

Conversation

@brooksprumo
Copy link
Copy Markdown

Problem

The merkle-based accounts hashing is no longer used.

Summary of Changes

This PR removes the AccountsDb update_accounts_hash() family of functions.

@brooksprumo brooksprumo self-assigned this Jul 22, 2025
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.2%. Comparing base (f9cd7ad) to head (6aec29b).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #7091    +/-   ##
========================================
  Coverage    83.2%    83.2%            
========================================
  Files         854      854            
  Lines      374726   374380   -346     
========================================
- Hits       312092   311813   -279     
+ Misses      62634    62567    -67     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brooksprumo brooksprumo marked this pull request as ready for review July 22, 2025 21:44
@brooksprumo brooksprumo requested review from HaoranYi and roryharr July 22, 2025 21:44
/// This is intended to be used by startup verification, and also AccountsHashVerifier.
/// Uses account storage files as the data source for the calculation.
// obsolete, will be removed next
pub fn calculate_accounts_hash(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

let bank_hash_stats = BankHashStats::default();
let accounts_delta_hash = accounts_db.get_accounts_delta_hash(slot).unwrap();
let accounts_hash = accounts_db.get_accounts_hash(slot).unwrap().0;
let accounts_hash = AccountsHash(Hash::default()); // obsolete, any value works
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@brooksprumo brooksprumo merged commit 6a4b1fb into anza-xyz:master Jul 23, 2025
41 checks passed
@brooksprumo brooksprumo deleted the lthash/update_accounts_hash branch July 23, 2025 16:01
puhtaytow pushed a commit to puhtaytow/agave that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants