Skip to content

events: close events.pack records at a 128 KiB byte limit - #1079

Draft
tamirms wants to merge 1 commit into
tamirms/packfile-byte-limitfrom
tamirms/events-pack-byte-limit
Draft

tamirms wants to merge 1 commit into
tamirms/packfile-byte-limitfrom
tamirms/events-pack-byte-limit

Conversation

@tamirms

@tamirms tamirms commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

An events.pack record closes only after 128 payloads, so a few large
events make it large, and a read of any event in it fetches and decodes
all of it. One contract's big events thus inflate reads of other
contracts' events.

The events.pack writer now sets MaxRecordBytes to 128 KiB. Payloads
average about 250 bytes, so 128 of them come to about 32 KB and real
records still close at 128 items: production packs are unchanged, and
their index stores no item counts. The reader addresses payloads by
position and needs no change. The getEvents design doc now describes
both record limits and finds an event's record through the offset
index.

🤖 Generated with Claude Code

@tamirms
tamirms added this pull request to stack #1081 October 5, 2026 10:56
@tamirms
tamirms removed this pull request from stack #1081 October 5, 2026 16:19
Base automatically changed from tamirms/packfile-reuse-buffers to tamirms/packfile-byte-limit October 5, 2026 16:19
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from 7983738 to 13520ba Compare October 5, 2026 16:19
@tamirms
tamirms added this pull request to stack #1089 October 5, 2026 16:24
@tamirms
tamirms removed this pull request from stack #1089 October 8, 2026 08:18
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from 13520ba to 9e26b41 Compare October 8, 2026 08:18
@tamirms
tamirms added this pull request to stack #1102 October 8, 2026 08:19
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch 3 times, most recently from f963069 to 2945f30 Compare October 9, 2026 06:02
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch 2 times, most recently from 953b84f to 651c1c6 Compare October 15, 2026 19:15
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from 651c1c6 to a34cf59 Compare October 19, 2026 13:00
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from a34cf59 to 2418b48 Compare October 21, 2026 08:48
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch 4 times, most recently from b453ca8 to a489361 Compare October 21, 2026 11:16
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from a489361 to 27b2616 Compare October 21, 2026 14:04
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from 27b2616 to 0c10b04 Compare October 21, 2026 14:07
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch 3 times, most recently from 6b90d17 to e70fff7 Compare October 21, 2026 17:15
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from e70fff7 to 3b6af1a Compare October 22, 2026 18:41
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from 3b6af1a to 181ac6a Compare October 22, 2026 19:46
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch 5 times, most recently from a4da976 to 3204615 Compare October 24, 2026 02:49
@tamirms
tamirms removed this pull request from stack #1102 October 27, 2026 10:19
@tamirms
tamirms added this pull request to stack #1157 October 27, 2026 10:21
@tamirms tamirms moved this from To Do to In Progress in Platform Scrum Oct 27, 2026
An events.pack record closes only after 128 payloads, so a few large
events make it large, and a read of any event in it fetches and decodes
all of it. One contract's big events thus inflate reads of other
contracts' events.

The events.pack writer now sets MaxRecordBytes to 128 KiB. Payloads
average about 250 bytes, so 128 of them come to about 32 KB and real
records still close at 128 items: production packs are unchanged, and
their index stores no item counts. The reader addresses payloads by
position and needs no change. The getEvents design doc now describes
both record limits and finds an event's record through the offset
index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KKssDnVqUbxVZqpxPN3FpP
@tamirms
tamirms force-pushed the tamirms/events-pack-byte-limit branch from 3204615 to 601c02b Compare October 28, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant