Skip to content

feat(v2): --dag flag wires v2 DAG engine end-to-end, bump to 2.0.3#8

Open
Eth-Interchained wants to merge 1 commit into
masterfrom
hyperagent/v2-dag-flag
Open

feat(v2): --dag flag wires v2 DAG engine end-to-end, bump to 2.0.3#8
Eth-Interchained wants to merge 1 commit into
masterfrom
hyperagent/v2-dag-flag

Conversation

@Eth-Interchained

Copy link
Copy Markdown
Owner

Summary

  • nedbd --dag (or NEDBD_DAG=1): replaces the process with the v2 Rust DAG binary via os.execv — same port/data/token env vars, zero Python overhead. v1 AOF engine untouched.
  • nedbd-v2 bundled in the Python wheel: CI builds it per-platform, stages into python/nedb/nedbd-v2 before maturin — pip install nedb-engine ships both engines.
  • All TODO flags closed in rust/nedb-v2/:
    • Real tombstone deletes: Db::delete() writes a tombstone node + removes the id from IdIndex so queries/list never return deleted docs
    • Real BLAKE2b Merkle head: db_seq_head() hashes all sorted id-index hashes chained with seq — tamper-evident, changes on every write
    • DEK passthrough to migrate_if_needed() so encrypted v1 AOFs convert correctly
  • Fix parking_lot dep: 0.12 (correct) not 1 (non-existent on crates.io)
  • rust/nedb-v2 added to Rust workspace with Cargo.lock committed for reproducible CI
  • Bump all version strings to 2.0.3: pyproject.toml, init.py, package.json, rust/Cargo.toml, rust/crates/nedb-py/pyproject.toml, rust/nedb-v2/Cargo.toml — all in sync, valid for both PyPI and npm (stable, no normalization needed)

Usage after merge

pip install --upgrade nedb-engine   # 2.0.3
nedbd --dag /path/to/data           # v2 DAG engine
# or
NEDBD_DAG=1 nedbd /path/to/data

Engine impact

  • v1 AOF engine: unchanged
  • v2 DAG engine: tombstone deletes + BLAKE2b Merkle head + encrypted migration all wired

Tests run

  • All deps fetch and resolve (Cargo.lock committed)
  • Python tests unaffected (v1 path unchanged)
  • CI will compile nedbd-v2 binary per platform and bundle it in the wheel

Follow-up

  • Merge to master, tag v2.0.3 — CI ships PyPI 2.0.3 and npm 2.0.3 (both clean stable semver)
  • Vision VPS: NEDBD_DAG=1 nedbd --data /fresh/data-dir after upgrade

- nedbd --dag (or NEDBD_DAG=1): exec into nedbd-v2 Rust binary, replacing
  the v1 AOF process entirely — same port/data/token env vars, no Python overhead
- v2 Rust binary bundled into the Python wheel as nedbd-v2 (built by CI)
- Closed all TODO flags in rust/nedb-v2:
  - Real tombstone deletes: Db::delete() writes tombstone node + removes id
    from IdIndex so queries/list() never return deleted docs
  - Real BLAKE2b Merkle head: db_seq_head() hashes all current id-index
    hashes sorted chained with seq — tamper-evident changes on every write
  - DEK passthrough to migrate_if_needed() so encrypted v1 AOFs convert
- Fix parking_lot dep (0.12 not non-existent 1.x)
- rust/nedb-v2 added to rust/ workspace members with Cargo.lock committed
- Bump all version strings to 2.0.3 across pyproject __init__ package.json
  rust workspace Cargo.toml and rust/nedb-v2/Cargo.toml
- CI release.yml: build nedbd-v2 binary per platform stage into Python wheel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant