HomePhabricator

Switch blocks to a constant-space Merkle root/branch algorithm.
eece63fa7256Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Switch blocks to a constant-space Merkle root/branch algorithm.

This switches the Merkle tree logic for blocks to one that runs in constant (small) space.
The old code is moved to tests, and a new test is added that for various combinations of
block sizes, transaction positions to compute a branch for, and mutations:

  • Verifies that the old code and new code agree for the Merkle root.
  • Verifies that the old code and new code agree for the Merkle branch.
  • Verifies that the computed Merkle branch is valid.
  • Verifies that mutations don't change the Merkle root.
  • Verifies that mutations are correctly detected.

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Nov 17 2015, 16:35
deadalnixPushed on May 14 2017, 22:04
Parents
rABCee60e5625bf8: Add merkle.{h,cpp}, generic merkle root/branch algorithm
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rABCeece63fa7256: Switch blocks to a constant-space Merkle root/branch algorithm. (authored by Pieter Wuille <pieter.wuille@gmail.com>).Nov 27 2015, 14:36