diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c3c93b57..5dfab74ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,6 +73,9 @@ jobs: - run: name: Check docs command: python docs/check.py ./ + - run: + name: Check conformance commits + command: conformance/scripts/verify-commits.sh build_linux: executor: linux-executor @@ -275,10 +278,11 @@ jobs: - run: name: Setup solana-conformance command: | + . conformance/commits.env git clone https://github.com/firedancer-io/solana-conformance --depth 1 cd solana-conformance/ - git fetch origin d2bcbdc4b21d52d4579e87516d3eaad651e9f455 - git checkout d2bcbdc4b21d52d4579e87516d3eaad651e9f455 + git fetch origin $SOLANA_CONFORMANCE_COMMIT + git checkout $SOLANA_CONFORMANCE_COMMIT sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt install -y python3.11 python3.11-dev python3.11-venv rename @@ -292,10 +296,11 @@ jobs: name: Checkout Test Vectors command: | if [ ! -d "test-vectors" ]; then + . conformance/commits.env git clone https://github.com/firedancer-io/test-vectors --depth 1 cd test-vectors - git fetch origin 233b764514a3cd35adf986e0b9967946d486c987 - git checkout 233b764514a3cd35adf986e0b9967946d486c987 + git fetch origin $TEST_VECTORS_COMMIT + git checkout $TEST_VECTORS_COMMIT # We need each fixture file to have a unique name so that we can put them into the test-inputs directory # in a "flat" manner. The problem is that there are just too many files and it exceeds ARG_MAX for a single diff --git a/conformance/commits.env b/conformance/commits.env new file mode 100644 index 000000000..08d3ec129 --- /dev/null +++ b/conformance/commits.env @@ -0,0 +1,11 @@ +# The commits currently used in CI for sig's conformance with agave. + +SOLANA_CONFORMANCE_COMMIT=d2bcbdc4b21d52d4579e87516d3eaad651e9f455 +TEST_VECTORS_COMMIT=233b764514a3cd35adf986e0b9967946d486c987 +SOLFUZZ_AGAVE_COMMIT=cef278ea3216bde6ea7fe760a89217560c2da856 + +# protosol definitions needed for the above commit of solfuzz-agave +AGAVE_PROTOSOL_COMMIT=7064b0b09062de4d2e24ee4709cbe160e541bb0e + +# protosol definitions used for sig +SIG_PROTOSOL_COMMIT=90ec31a506593fc9574d2c09f76e64d202b23124 diff --git a/conformance/scripts/verify-commits.sh b/conformance/scripts/verify-commits.sh new file mode 100755 index 000000000..83c327690 --- /dev/null +++ b/conformance/scripts/verify-commits.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail + +# This script is a basic sanity check that the commit hashes in commits.env are +# consistent with our CI configuration. It's not perfect but checks for some +# obvious inconsistencies. + +trap 'echo ❌ Failed to verify conformance commit at $LINENO: $BASH_COMMAND' ERR + +# ensure working directory is repository root +cd $(dirname "${BASH_SOURCE[0]}")/../.. + +. conformance/commits.env + +test $(grep -c "test-vectors-$TEST_VECTORS_COMMIT" .circleci/config.yml) -eq 2 +grep "solfuzz-agave: $SOLFUZZ_AGAVE_COMMIT" conformance/scripts/download_artifacts.sh > /dev/null +grep "// current commit: $SIG_PROTOSOL_COMMIT" conformance/build.zig > /dev/null + +echo ✅ Verified conformance commits.