Skip to content
Closed
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
7 changes: 7 additions & 0 deletions beacon_node/beacon_chain/src/kzg_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ pub fn blobs_to_data_column_sidecars<E: EthSpec>(
let kzg_commitments_inclusion_proof = block.message().body().kzg_commitments_merkle_proof()?;
let signed_block_header = block.signed_block_header();

if cell_proofs.len() != blobs.len() * E::number_of_columns() {
return Err(DataColumnSidecarError::InvalidCellProofLength {
expected: blobs.len() * E::number_of_columns(),
actual: cell_proofs.len(),
});
}

let proof_chunks = cell_proofs
.chunks_exact(E::number_of_columns())
.collect::<Vec<_>>();
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/http_api/src/publish_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ fn build_data_columns<T: BeaconChainTypes>(
error!(
error = ?e,
%slot,
"Invalid data column - not publishing block"
"Invalid data column - not publishing data columns"
);
warp_utils::reject::custom_bad_request(format!("{e:?}"))
})?;
Expand Down
1 change: 1 addition & 0 deletions consensus/types/src/data_column_sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub enum DataColumnSidecarError {
PreDeneb,
SszError(SszError),
BuildSidecarFailed(String),
InvalidCellProofLength { expected: usize, actual: usize },
}

impl From<ArithError> for DataColumnSidecarError {
Expand Down
72 changes: 72 additions & 0 deletions scripts/print_release_diffs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
"""
Summarise pull requests between two Lighthouse releases.

Usage:
export GITHUB_TOKEN=your_token
python -m pip install requests==2.32.4
python print_release_diffs.py --base v7.0.1 --head release-v7.1.0

Shows commit SHA, PR number, 'backwards-incompat' label status, and PR title.
"""

import requests
import re
import argparse
import os

GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN")
if not GITHUB_TOKEN:
raise SystemExit("Error: Please set the GITHUB_TOKEN environment variable.")

parser = argparse.ArgumentParser(description="Summarise PRs between two Lighthouse versions.")
parser.add_argument("--base", required=True, help="Base tag or branch (older release)")
parser.add_argument("--head", required=True, help="Head tag or branch (newer release)")
args = parser.parse_args()

BASE = args.base
HEAD = args.head
OWNER = 'sigp'
REPO = 'lighthouse'

HEADERS = {
'Authorization': f'token {GITHUB_TOKEN}',
'Accept': 'application/vnd.github+json'
}

def get_commits_between(base, head):
url = f'https://api.github.com/repos/{OWNER}/{REPO}/compare/{base}...{head}'
response = requests.get(url, headers=HEADERS)
response.raise_for_status()
return response.json()['commits']

def has_backwards_incompat_label(pr_number):
url = f'https://api.github.com/repos/{OWNER}/{REPO}/issues/{pr_number}'
response = requests.get(url, headers=HEADERS)
if response.status_code != 200:
raise Exception(f"Failed to fetch PR #{pr_number}")
labels = response.json().get('labels', [])
return any(label['name'] == 'backwards-incompat' for label in labels)

def main():
commits = get_commits_between(BASE, HEAD)
print(" # Commit SHA PR Number Has backwards-incompat Label PR Title")
print("--- ------------ ----------- ------------------------------ --------------------------------------------")

for i, commit in enumerate(commits, 1):
sha = commit['sha'][:12]
message = commit['commit']['message']
pr_match = re.search(r"\(#(\d+)\)", message)

if not pr_match:
print(f"{i:<3} {sha} {'-':<11} {'-':<30} [NO PR MATCH]: {message.splitlines()[0]}")
continue

pr_number = int(pr_match.group(1))
try:
has_label = has_backwards_incompat_label(pr_number)
print(f"{i:<3} {sha} {pr_number:<11} {str(has_label):<30} {message.splitlines()[0]}")
except Exception as e:
print(f"{i:<3} {sha} {pr_number:<11} {'ERROR':<30} [ERROR FETCHING PR]: {e}")

if __name__ == '__main__':
main()
Loading