Skip to content

fix: Fix BlockAccessService - getBlock - when using only retrieve_latest=true #1146

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

Closed
wants to merge 1 commit into from

Conversation

AlfredoG87
Copy link
Contributor

@AlfredoG87 AlfredoG87 commented May 14, 2025

Reviewer Notes

current request does not work:


grpcurl -plaintext -import-path  <insertDir> -proto block_access_service.proto -d '{"retrieve_latest":"true"}' 127.0.0.1:8080 org.hiero.block.api.BlockAccessService.getBlock

with this temporary fix, we make it work.

but it could also work when:

grpcurl -plaintext -import-path  <insertDir> -proto block_access_service.proto -d '{"block_number": "18446744073709551615", "retrieve_latest":"true"}' 127.0.0.1:8080 org.hiero.block.api.BlockAccessService.getBlock

@AlfredoG87 AlfredoG87 self-assigned this May 14, 2025
@AlfredoG87 AlfredoG87 added this to the 0.10.0 milestone May 14, 2025
@AlfredoG87 AlfredoG87 added the Bug A error that causes the feature to behave differently than what was expected based on design docs label May 14, 2025
@AlfredoG87 AlfredoG87 changed the title bug: Fix BlockAccessService - getBlock - when using only retrieve_latest=true fix: Fix BlockAccessService - getBlock - when using only retrieve_latest=true May 14, 2025
@AlfredoG87 AlfredoG87 marked this pull request as ready for review May 14, 2025 19:17
@AlfredoG87 AlfredoG87 requested review from a team as code owners May 14, 2025 19:17
@Nana-EC Nana-EC requested review from georgi-l95, ata-nas and jsync-swirlds and removed request for mattp-swirldslabs May 14, 2025 19:53
Copy link
Contributor

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

Looking good but one suggestion to include more coverage

Nana-EC
Nana-EC previously approved these changes May 14, 2025
Copy link
Contributor

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

LG to unblock.
The test case for -1 should probably be restored later but with a different error condition

Nana-EC
Nana-EC previously approved these changes May 14, 2025
Copy link
Contributor

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

LG

Nana-EC
Nana-EC previously approved these changes May 14, 2025
Copy link
Contributor

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

LG

@jsync-swirlds
Copy link
Contributor

This PR should not apply to main, as it creates a bug to work around a bad assumption.
Can we target this only to the release branch as a temporary patch/workaround, and rely on the bug issue to actually fix this correctly in main?

@AlfredoG87 AlfredoG87 changed the base branch from main to release/0.10 May 14, 2025 23:09
@AlfredoG87 AlfredoG87 requested a review from a team as a code owner May 14, 2025 23:09
@AlfredoG87 AlfredoG87 requested a review from nathanklick May 14, 2025 23:09
…latest` set.

Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
@AlfredoG87 AlfredoG87 force-pushed the fix-block-acceess-retrive-latest branch from 6d57fab to c0af20c Compare May 14, 2025 23:24
Copy link
Contributor

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

Appropriate as work around for v0.10.0 testing

@AlfredoG87
Copy link
Contributor Author

superseeded by #1147

and founded another workaround so no need to rush this change into current release.

@AlfredoG87 AlfredoG87 closed this May 15, 2025
Copy link

codecov bot commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@                Coverage Diff                 @@
##             release/0.10    #1146      +/-   ##
==================================================
- Coverage           84.86%   84.84%   -0.02%     
+ Complexity            916      914       -2     
==================================================
  Files                 104      104              
  Lines                3719     3715       -4     
  Branches              396      395       -1     
==================================================
- Hits                 3156     3152       -4     
  Misses                411      411              
  Partials              152      152              
Files with missing lines Coverage Δ Complexity Δ
.../node/access/service/BlockAccessServicePlugin.java 80.64% <100.00%> (-1.18%) 9.00 <0.00> (-2.00)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A error that causes the feature to behave differently than what was expected based on design docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants