diff --git a/.github/tests/mix-assert.yaml b/.github/tests/mix-assert.yaml new file mode 100644 index 000000000..d1be13155 --- /dev/null +++ b/.github/tests/mix-assert.yaml @@ -0,0 +1,18 @@ +participants: + - el_type: geth + cl_type: teku + - el_type: nethermind + cl_type: prysm + - el_type: erigon + cl_type: nimbus + - el_type: besu + cl_type: lighthouse + - el_type: reth + cl_type: lodestar + - el_type: nimbus + cl_type: grandine +additional_services: + - assertoor +assertoor_params: + run_stability_check: false + run_block_proposal_check: true diff --git a/.github/workflows/per-pr.yml b/.github/workflows/per-pr.yml index a3993e125..b331395d8 100644 --- a/.github/workflows/per-pr.yml +++ b/.github/workflows/per-pr.yml @@ -66,3 +66,54 @@ jobs: - name: Kurtosis Lint run: kurtosis lint ${{ github.workspace }} + + assertoor: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup 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 kurtosis-cli + kurtosis analytics disable + + - name: Run Starlark + run: kurtosis run ${{ github.workspace }} --enclave assertoor-${{ github.run_id }} --args-file ./.github/tests/mix-assert.yaml --image-download always --non-blocking-tasks --verbosity DETAILED + + - name: Assertoor Status Check + id: test_result + uses: ethpandaops/assertoor-github-action@v1 + with: + kurtosis_enclave_name: "assertoor-${{ github.run_id }}" + + - name: Return test result + shell: bash + run: | + test_result="${{ steps.test_result.outputs.result }}" + test_status=$( + cat <<"EOF" + ${{ steps.test_result.outputs.test_overview }} + EOF + ) + failed_test_status=$( + cat <<"EOF" + ${{ steps.test_result.outputs.failed_test_details }} + EOF + ) + echo "Test Result: $test_result" + echo "$test_status" + + if ! [ "$test_result" == "success" ]; then + echo "" + echo "Failed Test Task Status:" + echo "$failed_test_status" + + echo "" + echo "See 'Await test completion' task for detailed logs about this failure!" + echo "" + + exit 1 # fail action + fi diff --git a/src/cl/cl_context.star b/src/cl/cl_context.star index d388952ed..d54d4fbe8 100644 --- a/src/cl/cl_context.star +++ b/src/cl/cl_context.star @@ -4,6 +4,7 @@ def new_cl_context( beacon_http_url, cl_nodes_metrics_info, beacon_service_name, + beacon_grpc_url="", multiaddr="", peer_id="", snooper_enabled=False, @@ -16,6 +17,7 @@ def new_cl_context( beacon_http_url=beacon_http_url, cl_nodes_metrics_info=cl_nodes_metrics_info, beacon_service_name=beacon_service_name, + beacon_grpc_url=beacon_grpc_url, multiaddr=multiaddr, peer_id=peer_id, snooper_enabled=snooper_enabled, diff --git a/src/cl/prysm/prysm_launcher.star b/src/cl/prysm/prysm_launcher.star index 24ccac488..0b4d59723 100644 --- a/src/cl/prysm/prysm_launcher.star +++ b/src/cl/prysm/prysm_launcher.star @@ -148,13 +148,9 @@ def launch( beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID] - beacon_http_endpoint = "http://{0}:{1}".format( - beacon_service.ip_address, HTTP_PORT_NUM - ) - beacon_rpc_endpoint = "http://{0}:{1}".format( - beacon_service.ip_address, RPC_PORT_NUM - ) - beacon_http_url = beacon_rpc_endpoint + beacon_http_url = "http://{0}:{1}".format(beacon_service.ip_address, HTTP_PORT_NUM) + beacon_grpc_url = "{0}:{1}".format(beacon_service.ip_address, RPC_PORT_NUM) + # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module beacon_node_identity_recipe = GetHttpRequestRecipe( endpoint="/eth/v1/node/identity", @@ -187,6 +183,7 @@ def launch( beacon_http_url, nodes_metrics_info, beacon_service_name, + beacon_grpc_url, beacon_multiaddr, beacon_peer_id, snooper_enabled, diff --git a/src/vc/prysm.star b/src/vc/prysm.star index 2dac1dd22..45af2f274 100644 --- a/src/vc/prysm.star +++ b/src/vc/prysm.star @@ -36,15 +36,16 @@ def get_config( prysm_password_relative_filepath, ) - beacon_http_url = beacon_http_url[7:] # remove the "http://" + if cl_context.client_name != constants.CL_TYPE.prysm: + beacon_grpc_url = beacon_http_url[7:] # remove the "http://" prefix cmd = [ "--accept-terms-of-use=true", # it's mandatory in order to run the node "--chain-config-file=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/config.yaml", - "--beacon-rpc-provider=" + beacon_http_url, - "--beacon-rest-api-provider=" + beacon_http_url, + "--beacon-rpc-provider=" + cl_context.beacon_grpc_url, + "--beacon-rest-api-provider=" + cl_context.beacon_grpc_url, "--wallet-dir=" + validator_keys_dirpath, "--wallet-password-file=" + validator_secrets_dirpath, "--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,