Skip to content

refactor(compose): update compose and start script#2159

Open
Mirko-von-Leipzig wants to merge 9 commits into
mirko/move-syncfrom
mirko/update-docker
Open

refactor(compose): update compose and start script#2159
Mirko-von-Leipzig wants to merge 9 commits into
mirko/move-syncfrom
mirko/update-docker

Conversation

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig commented May 29, 2026

This PR does three deployment related things:

  1. Updates docker compose for the new sequencer/full node split.
  2. Updates run-node.sh.
  3. Attempts to simplify and improve the OTel config.

Updates (1 & 2)

These still used the old rpc, block-producer, store splits.

I also changed the bootstrap behavior from profile genesis to using a sentinel file. This means on startup the bootstrap of each component check the sentinel file, if it exists they do nothing and the network launches. The main benefit here is that we no longer need a separate genesis/bootstrap invocation, simplifying things.

The downside is that if we want to manually bootstrap/configure things then we will need to replicate this. Or we can add a flag that disables this behavior. Either way I think this is the exception, so simplifying the default "bootstrap and run" behavior made sense to me.

There are other minor differences & clean up that I did. So please do double-check this properly; its not a rubber stamp PR :)

Also note that the ntx bootstrap is left TODO as it requires #2158.

OTel changes

The executables now set certain OTel attributes on startup by default, and these can be overridden via the OTel env vars. More concretely:

service.namespace = miden
service.name = node | ntx-builder | validator | prover
# For node only:
miden.node.role = sequencer | full

# For prover only:
miden.prover.kind = transaction | batch | block

Maybe we should use miden.node.kind instead of role?

Further, I've removed the --enable-otel CLI flag, and instead the behavior is inferred by checking the relevant OTel env vars for the URL to send to. This changes from the current behavior where by default OTel will export to localhost:<some-port>. In practice this meant doing --enable-otel true and not setting the url env var resulted in error logs in stdout whenever the otel sdk attempted to upload the traces.

Instead we now activate only if the url env vars are specified. However, maybe this is a poor idea and instead we should change the --enable-otel into --otel.export.trace.url, with the appropriate OTel env var? lmwyt..

@Mirko-von-Leipzig Mirko-von-Leipzig added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label May 29, 2026
@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as ready for review May 29, 2026 12:37
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.

I like the idea of removing --enable-otel and relying on the environment variables instead.

However, there's not quite right with ntx-builder bootstrap in compose & the run script.

Comment thread docker-compose.yml
echo "Bootstrapping network transaction builder..."
miden-ntx-builder bootstrap \
--data-directory /data/ntx-builder \
--genesis-block /data/genesis/genesis.dat
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.

This is not working for me:

Bootstrapping network transaction builder...
error: unexpected argument '--genesis-block' found

Usage: miden-ntx-builder bootstrap --data-directory <DIR> --rpc.url <URL>

For more information, try '--help'.
Shutting down...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Also note that the ntx bootstrap is left TODO as it requires #2158.

Currently the ntx bootstraps from an active node via RPC. I didn't like this, #2160 implements this as a file based system instead.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Or put differently; the order of my PRs are.. a bit out-of-order because I didn't want to rebase too many at once.

Comment thread scripts/run-node.sh

"$NTX_BUILDER_BINARY" bootstrap \
--data-directory "$NTX_BUILDER_DIR" \
--genesis-block "$VALIDATOR_DIR/genesis.dat"
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.

This fails with the following error for me:

error: unexpected argument '--genesis-block' found

Usage: miden-ntx-builder bootstrap --data-directory <DIR> --rpc.url <URL>

For more information, try '--help'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants