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

EIP-4895: CL-EL withdrawals harmonization: using units of Gwei #6325

Merged
merged 3 commits into from
Jan 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion EIPS/eip-4895.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Define a new payload-level object called a `withdrawal` that describes withdrawa
1. a monotonically increasing `index`, starting from 0, as a `uint64` value that increments by 1 per withdrawal to uniquely identify each withdrawal
2. the `validator_index` of the validator, as a `uint64` value, on the consensus layer the withdrawal corresponds to
3. a recipient for the withdrawn ether `address` as a 20-byte value
4. a nonzero `amount` of ether given in wei as a `uint256` value.
4. a nonzero `amount` of ether given in Gwei (1e9 wei) as a `uint64` value.

*NOTE*: the `index` for each withdrawal is a global counter spanning the entire sequence of withdrawals.

Expand Down Expand Up @@ -129,6 +129,8 @@ The `withdrawals` in an execution payload are processed **after** any user-level

For each `withdrawal` in the list of `execution_payload.withdrawals`, the implementation increases the balance of the `address` specified by the `amount` given.

Recall that the `amount` is given in units of Gwei so a conversion of units of wei must be performed when working with account balances in the execution state.
ralexstokes marked this conversation as resolved.
Show resolved Hide resolved

This balance change is unconditional and **MUST** not fail.

This operation has no associated gas costs.
Expand Down