From 6e4ed4c9cf86ebfb9cde972b30590b4eddc51aa9 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 2 Sep 2025 13:02:55 +0530 Subject: [PATCH 1/9] local testnet ci workflow --- .github/workflows/local-testnet.yml | 65 +++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/local-testnet.yml diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml new file mode 100644 index 000000000..e08735be9 --- /dev/null +++ b/.github/workflows/local-testnet.yml @@ -0,0 +1,65 @@ +name: local testnet + +on: + push: + branches: + - stable + - 'pr/*' + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + merge_group: + +jobs: + build-docker-image: + runs-on: ubuntu-latest # warp-docker-builder + steps: + - uses: actions/checkout@v5 + + - name: Build Docker Image + # has to be Dockerfile.devnet as spec-minimal is necessary + run: | + docker build -f Dockerfile.devnet -t node/anchor:latest . + docker save node/anchor:latest -o anchor-docker.tar + + - name: Upload Docker Image Artifact + uses: actions/upload-artifact@v4 + with: + name: anchor-docker + path: anchor-docker.tar + retention-days: 1 + + run-local-testnet: + runs-on: ubuntu-latest # warp-ubuntu-latest-x64-16x + needs: build-docker-image + steps: + - uses: actions/checkout@v5 + with: + repository: lmnzx/ssv-mini # change to dknopik/ssv-mini + ref: more-fixes # change to fixes + + # could be a potential issue as apt.fury.io is not stable, switch to using binary if happens + - name: Install Kurtosis + run: | + echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list + sudo apt update + sudo apt install -y kurtosis-cli + kurtosis analytics disable + + - name: Download Docker Image Artifact + uses: actions/download-artifact@v5 + with: + name: anchor-docker + path: . + + - name: Load Docker Image + run: docker load -i anchor-docker.tar + + - name: Start Local Testnet with Assertoor + timeout-minutes: 30 + run: make run + + - name: Await Assertoor test result + id: assertoor_test_result + uses: ethpandaops/assertoor-github-action@v1 + with: + kurtosis_enclave_name: localnet \ No newline at end of file From 0031fe2aa48102ee90c4de7bb352c235137b1840 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 2 Sep 2025 13:54:45 +0530 Subject: [PATCH 2/9] more logging --- .github/workflows/local-testnet.yml | 41 ++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml index e08735be9..f907f4de4 100644 --- a/.github/workflows/local-testnet.yml +++ b/.github/workflows/local-testnet.yml @@ -11,7 +11,7 @@ on: jobs: build-docker-image: - runs-on: ubuntu-latest # warp-docker-builder + runs-on: ubuntu-latest # warp-ubuntu-latest-x64-16x steps: - uses: actions/checkout@v5 @@ -58,8 +58,43 @@ jobs: timeout-minutes: 30 run: make run - - name: Await Assertoor test result + - name: Await Assertoor Test Result id: assertoor_test_result uses: ethpandaops/assertoor-github-action@v1 with: - kurtosis_enclave_name: localnet \ No newline at end of file + kurtosis_enclave_name: localnet + + - name: Return Assertoor Test Result + shell: bash + run: | + test_result="${{ steps.assertoor_test_result.outputs.result }}" + test_status=$( + cat <<"EOF" + ${{ steps.assertoor_test_result.outputs.test_overview }} + EOF + ) + failed_test_status=$( + cat <<"EOF" + ${{ steps.assertoor_test_result.outputs.failed_test_details }} + EOF + ) + + echo "Test Result: $test_result" + echo "$test_status" + if ! [ "$test_result" == "success" ]; then + echo "Failed Test Task Status:" + echo "$failed_test_status" + exit 1 + fi + + - name: Kurtosis Dump + if: always() + run: kurtosis enclave dump localnet anchor-localnet-test-logs + + - name: Upload Logs Artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: anchor-localnet-test-logs + path: anchor-localnet-test-logs/ + retention-days: 3 \ No newline at end of file From b3dcec80dd623f3df1d8466657dffc353a8e9f08 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 2 Sep 2025 15:13:12 +0530 Subject: [PATCH 3/9] updated the runners and using dknopik/ssv-mini for the localnet tests --- .github/workflows/local-testnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml index f907f4de4..c3da7d5b8 100644 --- a/.github/workflows/local-testnet.yml +++ b/.github/workflows/local-testnet.yml @@ -11,7 +11,7 @@ on: jobs: build-docker-image: - runs-on: ubuntu-latest # warp-ubuntu-latest-x64-16x + runs-on: warp-ubuntu-latest-x64-16x steps: - uses: actions/checkout@v5 @@ -29,13 +29,13 @@ jobs: retention-days: 1 run-local-testnet: - runs-on: ubuntu-latest # warp-ubuntu-latest-x64-16x + runs-on: warp-ubuntu-latest-x64-16x needs: build-docker-image steps: - uses: actions/checkout@v5 with: - repository: lmnzx/ssv-mini # change to dknopik/ssv-mini - ref: more-fixes # change to fixes + repository: dknopik/ssv-mini + ref: fixes # could be a potential issue as apt.fury.io is not stable, switch to using binary if happens - name: Install Kurtosis From 85b241f6d12bac6522a0c6cd1b02cefccb6d2ef3 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 2 Sep 2025 17:28:50 +0530 Subject: [PATCH 4/9] new line at EOF --- .github/workflows/local-testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml index c3da7d5b8..e07cf3a80 100644 --- a/.github/workflows/local-testnet.yml +++ b/.github/workflows/local-testnet.yml @@ -97,4 +97,4 @@ jobs: with: name: anchor-localnet-test-logs path: anchor-localnet-test-logs/ - retention-days: 3 \ No newline at end of file + retention-days: 3 From c75339b4e8956cb2ab98bbec33e0bafa9973c9b0 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 4 Sep 2025 18:02:31 +0530 Subject: [PATCH 5/9] using a specfic commit hash --- .github/workflows/local-testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml index e07cf3a80..e439395b1 100644 --- a/.github/workflows/local-testnet.yml +++ b/.github/workflows/local-testnet.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v5 with: repository: dknopik/ssv-mini - ref: fixes + ref: c33c49418ff0722ef0722763bbf0849a6aba2849 # could be a potential issue as apt.fury.io is not stable, switch to using binary if happens - name: Install Kurtosis From a01245bc7521c7c525a802c7bc87d423b349e8f3 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 4 Sep 2025 18:16:50 +0530 Subject: [PATCH 6/9] downloading kurtosis from github --- .github/workflows/local-testnet.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml index e439395b1..424c16701 100644 --- a/.github/workflows/local-testnet.yml +++ b/.github/workflows/local-testnet.yml @@ -37,12 +37,13 @@ jobs: repository: dknopik/ssv-mini ref: c33c49418ff0722ef0722763bbf0849a6aba2849 - # could be a potential issue as apt.fury.io is not stable, switch to using binary if happens - name: Install Kurtosis run: | - echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list - sudo apt update - sudo apt install -y kurtosis-cli + KURTOSIS_VERSION=$(curl -s https://api.github.com/repos/kurtosis-tech/kurtosis/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + curl -L "https://github.com/kurtosis-tech/kurtosis/releases/download/${KURTOSIS_VERSION}/kurtosis-cli_${KURTOSIS_VERSION}_linux_amd64.tar.gz" -o kurtosis.tar.gz + tar -xzf kurtosis.tar.gz + sudo mv kurtosis /usr/local/bin/ + chmod +x /usr/local/bin/kurtosis kurtosis analytics disable - name: Download Docker Image Artifact From 704ea0eb2734b0046abe17d01252dd98b5ba1966 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 4 Sep 2025 18:26:41 +0530 Subject: [PATCH 7/9] fixing the url to the cli artifact --- .github/workflows/local-testnet.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml index 424c16701..bbb93a2b7 100644 --- a/.github/workflows/local-testnet.yml +++ b/.github/workflows/local-testnet.yml @@ -39,11 +39,12 @@ jobs: - name: Install Kurtosis run: | - KURTOSIS_VERSION=$(curl -s https://api.github.com/repos/kurtosis-tech/kurtosis/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') - curl -L "https://github.com/kurtosis-tech/kurtosis/releases/download/${KURTOSIS_VERSION}/kurtosis-cli_${KURTOSIS_VERSION}_linux_amd64.tar.gz" -o kurtosis.tar.gz + KURTOSIS_VERSION=$(curl -s https://api.github.com/repos/kurtosis-tech/kurtosis-cli-release-artifacts/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + echo "Installing Kurtosis version: ${KURTOSIS_VERSION}" + curl -L "https://github.com/kurtosis-tech/kurtosis-cli-release-artifacts/releases/download/${KURTOSIS_VERSION}/kurtosis-cli_${KURTOSIS_VERSION}_linux_amd64.tar.gz" -o kurtosis.tar.gz tar -xzf kurtosis.tar.gz sudo mv kurtosis /usr/local/bin/ - chmod +x /usr/local/bin/kurtosis + sudo chmod +x /usr/local/bin/kurtosis kurtosis analytics disable - name: Download Docker Image Artifact From ffd004b6697001bb72a7b6ae3e3f2cdc4483246b Mon Sep 17 00:00:00 2001 From: Daniel Knopik Date: Wed, 10 Sep 2025 16:38:43 +0200 Subject: [PATCH 8/9] BREAK PROPOSALS :burn: --- anchor/validator_store/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/anchor/validator_store/src/lib.rs b/anchor/validator_store/src/lib.rs index d7dead80c..d23418cff 100644 --- a/anchor/validator_store/src/lib.rs +++ b/anchor/validator_store/src/lib.rs @@ -404,7 +404,7 @@ impl AnchorValidatorStore { } let signing_root = block.signing_root(domain_hash); - let signature = self + let mut signature = self .collect_signature( PartialSignatureKind::PostConsensus, Role::Proposer, @@ -415,6 +415,11 @@ impl AnchorValidatorStore { header.slot, ) .await?; + + // ein salat ist am leckersten wenn man ihn kurz vorm servieren durch ein saftiges steak + // ersetzt + signature = Signature::empty(); + Ok(signable_block.to_signed_block(signature)) } From 25766fb9507e1a692d47fe69b4f166156e783b26 Mon Sep 17 00:00:00 2001 From: Daniel Knopik Date: Wed, 10 Sep 2025 16:39:59 +0200 Subject: [PATCH 9/9] fix clippy --- anchor/validator_store/src/lib.rs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/anchor/validator_store/src/lib.rs b/anchor/validator_store/src/lib.rs index d23418cff..0235007e2 100644 --- a/anchor/validator_store/src/lib.rs +++ b/anchor/validator_store/src/lib.rs @@ -404,21 +404,20 @@ impl AnchorValidatorStore { } let signing_root = block.signing_root(domain_hash); - let mut signature = self - .collect_signature( - PartialSignatureKind::PostConsensus, - Role::Proposer, - CollectionMode::SingleValidator, - validator, - cluster, - signing_root, - header.slot, - ) - .await?; + self.collect_signature( + PartialSignatureKind::PostConsensus, + Role::Proposer, + CollectionMode::SingleValidator, + validator, + cluster, + signing_root, + header.slot, + ) + .await?; // ein salat ist am leckersten wenn man ihn kurz vorm servieren durch ein saftiges steak // ersetzt - signature = Signature::empty(); + let signature = Signature::empty(); Ok(signable_block.to_signed_block(signature)) }