-
Notifications
You must be signed in to change notification settings - Fork 5.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
Add EIP: Separated Payer Transaction #7949
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
Check failure on line 1 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble is missing header(s): `description`
Check failure on line 1 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble is missing header(s): `description`
|
||
eip: XXXX | ||
Check failure on line 2 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble header `eip` must be an unsigned integer
Check failure on line 2 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble header `eip` must be an unsigned integer
|
||
title: Separated Payer Transaction | ||
author: Tomasz Stanczak (@tkstanczak), Ansgar Dietrichs (@adietrichs) | ||
discussions-to: tbd | ||
Check failure on line 5 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble header `discussions-to` is not a valid URL
Check failure on line 5 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble header `discussions-to` should point to a thread on ethereum-magicians.org
Check failure on line 5 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble header `discussions-to` is not a valid URL
Check failure on line 5 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorpreamble header `discussions-to` should point to a thread on ethereum-magicians.org
|
||
status: Draft | ||
type: Standards Track | ||
category: Core | ||
created: 2023-11-03 | ||
--- | ||
|
||
Check failure on line 11 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorbody is missing section(s): `Abstract`
Check failure on line 11 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorbody is missing section(s): `Abstract`
|
||
## Simple Summary | ||
Check failure on line 12 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorbody has extra section(s)
Check failure on line 12 in EIPS/eip-XXXX.md GitHub Actions / EIP Walidatorbody has extra section(s)
|
||
This EIP creates a new transaction type that separates the roles of transaction sender and payer. | ||
|
||
## Motivation | ||
[EIP-2711](./eip-2711.md) tried to introduce sponsored transactions as part of a broader set of new transaction behaviors. As a result of the broad scope, the EIP was never accepted. This EIP implements the core concept of sponsored transactions in isolation. | ||
|
||
## Specification | ||
|
||
### Parameters | ||
|
||
| Constant | Value | | ||
| - | - | | ||
| `SP_TX_TYPE` | `Bytes1(0x04)` | | ||
| `SENDER_BYTE` | `Bytes1(0x00)` | | ||
| `PAYER_BYTE` | `Bytes1(0x01)` | | ||
|
||
### Separated Payer Transaction | ||
|
||
We introduce a new [EIP-2718](./eip-2718.md) transaction, "separated payer transaction", where the `TransactionType` is `SP_TX_TYPE` and the `TransactionPayload` is the RLP serialization of the following `TransactionPayloadBody`: | ||
|
||
```python | ||
[ | ||
chain_id, | ||
nonce, | ||
max_priority_fee_per_gas, | ||
max_fee_per_gas, | ||
gas_limit, | ||
to, | ||
value, | ||
data, | ||
access_list, | ||
sender_y_parity, | ||
sender_r, | ||
sender_s, | ||
payer_y_parity, | ||
payer_r, | ||
payer_s | ||
] | ||
``` | ||
|
||
The fields `chain_id`, `nonce`, `max_priority_fee_per_gas`, `max_fee_per_gas`, `gas_limit`, `to`, `value`, `data`, and `access_list` follow the same semantics as [EIP-1559](./eip-1559.md). | ||
|
||
The [EIP-2718](./eip-2718.md) `ReceiptPayload` for this transaction is `rlp([status, cumulativeGasUsed, logsBloom, logs])`. | ||
|
||
#### Sender Signature | ||
|
||
The signature values `sender_y_parity`, `sender_r`, and `sender_s` are calculated by constructing a secp256k1 signature over the following digest: | ||
|
||
`keccak256(SP_TX_TYPE || SENDER_BYTE || rlp([chain_id, nonce, gas_limit, to, value, data, access_list]))`. | ||
|
||
The `sender_address` is the address derived from the public key recovered from the sender signature. | ||
|
||
#### Payer Signature | ||
|
||
The signature values `payer_y_parity`, `payer_r`, and `payer_s` are calculated by constructing a secp256k1 signature over the following digest: | ||
|
||
`keccak256(SP_TX_TYPE || PAYER_BYTE || rlp([chain_id, nonce, gas_limit, to, value, data, access_list]) || rlp([max_priority_fee_per_gas, max_fee_per_gas, sender_address]))`. | ||
|
||
The `payer_address` is the address derived from the public key recovered from the payer signature. | ||
|
||
### Behavior | ||
|
||
The role of the `payer_address` is to pay for the execution of the transaction. All transaction fee payment logic uses the `payer_address` instead of `sender_address`. | ||
|
||
The nonce verification and increment logic with respect to the `sender_address` remains unchanged. There is no nonce related logic (verification or increment) related to the `payer_address`. | ||
|
||
Both the `sender_address` and the `payer_address` have to have empty code. | ||
|
||
## Rationale | ||
TBD | ||
|
||
## Test Cases | ||
TBD | ||
|
||
## Implementation | ||
TBD | ||
|
||
## Security Considerations | ||
TBD | ||
|
||
## Copyright | ||
Copyright and related rights waived via [CC0](../LICENSE.md). |
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.
Assigning next sequential EIP/ERC/RIP number.
Numbering changed to sequential from 7500 and is no longer the PR number.
Please also update the filename.