> loading_
# EIP-8070 Per-Request Column Cap Removal — Developer Walkthrough
# This walkthrough illustrates how the spec change affects client-side
# request construction for DataColumnSidecar retrieval via PeerDAS.
# === BEFORE: With per-request column cap ===
# Previously, the spec enforced MAX_REQUEST_DATA_COLUMNS (e.g., 128)
# which limited how many column indices you could ask for in one request.
# MAX_REQUEST_DATA_COLUMNS = 128 # Old spec constant
#
# def request_data_columns(peer, slot, column_indices):
# """Chunk column requests to respect the per-request cap."""
# chunks = [
# column_indices[i:i + MAX_REQUEST_DATA_COLUMNS]
# for i in range(0, len(column_indices), MAX_REQUEST_DATA_COLUMNS)
# ]
# results = []
# for chunk in chunks:
# # Each chunk is a separate network round-trip
# req = DataColumnSidecarsByRange(
# slot=slot,
# columns=chunk
# )
# resp = peer.send_request(req)
# results.extend(resp.sidecars)
# return results
# === AFTER: Column cap removed ===
# With the cap removed, clients can request all needed columns in one call.
# The total number of columns is bounded by NUMBER_OF_COLUMNS (e.g., 128
# for the full set in the current danksharding design), but there is no
# artificial per-request sub-limit.
# NUMBER_OF_COLUMNS = 128 # Total columns in the data matrix
#
# def request_data_columns(peer, slot, column_indices):
# """Request all needed columns in a single network call."""
# # Validate that requested indices are within the valid range
# assert all(0 <= idx < NUMBER_OF_COLUMNS for idx in column_indices)
#
# # Single request — no chunking required
# req = DataColumnSidecarsByRange(
# slot=slot,
# columns=column_indices # Send all at once
# )
# resp = peer.send_request(req)
# return resp.sidecars
# === Migration checklist for client developers ===
#
# 1. Remove MAX_REQUEST_DATA_COLUMNS constant from your spec config.
# 2. Remove or refactor any chunking/batching logic that split requests
# based on the old cap.
# 3. Update request validation: peers should no longer reject requests
# solely because they exceed the old column cap.
# 4. Update rate-limiting logic: without a protocol-level cap, consider
# implementing application-level backpressure (e.g., based on peer
# bandwidth or response latency) to avoid overwhelming peers.
# 5. Update tests: remove assertions that enforce the old cap and add
# tests for full-range column requests.
#
# Track the canonical spec at:
# https://github.com/ethereum/EIPs (search for EIP-8070)
# Pin to a specific commit hash for reproducible builds.