-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: multi-network ci #6162
feat: multi-network ci #6162
Conversation
When formally implementing compiler features, the setting of the `TARI_NETWORK` and (from now) `TARI_TARGET_NETWORK` envar and the related compiler flags matter. These changes require that when tests run, the correct network flags are set. For example, `blocks::genesis_block::test::stagenet_genesis_sanity_check` should only run when `TARI_NETWORK=stagenet`. The current setup reveals a problem: There is not a 1:1 mapping between the build _target_ and the actual network the binary may run on. E.g. the mainnet build can run on either stagenet or mainnet. Unfortunately the `TARI_NETWORK` envar was used to set both of these variables. Since these are 2 different things, this commit introduced `TARI_TARGET_NETWORK` which sets the **build target**. In most contexts, this then decouples the configured network, which is specified by the `TARI_NETWORK` envar as usual. The other changes in this commit revolve around updating merkle roots and the correct faucet sets to make the target/network/faucet combination consistent. The CI is configured to run tests for each of `{target} ({network})` * Testnet (Esme) * Nextnet (Nextnet) * Mainnet (Stagenet)
Test Results (CI) 3 files 117 suites 37m 32s ⏱️ Results for commit 1b1ba8b. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow looks good - utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, just one question about the tests,
I cant seem to find any test for the esme gen block anymore?
// Note: Generate new data for `pub fn get_esmeralda_genesis_block()` and `fn get_esmeralda_genesis_block_raw()` | ||
// if consensus values change, e.g. new faucet or other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Note: Generate new data for `pub fn get_esmeralda_genesis_block()` and `fn get_esmeralda_genesis_block_raw()` | |
// if consensus values change, e.g. new faucet or other |
@@ -399,11 +393,13 @@ mod test { | |||
} | |||
|
|||
#[test] | |||
fn esmeralda_genesis_sanity_check() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont see a test for esmeralda anymore?
We only have one for nextnet and stagenet
When formally implementing compiler features, the setting of the
TARI_NETWORK
and (from now)TARI_TARGET_NETWORK
envar and the related compiler flags matter.These changes require that when tests run, the correct network flags are set.
For example,
blocks::genesis_block::test::stagenet_genesis_sanity_check
should only run whenTARI_NETWORK=stagenet
.The current setup reveals a problem:
There is not a 1:1 mapping between the build target and the actual network the binary may run on. E.g. the mainnet build can run on either stagenet or mainnet.
Unfortunately the
TARI_NETWORK
envar was used to set both of these variables.Since these are 2 different things, this commit introduced
TARI_TARGET_NETWORK
which sets the build target. In most contexts, this then decouples the configured network, which is specified by theTARI_NETWORK
envar as usual.The other changes in this commit revolve around updating merkle roots and the correct faucet sets to make the target/network/faucet combination consistent.
The CI is configured to run tests for each of
{target} ({network})
Description
This replaces part of #6131
Breaking Changes