Skip to content

Commit

Permalink
first commit default stack
Browse files Browse the repository at this point in the history
  • Loading branch information
avenbreaks committed May 3, 2024
0 parents commit f49c258
Show file tree
Hide file tree
Showing 175 changed files with 27,951 additions and 0 deletions.
171 changes: 171 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
version: 2.1

orbs:
kurtosis-docs-checker: kurtosis-tech/docs-checker@0.2.3

executors:
ubuntu_vm:
machine:
image: ubuntu-2204:current

parameters:
should-enable-check-latest-version-workflow:
type: boolean
default: false
# To enable/disabled the check_code workflow execution which will be triggered by the PR's checkers
should-enable-build-workflow:
type: boolean
default: true
kurtosis-cluster-setting-abs-filepath:
type: string
default: "/home/circleci/.local/share/kurtosis/cluster-setting"


# Install go version 1.19 to run our integration tests on the minimal version we support
setup_kurtosis: &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
kurtosis engine restart
# Steps to prepare a job for Kubernetes testing (with K3S K8S distribution)
setup_kurtosis_k3s: &setup_kurtosis_k3s
pre-steps:
- run:
name: Install Kurtosis
command: |
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
- run:
name: Install K3D and create the K3D/K3S cluster on Docker
command: |
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
k3d cluster create --servers 1 --no-lb --wait --verbose
# Edit the Kurtosis config file in order to have K3S cluster configuration
- run:
name: Add K3S cluster config in Kurtosis config file
command: |
KURTOSIS_CONFIG_FILEPATH=$(kurtosis config path)
cat \<< EOF > "$KURTOSIS_CONFIG_FILEPATH"
config-version: 2
should-send-metrics: true
kurtosis-clusters:
docker:
type: docker
k3d-k3s-default:
type: kubernetes
config:
kubernetes-cluster-name: k3d-k3s-default
storage-class: local-path
enclave-size-in-megabytes: 2048
EOF
# Set the K3S cluster with some previous steps to force this cluster type in the cluster-setting file. This save us to start the engine with the cluster set command
# because we are going to start it on the next step
- run:
name: Set K3S Kurtosis cluster
command: |
KURTOSIS_CLUSTER_SETTING_FILEPATH="<< pipeline.parameters.kurtosis-cluster-setting-abs-filepath >>"
echo -n "k3d-k3s-default" > "$KURTOSIS_CLUSTER_SETTING_FILEPATH"
echo "Kurtosis cluster-setting file content: $(cat $KURTOSIS_CLUSTER_SETTING_FILEPATH)"
kurtosis cluster set k3d-k3s-default --cli-log-level trace
- run:
name: Start Kurtosis engine in K8s backend
command: |
kurtosis engine start --enclave-pool-size 2
- run:
name: Run Kurtosis gateway
command: "kurtosis gateway"
background: true


# NOTE: Because CircleCI jobs run on separate machines from each other, we duplicate steps (like checkout) between jobs. This is because doing the "correct" DRY
# refactoring of, "one job for checkout, one job for build Docker image, etc." would require a) persisting files between jobs and b) persisting Docker images between
# jobs. Both are annoying (saving/loading workspaces require re-downloading the workspace over the network, and there doesn't seem to be a good way to do Docker
# images), so we run everything inside a single job.
# See also: https://discuss.circleci.com/t/can-docker-images-be-preserved-between-jobs-in-a-workflow-without-a-manual-load-save/23388/12
jobs:
run_starlark_arm64:
executor: ubuntu_vm
resource_class: arm.medium
steps:
- <<: *setup_kurtosis
- checkout
- run: kurtosis run ${PWD}

mev_k8s:
executor: ubuntu_vm
steps:
- checkout
- run: kurtosis run ${PWD} --verbosity detailed --args-file=./.github/tests/mev.yaml

mix_with_tools_k8s:
resource_class: xlarge
executor: ubuntu_vm
steps:
- checkout
- run: kurtosis run ${PWD} --verbosity detailed --args-file=./.github/tests/mev.yaml

mix_persistence_k8s:
resource_class: xlarge
executor: ubuntu_vm
steps:
- checkout
- run: kurtosis run ${PWD} "$(cat ./.github/tests/mix-persistence-k8s.yaml)"

workflows:
nightly_tests:
when: << pipeline.parameters.should-enable-check-latest-version-workflow >>
jobs:
- mev_k8s:
<<: *setup_kurtosis_k3s
- mix_with_tools_k8s:
<<: *setup_kurtosis_k3s

per_pr_test:
when: << pipeline.parameters.should-enable-build-workflow >>
jobs:
- kurtosis-docs-checker/check-docs:
should-check-changelog: false
markdown-link-check-config-json: |
{
"ignorePatterns": [
{
"pattern": "https://github.com/kurtosis-tech/ethereum-package"
}
]
}
filters:
branches:
ignore:
- main

- run_starlark_arm64:
filters:
branches:
ignore:
- main

- mev_k8s:
<<: *setup_kurtosis_k3s
filters:
branches:
ignore:
- main

- mix_with_tools_k8s:
<<: *setup_kurtosis_k3s
filters:
branches:
ignore:
- main

- mix_persistence_k8s:
<<: *setup_kurtosis_k3s
filters:
branches:
ignore:
- main
37 changes: 37 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# This is the top-most .editorconfig file (do not search in parent directories)
root = true

# 4 space indentation for all starlark files
[*.star]
indent_style = space
indent_size = 4

# 4 space indentation for all python files
[*.py]

# 2 space indentation for all yaml files
[*.yml, *.yaml]
indent_style = space
indent_size = 2

# 2 space indentation for all json files
[*.json]
indent_style = space
indent_size = 2

[*.yaml]
indent_style = space
indent_size = 2
11 changes: 11 additions & 0 deletions .github/remove_trailing_space.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This is used by the pr-description-update action
# to trim trailing newlines and spaces in pr descriptions

import sys

def remove():
line = sys.argv[1]
return line.strip()

if __name__ == "__main__":
print(remove())
2 changes: 2 additions & 0 deletions .github/tests/apache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
additional_services:
- apache
9 changes: 9 additions & 0 deletions .github/tests/assertoor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
participants:
- el_type: geth
cl_type: lighthouse
count: 1
- el_type: geth
cl_type: lodestar
count: 1
additional_services:
- assertoor
14 changes: 14 additions & 0 deletions .github/tests/besu-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
participants:
- el_type: geth
cl_type: teku
- el_type: geth
cl_type: teku
- el_type: besu
cl_type: prysm
- el_type: besu
cl_type: nimbus
- el_type: besu
cl_type: lighthouse
- el_type: besu
cl_type: lodestar
additional_services: []
18 changes: 18 additions & 0 deletions .github/tests/blobber.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
participants:
- el_type: geth
el_image: ethpandaops/geth:master
cl_type: lighthouse
blobber_enabled: true
blobber_extra_params:
- --proposal-action-frequency=1
- "--proposal-action={\"name\": \"blob_gossip_delay\", \"delay_milliseconds\": 1500}"
count: 1
- el_type: geth
el_image: ethpandaops/geth:master
cl_type: lodestar
count: 1
network_params:
deneb_fork_epoch: 1
additional_services:
- dora
- blob_spammer
16 changes: 16 additions & 0 deletions .github/tests/dencun-genesis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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: ethereumjs
cl_type: teku
network_params:
deneb_fork_epoch: 0
additional_services: []
15 changes: 15 additions & 0 deletions .github/tests/disable-peer-scoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
participants:
- el_type: geth
cl_type: teku
- el_type: besu
cl_type: lighthouse
- el_type: reth
cl_type: lodestar
- el_type: erigon
cl_type: nimbus
- el_type: nethermind
cl_type: prysm
- el_type: ethereumjs
cl_type: teku
additional_services: []
disable_peer_scoring: true
16 changes: 16 additions & 0 deletions .github/tests/ephemery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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: ethereumjs
cl_type: teku
network_params:
network: "ephemery"
additional_services: []
12 changes: 12 additions & 0 deletions .github/tests/erigon-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
participants:
- el_type: erigon
cl_type: teku
- el_type: erigon
cl_type: prysm
- el_type: erigon
cl_type: nimbus
- el_type: erigon
cl_type: lighthouse
- el_type: erigon
cl_type: lodestar
additional_services: []
12 changes: 12 additions & 0 deletions .github/tests/ethereumjs-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
participants:
- el_type: ethereumjs
cl_type: teku
- el_type: ethereumjs
cl_type: prysm
- el_type: ethereumjs
cl_type: nimbus
- el_type: ethereumjs
cl_type: lighthouse
- el_type: ethereumjs
cl_type: lodestar
additional_services: []
12 changes: 12 additions & 0 deletions .github/tests/geth-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
participants:
- el_type: geth
cl_type: teku
- el_type: geth
cl_type: prysm
- el_type: geth
cl_type: nimbus
- el_type: geth
cl_type: lighthouse
- el_type: geth
cl_type: lodestar
additional_services: []
14 changes: 14 additions & 0 deletions .github/tests/grandine-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
participants:
- el_type: geth
cl_type: grandine
- el_type: nethermind
cl_type: grandine
- el_type: erigon
cl_type: grandine
- el_type: besu
cl_type: grandine
- el_type: reth
cl_type: grandine
- el_type: ethereumjs
cl_type: grandine
additional_services: []
16 changes: 16 additions & 0 deletions .github/tests/holesky-shadowfork-verkle.yaml_norun
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
participants:
- el_type: geth
el_image: ethpandaops/geth:transition-post-genesis-04b0304
cl_type: lighthouse
cl_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
- el_type: geth
el_image: ethpandaops/geth:transition-post-genesis-04b0304
cl_type: lodestar
cl_image: ethpandaops/lodestar:g11tech-verge-815364b
network_params:
electra_fork_epoch: 1
network: holesky-shadowfork-verkle
additional_services:
- dora
snooper_enabled: true
persistent: true
Loading

0 comments on commit f49c258

Please sign in to comment.