Skip to content
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

feat: add stressnet profile with more nodes #123

Merged
merged 39 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9139626
feat: add stressnet profile with more nodes
May 31, 2024
3742116
feat: add stressnet profile with more nodes
May 31, 2024
b4a2f87
fix: add 1 to allocation index
May 31, 2024
11131ed
fix: add 1 to allocation index
May 31, 2024
4fbd7c2
fix: add 1 to allocation index
May 31, 2024
e11311b
fix: add 1 to allocation index
May 31, 2024
dd1d602
fix: add 1 to allocation index
May 31, 2024
df973b8
fix: add 1 to allocation index
May 31, 2024
10bf864
fix: add 1 to allocation index
May 31, 2024
3e79d28
fix: restore datadog
May 31, 2024
0d1188d
fix: restore datadog
May 31, 2024
9e6104b
fix: raw tags
May 31, 2024
3eb613a
fix: metrics endpoint and add winners
Jun 1, 2024
dca3e4e
fix: close handshake stream
Jun 1, 2024
d5cba88
fix: oracle job
Jun 1, 2024
e701b2b
fix: dont use prefix based range
Jun 2, 2024
6c1604f
fix: dont use prefix based range
Jun 2, 2024
2254a1e
fix: dont use prefix based range
Jun 2, 2024
94d3dfc
fix: dont use prefix based range
Jun 2, 2024
5249731
fix: dont use prefix based range
Jun 2, 2024
4cce132
fix: dont use prefix based range
Jun 2, 2024
fe69a69
fix: dont use prefix based range
Jun 2, 2024
3c03fa7
fix: window adjustment
Jun 3, 2024
5a3bce5
chore: stressnet memory inc (#128)
Mikelle Jun 3, 2024
4322b87
chore: moved unlock acc to init function (#130)
Mikelle Jun 3, 2024
9c69bcb
fix: add more stress
Jun 3, 2024
a556034
fix: tracker test
Jun 3, 2024
16f511e
fix: add deposits in advance
Jun 4, 2024
81260b3
fix: use unlocked key
Jun 4, 2024
df79487
fix: conditionally set resources
Jun 4, 2024
c4d9dd9
fix: info log for status
Jun 4, 2024
5b887f6
fix: use simple encrypted keysigner
Jun 4, 2024
f9c4d5b
fix: get failed txn traces
Jun 4, 2024
f8351e2
fix: get failed txn traces
Jun 4, 2024
0603de4
fix: get failed txn traces
Jun 4, 2024
940457c
revert: keystore signer
Jun 4, 2024
17c335b
revert: keystore signer
Jun 4, 2024
adb2f80
fix: devnet
Jun 5, 2024
8ccee3c
fix: flaky test
Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/infrstructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
options:
- devnet
- testnet
- stressnet
default: 'devnet'
init:
description: 'Initialize'
Expand Down
1 change: 1 addition & 0 deletions infrastructure/nomad/playbooks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
label: "{{ item.name }}"
vars:
job: "{{ item }}"
profile: "{{ profile }}"
when: build_templates is not defined or build_templates

- name: Create "version.txt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,27 @@ job "{{ job.name }}" {
{{- range nomadService "mev-commit-provider-node1" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: "mev-commit-provider-node1"
service: {{ .Name }}
metrics:
- mev_commit*
- go*
- libp2p*
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-provider-node2" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
- go*
- libp2p*
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-provider-node3" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
- go*
Expand All @@ -105,7 +125,47 @@ job "{{ job.name }}" {
{{- range nomadService "mev-commit-bidder-node1" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: "mev-commit-bidder-node1"
service: {{ .Name }}
metrics:
- mev_commit*
- go*
- libp2p*
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-bidder-node2" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
- go*
- libp2p*
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-bidder-node3" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
- go*
- libp2p*
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-bidder-node4" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
- go*
- libp2p*
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-bidder-node5" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: https://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
- go*
Expand Down Expand Up @@ -196,7 +256,7 @@ job "{{ job.name }}" {
{{- range nomadService "mev-commit-provider-emulator-node1" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: http://{{ .Address }}:{{ .Port }}/metrics
service: "mev-commit-provider-emulator-node1"
service: {{ .Name }}
metrics:
- mev_commit*
{{- end }}
Expand All @@ -205,7 +265,24 @@ job "{{ job.name }}" {
{{- range nomadService "mev-commit-bidder-emulator-node1" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: http://{{ .Address }}:{{ .Port }}/metrics
service: "mev-commit-bidder-emulator-node1"
service: {{ .Name }}
metrics:
- mev_commit*
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-provider-emulator-nodes" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: http://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
{{- end }}
{{- end }}

{{- range nomadService "mev-commit-bidder-emulator-nodes" }}
{{- if contains "metrics" .Tags }}
- openmetrics_endpoint: http://{{ .Address }}:{{ .Port }}/metrics
service: {{ .Name }}
metrics:
- mev_commit*
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ job "{{ job.name }}" {
if job.get('env') and job.env.get('log-tags')
else 'service:' + job.name + '-{{ env "NOMAD_ALLOC_INDEX" }}'
}}"

{%- raw %}
{{- range nomadService "{% endraw %}{{ job.target_name }}{% raw %}" }}
{{- $idx := add (env "NOMAD_ALLOC_INDEX" | parseInt) 1 }}
{{- range nomadService (printf "%s%d" "{% endraw %}{{ job.target_name }}{% raw %}" $idx) }}
{{- if contains "rpc" .Tags }}
EMULATOR_IP_PORT="{{ .Address }}:{{ .Port }}"
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ job "{{ job.name }}" {
{{ end }}
{{- end }}

{{- range nomadService "{% endraw %}{{ job.target_name }}{% raw %}" }}
{{- $idx := add (env "NOMAD_ALLOC_INDEX" | parseInt) 1 }}
{{- range nomadService (printf "%s%d" "{% endraw %}{{ job.target_name }}{% raw %}" $idx) }}
{{- if contains "http" .Tags }}
START_TIME=$(date +%s)
TIMEOUT=60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ job "{{ job.name }}" {
}
{% endfor %}

{% if profile == 'stressnet' %}
resources {
memory = 16384
}
{% endif %}

artifact {
source = "https://primev-infrastructure-artifacts.s3.us-west-2.amazonaws.com/mev-commit-geth_{{ version }}_Linux_x86_64.tar.gz"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ job "{{ job.name }}" {
sidecar = true
}

{% if profile == 'stressnet' %}
resources {
memory = 4096
}
{% endif %}

template {
data = <<-EOH
{%- raw %}
Expand Down Expand Up @@ -119,6 +125,12 @@ job "{{ job.name }}" {
source = "https://primev-infrastructure-artifacts.s3.us-west-2.amazonaws.com/contracts_{{ version }}.tar.gz"
}

{% if profile == 'stressnet' %}
resources {
memory = 1024
}
{% endif %}

template {
data = <<-EOH
KEYSTOREGEN_LOG_FMT="{{ job.env.get('log-format', 'json') }}"
Expand All @@ -144,7 +156,7 @@ job "{{ job.name }}" {
MEV_ORACLE_HTTP_PORT="{{ .Port }}"
{{- end }}
{{- end }}
{{- range nomadService "mev-commit-geth-bootnode1" }}
{{- range nomadService "mev-commit-geth-member-node" }}
{{- if contains "http" .Tags }}
MEV_ORACLE_SETTLEMENT_RPC_URL_HTTP="http://{{ .Address }}:{{ .Port }}"
{{- end }}
Expand All @@ -171,23 +183,53 @@ job "{{ job.name }}" {
data = <<-EOH
#!/usr/bin/env bash
{%- raw %}
ADDRESSES = ""
{{- range nomadService "mev-commit-provider-node1" }}
{{ if contains "http" .Tags }}
TOPOLOGY=$(curl https://{{ .Address}}:{{ .Port }}/v1/debug/topology)
PROVIDER_ETHEREUM_ADDRESS=$(echo ${TOPOLOGY} | jq -r '.topology.self["Ethereum Address"]')
export MEV_ORACLE_OVERRIDE_WINNERS=${PROVIDER_ETHEREUM_ADDRESS}
if [ -z "${ADDRESSES}" ]; then
ADDRESSES="${PROVIDER_ETHEREUM_ADDRESS}"
else
ADDRESSES="${ADDRESSES},${PROVIDER_ETHEREUM_ADDRESS}"
fi
{{ end }}
{{- end }}
{% endraw %}
{{- range nomadService "mev-commit-provider-node2" }}
{{ if contains "http" .Tags }}
TOPOLOGY=$(curl https://{{ .Address}}:{{ .Port }}/v1/debug/topology)
PROVIDER_ETHEREUM_ADDRESS=$(echo ${TOPOLOGY} | jq -r '.topology.self["Ethereum Address"]')
if [ -z "${ADDRESSES}" ]; then
ADDRESSES="${PROVIDER_ETHEREUM_ADDRESS}"
else
ADDRESSES="${ADDRESSES},${PROVIDER_ETHEREUM_ADDRESS}"
fi
{{ end }}
{{- end }}
{{- range nomadService "mev-commit-provider-node3" }}
{{ if contains "http" .Tags }}
TOPOLOGY=$(curl https://{{ .Address}}:{{ .Port }}/v1/debug/topology)
PROVIDER_ETHEREUM_ADDRESS=$(echo ${TOPOLOGY} | jq -r '.topology.self["Ethereum Address"]')
if [ -z "${ADDRESSES}" ]; then
ADDRESSES="${PROVIDER_ETHEREUM_ADDRESS}"
else
ADDRESSES="${ADDRESSES},${PROVIDER_ETHEREUM_ADDRESS}"
fi
{{ end }}
{{- end }}

{%- raw %}
{{- range nomadService "datadog-agent-logs-collector" }}
{{ if contains "tcp" .Tags }}
exec > >(nc {{ .Address }} {{ .Port }}) 2>&1
{{ end }}
{{- end }}
{% endraw %}

if [ ! -z "${ADDRESSES}" ]; then
echo "starting mev-oracle with override winners ${ADDRESSES}"
export MEV_ORACLE_OVERRIDE_WINNERS=${ADDRESSES}
fi

if [ ! -d "${MEV_ORACLE_KEYSTORE_PATH}" ]; then
mkdir -p "${MEV_ORACLE_KEYSTORE_PATH}" > /dev/null 2>&1
mv local/contracts/deployer_keystore/* "${MEV_ORACLE_KEYSTORE_PATH}/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ job "{{ job.name }}" {
source = "https://primev-infrastructure-artifacts.s3.us-west-2.amazonaws.com/keystore-generator_{{ version }}_Linux_x86_64.tar.gz"
}

{% if profile == 'stressnet' %}
resources {
memory = 1024
}
{% endif %}

template {
data = <<-EOH
KEYSTOREGEN_LOG_FMT="{{ job.env.get('log-format', 'json') }}"
Expand Down
Loading
Loading