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 all commits
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
5 changes: 4 additions & 1 deletion EIPS/eip-4895.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ Define a new payload-level object called a `withdrawal` that describes withdrawa
`Withdrawal`s are syntactically similar to a user-level transaction but live in a different domain than user-level transactions.

`Withdrawal`s provide key information from the consensus layer:

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 +130,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 to units of wei must be performed when working with account balances in the execution state.

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

This operation has no associated gas costs.
Expand Down