-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD: New Oracle Changes and activate CSM Mainnet (#2100)
* ADD: New Oracle Changes * ADD: Mainnet Contract Addresses for csm monitor service * ADD: CSM * FIX: handle case when service is not in updates.json --------- Co-authored-by: Martin Wostal <[email protected]>
- Loading branch information
Showing
14 changed files
with
246 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
vars_files: | ||
- ../../../../defaults/stereum_defaults.yaml | ||
|
||
tasks: | ||
- name: "Include update-changes" | ||
include_role: | ||
name: "update-changes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
#dependency: | ||
# name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: "update-changes--2.2.4--ubuntu-23.04" | ||
image: ubuntu:lunar | ||
# - name: "configure-updates--default--centos-8" | ||
# image: geerlingguy/docker-centos8-ansible | ||
provisioner: | ||
name: ansible | ||
env: | ||
ANSIBLE_PIPELINING: "True" | ||
lint: | | ||
set -e | ||
yamllint . | ||
ansible-lint . | ||
scenario: | ||
test_sequence: | ||
- destroy | ||
- create | ||
- prepare | ||
- converge | ||
- idempotence | ||
- verify | ||
- destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
tasks: | ||
- name: "Include update-changes" | ||
include_role: | ||
name: "update-changes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
tasks: | ||
- name: Make sure Stereum's config path exists | ||
file: | ||
path: "/etc/stereum/services" | ||
state: directory | ||
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" | ||
mode: 0644 | ||
content: | | ||
service: ValidatorEjectorService | ||
id: 15ce3684-4dbd-4657-8a21-b1243b72b1ca | ||
configVersion: 1 | ||
command: [] | ||
entrypoint: [] | ||
env: | ||
EXECUTION_NODE: http://stereum-ce456ae0-64d6-4886-a53b-6b90984d4913:8545 | ||
CONSENSUS_NODE: http://stereum-e7bd77d1-4d20-4a2e-85a6-1915f105a4c6:5052 | ||
LOCATOR_ADDRESS: "0x28FAB2059C713A7F9D8c86Db49f9bb0e96Af1ef8" | ||
STAKING_MODULE_ID: "123" | ||
OPERATOR_ID: "123" | ||
MESSAGES_LOCATION: /app/messages | ||
ORACLE_ADDRESSES_ALLOWLIST: '["0x140Bd8FbDc884f48dA7cb1c09bE8A2fAdfea776E", | ||
"0xA7410857ABbf75043d61ea54e07D57A6EB6EF186", | ||
"0x404335BcE530400a5814375E7Ec1FB55fAff3eA2", | ||
"0x946D3b081ed19173dC83Cd974fC69e1e760B7d78", | ||
"0x007DE4a5F7bc37E2F26c0cb2E8A95006EE9B89b5", | ||
"0xe57B3792aDCc5da47EF4fF588883F0ee0c9835C9", | ||
"0x61c91ECd902EB56e314bB2D5c5C07785444Ea1c8", | ||
"0x1Ca0fEC59b86F549e1F1184d97cb47794C8Af58d", | ||
"0xc79F702202E3A6B0B6310B537E786B9ACAA19BAf"]' | ||
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-15ce3684-4dbd-4657-8a21-b1243b72b1ca/messages:/app/messages | ||
user: "2000" | ||
autoupdate: true | ||
network: mainnet | ||
dependencies: | ||
executionClients: | ||
- service: GethService | ||
id: ce456ae0-64d6-4886-a53b-6b90984d4913 | ||
consensusClients: | ||
- service: LighthouseBeaconService | ||
id: e7bd77d1-4d20-4a2e-85a6-1915f105a4c6 | ||
mevboost: [] | ||
otherServices: [] | ||
become: yes | ||
|
||
- name: Create ValidatorEjectorService config | ||
copy: | ||
dest: "/etc/stereum/services/41b15ea7-12d4-49f6-8448-8a6164edef36.yaml" | ||
owner: "root" | ||
group: "root" | ||
mode: 0644 | ||
content: | | ||
service: ValidatorEjectorService | ||
id: 41b15ea7-12d4-49f6-8448-8a6164edef36 | ||
configVersion: 1 | ||
command: [] | ||
entrypoint: [] | ||
env: | ||
EXECUTION_NODE: http://stereum-cc1323ce-90a1-440f-8b78-f930a3300b38:8545 | ||
CONSENSUS_NODE: http://stereum-62cb879b-b0f0-4ea2-bc13-f606b7f4cfb9:5052 | ||
LOCATOR_ADDRESS: "0x28FAB2059C713A7F9D8c86Db49f9bb0e96Af1ef8" | ||
STAKING_MODULE_ID: "123" | ||
OPERATOR_ID: "123" | ||
MESSAGES_LOCATION: /app/messages | ||
ORACLE_ADDRESSES_ALLOWLIST: '["0x140Bd8FbDc884f48dA7cb1c09bE8A2fAdfea776E","0xA7410857ABbf75043d61ea54e07D57A6EB6EF186","0x404335BcE530400a5814375E7Ec1FB55fAff3eA2","0x946D3b081ed19173dC83Cd974fC69e1e760B7d78","0x007DE4a5F7bc37E2F26c0cb2E8A95006EE9B89b5","0xe57B3792aDCc5da47EF4fF588883F0ee0c9835C9","0x61c91ECd902EB56e314bB2D5c5C07785444Ea1c8","0x1Ca0fEC59b86F549e1F1184d97cb47794C8Af58d","0xc79F702202E3A6B0B6310B537E786B9ACAA19BAf"]' | ||
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-41b15ea7-12d4-49f6-8448-8a6164edef36/messages:/app/messages | ||
user: "2000" | ||
autoupdate: true | ||
network: mainnet | ||
dependencies: | ||
executionClients: | ||
- service: GethService | ||
id: cc1323ce-90a1-440f-8b78-f930a3300b38 | ||
consensusClients: | ||
- service: LighthouseBeaconService | ||
id: 62cb879b-b0f0-4ea2-bc13-f606b7f4cfb9 | ||
mevboost: [] | ||
otherServices: [] | ||
become: yes | ||
#EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
# ValidatorEjectorService | ||
- name: Read ValidatorEjectorService file | ||
slurp: | ||
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" | ||
register: Ejector_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 }}" | ||
|
||
- debug: | ||
msg: "{{ Ejector_service_configuration }}" | ||
- debug: | ||
msg: "{{ Ejector_service_configuration_raw['content'] | b64decode }}" | ||
|
||
- debug: | ||
msg: "{{ Ejector_service_configuration2 }}" | ||
- debug: | ||
msg: "{{ Ejector_service_configuration2_raw['content'] | b64decode }}" | ||
|
||
- assert: | ||
that: | ||
- Ejector_service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x73181107c8D9ED4ce0bbeF7A0b4ccf3320C41d12') | length == 1 | ||
- Ejector_service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x1Ca0fEC59b86F549e1F1184d97cb47794C8Af58d') | length == 0 | ||
- Ejector_service_configuration2.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x73181107c8D9ED4ce0bbeF7A0b4ccf3320C41d12') | length == 1 | ||
- Ejector_service_configuration2.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x1Ca0fEC59b86F549e1F1184d97cb47794C8Af58d') | length == 0 | ||
# EOF |
20 changes: 20 additions & 0 deletions
20
controls/roles/update-changes/tasks/2.2.4/ejector_changes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
- name: Read service file | ||
slurp: | ||
src: "{{ config_file.path }}" | ||
register: service_configuration_raw | ||
|
||
- name: Parse service's configuration | ||
set_fact: | ||
service_configuration: "{{ service_configuration_raw['content'] | b64decode | from_yaml }}" | ||
service_configuration_text: "{{ service_configuration_raw['content'] | b64decode }}" | ||
|
||
- name: Update Oracle Allow List | ||
replace: | ||
path: "{{ config_file.path }}" | ||
regexp: '(?s)ORACLE_ADDRESSES_ALLOWLIST:.*?]["'']{1}' | ||
replace: 'ORACLE_ADDRESSES_ALLOWLIST: ''["0x140Bd8FbDc884f48dA7cb1c09bE8A2fAdfea776E","0xA7410857ABbf75043d61ea54e07D57A6EB6EF186","0x404335BcE530400a5814375E7Ec1FB55fAff3eA2","0x946D3b081ed19173dC83Cd974fC69e1e760B7d78","0x007DE4a5F7bc37E2F26c0cb2E8A95006EE9B89b5","0xe57B3792aDCc5da47EF4fF588883F0ee0c9835C9","0x61c91ECd902EB56e314bB2D5c5C07785444Ea1c8","0x73181107c8D9ED4ce0bbeF7A0b4ccf3320C41d12","0xc79F702202E3A6B0B6310B537E786B9ACAA19BAf"]''' | ||
when: | ||
- service_configuration.service == "ValidatorEjectorService" | ||
- service_configuration.network == "mainnet" | ||
- service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x1Ca0fEC59b86F549e1F1184d97cb47794C8Af58d') | length == 1 |
11 changes: 11 additions & 0 deletions
11
controls/roles/update-changes/tasks/2.2.4/updates-224.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Find service configs | ||
find: | ||
paths: "/etc/stereum/services" | ||
register: service_config_files | ||
|
||
- name: Include Ejector Changes | ||
include_tasks: ejector_changes.yaml | ||
loop: "{{ service_config_files.files }}" | ||
loop_control: | ||
loop_var: config_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters