Skip to content
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

E2E smoke test with nitro components running separately #50

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,16 @@ function writeConfigs(argv: any) {
"vhosts": "*",
"corsdomain": "*"
},
}
} as any

if (argv.espresso) {
let config = baseConfig as any
config.node['block-validator']["espresso"] = false
config.node['block-validator']["light-client-address"] = ""
config.node["batch-poster"]["hotshot-url"] = ""
config.node["batch-poster"]["light-client-address"] = ""
config.node["transaction-streamer"] = {
baseConfig.node['block-validator']["espresso"] = false
baseConfig.node['block-validator']["light-client-address"] = ""
baseConfig.node["batch-poster"]["hotshot-url"] = ""
baseConfig.node["batch-poster"]["light-client-address"] = ""
baseConfig.node["transaction-streamer"] = {
"sovereign-sequencer-enabled": false,
"hotshot-url": "",
"hotshot-url": argv.espressoUrl,
"espresso-namespace": 412346,
}
}
Expand All @@ -278,10 +277,6 @@ function writeConfigs(argv: any) {
simpleConfig.node["delayed-sequencer"].enable = true
simpleConfig.node["batch-poster"].enable = true
simpleConfig.node["batch-poster"]["redis-url"] = ""
if (argv.espresso) {
simpleConfig.node["transaction-streamer"]["hotshot-url"] = argv.espressoUrl
simpleConfig.node["transaction-streamer"]["sovereign-sequencer-enabled"] = true
}
simpleConfig.execution["sequencer"].enable = true
fs.writeFileSync(path.join(consts.configpath, "sequencer_config.json"), JSON.stringify(simpleConfig))
} else {
Expand Down
22 changes: 22 additions & 0 deletions smoke-test-seperate-components.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail

# no-simple runs a full
./test-node.bash --espresso --latest-espresso-image --validate --tokenbridge --init-force --detach --no-simple

# Sending L2 transaction
./test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait

rollupAddress=$(docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'")
while true; do
confirmed=$(cast call --rpc-url http://localhost:8545 $rollupAddress 'latestConfirmed()(uint256)')
echo "Number of confirmed staking nodes: $confirmed"
if [ "$confirmed" -gt 0 ]; then
break
else
echo "Waiting for more confirmed nodes ..."
fi
sleep 5
done

docker compose down