Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(blobs): cleanup logging and node-api handling of blobs #2486

Merged
merged 10 commits into from
Feb 19, 2025

Conversation

calbera
Copy link
Contributor

@calbera calbera commented Feb 6, 2025

Simple cleanup for blobs endpoint in beacon api

@calbera calbera requested a review from a team as a code owner February 6, 2025 19:18
@calbera calbera requested review from shotes and removed request for a team February 6, 2025 19:18
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 32.30%. Comparing base (9af4d0d) to head (3740831).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
node-api/backend/blobs.go 0.00% 7 Missing ⚠️
beacon/blockchain/process_proposal.go 0.00% 3 Missing ⚠️
node-api/backend/backend.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2486      +/-   ##
==========================================
- Coverage   32.31%   32.30%   -0.01%     
==========================================
  Files         350      350              
  Lines       15672    15674       +2     
  Branches       20       20              
==========================================
  Hits         5064     5064              
- Misses      10245    10247       +2     
  Partials      363      363              
Files with missing lines Coverage Δ
node-api/backend/backend.go 0.00% <0.00%> (ø)
beacon/blockchain/process_proposal.go 0.00% <0.00%> (ø)
node-api/backend/blobs.go 0.00% <0.00%> (ø)

Comment on lines +40 to +43
// If the requested slot is 0 (head, finalized, justified), use the current slot.
if slot == 0 {
slot = math.Slot(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.

this is the main fix of this PR. we resolve "head", "finalized" and "justified" blockIDs to slot 0, which hits the node query context for the latest height.

Copy link
Contributor

@nidhi-singh02 nidhi-singh02 left a comment

Choose a reason for hiding this comment

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

lgtm!

@calbera calbera requested a review from shotes February 18, 2025 21:41
@calbera calbera changed the title chore(blobs): cleanup logging and node-api handling of blobs fix(blobs): cleanup logging and node-api handling of blobs Feb 18, 2025
Copy link
Contributor

@shotes shotes left a comment

Choose a reason for hiding this comment

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

nits on using getter for slot. Otherwise LGTM.

Not a big deal for the getter nits. I've been wanting to clean up data handling and exported values around the codebase as a whole for awhile now. For now, I think we should be diligently using getters where expected.

Co-authored-by: Shota Ehrlich <[email protected]>
Signed-off-by: Cal Bera <[email protected]>
Co-authored-by: Shota Ehrlich <[email protected]>
Signed-off-by: Cal Bera <[email protected]>
@shotes
Copy link
Contributor

shotes commented Feb 18, 2025

LGTM

@calbera calbera merged commit d90756b into main Feb 19, 2025
19 checks passed
@calbera calbera deleted the clean-blobs-handling branch February 19, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants