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

feat: implement new beacon APIs(accessors for pending_deposits/pending_partial_withdrawals) #7006

Open
wants to merge 5 commits into
base: unstable
Choose a base branch
from

Conversation

syjn99
Copy link

@syjn99 syjn99 commented Feb 15, 2025

Issue Addressed

Resolves #7003

Proposed Changes

Added two endpoints as ethereum/beacon-APIs#500 proposed:

  • /eth/v1/beacon/states/{state_id}/pending_deposits
  • /eth/v1/beacon/states/{state_id}/pending_partial_withdrawals

Additional Info

#7005 breaks current test set-up right now. #7007 fixes the issue, but not yet merged to unstable branch.

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Looks good at a glance, you're definitely on the right track. I've triggered CI so you can see if the tests pass. You can also run locally, just not in debug mode

@michaelsproul
Copy link
Member

michaelsproul commented Feb 17, 2025

You can fix the cargo format failure by running cargo fmt --all

@syjn99
Copy link
Author

syjn99 commented Feb 20, 2025

RUST_MIN_STACK=16777216 cargo test beacon_get_state_info_electra -p http_api --test bn_http_api_tests -- --nocapture

@michaelsproul Hi, thanks to #7007, I found that my test successfully passed with the commit. However, I'm afraid that default BeaconChainHarness will always return empty list of pending_deposits/pending_partial_withdrawals as it is initialized with default value. Do I have to add a case for comparing not emptied list? If then, would you mind letting me know where the good place to start?

@michaelsproul michaelsproul marked this pull request as ready for review February 20, 2025 11:43
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.

2 participants