A Better MMR Definition



Summary:

In an email exchange discussing code review, Bram Cohen responded to Peter Todd's criticism of his merkle-set implementation being too dense, with almost no comments and less than 100 lines of tests. Cohen defended the implementation, stating that a coworker had reviewed the code and added comments explaining the subtleties which tripped him up. He also said that the optimized implementation behaves identically to the reference implementation, but faster and using less memory. Regarding Todd's own Python MMR implementation, Cohen suggested that non-optimized Python won't be touching the Bitcoin codebase any time soon. Todd suggested that Cohen should have split the reference implementation from the optimized one and placed them in separate files, and added more comments. Cohen replied that the code was all about cache coherence, and this information should be included in the README file for the repository.


Updated on: 2023-06-11T21:38:57.411891+00:00