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

algod: Add API Endpoint to fetch TxIDs from block #5611

Merged
merged 12 commits into from Aug 9, 2023

Conversation

algochoi
Copy link
Contributor

@algochoi algochoi commented Jul 26, 2023

Summary

Adds an algod endpoint /v2/blocks/{round}/txids to return top level TxIDs in a given block.

#5461

Test Plan

Added a unit test in handlers_test.go, added a small test in an existing e2e test and locally tested endpoint to confirm that only top-level txids were reported.

{"blockTxids":["PFKS67KJXVXD3SMVP65F4NTNKULDBQJBBP3SCLHYFSTXDLQGX3BA"]}

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #5611 (aad531d) into master (4dc3f92) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #5611   +/-   ##
=======================================
  Coverage   54.95%   54.96%           
=======================================
  Files         463      463           
  Lines       64553    64570   +17     
=======================================
+ Hits        35478    35491   +13     
- Misses      26698    26707    +9     
+ Partials     2377     2372    -5     
Files Changed Coverage Δ
daemon/algod/api/server/v2/handlers.go 0.80% <0.00%> (-0.02%) ⬇️

... and 14 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@algochoi algochoi marked this pull request as ready for review July 26, 2023 18:50
@algochoi algochoi requested a review from a team July 27, 2023 16:06
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Looking clean and correct.

I left a couple of nits. Also consider adding a call to the endpoint in an already existing E2E test. But this might entail adding a local client (not too bad).

Co-authored-by: Zeph Grunschlag <tzaffi@users.noreply.github.com>
winder
winder previously approved these changes Jul 28, 2023
Copy link
Contributor

@winder winder left a comment

Choose a reason for hiding this comment

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

LGTM

tzaffi
tzaffi previously approved these changes Aug 1, 2023
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

LGTM

@algochoi algochoi requested a review from winder August 1, 2023 16:31
daemon/algod/api/server/v2/handlers.go Outdated Show resolved Hide resolved
daemon/algod/api/server/v2/handlers.go Outdated Show resolved Hide resolved
Copy link
Contributor

@winder winder left a comment

Choose a reason for hiding this comment

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

Declining for Pavel's feedback

algorandskiy
algorandskiy previously approved these changes Aug 7, 2023
tzaffi
tzaffi previously approved these changes Aug 8, 2023
@algochoi algochoi dismissed stale reviews from algorandskiy and tzaffi via aad531d August 8, 2023 23:16
@algorandskiy algorandskiy merged commit 867aa17 into algorand:master Aug 9, 2023
18 checks passed
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.

None yet

6 participants