feat(copycat): headers-only indexing mode with fail-closed completion - #7
Open
xylophonez wants to merge 2 commits into
Open
xylophonez wants to merge 2 commits into
xylophonez wants to merge 2 commits into
Conversation
xylophonez
force-pushed
the
feat/copycat-headers-mode
branch
from
August 20, 2026 21:18
1ea08ad to
831e3e9
Compare
xylophonez
force-pushed
the
feat/copycat-headers-mode
branch
from
August 20, 2026 21:19
831e3e9 to
4b29d56
Compare
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.
Summary
Adds a headers-only indexing mode to the
~copycat@1.0Arweave engine (dev_copycat_arweave), plus fail-closed completion semantics for it.Headers mode replicates a block range using one
block2layout request per block and fetches individual transaction headers only for the zero-data transactions that require them, instead of pulling every transaction. For low-fanout consumers — resource-constrained or edge nodes backfilling a large historical range from the node's native Arweave peer pool — this collapses the request count dramatically (a typical tip block resolves in ~2 requests instead of one-per-transaction) while writing the same canonical header/index entries as the existing path.Behaviour
block2layout, an out-of-order/incorrect block id, or a header that cannot be retrieved is treated as a hard failure. The engine never returns a success status for a partially-indexed range and never writes a per-block completion marker after a skipped header. A completion marker therefore means "every required header for this block is committed locally," so downstream consumers can trust it as a real guarantee rather than a best-effort hint.Scope
Single file:
src/preloaded/query/dev_copycat_arweave.erl. No changes to core, stores, HTTP, or other devices.Testing
Covered by the copycat package suite, including an HTTP-level fail-closed test that drives a valid block, a malformed
block2, and an invalid backing store through the real packaged HTTP path and asserts a non-2xx result with no completion marker written while still only touching the native block/block2routes.