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: Erigon Image Migration #2105

Merged
merged 2 commits into from
Nov 21, 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
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
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(/thorax\/erigon/);
expect(ErigonService.buildByUserInput("mainnet", null, null).buildConfiguration().image).toMatch(/erigontech\/erigon/);
});

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