Skip to content

ntx-builder: move to sqlite framework - #2353

Open
SantiagoPittella wants to merge 19 commits into
nextfrom
migrate-ntx-builder-off-diesel
Open

ntx-builder: move to sqlite framework#2353
SantiagoPittella wants to merge 19 commits into
nextfrom
migrate-ntx-builder-off-diesel

Conversation

@SantiagoPittella

@SantiagoPittella SantiagoPittella commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

closes #2250

Summary

Migrates the ntx-builder database layer off Diesel and onto the shared miden-node-db SQLite framework.

Why:

  • Removes the last Diesel dependency and its schema/codegen tooling from the ntx-builder.
  • Unifies persistence on one connection-pool + transaction model across the node.

How:

  • Replaces the Diesel query modules with plain query functions over ReadTx/WriteTx and hand-written SQL in db/sql/.
  • Drops the pinned "loop connection"; writes now serialize through the framework's single writer connection, reads use the shared reader pool.
  • On-disk layout is unchanged (same to_bytes()/read_from_bytes() codec, same 001_initial.sql schema), so existing databases stay compatible.

Changelog

changelog = "none"
reason    = "Internal change only."

@Mirko-von-Leipzig Mirko-von-Leipzig changed the title chore: mvoe ntx-builder to sqlite framework ntx-builder: move to sqlite framework Jul 17, 2026
Comment thread bin/ntx-builder/src/db/queries/note_scripts.rs Outdated
Comment thread bin/ntx-builder/src/db/queries/mod.rs Outdated
Comment thread bin/ntx-builder/src/lib.rs
@SantiagoPittella
SantiagoPittella requested a review from igamigo July 27, 2026 13:54

@Mirko-von-Leipzig Mirko-von-Leipzig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment thread crates/db/src/sqlite/pool.rs
@SantiagoPittella

Copy link
Copy Markdown
Collaborator Author

@Mirko-von-Leipzig should I merge or wait for some other approve?

@kkovaacs kkovaacs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

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.

Migrate ntx-builder off diesel

3 participants