Skip to content

refactor(config): align env var names with cartesi/rollups-node#19

Merged
stephenctw merged 1 commit into
mainfrom
feature/cartesi-env-naming
Jun 29, 2026
Merged

refactor(config): align env var names with cartesi/rollups-node#19
stephenctw merged 1 commit into
mainfrom
feature/cartesi-env-naming

Conversation

@stephenctw

Copy link
Copy Markdown
Collaborator

Rename sequencer and watchdog environment variables to the CARTESI__ convention used by cartesi/rollups-node, per Enderson's review feedback:

  • SEQ_* -> CARTESI_SEQUENCER_*
  • WATCHDOG_* -> CARTESI_WATCHDOG_*

Where a value maps to a rollups-node concept, adopt its canonical suffix so the same thing has the same name across the stack (no duplicates):

  • *_ETH_RPC_URL / *_L1_RPC_URL -> *_BLOCKCHAIN_HTTP_ENDPOINT
  • *_CHAIN_ID -> *_BLOCKCHAIN_ID
  • *_INPUTBOX_ADDRESS -> *_CONTRACTS_INPUT_BOX_ADDRESS
  • *_BATCH_SUBMITTER_PRIVATE_KEY[_FILE] -> *_AUTH_PRIVATE_KEY[_FILE]

Rename sequencer and watchdog environment variables to the
CARTESI_<COMPONENT>_<SETTING> convention used by cartesi/rollups-node,
per Enderson's review feedback:

- SEQ_*      -> CARTESI_SEQUENCER_*
- WATCHDOG_* -> CARTESI_WATCHDOG_*

Where a value maps to a rollups-node concept, adopt its canonical suffix
so the same thing has the same name across the stack (no duplicates):

- *_ETH_RPC_URL / *_L1_RPC_URL    -> *_BLOCKCHAIN_HTTP_ENDPOINT
- *_CHAIN_ID                       -> *_BLOCKCHAIN_ID
- *_INPUTBOX_ADDRESS              -> *_CONTRACTS_INPUT_BOX_ADDRESS
- *_BATCH_SUBMITTER_PRIVATE_KEY[_FILE] -> *_AUTH_PRIVATE_KEY[_FILE]

CLI long flags and internal struct/field names are unchanged; only the
env-var bindings, Lua/shell readers, tests, and docs are updated. Demo
client-script vars (tests/scripts/.env, docs/live-demo.md) are a separate
namespace and left as-is.

Verified: cargo fmt/clippy clean, cargo test --workspace, 37/37 watchdog
lua tests, divergence drill pass.
@stephenctw stephenctw self-assigned this Jun 29, 2026

@endersonmaia endersonmaia left a comment

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.

LGTM

I have minor comments about naming, that even using the conventions adopted in the rollups-node I don't think we have it solved.

I see that in the we use _ADDR to define the HOST:PORTtuple the daemon will listen for connection, where at rollups-node we use _ADDRESS.

We could adhere to _ADDRESS but then we may create a confusion, that already exisits in the node if it's a network address or a blockchain address. Inthe nome, it's solved with the suffix/section _CONTRACTS_, but I'm afraid we increase the name of the variable too much.

So it's up to you make the decision of this minor changes, the way it is now with this PR is good enough for me.

@stephenctw

Copy link
Copy Markdown
Collaborator Author

Thanks @endersonmaia! Good point on the _ADDR vs _ADDRESS inconsistency with rollups-node. Agreed it's worth aligning, but since it's non-blocking let's merge this one as-is and revisit the naming convention (and the network-vs-blockchain-address ambiguity) in a follow-up.

@stephenctw stephenctw merged commit 704d7d2 into main Jun 29, 2026
8 checks passed
@GCdePaula GCdePaula deleted the feature/cartesi-env-naming branch June 29, 2026 22:44
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.

2 participants