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

Add EIP: Separated Payer Transaction #7949

Closed
Closed
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
93 changes: 93 additions & 0 deletions EIPS/eip-XXXX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---

Check failure on line 1 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble is missing header(s): `description`

error[preamble-req]: preamble is missing header(s): `description` --> EIPS/eip-XXXX.md | | = help: see https://ethereum.github.io/eipw/preamble-req/

Check failure on line 1 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble is missing header(s): `description`

error[preamble-req]: preamble is missing header(s): `description` --> EIPS/eip-XXXX.md | | = help: see https://ethereum.github.io/eipw/preamble-req/
eip: XXXX

Check failure on line 2 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `eip` must be an unsigned integer

error[preamble-eip]: preamble header `eip` must be an unsigned integer --> EIPS/eip-XXXX.md:2:5 | 2 | eip: XXXX | ^^^^^ not a non-negative integer | = help: see https://ethereum.github.io/eipw/preamble-eip/

Check failure on line 2 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `eip` must be an unsigned integer

error[preamble-eip]: preamble header `eip` must be an unsigned integer --> EIPS/eip-XXXX.md:2:5 | 2 | eip: XXXX | ^^^^^ not a non-negative integer | = help: see https://ethereum.github.io/eipw/preamble-eip/
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
eip: XXXX
eip: 7553

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.

title: Separated Payer Transaction
author: Tomasz Stanczak (@tkstanczak), Ansgar Dietrichs (@adietrichs)
discussions-to: tbd

Check failure on line 5 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `discussions-to` is not a valid URL

error[preamble-discussions-to]: preamble header `discussions-to` is not a valid URL --> EIPS/eip-XXXX.md:5:16 | 5 | discussions-to: tbd | ^^^^ relative URL without a base | = help: see https://ethereum.github.io/eipw/preamble-discussions-to/

Check failure on line 5 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `discussions-to` should point to a thread on ethereum-magicians.org

error[preamble-re-discussions-to]: preamble header `discussions-to` should point to a thread on ethereum-magicians.org --> EIPS/eip-XXXX.md:5:16 | 5 | discussions-to: tbd | ^^^^ required pattern was not matched | = info: the pattern in question: `^https://ethereum-magicians.org/t/[^/]+/[0-9]+$` = help: see https://ethereum.github.io/eipw/preamble-re-discussions-to/

Check failure on line 5 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `discussions-to` is not a valid URL

error[preamble-discussions-to]: preamble header `discussions-to` is not a valid URL --> EIPS/eip-XXXX.md:5:16 | 5 | discussions-to: tbd | ^^^^ relative URL without a base | = help: see https://ethereum.github.io/eipw/preamble-discussions-to/

Check failure on line 5 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `discussions-to` should point to a thread on ethereum-magicians.org

error[preamble-re-discussions-to]: preamble header `discussions-to` should point to a thread on ethereum-magicians.org --> EIPS/eip-XXXX.md:5:16 | 5 | discussions-to: tbd | ^^^^ required pattern was not matched | = info: the pattern in question: `^https://ethereum-magicians.org/t/[^/]+/[0-9]+$` = help: see https://ethereum.github.io/eipw/preamble-re-discussions-to/
status: Draft
type: Standards Track
category: Core
created: 2023-11-03
---

Check failure on line 11 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body is missing section(s): `Abstract`

error[markdown-req-section]: body is missing section(s): `Abstract` --> EIPS/eip-XXXX.md | | = help: must be at the second level (`## Heading`) = help: see https://ethereum.github.io/eipw/markdown-req-section/

Check failure on line 11 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body is missing section(s): `Abstract`

error[markdown-req-section]: body is missing section(s): `Abstract` --> EIPS/eip-XXXX.md | | = help: must be at the second level (`## Heading`) = help: see https://ethereum.github.io/eipw/markdown-req-section/
## Simple Summary

Check failure on line 12 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body has extra section(s)

error[markdown-order-section]: body has extra section(s) --> EIPS/eip-XXXX.md | 12 | ## Simple Summary | ::: EIPS/eip-XXXX.md | 86 | ## Implementation | = help: see https://ethereum.github.io/eipw/markdown-order-section/

Check failure on line 12 in EIPS/eip-XXXX.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body has extra section(s)

error[markdown-order-section]: body has extra section(s) --> EIPS/eip-XXXX.md | 12 | ## Simple Summary | ::: EIPS/eip-XXXX.md | 86 | ## Implementation | = help: see https://ethereum.github.io/eipw/markdown-order-section/
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).
Loading