Merge pull request #115 from IntersectMBO/bash_imp2
feat(scripts): enforce required env vars and switch to C-style for loops
feat(scripts): enforce required env vars and switch to C-style for loops
* ouroboros-network-1.0.0.0 - allow trace-dispatcher-2.12.0 * ouroboros-network-1.1.0.0 - allow trace-dispatcher-2.11.0 * cardano-diffusion-1.0.0.0 - allow trace-dispatcher-2.11.0
Refactor such that each example from an era is build on top of the example of the previous era. Allows: * reduced duplication * each example of each era has most fields set with values
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
On multi-era chains, Byron slots are 20s each while Shelley+ slots are 1s. Using fixedEpochInfo for L2 Globals produces wrong POSIXTime values in the Plutus ScriptContext, which can cause time-sensitive scripts (Close, Contest, Fanout) to fail. For online (Cardano) mode, query the chain's EraHistory and use it to build an era-aware EpochInfo via newGlobalsWithEraHistory. Offline mode keeps fixedEpochInfo since it runs a single-era devnet. Signed-off-by: Sasha Bogicevic <[email protected]>
Fetch and patch peer-snapshot.json for Preproduction (in addition to Mainnet and Preview) so the node can bootstrap peers and start syncing within the test's 10-second window. Also update Preview and Preproduction config paths from environments-pre/ to environments/ to match the current layout on book.world.dev.cardano.org, and increase the CommitRecovered wait timeout in canSeePendingDeposits to 20 block times to tolerate slower networks. Signed-off-by: Sasha Bogicevic <[email protected]>
Since `ContextError`s are never stored and their reporting doesn't need to be efficient (we always optimize for the positive case with valid transactions, as invalid transactions don't propagate through the network), there's no need for strictness annotations on the error constructors. This change removes the bang patterns (!) from: - AlonzoContextError - BabbageContextError - ConwayContextError - DijkstraContextError
From https://github.com/Quid2/flat at 3014e2dde892635c4f46037ba929ec514e0f130f
From https://github.com/hedgehogqa/haskell-hedgehog at 4c5424db30eee67423ddd80745d03e487a223ade
From https://github.com/input-output-hk/hedgehog-extras at 0d9784e29a2b0d2514a019341a1b498ab5b8e9ef
- Replace `seq`-based for loops with C-style for loops using `${VAR:?}` to ensure required environment variables are set, improving error handling and script robustness.
- Add `:?` parameter expansion to critical variables (e.g., `STATE_CLUSTER`, `NETWORK_MAGIC`, `DREP_DEPOSIT`, etc.) throughout scripts to fail fast if unset.
- Update file and directory references to consistently use `${VAR:?}` for safety.
- Improves maintainability and prevents silent failures due to unset or empty variables in cluster management scripts.