@@ -168,6 +168,10 @@ library MerkleProof {
168
168
* This version handles multiproofs in memory with the default hashing function.
169
169
*
170
170
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
171
+ *
172
+ * NOTE: The _empty set_ (i.e. the case where `proof.length == 0 && leaves.length == 0`) is considered a noop,
173
+ * and therefore a valid multiproof (i.e. it returns `true`). Consider disallowing this case if you're not
174
+ * validating the leaves elsewhere.
171
175
*/
172
176
function multiProofVerify (
173
177
bytes32 [] memory proof ,
@@ -247,6 +251,10 @@ library MerkleProof {
247
251
* This version handles multiproofs in memory with a custom hashing function.
248
252
*
249
253
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
254
+ *
255
+ * NOTE: The _empty set_ (i.e. the case where `proof.length == 0 && leaves.length == 0`) is considered a noop,
256
+ * and therefore a valid multiproof (i.e. it returns `true`). Consider disallowing this case if you're not
257
+ * validating the leaves elsewhere.
250
258
*/
251
259
function multiProofVerify (
252
260
bytes32 [] memory proof ,
@@ -328,6 +336,10 @@ library MerkleProof {
328
336
* This version handles multiproofs in calldata with the default hashing function.
329
337
*
330
338
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
339
+ *
340
+ * NOTE: The _empty set_ (i.e. the case where `proof.length == 0 && leaves.length == 0`) is considered a noop,
341
+ * and therefore a valid multiproof (i.e. it returns `true`). Consider disallowing this case if you're not
342
+ * validating the leaves elsewhere.
331
343
*/
332
344
function multiProofVerifyCalldata (
333
345
bytes32 [] calldata proof ,
@@ -407,6 +419,10 @@ library MerkleProof {
407
419
* This version handles multiproofs in calldata with a custom hashing function.
408
420
*
409
421
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
422
+ *
423
+ * NOTE: The _empty set_ (i.e. the case where `proof.length == 0 && leaves.length == 0`) is considered a noop,
424
+ * and therefore a valid multiproof (i.e. it returns `true`). Consider disallowing this case if you're not
425
+ * validating the leaves elsewhere.
410
426
*/
411
427
function multiProofVerifyCalldata (
412
428
bytes32 [] calldata proof ,
0 commit comments