Commit 2498b97
merge develop: integrate NotSummed wrapper + aggregate_count exposure
Two PRs landed on develop while this PR was open:
- #659: Element::NotSummed wrapper variant
- #658: aggregate_count proof verification under verify feature
Conflicts resolved in 8 files. The substantive resolution work:
DISCRIMINANT COLLISION. The shipped cidx PR used ElementType
discriminant 16 for CountIndexedTree and 17 for
ProvableCountIndexedTree. Develop's NotSummed PR allocated byte 16
as NOT_SUMMED_WRAPPER_DISCRIMINANT. Both are still pre-shipping, so
renumbering is safe — and since the NotSummed wrapper byte semantics
need to round-trip across the wire, the wrapper byte stays at 16
and the cidx discriminants shift:
CountIndexedTree: 16 → 17
ProvableCountIndexedTree: 17 → 18
NonCountedCountIndexedTree: 144 → 145 (= 0x80 | 17)
NonCountedProvableCountIndexedTree: 145 → 146 (= 0x80 | 18)
ENUM VARIANT ORDER. Bincode encodes Element variants by ENUM ORDER
(not by ElementType discriminant). The Element enum has been
reordered so NotSummed appears at variant index 16 (matching
NOT_SUMMED_WRAPPER_DISCRIMINANT), and CountIndexedTree /
ProvableCountIndexedTree appear AFTER NotSummed at indices 17/18 —
matching their new ElementType discriminants. Without this
reordering, bincode would still write 16 for CountIndexedTree but
from_serialized_value would interpret 16 as the NotSummed wrapper.
WRAPPER NESTING CHECK in `from_serialized_value`: now explicitly
rejects both nested NonCounted and cross-nesting with NotSummed
(inner_byte == 15 || inner_byte == 16), in addition to the
existing reject-high-bit-twin guard.
Other resolutions are straightforward additions: both branches
added arms to match expressions across helpers.rs, tree_type.rs,
visualize.rs; merged additively. The two `mod tests` blocks in
grovedb-element/src/element/mod.rs (one from each PR) renamed the
cidx-side block to `cidx_tests` to avoid duplicate name.
All 1944+ workspace tests pass post-merge.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>33 files changed
Lines changed: 2108 additions & 205 deletions
File tree
- grovedb-element
- src
- element
- grovedb-query/src/proofs
- grovedb/src
- batch
- estimated_costs
- operations
- get
- insert
- proof
- tests
- merk/src
- element
- proofs/query
- tree_type
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
433 | | - | |
434 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
435 | 438 | | |
436 | | - | |
| 439 | + | |
437 | 440 | | |
438 | | - | |
| 441 | + | |
439 | 442 | | |
440 | 443 | | |
441 | 444 | | |
442 | 445 | | |
443 | 446 | | |
444 | | - | |
445 | | - | |
446 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
447 | 491 | | |
448 | | - | |
449 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
450 | 497 | | |
451 | 498 | | |
452 | 499 | | |
0 commit comments