Skip to content

Conversation

@james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Aug 20, 2025

What type of PR is this?

Feature

What does this PR do? Why is it needed?

adds the new endpoint /eth/v1/beacon/blobs/{block_id} that will later replace /eth/v1/beacon/blob_sidecars/{block_id}

Which issues(s) does this PR fix?

Fixes # ethereum/beacon-APIs#546

task in #14129

Other notes for review

Acknowledgements

@james-prysm james-prysm mentioned this pull request Aug 20, 2025
30 tasks
@james-prysm james-prysm marked this pull request as ready for review September 15, 2025 15:38
}

// If block is not in the retention window, return 200 w/ empty list
if !p.BlobStorage.WithinRetentionPeriod(slots.ToEpoch(roSignedBlock.Block().Slot()), slots.ToEpoch(p.GenesisTimeFetcher.CurrentSlot())) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing this check based on discussion with manu, we should just return what we have

field_params "github.com/OffchainLabs/prysm/v6/config/fieldparams"
"github.com/OffchainLabs/prysm/v6/beacon-chain/rpc/eth/shared"
"github.com/OffchainLabs/prysm/v6/beacon-chain/rpc/options"
fieldparams "github.com/OffchainLabs/prysm/v6/config/fieldparams"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the alias can be removed because it is identical to the package name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops not sure how that happened

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait it's called field_params so i need to leave it or use the old one
i think field_params is not preferred


// Verify all requested hashes were found
if len(indices) != len(cfg.VersionedHashes) {
return nil, &core.RpcError{Err: errors.New("versioned hash does not exist in given block"), Reason: core.NotFound}
Copy link
Contributor

@rkapka rkapka Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would require writing some more code, but it would be nice to let the caller know exactly which hash(es) were not found

@james-prysm james-prysm added this pull request to the merge queue Sep 17, 2025
Merged via the queue into develop with commit 7e32bbc Sep 17, 2025
17 checks passed
@james-prysm james-prysm deleted the get-blob-fulu branch September 17, 2025 15:52
@rkapka rkapka mentioned this pull request Sep 17, 2025
3 tasks
fernantho pushed a commit to fernantho/prysm that referenced this pull request Sep 26, 2025
* wip

* wip

* adding ssz marshalling

* updating function for readability

* adding unit tests and fixing ssz

* gaz

* linting

* fixing test

* wip

* fixing mock blocker

* fixing test

* fixing tests and handler

* updating unit test for more coverage

* adding some comments

* self review

* gofmt

* updating and consolidating tests

* moving functional options so it can be used properly

* gofmt

* more missed gofmt

* Update beacon-chain/rpc/endpoints.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update beacon-chain/rpc/lookup/blocker.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update beacon-chain/rpc/eth/beacon/handlers.go

Co-authored-by: Radosław Kapka <[email protected]>

* radek feedback

* fixing tests

* fixing test

* moving endpoint in test

* removed unneeded comment

* fixing linting from latest develop merge

* fixing linting from latest develop merge

* Update beacon-chain/rpc/eth/blob/handlers.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update beacon-chain/rpc/eth/blob/handlers.go

Co-authored-by: Radosław Kapka <[email protected]>

* reverting change

* reverting change

* adding in better error for which hashes are missing

* Update beacon-chain/rpc/lookup/blocker.go

Co-authored-by: Radosław Kapka <[email protected]>

* fixing unit test

* gofmt

---------

Co-authored-by: Radosław Kapka <[email protected]>
fernantho pushed a commit to fernantho/prysm that referenced this pull request Sep 26, 2025
* wip

* wip

* adding ssz marshalling

* updating function for readability

* adding unit tests and fixing ssz

* gaz

* linting

* fixing test

* wip

* fixing mock blocker

* fixing test

* fixing tests and handler

* updating unit test for more coverage

* adding some comments

* self review

* gofmt

* updating and consolidating tests

* moving functional options so it can be used properly

* gofmt

* more missed gofmt

* Update beacon-chain/rpc/endpoints.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update beacon-chain/rpc/lookup/blocker.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update beacon-chain/rpc/eth/beacon/handlers.go

Co-authored-by: Radosław Kapka <[email protected]>

* radek feedback

* fixing tests

* fixing test

* moving endpoint in test

* removed unneeded comment

* fixing linting from latest develop merge

* fixing linting from latest develop merge

* Update beacon-chain/rpc/eth/blob/handlers.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update beacon-chain/rpc/eth/blob/handlers.go

Co-authored-by: Radosław Kapka <[email protected]>

* reverting change

* reverting change

* adding in better error for which hashes are missing

* Update beacon-chain/rpc/lookup/blocker.go

Co-authored-by: Radosław Kapka <[email protected]>

* fixing unit test

* gofmt

---------

Co-authored-by: Radosław Kapka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants