test(api/rpc): add CELESTIA-202 OOM reproduction#4823
Draft
rootulp wants to merge 1 commit intocelestiaorg:mainfrom
Draft
test(api/rpc): add CELESTIA-202 OOM reproduction#4823rootulp wants to merge 1 commit intocelestiaorg:mainfrom
rootulp wants to merge 1 commit intocelestiaorg:mainfrom
Conversation
Add unit tests and a Docker-based reproduction for the unlimited JSON-RPC batch request OOM vulnerability (CELESTIA-202). Unit tests (server_test.go): - TestServer_BatchRequestLimit: verifies the server processes unlimited batch requests without any limit - TestServer_BatchResponseAmplification: demonstrates memory amplification where a small request triggers large responses Docker reproduction (oom-repro/): - docker-compose.yml: local devnet with celestia-app validator and celestia-node bridge (512 MB memory limit) - attack.go: ramps up concurrent batch requests until OOM - repro.sh: orchestrates build, startup, attack, and OOM detection Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
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
Unit tests (
api/rpc/server_test.go)TestServer_BatchRequestLimit: sends a batch of 10K requests — server processes all without any limitTestServer_BatchResponseAmplification: demonstrates 34x memory amplification (small request → large response)Docker reproduction (
api/rpc/oom-repro/)Starts a local devnet (celestia-app validator + celestia-node bridge with 512 MB memory limit), then ramps up concurrent batch requests until the bridge node is OOM-killed.
Run with:
bash api/rpc/oom-repro/repro.shTest plan
go test -run TestServer_BatchRequestLimit ./api/rpc/go test -run TestServer_BatchResponseAmplification ./api/rpc/bash api/rpc/oom-repro/repro.shand verify OOM kill🤖 Generated with Claude Code