-
-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add support for the CI env for e2e tests (#5488)
* Add support for the CI env for e2e tests * Update the port number e2e tests node * Update the script * Update the e2e script * Stop the e2e tests env * Update the script to stop env * Add a timeout for port * Redirect nohup output * Redirect nohup output * Update the process signal * Move the run bash script to a file * Remove the unwanted wait time * Update the variaable name * Update the script name * Update the test env * Update the e2e env to start from capella * Increase the genesis delay * Pass three epoch to fix the sync comittee availability * Increase the wait epoch * Wait for the 3rd epoch * Increase timeout * Add lodestar preset value * Fix env variable * Set the forks in incremental sequence * Increase the timeout * Move wait logic to test file * Fix the geth version * Allow to pass custom config to support custom network * Fix lint error * Add minimal preset for the e2e tests
- Loading branch information
1 parent
e053608
commit 0e93c07
Showing
20 changed files
with
236 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import path from "node:path"; | ||
import {CLClient, ELClient} from "../utils/simulation/interfaces.js"; | ||
import {SimulationEnvironment} from "../utils/simulation/SimulationEnvironment.js"; | ||
import {getEstimatedTTD, logFilesDir} from "../utils/simulation/utils/index.js"; | ||
import {connectAllNodes} from "../utils/simulation/utils/network.js"; | ||
|
||
const secondsPerSlot = 4; | ||
const cliqueSealingPeriod = 5; | ||
const genesisDelaySeconds = 30 * secondsPerSlot; | ||
const altairForkEpoch = 1; | ||
const bellatrixForkEpoch = 2; | ||
const capellaForkEpoch = 3; | ||
// Make sure bellatrix started before TTD reach | ||
const additionalSlotsForTTD = 2; | ||
|
||
const ttd = getEstimatedTTD({ | ||
genesisDelaySeconds, | ||
bellatrixForkEpoch, | ||
secondsPerSlot, | ||
cliqueSealingPeriod, | ||
additionalSlots: additionalSlotsForTTD, | ||
}); | ||
|
||
const env = await SimulationEnvironment.initWithDefaults( | ||
{ | ||
id: "e2e-test-env", | ||
logsDir: path.join(logFilesDir, "e2e-test-env"), | ||
chainConfig: { | ||
ALTAIR_FORK_EPOCH: altairForkEpoch, | ||
BELLATRIX_FORK_EPOCH: bellatrixForkEpoch, | ||
CAPELLA_FORK_EPOCH: capellaForkEpoch, | ||
GENESIS_DELAY: genesisDelaySeconds, | ||
TERMINAL_TOTAL_DIFFICULTY: ttd, | ||
}, | ||
}, | ||
[ | ||
{id: "node-1", cl: CLClient.Lodestar, el: ELClient.Geth, keysCount: 32, mining: true}, | ||
{id: "node-2", cl: CLClient.Lodestar, el: ELClient.Nethermind, keysCount: 32}, | ||
] | ||
); | ||
|
||
await env.start({runTimeoutMs: 0}); | ||
await connectAllNodes(env.nodes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.