Skip to content

Commit dbc185c

Browse files
authored
REMOVE: --validators-proposer-blinded-blocks-enabled tag from Teku Validator Service (#2273)
* ADD: Teku Tag Migration * ADD: Test to workflow
1 parent 0ef18aa commit dbc185c

11 files changed

Lines changed: 171 additions & 1 deletion

File tree

.github/workflows/test-molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
{ role: "update-changes", test: "232" },
7272
{ role: "update-changes", test: "235" },
7373
{ role: "update-changes", test: "241" },
74+
{ role: "update-changes", test: "242" },
7475
]
7576
fail-fast: false
7677
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}

controls/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.1.0"
44
description = "A test environment for testing Ansible roles with Molecule."
55
authors = ["stereum.com"]
66
readme = "README.md"
7+
package-mode = false
78

89
[tool.poetry.dependencies]
910
python = "^3.10"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: Converge
3+
hosts: all
4+
vars_files:
5+
- ../../../../defaults/stereum_defaults.yaml
6+
7+
tasks:
8+
- name: "Include update-changes"
9+
include_role:
10+
name: "update-changes"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
#dependency:
3+
# name: galaxy
4+
driver:
5+
name: docker
6+
platforms:
7+
- name: "update-changes--2.4.2--ubuntu-24.04"
8+
image: ubuntu:noble
9+
# - name: "configure-updates--default--centos-8"
10+
# image: geerlingguy/docker-centos8-ansible
11+
provisioner:
12+
name: ansible
13+
env:
14+
ANSIBLE_PIPELINING: "True"
15+
lint: |
16+
set -e
17+
yamllint .
18+
ansible-lint .
19+
scenario:
20+
test_sequence:
21+
- destroy
22+
- create
23+
- prepare
24+
- converge
25+
- idempotence
26+
- verify
27+
- destroy
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- name: Converge
3+
hosts: all
4+
tasks:
5+
- name: "Include update-changes"
6+
include_role:
7+
name: "update-changes"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
- name: Prepare
3+
hosts: all
4+
tasks:
5+
- name: Make sure Stereum's config path exists
6+
file:
7+
path: "/etc/stereum/services"
8+
state: directory
9+
owner: "root"
10+
group: "root"
11+
mode: 0644
12+
become: yes
13+
14+
- name: Create ValidatorEjectorService config
15+
copy:
16+
dest: "/etc/stereum/services/365500b1-285c-f88d-7d6c-3cde7b3ed973.yaml"
17+
owner: "root"
18+
group: "root"
19+
mode: 0644
20+
content: |
21+
service: TekuValidatorService
22+
id: 365500b1-285c-f88d-7d6c-3cde7b3ed973
23+
configVersion: 1
24+
command:
25+
- vc
26+
- --beacon-node-api-endpoint=http://stereum-5c7d873b-bf84-5b58-ffcc-7d9c115f5365:5051
27+
- --network=hoodi
28+
- --logging=INFO
29+
- --data-path=/opt/app/data
30+
- --validators-keystore-locking-enabled=true
31+
- --validators-proposer-default-fee-recipient=0x0000000000000000000000000000000000000000
32+
- --validators-graffiti-file=/opt/app/graffitis/graffitis.yaml
33+
- --log-destination=CONSOLE
34+
- --metrics-enabled=true
35+
- --metrics-port=8008
36+
- --metrics-interface=0.0.0.0
37+
- --metrics-host-allowlist=*
38+
- --metrics-publish-interval=10
39+
- --validator-api-enabled=true
40+
- --validator-api-port=5052
41+
- --validator-api-host-allowlist=*
42+
- --validator-api-cors-origins=*
43+
- --validator-api-keystore-file=/opt/app/data/teku_api_keystore
44+
- --validator-api-keystore-password-file=/opt/app/data/teku_api_password.txt
45+
- --validators-builder-registration-default-enabled=true
46+
- --validators-proposer-blinded-blocks-enabled=true
47+
- --doppelganger-detection-enabled=true
48+
entrypoint:
49+
- /opt/teku/bin/teku
50+
env:
51+
JAVA_OPTS: -Xmx4g
52+
image: consensys/teku:25.4.1
53+
ports: []
54+
volumes:
55+
- /opt/stereum/teku-365500b1-285c-f88d-7d6c-3cde7b3ed973/data:/opt/app/data
56+
- /opt/stereum/teku-365500b1-285c-f88d-7d6c-3cde7b3ed973/graffitis:/opt/app/graffitis
57+
user: "2000"
58+
autoupdate: true
59+
network: hoodi
60+
dependencies:
61+
executionClients: []
62+
consensusClients:
63+
- service: TekuBeaconService
64+
id: 5c7d873b-bf84-5b58-ffcc-7d9c115f5365
65+
mevboost: []
66+
otherServices: []
67+
become: yes
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
- name: Verify
3+
hosts: all
4+
gather_facts: false
5+
tasks:
6+
# TekuValidatorService
7+
- name: Read TekuValidatorService file
8+
slurp:
9+
src: "/etc/stereum/services/365500b1-285c-f88d-7d6c-3cde7b3ed973.yaml"
10+
register: Teku_service_configuration_raw
11+
12+
- name: Parse Service configurations
13+
set_fact:
14+
Teku_service_configuration: "{{ Teku_service_configuration_raw['content'] | b64decode | from_yaml }}"
15+
16+
- debug:
17+
msg: "{{ Teku_service_configuration }}"
18+
- debug:
19+
msg: "{{ Teku_service_configuration_raw['content'] | b64decode }}"
20+
21+
- assert:
22+
that:
23+
- Teku_service_configuration.command | select('match', '--validators-proposer-blinded-blocks-enabled') | length == 0
24+
# EOF
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
- name: Read service file
3+
slurp:
4+
src: "{{ config_file.path }}"
5+
register: service_configuration_raw
6+
7+
- name: Parse service's configuration
8+
set_fact:
9+
service_configuration: "{{ service_configuration_raw['content'] | b64decode | from_yaml }}"
10+
service_configuration_text: "{{ service_configuration_raw['content'] | b64decode }}"
11+
12+
- name: Teku Changes
13+
when: service_configuration.service == "TekuValidatorService"
14+
block:
15+
- name: remove --validators-proposer-blinded-blocks-enabled
16+
lineinfile:
17+
path: "{{ config_file.path }}"
18+
regex: "--validators-proposer-blinded-blocks-enabled"
19+
state: absent
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
- name: Find service configs
3+
find:
4+
paths: "/etc/stereum/services"
5+
register: service_config_files
6+
7+
- name: Include Teku Changes
8+
include_tasks: teku_changes.yaml
9+
loop: "{{ service_config_files.files }}"
10+
loop_control:
11+
loop_var: config_file

controls/roles/update-changes/tasks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@
99
- name: Include 2.4.1 Update Scripts
1010
include_tasks: "2.4.1/updates-241.yaml"
1111
ignore_errors: yes
12+
13+
- name: Include 2.4.2 Update Scripts
14+
include_tasks: "2.4.2/updates-242.yaml"
15+
ignore_errors: yes
1216
# EOF

0 commit comments

Comments
 (0)