Skip to content

feat: Validator binary crate, Dockerfile, and Debian package#2053

Open
sergerad wants to merge 14 commits intonextfrom
sergerad-bin-validator
Open

feat: Validator binary crate, Dockerfile, and Debian package#2053
sergerad wants to merge 14 commits intonextfrom
sergerad-bin-validator

Conversation

@sergerad
Copy link
Copy Markdown
Collaborator

@sergerad sergerad commented May 6, 2026

Relates to #1961.

➜ ./target/debug/miden-validator -h
Miden validator binary

Usage: miden-validator <COMMAND>

Commands:
  bootstrap  Bootstraps the genesis block
  start      Starts the validator component
  help       Print this message or the help of the given subcommand(s)

@sergerad
Copy link
Copy Markdown
Collaborator Author

sergerad commented May 6, 2026

Debian workflow works until release is required, as expected https://github.com/0xMiden/node/actions/runs/25411348891

Copy link
Copy Markdown
Collaborator

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

Choose a reason for hiding this comment

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

I didn't audit the old/moved code in depth, I assume its largely a copy-paste operation.

Comment thread docker-compose.yml Outdated
Comment thread CHANGELOG.md
Comment thread Dockerfile
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.

This will come up a bunch. Should we create separate "base images" for building and runtime?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As far as I understand that's not possible without using some extensions. We could add dockerfile-x though and move the builder and runner image definitions to a common Dockerfile referenced by the per-service Dockerfiles.

Copy link
Copy Markdown
Collaborator Author

@sergerad sergerad May 7, 2026

Choose a reason for hiding this comment

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

I have gone with a merged Dockerfile with ARGs for bin and port. Might not be flexible enough for us in the end, but it might be (same will work fine for the ntx-builder image).

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.

Lets see how it goes. I don't like that it assumes the binaries are the same and can be coupled like this.

I think what I was assuming originally is that we would publish build and runtime base images. I don't understand why that isn't possible; isn't that how

FROM rust:1.93-slim-bookworm AS chef

exist?

Comment thread bin/validator/.env
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.

I would really like if we could get rid of these. They're a pain to maintain.

I guess this could be done in tandem with removing Debian packages once we move to docker ourselves?

Comment thread bin/validator/src/main.rs Outdated
@sergerad sergerad requested a review from Mirko-von-Leipzig May 7, 2026 01:25
Copy link
Copy Markdown
Contributor

@kkovaacs kkovaacs left a comment

Choose a reason for hiding this comment

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

Just two comments:

  • bin/genesis/README.md still has a reference to miden-node validator bootstrap which is now gone.
  • Similarly, scripts/run-node.sh still tries to bootstrap with miden-node validator bootstrap, so it's effectively broken.

Comment thread bin/validator/Cargo.toml
homepage.workspace = true
keywords = ["miden", "validator"]
license.workspace = true
name = "miden-validator"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I saw a comment from @Mirko-von-Leipzig regarding naming somewhere: it does feel strange to have both miden-node-validator and miden-validator crates.

One potential option is to have both library and binary targets in the miden-node-validator crate - but I'm not sure if that's a good idea.

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.

4 participants