Skip to content

Commit

Permalink
REVERT: Erigon Image Change (#2098)
Browse files Browse the repository at this point in the history
* REVERT: Erigon Image Change

* ADD: other changes
  • Loading branch information
NeoPlays authored Oct 17, 2024
1 parent d2c33c3 commit 8086cd2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 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
3 changes: 3 additions & 0 deletions launcher/src/backend/OneClickInstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export class OneClickInstall {
if (this.mevboost) serviceList.push(this.mevboost);
if (this.validatorService) serviceList.push(this.validatorService);
if (this.extraServices) this.extraServices.forEach((service) => serviceList.push(service));
serviceList.forEach((service) => {
if (service.switchImageTag) service.switchImageTag(this.nodeConnection.settings.stereum.settings.arch);
});
return serviceList.map((service) => service.buildConfiguration());
}

Expand Down
2 changes: 2 additions & 0 deletions launcher/src/backend/ServiceManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ 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 @@ -1382,6 +1383,7 @@ 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: 12 additions & 1 deletion 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
"erigontech/erigon", // image
"thorax/erigon", // image
"v2.60.8", // imageVersion
[
`erigon`,
Expand Down Expand Up @@ -81,6 +81,17 @@ 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;
}
}

buildExecutionClientHttpEndpointUrl() {
return "http://stereum-" + this.id + ":8545";
}
Expand Down
2 changes: 1 addition & 1 deletion launcher/src/backend/tests/unit/ErigonService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test("user", () => {
});

test("image", () => {
expect(ErigonService.buildByUserInput("mainnet", null, null).buildConfiguration().image).toMatch(/erigontech\/erigon/);
expect(ErigonService.buildByUserInput("mainnet", null, null).buildConfiguration().image).toMatch(/thorax\/erigon/);
});

test("endpoint url", () => {
Expand Down

0 comments on commit 8086cd2

Please sign in to comment.