Add memory side effects notes when using function pointers (#5174)

This commit is contained in:
Ernesto García
2024-08-30 05:44:05 -06:00
committed by GitHub
parent a9161aa93f
commit 83f954d8c4
4 changed files with 14 additions and 0 deletions

View File

@ -26,6 +26,9 @@ import {Hashes} from "./Hashes.sol";
* OpenZeppelin's JavaScript library generates Merkle trees that are safe
* against this attack out of the box.
*
* IMPORTANT: Consider memory side-effects when using custom hashing functions
* that access memory in an unsafe way.
*
* NOTE: This library supports proof verification for merkle trees built using
* custom _commutative_ hashing functions (i.e. \`H(a, b) == H(b, a)\`). Proving
* leaf inclusion in trees built using non-commutative hashing functions requires