lambdaclass / lambdaclass/lambda_ethereum_consensus
[Snappy] Support stream decoding with decoded size limit
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 109
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
The spec says about ssz_snappy's header:
Encoding-dependent header: Req/Resp protocols using the
ssz_snappyencoding strategy MUST encode the length of the raw SSZ bytes, encoded as an unsigned protobuf varint.
A block request's response is basically:
[status] [edh] [encoded chunk] [status] [edh] [encoded chunk] [status] ...
edh = encoding-dependent-header
Limiting the size when decoding data that follows the edh would enable us to differentiate chunk ends from stream errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named in the issue. Start by locating the ssz_snappy decoding path and its handling of encoding-dependent headers, then inspect existing request/response stream tests; done means decoding can enforce the raw SSZ size from the header and distinguish chunk ends from stream errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100