feat(ream): enhance attestation committee handling#177
Merged
ch4r10t33r merged 1 commit intoMay 21, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the ream Ansible role to better derive runtime parameters from validator-config.yaml and ream-cmd.sh, and passes subnet/committee settings into the container run command.
Changes:
- Improved docker image extraction with an explicit script existence check.
- Added computation of
attestation_committee_countand aggregate subnet IDs and wired them into the container args. - Adjusted facts set from
validator-config.yaml(droppedprivkey, shifted indices) and added new defaults.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| ansible/roles/ream/tasks/main.yml | Adds committee/subnet derivation and container flags; changes how facts are set (including delegation/run_once). |
| ansible/roles/ream/defaults/main.yml | Introduces defaults for committee count and adds empty-string defaults for required inputs. |
Comments suppressed due to low confidence (1)
ansible/roles/ream/tasks/main.yml:1
set_factexecutes on the target host; withdelegate_to: localhostthese facts will be set onlocalhost(and not on each managed host). If later tasks on remote hosts referenceream_docker_image/deployment_mode, they may be missing or fall back to defaults. Fix by removingdelegate_tofor thisset_fact, or usedelegate_facts: trueand consistently reference the delegated host viahostvars['localhost'].....
---
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Set attestation committee count | ||
| set_fact: | ||
| ream_attestation_committee_count: "{{ ream_attestation_committee_count_raw.stdout | trim | int }}" | ||
| run_once: true |
Comment on lines
+97
to
+100
| - name: Set aggregate subnet ids csv | ||
| set_fact: | ||
| ream_aggregate_subnet_ids: "{{ ream_all_subnets_raw.stdout | trim }}" | ||
| run_once: true |
Comment on lines
+58
to
+65
| - name: Compute attestation committee count from validator-config.yaml | ||
| shell: | | ||
| set -e | ||
| ac=$(yq eval '.config.attestation_committee_count // 1' "{{ local_validator_config_path }}") | ||
| ac=$(echo "$ac" | tr -d '\r\n' | head -1) | ||
| case "$ac" in ''|*[!0-9]*) ac=1;; esac | ||
| if [ "$ac" -lt 1 ]; then ac=1; fi | ||
| echo "$ac" |
Comment on lines
+78
to
+99
| - name: Compute aggregate subnet ids from attestation_committee_count | ||
| shell: | | ||
| set -e | ||
| ac=$(yq eval '.config.attestation_committee_count // 1' "{{ local_validator_config_path }}") | ||
| ac=$(echo "$ac" | tr -d '\r\n' | head -1) | ||
| case "$ac" in ''|*[!0-9]*) ac=1;; esac | ||
| if [ "$ac" -lt 1 ]; then ac=1; fi | ||
| out="0" | ||
| i=1 | ||
| while [ "$i" -lt "$ac" ]; do | ||
| out="$out,$i" | ||
| i=$((i + 1)) | ||
| done | ||
| echo "$out" | ||
| register: ream_all_subnets_raw | ||
| changed_when: false | ||
| delegate_to: localhost | ||
| run_once: true | ||
|
|
||
| - name: Set aggregate subnet ids csv | ||
| set_fact: | ||
| ream_aggregate_subnet_ids: "{{ ream_all_subnets_raw.stdout | trim }}" |
| @@ -27,6 +29,8 @@ | |||
| set_fact: | |||
| ream_docker_image: "{{ ream_docker_image_raw.stdout | trim | default('ghcr.io/reamlabs/ream:latest-devnet4') }}" | |||
| echo "ERROR: Script not found at $script_path (project_root=$project_root, playbook_dir={{ playbook_dir }})" >&2 | ||
| exit 1 | ||
| fi | ||
| grep -E '^node_docker=' "$script_path" | head -1 | grep -oE '[a-zA-Z0-9._/-]+:[a-zA-Z0-9._-]+' | head -1 |
Comment on lines
+14
to
+16
| node_name: "" | ||
| genesis_dir: "" | ||
| data_dir: "" |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.