Skip to content

Commit

Permalink
ADD: Erigon Image Migration
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoPlays committed Nov 8, 2024
1 parent 431302f commit 393e8e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
4 changes: 2 additions & 2 deletions controls/roles/update-changes/molecule/223/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
- 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'
- 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
10 changes: 5 additions & 5 deletions controls/roles/update-changes/tasks/2.2.3/updates-223.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
loop_control:
loop_var: config_file

# - name: Include Erigon Changes
# include_tasks: erigon_changes.yaml
# loop: "{{ service_config_files.files }}"
# loop_control:
# loop_var: config_file
- name: Include Erigon Changes
include_tasks: erigon_changes.yaml
loop: "{{ service_config_files.files }}"
loop_control:
loop_var: config_file

- name: Include MEV Changes
include_tasks: mev_changes.yaml
Expand Down
2 changes: 0 additions & 2 deletions launcher/src/backend/ServiceManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,6 @@ export class ServiceManager {
new ServicePort("127.0.0.1", 8546, 8546, servicePortProtocol.tcp),
];
service = ErigonService.buildByUserInput(args.network, ports, args.installDir + "/erigon");
service.switchImageTag(this.nodeConnection.settings.stereum.settings.arch);
return service;

case "LighthouseBeaconService":
Expand Down Expand Up @@ -1383,7 +1382,6 @@ export class ServiceManager {
} else if (versions["prater"] && versions["prater"][service.service]) {
service.imageVersion = versions["prater"][service.service].slice(-1).pop();
}
if (service.switchImageTag) service.switchImageTag(this.nodeConnection.settings.stereum.settings.arch);
});
for (const service of newServices) {
await this.nodeConnection.writeServiceConfiguration(
Expand Down
13 changes: 3 additions & 10 deletions launcher/src/backend/ethereum-services/ErigonService.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ErigonService extends NodeService {
"ErigonService", // service
service.id, // id
1, // configVersion
"thorax/erigon", // image
"erigontech/erigon", // image
"v2.60.8", // imageVersion
[
`erigon`,
Expand Down Expand Up @@ -81,15 +81,8 @@ export class ErigonService extends NodeService {
return service;
}

switchImageTag(arch) {
const armArchs = ["arm", "arm64", "aarch64_be", "aarch64", "armv8b", "armv8l"]; //Possible arm architectures: https://stackoverflow.com/questions/45125516/possible-values-for-uname-m
if (armArchs.includes(arch)) {
this.imageVersion = this.imageVersion.endsWith("-arm64") ? this.imageVersion : this.imageVersion + "-arm64";
this.imageVersion = this.imageVersion.startsWith("v") ? this.imageVersion.slice(1) : this.imageVersion;
} else {
this.imageVersion = this.imageVersion.endsWith("-arm64") ? this.imageVersion.replace("-arm64", "") : this.imageVersion;
this.imageVersion = this.imageVersion.startsWith("v") ? this.imageVersion.slice(1) : this.imageVersion;
}
switchImageTag() {
this.imageVersion = this.imageVersion.startsWith("v") ? this.imageVersion : "v" + this.imageVersion;
}

buildExecutionClientHttpEndpointUrl() {
Expand Down

0 comments on commit 393e8e3

Please sign in to comment.