Conversation
b3b85c1 to
5a66c6e
Compare
|
Should we also tackle #1431 as a part of this PR? |
I would do it separately. I'm thinking of making a few more changes here - moving the env vars to more specific modules so there will be a few more diffs. |
Mirko-von-Leipzig
left a comment
There was a problem hiding this comment.
I would like to see a conf implementation as well.
This could be a follow-up PR, or even a PoC PR on top of this one.
Primarily what I'm hoping for is that we don't need const for these things at all except for the prefixless exceptions you listed. We previously had the const because they got used multiple times (due to bundled mode), but now they can just be strings in the actual derive macro which is much easier to understand imo.
I'm approving because I think this is an improvement over the status quo, but I think we can do better potentially.
There was a problem hiding this comment.
tbh I still don't understand why we want this file to exist?
The only source of truth is miden-node --help.
There was a problem hiding this comment.
For an easy copy paste into infra repo. Just a bit less manual and error prone this way. Still not ideal though
Closes #1456.
MIDEN_NODE_[component]_[setting]naming convention for all env vars (except universal ones likeMIDEN_NODE_DATA_DIRECTORYandMIDEN_NODE_ENABLE_OTEL)MIDEN_NODE_prefix to env vars that lacked itMIDEN_NODE_STORE_RPC_URLMIDEN_NODE_RPC_STORE_URL(RPC connect) /MIDEN_NODE_STORE_RPC_URL(store listen)MIDEN_NODE_STORE_NTX_BUILDER_URLMIDEN_NODE_NTX_BUILDER_STORE_URL(NTX builder connect) /MIDEN_NODE_STORE_NTX_BUILDER_URL(store listen)MIDEN_NODE_STORE_BLOCK_PRODUCER_URLMIDEN_NODE_BLOCK_PRODUCER_STORE_URL(block producer connect) /MIDEN_NODE_STORE_BLOCK_PRODUCER_URL(store listen)MIDEN_NODE_VALIDATOR_BLOCK_PRODUCER_URLMIDEN_NODE_BLOCK_PRODUCER_VALIDATOR_URLMIDEN_NODE_BATCH_PROVER_URLMIDEN_NODE_BLOCK_PRODUCER_BATCH_PROVER_URLMIDEN_NODE_BLOCK_PROVER_URLMIDEN_NODE_STORE_BLOCK_PROVER_URLMIDEN_NODE_NTX_PROVER_URLMIDEN_NODE_NTX_BUILDER_NTX_PROVER_URLMIDEN_MAX_TXS_PER_BATCHMIDEN_NODE_BLOCK_PRODUCER_MAX_TXS_PER_BATCHMIDEN_MAX_BATCHES_PER_BLOCKMIDEN_NODE_BLOCK_PRODUCER_MAX_BATCHES_PER_BLOCKMIDEN_NODE_MEMPOOL_TX_CAPACITYMIDEN_NODE_BLOCK_PRODUCER_MEMPOOL_TX_CAPACITYMIDEN_NTX_DATA_STORE_SCRIPT_CACHE_SIZEMIDEN_NODE_NTX_BUILDER_SCRIPT_CACHE_SIZEMIDEN_NODE_NTX_DATA_DIRECTORYMIDEN_NODE_DATA_DIRECTORYMIDEN_NTX_MAX_CYCLESMIDEN_NODE_NTX_BUILDER_MAX_CYCLESMIDEN_GENESIS_CONFIG_FILEMIDEN_NODE_VALIDATOR_GENESIS_CONFIG_FILE