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

ADD: Update Scripts and Changes to new Setups #2091

Merged
merged 8 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
237 changes: 228 additions & 9 deletions controls/roles/update-changes/molecule/223/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
tasks:
- name: Make sure Stereum's config path exists
file:
path: '/etc/stereum/services'
path: "/etc/stereum/services"
state: directory
owner: 'root'
group: 'root'
owner: "root"
group: "root"
mode: 0644
become: yes

- name: Create ValidatorEjectorService config
copy:
dest: '/etc/stereum/services/15ce3684-4dbd-4657-8a21-b1243b72b1ca.yaml'
owner: 'root'
group: 'root'
dest: "/etc/stereum/services/15ce3684-4dbd-4657-8a21-b1243b72b1ca.yaml"
owner: "root"
group: "root"
mode: 0644
content: |
service: ValidatorEjectorService
Expand Down Expand Up @@ -63,9 +63,9 @@

- name: Create ValidatorEjectorService config
copy:
dest: '/etc/stereum/services/41b15ea7-12d4-49f6-8448-8a6164edef36.yaml'
owner: 'root'
group: 'root'
dest: "/etc/stereum/services/41b15ea7-12d4-49f6-8448-8a6164edef36.yaml"
owner: "root"
group: "root"
mode: 0644
content: |
service: ValidatorEjectorService
Expand Down Expand Up @@ -102,4 +102,223 @@
mevboost: []
otherServices: []
become: yes

- name: Create ErigonService config
copy:
dest: "/etc/stereum/services/b180d035-f390-d644-5fae-6671659dbcdb.yaml"
owner: "root"
group: "root"
mode: 0644
content: |
service: ErigonService
id: b180d035-f390-d644-5fae-6671659dbcdb
configVersion: 1
command:
- erigon
- --chain=holesky
- --datadir=/opt/data/erigon
- --authrpc.addr=0.0.0.0
- --authrpc.vhosts=*
- --authrpc.port=8551
- --authrpc.jwtsecret=/engine.jwt
- --rpc.returndata.limit=1000000
- --ws
- --http
- --http.vhosts=*
- --http.corsdomain=*
- --http.addr=0.0.0.0
- --http.port=8545
- --http.api=engine,net,eth,web3
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --db.pagesize=16K
- --db.size.limit=8TB
- --prune=htc
entrypoint: []
env: {}
image: thorax/erigon:v2.60.8
ports:
- 0.0.0.0:30303:30303/tcp
- 0.0.0.0:30303:30303/udp
- 127.0.0.1:8545:8545/tcp
- 127.0.0.1:8546:8546/tcp
volumes:
- /opt/stereum/erigon-b180d035-f390-d644-5fae-6671659dbcdb/data:/opt/data/erigon
- /opt/stereum/erigon-b180d035-f390-d644-5fae-6671659dbcdb/engine.jwt:/engine.jwt
user: root
autoupdate: true
network: holesky
dependencies:
executionClients: []
consensusClients: []
mevboost: []
otherServices: []
become: yes

- name: Create ErigonService config
copy:
dest: "/etc/stereum/services/580c2c43-ad2a-405d-ab78-eb3678383f59.yaml"
owner: "root"
group: "root"
mode: 0644
content: |
service: ErigonService
id: 580c2c43-ad2a-405d-ab78-eb3678383f59
configVersion: 1
command:
- erigon
- --chain=holesky
- --datadir=/opt/data/erigon
- --authrpc.addr=0.0.0.0
- --authrpc.vhosts=*
- --authrpc.port=8551
- --authrpc.jwtsecret=/engine.jwt
- --rpc.returndata.limit=1000000
- --ws
- --http
- --http.vhosts=*
- --http.corsdomain=*
- --http.addr=0.0.0.0
- --http.port=8545
- --http.api=engine,net,eth,web3
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --db.pagesize=16K
- --db.size.limit=8TB
- --prune=htc
entrypoint: []
env: {}
image: erigontech/erigon:v2.60.8
ports:
- 0.0.0.0:30303:30303/tcp
- 0.0.0.0:30303:30303/udp
- 127.0.0.1:8545:8545/tcp
- 127.0.0.1:8546:8546/tcp
volumes:
- /opt/stereum/erigon-580c2c43-ad2a-405d-ab78-eb3678383f59/data:/opt/data/erigon
- /opt/stereum/erigon-580c2c43-ad2a-405d-ab78-eb3678383f59/engine.jwt:/engine.jwt
user: root
autoupdate: true
network: holesky
dependencies:
executionClients: []
consensusClients: []
mevboost: []
otherServices: []
become: yes

- name: Create ValidatorEjectorService config
copy:
dest: "/etc/stereum/services/3911cf56-f350-5fc7-dded-1d08da1a9954.yaml"
owner: "root"
group: "root"
mode: 0644
content: |
service: ValidatorEjectorService
id: 3911cf56-f350-5fc7-dded-1d08da1a9954
configVersion: 1
command: []
entrypoint: []
env:
EXECUTION_NODE: ""
CONSENSUS_NODE: ""
LOCATOR_ADDRESS: "0x28FAB2059C713A7F9D8c86Db49f9bb0e96Af1ef8"
STAKING_MODULE_ID: "1"
OPERATOR_ID: "123456789"
MESSAGES_LOCATION: /app/messages
ORACLE_ADDRESSES_ALLOWLIST: '["0x12A1D74F8697b9f4F1eEBb0a9d0FB6a751366399",
"0xD892c09b556b547c80B7d8c8cB8d75bf541B2284",
"0xf7aE520e99ed3C41180B5E12681d31Aa7302E4e5",
"0x31fa51343297FFce0CC1E67a50B2D3428057D1b1",
"0x81E411f1BFDa43493D7994F82fb61A415F6b8Fd4",
"0x4c75FA734a39f3a21C57e583c1c29942F021C6B7",
"0xD3b1e36A372Ca250eefF61f90E833Ca070559970",
"0xF0F23944EfC5A63c53632C571E7377b85d5E6B6f",
"0xb29dD2f6672C0DFF2d2f173087739A42877A5172",
"0x3799bDA7B884D33F79CEC926af21160dc47fbe05"]'
HTTP_PORT: "8989"
RUN_METRICS: "true"
RUN_HEALTH_CHECK: "true"
DRY_RUN: "false"
image: lidofinance/validator-ejector:1.6.0
ports: []
volumes:
- /opt/stereum/validatorejector-3911cf56-f350-5fc7-dded-1d08da1a9954/messages:/app/messages
user: "2000"
autoupdate: true
network: holesky
dependencies:
executionClients: []
consensusClients: []
mevboost: []
otherServices: []
become: yes

- name: Create FlashbotsMevBoostService config
copy:
dest: "/etc/stereum/services/5c9c2120-03dc-ffa3-30a8-7faf61f09a3d.yaml"
owner: "root"
group: "root"
mode: 0644
content: |
service: FlashbotsMevBoostService
id: 5c9c2120-03dc-ffa3-30a8-7faf61f09a3d
configVersion: 1
command: []
entrypoint:
- /app/mev-boost
- -addr
- 0.0.0.0:18550
- -holesky
- -relay-check
- -relays
- https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz,https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-stag.ultrasound.money,https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.holesky.blxrbdn.com,https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net,https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7c0406754376c2c8285a36c630346aa5c5f833@holesky.aestus.live,https://0xb1d229d9c21298a87846c7022ebeef277dfc321fe674fa45312e20b5b6c400bfde9383f801848d7837ed5fc449083a12@relay-holesky.edennetwork.io
env: {}
image: flashbots/mev-boost:1.8
ports: []
volumes: []
user: "2000"
autoupdate: true
network: holesky
dependencies:
executionClients: []
consensusClients: []
mevboost: []
otherServices: []
become: yes

- name: Create FlashbotsMevBoostService config
copy:
dest: "/etc/stereum/services/4fee6e50-1fe2-533c-8ec2-e23b83e3236c.yaml"
owner: "root"
group: "root"
mode: 0644
content: |
service: FlashbotsMevBoostService
id: 4fee6e50-1fe2-533c-8ec2-e23b83e3236c
configVersion: 1
command: []
entrypoint:
- /app/mev-boost
- -addr
- 0.0.0.0:18550
- -holesky
- -relay-check
- -relays
- https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7c0406754376c2c8285a36c630346aa5c5f833@holesky.aestus.live,https://0xb1d229d9c21298a87846c7022ebeef277dfc321fe674fa45312e20b5b6c400bfde9383f801848d7837ed5fc449083a12@relay-holesky.edennetwork.io,https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.holesky.blxrbdn.com,https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net,https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-stag.ultrasound.money,https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz
env: {}
image: flashbots/mev-boost:1.8
ports: []
volumes: []
user: "2000"
autoupdate: true
network: holesky
dependencies:
executionClients: []
consensusClients: []
mevboost: []
otherServices: []
become: yes
#EOF
74 changes: 70 additions & 4 deletions controls/roles/update-changes/molecule/223/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,100 @@
# ValidatorEjectorService
- name: Read ValidatorEjectorService file
slurp:
src: '/etc/stereum/services/15ce3684-4dbd-4657-8a21-b1243b72b1ca.yaml'
src: "/etc/stereum/services/15ce3684-4dbd-4657-8a21-b1243b72b1ca.yaml"
register: Ejector_service_configuration_raw

# ValidatorEjectorService2
- name: Read ValidatorEjectorService file
slurp:
src: '/etc/stereum/services/41b15ea7-12d4-49f6-8448-8a6164edef36.yaml'
src: "/etc/stereum/services/41b15ea7-12d4-49f6-8448-8a6164edef36.yaml"
register: Ejector_service_configuration2_raw

# ValidatorEjectorService3
- name: Read ValidatorEjectorService file
slurp:
src: "/etc/stereum/services/3911cf56-f350-5fc7-dded-1d08da1a9954.yaml"
register: Ejector_service_configuration3_raw

# ErigonService
- name: Read ErigonService file
slurp:
src: "/etc/stereum/services/b180d035-f390-d644-5fae-6671659dbcdb.yaml"
register: Erigon_service_configuration_raw

# ErigonService2
- name: Read ErigonService file
slurp:
src: "/etc/stereum/services/580c2c43-ad2a-405d-ab78-eb3678383f59.yaml"
register: Erigon_service_configuration2_raw

# FlashbotsMevBoostService
- name: Read FlashbotsMevBoostService file
slurp:
src: "/etc/stereum/services/5c9c2120-03dc-ffa3-30a8-7faf61f09a3d.yaml"
register: Mev_service_configuration_raw

# FlashbotsMevBoostService
- name: Read FlashbotsMevBoostService file
slurp:
src: "/etc/stereum/services/4fee6e50-1fe2-533c-8ec2-e23b83e3236c.yaml"
register: Mev_service_configuration2_raw

- name: Parse Service configurations
set_fact:
Ejector_service_configuration: "{{ Ejector_service_configuration_raw['content'] | b64decode | from_yaml }}"
Ejector_service_configuration2: "{{ Ejector_service_configuration2_raw['content'] | b64decode | from_yaml }}"
Ejector_service_configuration3: "{{ Ejector_service_configuration3_raw['content'] | b64decode | from_yaml }}"
Erigon_service_configuration: "{{ Erigon_service_configuration_raw['content'] | b64decode | from_yaml }}"
Erigon_service_configuration2: "{{ Erigon_service_configuration2_raw['content'] | b64decode | from_yaml }}"
Mev_service_configuration: "{{ Mev_service_configuration_raw['content'] | b64decode | from_yaml }}"
Mev_service_configuration2: "{{ Mev_service_configuration2_raw['content'] | b64decode | from_yaml }}"

- debug:
msg: '{{ Ejector_service_configuration }}'
msg: "{{ Ejector_service_configuration }}"
- debug:
msg: "{{ Ejector_service_configuration_raw['content'] | b64decode }}"

- debug:
msg: '{{ Ejector_service_configuration2 }}'
msg: "{{ Ejector_service_configuration2 }}"
- debug:
msg: "{{ Ejector_service_configuration2_raw['content'] | b64decode }}"

- debug:
msg: "{{ Ejector_service_configuration3 }}"
- debug:
msg: "{{ Ejector_service_configuration3_raw['content'] | b64decode }}"

- debug:
msg: "{{ Erigon_service_configuration }}"
- debug:
msg: "{{ Erigon_service_configuration_raw['content'] | b64decode }}"

- debug:
msg: "{{ Erigon_service_configuration2 }}"
- debug:
msg: "{{ Erigon_service_configuration2_raw['content'] | b64decode }}"

- debug:
msg: "{{ Mev_service_configuration }}"
- debug:
msg: "{{ Mev_service_configuration_raw['content'] | b64decode }}"

- debug:
msg: "{{ Mev_service_configuration2 }}"
- debug:
msg: "{{ Mev_service_configuration2_raw['content'] | b64decode }}"

- assert:
that:
- Ejector_service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xe57B3792aDCc5da47EF4fF588883F0ee0c9835C9') | length == 1
- Ejector_service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xEC4BfbAF681eb505B94E4a7849877DC6c600Ca3A') | length == 0
- Ejector_service_configuration2.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xe57B3792aDCc5da47EF4fF588883F0ee0c9835C9') | length == 1
- Ejector_service_configuration2.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xEC4BfbAF681eb505B94E4a7849877DC6c600Ca3A') | length == 0
- Ejector_service_configuration3.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xfe43A8B0b481Ae9fB1862d31826532047d2d538c') | length == 1
- Ejector_service_configuration3.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x3799bDA7B884D33F79CEC926af21160dc47fbe05') | length == 0
- Erigon_service_configuration.image | split(':') | first == 'erigontech/erigon'
- Erigon_service_configuration2.image == 'erigontech/erigon:v2.60.8'
- Mev_service_configuration.entrypoint | select('match', 'eden') | length == 0
- Mev_service_configuration2.entrypoint | select('match', 'eden') | length == 0
# EOF
14 changes: 12 additions & 2 deletions controls/roles/update-changes/tasks/2.2.3/ejector_changes.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Read service file
slurp:
src: '{{ config_file.path }}'
src: "{{ config_file.path }}"
register: service_configuration_raw

- name: Parse service's configuration
Expand All @@ -11,10 +11,20 @@

- name: Update Oracle Allow List
replace:
path: '{{ config_file.path }}'
path: "{{ config_file.path }}"
regexp: '(?s)ORACLE_ADDRESSES_ALLOWLIST:.*?]["'']{1}'
replace: 'ORACLE_ADDRESSES_ALLOWLIST: ''["0x140Bd8FbDc884f48dA7cb1c09bE8A2fAdfea776E","0xA7410857ABbf75043d61ea54e07D57A6EB6EF186","0x404335BcE530400a5814375E7Ec1FB55fAff3eA2","0x946D3b081ed19173dC83Cd974fC69e1e760B7d78","0x007DE4a5F7bc37E2F26c0cb2E8A95006EE9B89b5","0xe57B3792aDCc5da47EF4fF588883F0ee0c9835C9","0x61c91ECd902EB56e314bB2D5c5C07785444Ea1c8","0x1Ca0fEC59b86F549e1F1184d97cb47794C8Af58d","0xc79F702202E3A6B0B6310B537E786B9ACAA19BAf"]'''
when:
- service_configuration.service == "ValidatorEjectorService"
- service_configuration.network == "mainnet"
- service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xEC4BfbAF681eb505B94E4a7849877DC6c600Ca3A') | length == 1

- name: Update Oracle Allow List
replace:
path: "{{ config_file.path }}"
regexp: '(?s)ORACLE_ADDRESSES_ALLOWLIST:.*?]["'']{1}'
replace: 'ORACLE_ADDRESSES_ALLOWLIST: ''["0x12A1D74F8697b9f4F1eEBb0a9d0FB6a751366399","0xD892c09b556b547c80B7d8c8cB8d75bf541B2284","0xf7aE520e99ed3C41180B5E12681d31Aa7302E4e5","0x31fa51343297FFce0CC1E67a50B2D3428057D1b1","0x81E411f1BFDa43493D7994F82fb61A415F6b8Fd4","0x4c75FA734a39f3a21C57e583c1c29942F021C6B7","0xD3b1e36A372Ca250eefF61f90E833Ca070559970","0xF0F23944EfC5A63c53632C571E7377b85d5E6B6f","0xb29dD2f6672C0DFF2d2f173087739A42877A5172","0xfe43A8B0b481Ae9fB1862d31826532047d2d538c"]'''
when:
- service_configuration.service == "ValidatorEjectorService"
- service_configuration.network == "holesky"
- service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x3799bDA7B884D33F79CEC926af21160dc47fbe05') | length == 1
Loading