Skip to content

09 25 feat sparkles adds ethereum besu service#118

Draft
alex-klikatech wants to merge 10 commits into
mainfrom
09-25-feat_sparkles_adds_ethereum_besu_service
Draft

09 25 feat sparkles adds ethereum besu service#118
alex-klikatech wants to merge 10 commits into
mainfrom
09-25-feat_sparkles_adds_ethereum_besu_service

Conversation

@alex-klikatech

Copy link
Copy Markdown
Contributor

No description provided.

@alex-klikatech alex-klikatech marked this pull request as draft September 27, 2024 14:26
@anthonyra

Copy link
Copy Markdown
Contributor

https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/

BESU - is only an execution client so we'll also need to get a consensus client installed for the validator to work

Comment on lines +56 to +63
- name: Find teku binary
become: true
ansible.builtin.find:
paths:
- /tmp
- "{{ ethereum_teku_download_path | default('/tmp') }}"
patterns: 'besu$'
use_regex: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patterns parameter is currently set to 'besu$', which will search for files ending with "besu". To correctly locate the Teku binary, this should be changed to 'teku$'. This adjustment will ensure the task finds the appropriate Teku executable file.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

debug:
var: ethereum_teku.status

- name: Check teku ervice

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a minor typo in the task name. Consider changing Check teku ervice to Check teku service to improve clarity and maintain consistency in the task descriptions.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@alex-klikatech

Copy link
Copy Markdown
Contributor Author

Hi @anthonyra, I add teku execution client, with the beacon node config file.

@anthonyra

anthonyra commented Oct 17, 2024

Copy link
Copy Markdown
Contributor

Hi @anthonyra, I add teku execution client, with the beacon node config file.

With this does it add an additional execution client? Or is Teku a consensus client?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably separate this out into sections.

  1. Base configurations - things that are common between clients
    • ethereum_execution_client: 'besu'
    • ethereum_consensus_client: 'nimbus'
  2. Execution clients with each client being grouped together
  3. Consensus clients with each client being grouped together

@skuznetsov-klika skuznetsov-klika Nov 28, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nimbus is a new ethereum consensus client. Separate them now is a tricky thing and this should be done in next phase with testing.

become: true
ansible.builtin.apt:
name:
- openjdk-21-jdk

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will probably be dependent on what clients have been selected right?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nimbus is a new ethereum consensus client with a different configuration for start.

Comment on lines +10 to +66
- name: Create program folder for besu
become: true
ansible.builtin.file:
state: directory
owner: root
group: root
mode: '0755'
dest: /opt/ethereum_besu/{{ ethereum_besu_version }}

- name: Create program folder for teku
become: true
ansible.builtin.file:
state: directory
owner: root
group: root
mode: '0755'
dest: /opt/ethereum_teku/{{ ethereum_teku_version }}

- name: Download besu binary to tmp
become: true
ansible.builtin.unarchive:
remote_src: true
src: "{{ ethereum_besu_download_url }}"
dest: /tmp
failed_when: false

- name: Download teku binary to tmp
become: true
ansible.builtin.unarchive:
remote_src: true
src: "{{ ethereum_teku_download_url }}"
dest: /tmp
failed_when: false

- name: Find besu binary
become: true
ansible.builtin.find:
paths:
- /tmp
- "{{ ethereum_besu_download_path | default('/tmp') }}"
patterns: 'besu$'
use_regex: true
get_checksum: true
recurse: true
register: _download_besu

- name: Find teku binary
become: true
ansible.builtin.find:
paths:
- /tmp
- "{{ ethereum_teku_download_path | default('/tmp') }}"
patterns: 'teku$'
use_regex: true
get_checksum: true
recurse: true
register: _download_teku

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should try and leverage depin.core.installer here.. but might need to run it twice. Once for the execution and once for the consensus clients to make it less "spaghetti"

@skuznetsov-klika skuznetsov-klika Nov 26, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this should be changed with new phase - because testing with integrating clients and server node can spent weeks to be sure that all works as expected. And changing of this part cannot be tested right now.

Comment on lines +6 to +8
- name: Ensure metrics is installed
ansible.builtin.include_tasks:
file: metrics.yml No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines +2 to +4
- name: "ethereum_besu {{ ethereum_cmd }}"
ansible.builtin.include_tasks:
file: "commands/{{ ethereum_cmd }}.yml"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Ethereum {{ ethereum_cmd }}
  vars:
    cmd_file: "{{ role_path }}/tasks/commands/{{ ethereum_cmd }}.yml"
  when: cmd_file is file
  ansible.builtin.include_tasks:
    file: "{{ cmd_file }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworked

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed due to depin.core.metrics

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworked

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed due to depin.core.metrics

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworked

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should use some systemd magic here to ensure that an execution client and consensus client are running together. Probably should make these generic also to ensure that clients can be swamped around as necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teku client can be launched only after Besu, otherwise there will be a runtime error. Running with custom scenarios better to do in the next phase with qa.

@skuznetsov-klika

Copy link
Copy Markdown

https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/

BESU - is only an execution client so we'll also need to get a consensus client installed for the validator to work

Nimbus is a new ethereum consensus client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants