SIMD-0220

Snapshots use Accounts Lattice Hash

Author: Brooks Prumo · Category: Core Protocol GitHub →

Feature Gate Status

Mainnet Active E818
Testnet Active E797
Devnet Active E911

LTsNAP8h1voEVVToMNBNqoiNQex4aqfUrbFhRH3mSQ2

TL;DR

Use the **Accounts Lattice Hash** as the **Snapshot Hash**, which enables removing the merkle-based accounts hash calculation.

Summary

Use the **Accounts Lattice Hash** as the **Snapshot Hash**, which enables removing the merkle-based accounts hash calculation.

Motivation

This SIMD follows on from SIMD-215, and shares its motivation: > The main goal is to scale Solana to billions accounts When snapshots are taken, they contain a **Snapshot Hash**. This hash is based on the merkle-based hash of the total account state. As established in SIMD-215, this merkle-based hashing of all accounts hinders scaling. And since SIMD-215 added the **Accounts Lattice Hash**, which is a hash of the total account state, the merkle-based hash of all accounts used in the current **Snapshot Hash** is redundant work. The **Snapshot Hash** can be updated to use the **Accounts Lattice Hash** instead.

Impact

Only validators will be impacted, and their performance will improve since the merkle-based hashing of all accounts will no longer be performed.

Backwards Compatibility

Snapshots will have a new hash, so consumers of snapshots will need to know which method to use for hash validation.

Security Considerations

None.