Skip to content

Extract shared indexed-list decoders for beacon REST handlers - #17399

Open
syjn99 wants to merge 1 commit into
developfrom
feat/indexed-list-decode
Open

Extract shared indexed-list decoders for beacon REST handlers#17399
syjn99 wants to merge 1 commit into
developfrom
feat/indexed-list-decode

Conversation

@syjn99

@syjn99 syjn99 commented Aug 24, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

Bug fix & Refactor

What does this PR do? Why is it needed?

As we've added SSZ support for request body, there are some duplicated logics for decoding SSZ/JSON (decode*{SSZ,JSON}). This PR adds a common decoding functions both for SSZ and JSON based on the callback function passed.

This PR also fixes a bug that might be panicked when there's null entry in JSON body. (An unit test added: null element keeps failure indices aligned) Also, POST /eth/v2/beacon/pool/attestations now doesn't compact the valid attestations; instead, it defines the fixed length of slice and puts valid one via index.

Which issue(s) does this PR fix?

N/A

Other notes for review

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have included a uniquely named changelog fragment file.
  • I have added a description with sufficient context for reviewers to understand this PR.
  • I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).

@syjn99 syjn99 added the api label Aug 24, 2026
@syjn99
syjn99 force-pushed the feat/indexed-list-decode branch from c30e1f7 to 9490462 Compare August 24, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant