-
Notifications
You must be signed in to change notification settings - Fork 584
Ci for rosetta block race test #18144
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
base: compatible
Are you sure you want to change the base?
Changes from 5 commits
a85e3ef
15d03f4
676072e
4fe0be1
e665e82
07c7715
ade7600
eda432f
5f28464
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Main purpose of this is script is to wrap around rosetta-block-race.sh | ||
| # So env vars from docker buildkite step are passed down to the script | ||
|
|
||
| LEDGER_URL="https://storage.googleapis.com/o1labs-ci-test-data/ledgers/single-bp-ledger.tar" | ||
| LEDGER_ARCHIVE="ledger.tar" | ||
| LEDGER_DIR="ledger" | ||
|
|
||
| echo "Downloading ledger archive from $LEDGER_URL ..." | ||
| curl -L -o "$LEDGER_ARCHIVE" "$LEDGER_URL" | ||
|
|
||
| mkdir -p "$LEDGER_DIR" | ||
|
|
||
| echo " Extracting ledger archive to $LEDGER_DIR ..." | ||
| tar -xf "$LEDGER_ARCHIVE" -C "$LEDGER_DIR" | ||
|
|
||
| chmod 700 "$LEDGER_DIR" | ||
|
|
||
| sudo apt-get update | ||
| sudo apt-get install -y python3 | ||
|
|
||
| ./scripts/rosetta/test-block-race.sh \ | ||
| --mina-exe /usr/local/bin/mina \ | ||
| --archive-exe /usr/local/bin/mina-archive \ | ||
| --rosetta-exe /usr/local/bin/mina-rosetta \ | ||
| --postgres-uri ${PG_CONN} \ | ||
| --ledger ${LEDGER_DIR} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| let Artifacts = ../Constants/Artifacts.dhall | ||
|
|
||
| let BuildFlags = ../Constants/BuildFlags.dhall | ||
|
|
||
| let Command = ./Base.dhall | ||
|
|
||
| let Size = ./Size.dhall | ||
|
|
||
| let RunWithPostgres = ./RunWithPostgres.dhall | ||
|
|
||
| let key = "rosetta-block-race-test" | ||
|
|
||
| in { step = | ||
| \(dependsOn : List Command.TaggedKey.Type) | ||
| -> Command.build | ||
| Command.Config::{ | ||
| , commands = | ||
| [ RunWithPostgres.runInDockerWithPostgresConn | ||
| ([] : List Text) | ||
| ( Some | ||
| ( RunWithPostgres.ScriptOrArchive.OnlineTarGzDump | ||
| "https://storage.googleapis.com/mina-archive-dumps/mainnet-archive-dump-2025-11-11_0000.sql.tar.gz" | ||
| ) | ||
| ) | ||
| ( Artifacts.fullDockerTag | ||
| Artifacts.Tag::{ | ||
| , artifact = Artifacts.Type.FunctionalTestSuite | ||
| , buildFlags = BuildFlags.Type.Instrumented | ||
| } | ||
| ) | ||
| ( "./buildkite/scripts/tests/rosetta-block-race-test.sh " | ||
| ++ "&& ./buildkite/scripts/upload-partial-coverage-data.sh ${key}" | ||
| ) | ||
| ] | ||
| , label = "Rosetta: Rosetta Block Race test" | ||
| , key = key | ||
| , target = Size.Large | ||
| , depends_on = dependsOn | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| let S = ../../Lib/SelectFiles.dhall | ||
|
|
||
| let Pipeline = ../../Pipeline/Dsl.dhall | ||
|
|
||
| let PipelineTag = ../../Pipeline/Tag.dhall | ||
|
|
||
| let JobSpec = ../../Pipeline/JobSpec.dhall | ||
|
|
||
| let Artifacts = ../../Constants/Artifacts.dhall | ||
|
|
||
| let Dockers = ../../Constants/DockerVersions.dhall | ||
|
|
||
| let BuildFlags = ../../Constants/BuildFlags.dhall | ||
|
|
||
| let RosettaBlockRaceTest = ../../Command/RosettaBlockRaceTest.dhall | ||
|
|
||
| let dependsOn = | ||
| Dockers.dependsOn | ||
| Dockers.DepsSpec::{ | ||
| , artifact = Artifacts.Type.FunctionalTestSuite | ||
| , buildFlags = BuildFlags.Type.Instrumented | ||
| } | ||
|
|
||
| in Pipeline.build | ||
| Pipeline.Config::{ | ||
| , spec = JobSpec::{ | ||
| , dirtyWhen = | ||
| [ S.strictlyStart (S.contains "src") | ||
| , S.exactly "scripts/rosetta/test-block-race-with-data" "sh" | ||
| , S.exactly "scripts/rosetta/test-block-race" "sh" | ||
| , S.exactly "buildkite/scripts/tests/rosetta-block-race-test" "sh" | ||
| , S.exactly "buildkite/src/Jobs/Test/RosettaBlockRaceTest" "dhall" | ||
| , S.exactly "buildkite/src/Command/RosettaBlockRaceTest" "dhall" | ||
| ] | ||
| , path = "Test" | ||
| , name = "RosettaBlockRaceTest" | ||
| , tags = | ||
| [ PipelineTag.Type.Long | ||
| , PipelineTag.Type.Test | ||
| , PipelineTag.Type.Stable | ||
| ] | ||
| } | ||
| , steps = [ RosettaBlockRaceTest.step dependsOn ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,7 +289,7 @@ cp -R "$LEDGER_DIR/ledgers/" genesis | |
| mkdir -p tmp | ||
|
|
||
| echo "Running warmup mina advanced test submit-to-archive (1 block, 1 payment, 0 zkapp)..." | ||
| TMP=tmp MINA_PRIVKEY_PASS="$MINA_EXE" advanced test submit-to-archive \ | ||
| TMP=tmp MINA_PRIVKEY_PASS="" "$MINA_EXE" advanced test submit-to-archive \ | ||
|
||
| --archive-node-port "$ARCHIVE_PORT" \ | ||
| --config-file "$LEDGER_DIR/runtime_config.json" \ | ||
| --privkey-path "$LEDGER_DIR/plain1" \ | ||
|
|
@@ -320,7 +320,7 @@ echo "" | |
| # Run main submit-to-archive test | ||
| echo "[Main Test] Submitting blocks to archive..." | ||
| echo "Running mina advanced test submit-to-archive..." | ||
| TMP=tmp MINA_PRIVKEY_PASS="$MINA_EXE" advanced test submit-to-archive \ | ||
| TMP=tmp MINA_PRIVKEY_PASS="" "$MINA_EXE" advanced test submit-to-archive \ | ||
| --archive-node-port "$ARCHIVE_PORT" \ | ||
| --config-file "$LEDGER_DIR/runtime_config.json" \ | ||
| --privkey-path "$LEDGER_DIR/plain1" \ | ||
|
|
||
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.
Suggest fusing this so we're not wasting I/O to store the tar itself.