refactor(config): align env var names with cartesi/rollups-node#19
Conversation
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.
endersonmaia
left a comment
There was a problem hiding this comment.
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.
|
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. |
Rename sequencer and watchdog environment variables to the CARTESI__ convention used by cartesi/rollups-node, per Enderson's review feedback:
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):