Skip to content

docs: add per-node max_blob_size with BlobTooLarge error in ADR 005 - #114

Merged
thiras merged 2 commits into
mainfrom
docs/max-blob-size
Apr 2, 2026
Merged

thiras merged 2 commits into
mainfrom
docs/max-blob-size

Conversation

@thiras

@thiras thiras commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds StreamError::BlobTooLarge variant to ADR 005 with enforcement semantics for a per-node configurable max_blob_size (PoC recommended default: 10 GB)
  • Updates architecture.md to mark max blob size as decided and document it in the Cache Behavior section
  • Adds cross-references from ADR 002 (content addressing) and ADR 003 (payments) to the new mechanism

Test plan

  • Verify StreamError enum in ADR 005 includes BlobTooLarge with correct comment
  • Verify architecture.md "What Is Not Decided Yet" no longer lists blob size as undecided
  • Verify cross-references from ADR 002, 003, and architecture.md all link to 005-protocol.md#error-handling-and-retry-semantics
  • Check cross-ADR consistency: max_blob_size terminology is uniform across all files

🤖 Generated with Claude Code

Introduces a configurable maximum blob size (PoC default: 10 GB) to
prevent unbounded resource risks from arbitrarily large blobs. Adds
StreamError::BlobTooLarge variant and enforcement semantics in ADR 005,
with cross-references from ADRs 002, 003, and architecture.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 2, 2026 04:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates ADRs and architecture docs to formalize a per-node configurable max_blob_size limit, including a new StreamError::BlobTooLarge error and guidance on enforcement and cross-ADR consistency.

Changes:

  • Documented StreamError::BlobTooLarge and max_blob_size enforcement + retry guidance in ADR 005.
  • Updated architecture.md to mark maximum blob size as decided and describe it in cache behavior.
  • Added cross-references in ADR 002 (content addressing) and ADR 003 (payments) to the ADR 005 error-handling section.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
adr/005-protocol.md Adds BlobTooLarge to StreamError and documents enforcement / retry semantics for max_blob_size.
adr/architecture.md Records max blob size as a decided per-node operational policy and documents it under Cache Behavior.
adr/003-payments.md Links voucher interval negotiation to per-node max_blob_size operational limits.
adr/002-content-addressing.md Clarifies that content addressing has no inherent size limit, but nodes may enforce max_blob_size.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adr/005-protocol.md Resolved

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a configurable max_blob_size limit to the protocol, allowing nodes to reject blobs that exceed their resource capacity. The changes include updates to several ADRs to define the BlobTooLarge error, specify its enforcement, and clarify retry behavior. My feedback highlights a potential conflict with the existing slashing mechanism for phantom announcements, suggests clarifying the retry policy in the StreamError enum, and recommends strengthening the language regarding retry behavior for BlobTooLarge errors to ensure operational consistency.

Comment thread adr/005-protocol.md Resolved
Comment thread adr/005-protocol.md Resolved
Comment thread adr/005-protocol.md Resolved
- Clarify enforcement checks local metadata, not StreamRequest fields
- Add probe interaction rule: MUST NOT respond has_blob:true for
  oversized blobs (prevents phantom-announcement slashing)
- Strengthen retry to MUST NOT; add "do not retry" to enum comment
- Remove undefined "hash sequence" clause

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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.

2 participants