-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Withdrawals fixes and improvements #7537
Conversation
3671f88
to
0919631
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with ETH Mainnet and api/v2/blocks/17327530
endpoint returns "withdrawals_count": null
for this block. Whereas, this block contains withdrawals and they're visible through UI.
Sample response from that endpoint:
{
"base_fee_per_gas": "33758890327",
"burnt_fees": "606951899402500848",
"burnt_fees_percentage": 95.14810830378532,
"difficulty": "0",
"extra_data": "TODO",
"gas_limit": "30000000",
"gas_target_percentage": 19.86016,
"gas_used": "17979024",
"gas_used_percentage": 59.93008,
"has_beacon_chain_withdrawals": true,
"hash": "0x9b6d5f664e297a63b6cc31e6378b3a8cbf99c1a9aa66d9307fad598bc288dd6c",
"height": 17327530,
"miner": {
"hash": "0x5124fcC2B3F99F571AD67D075643C743F38f1C34",
"implementation_name": null,
"is_contract": false,
"is_verified": null,
"name": null
},
"nonce": "0x0000000000000000",
"parent_hash": "0x0ed71a24746dc58fff1e891cbcaa816dc9ee746cc33cc945b7635dcacdf8cada",
"priority_fee": "30950325058596733",
"rewards": [
{
"reward": "30950325058596733",
"type": "Miner Reward"
}
],
"size": 89727,
"state_root": "TODO",
"timestamp": "2023-05-24T07:20:59.000000Z",
"total_difficulty": "58750003716598352816469",
"tx_count": 165,
"tx_fees": "637902224461097581",
"type": "block",
"uncles_hashes": [],
"withdrawals_count": null
}
0919631
to
2c69726
Compare
d7c0f0a
to
5cc8dc9
Compare
5cc8dc9
to
c82bc7e
Compare
Thanks, fixed |
Close #7531
Motivation
Currently withdrawal amount displayed in wei however it returned in gwei from the node
Also, sum counter does not work properly
Changelog
withdrawals_count
field to block structure and !removehas_beacon_chain_withdrawals
!Checklist for your Pull Request (PR)
CHANGELOG.md
with this PRmaster
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.