Skip to content

Major hash tree refactoring#335

Merged
edubart merged 82 commits intomainfrom
share/hash-tree-on-disk
Nov 25, 2025
Merged

Major hash tree refactoring#335
edubart merged 82 commits intomainfrom
share/hash-tree-on-disk

Conversation

@edubart
Copy link
Collaborator

@edubart edubart commented Oct 21, 2025

This PR completely reworks how hash tree are computed:

  • It is now orders magnitude faster to compute root hash
  • Hash tree now supports SHA-256 hasher
  • Hash tree now uses OpenMP and SIMD instructions to parallelize work
  • Hash tree can now persist to disk
  • A new C API was added to help constructing sparse and dense uarch computation hashes
  • Machines can now run mapped directly on disk

Along with many other changes, it combines months of work from Diego and me.

It also solves:

It supersedes:

diegonehab added 30 commits June 4, 2025 14:25
Using __builtin_memcpy instead.
The machine class took over the role.
And also i-prefer-uarch-state-access.h
Cleanup several of the DUMP_*.* implementations
PMA is only used for the two-word description of address ranges in memory
All other constants use AR (for address range)
Also simplified machine::read_memory()
This increases the space for DID
Checking for empty address range simply checks its length.
Shadow address ranges are neither device nor memory.
This is because they cannot be read/written with read_device/write_device.
They do not implement get_host_memory() either.
i-virtual-machine        -> i-machine
virtual-machine          -> local-machine
jsonrpc-virtual-machine  -> jsonrpc-machine
clua-i-virtual-machine   -> clua-i-machine
poor-type-name is more legible
@edubart edubart self-assigned this Oct 21, 2025
@edubart edubart added the enhancement New feature or request label Oct 21, 2025
@edubart edubart added optimization Optimization epic refactor Restructuring code, while not changing its original functionality labels Oct 21, 2025
@edubart edubart added this to the v0.20.0 milestone Oct 21, 2025
@edubart edubart mentioned this pull request Oct 21, 2025
@edubart edubart requested a review from a team October 21, 2025 14:22
@edubart edubart requested a review from diegonehab October 22, 2025 13:42
@edubart edubart moved this from Todo to Waiting Review in Machine Unit Oct 22, 2025
@github-project-automation github-project-automation bot moved this from Waiting Review to Waiting Merge in Machine Unit Nov 25, 2025
@edubart edubart merged commit 1cce7ce into main Nov 25, 2025
8 checks passed
@edubart edubart deleted the share/hash-tree-on-disk branch November 25, 2025 15:33
@github-project-automation github-project-automation bot moved this from Waiting Merge to Done in Machine Unit Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request epic optimization Optimization refactor Restructuring code, while not changing its original functionality

Projects

Status: Done

2 participants