Skip to content

feat(ream): enhance attestation committee handling#177

Merged
ch4r10t33r merged 1 commit into
blockblaz:mainfrom
shariqnaiyer:feat/shariqnaiyer/ream-ansible
May 21, 2026
Merged

feat(ream): enhance attestation committee handling#177
ch4r10t33r merged 1 commit into
blockblaz:mainfrom
shariqnaiyer:feat/shariqnaiyer/ream-ansible

Conversation

@shariqnaiyer
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 21, 2026 13:57
Copy link
Copy Markdown
Contributor

@ch4r10t33r ch4r10t33r left a comment

Choose a reason for hiding this comment

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

LGTM

@ch4r10t33r ch4r10t33r merged commit c829b79 into blockblaz:main May 21, 2026
4 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_count and aggregate subnet IDs and wired them into the container args.
  • Adjusted facts set from validator-config.yaml (dropped privkey, 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_fact executes on the target host; with delegate_to: localhost these facts will be set on localhost (and not on each managed host). If later tasks on remote hosts reference ream_docker_image / deployment_mode, they may be missing or fall back to defaults. Fix by removing delegate_to for this set_fact, or use delegate_facts: true and consistently reference the delegated host via hostvars['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: ""
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