From 8fb1734ff246ba3e358dc7bb18cfd33b3a5cc5ee Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 16 Sep 2024 19:54:53 -0400 Subject: [PATCH 01/12] Add 8888 --- EIPS/eip-8888.md | 104 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 EIPS/eip-8888.md diff --git a/EIPS/eip-8888.md b/EIPS/eip-8888.md new file mode 100644 index 00000000000000..b0bbf641bb3bf2 --- /dev/null +++ b/EIPS/eip-8888.md @@ -0,0 +1,104 @@ +--- +eip: 8888 +title: No-Ether transactions with free-for-all tips +author: William Entriken (@fulldecent) +status: Draft +type: Meta +created: 2024-09-14 +--- + +## Abstract + +A technique is introduced where an externally-owned account having no Ether can send transactions and pay tips using a new "free-for-all" bucket and using their own `origin.tx`. This requires no client changes and is compatible with existing ecosystem parts. + +## Motivation + +There is much interest in third-party-pay transactions on Ethereum and competing networks. + +Other proposals require changes to the Ethereum client, that transactions be sent to the network (i.e. `tx.origin`) using a separate account and/or other additional things. + +In contrast, this proposal introduces and standardizes a solution to this problem that works only with existing client and technology, and which preserves the `tx.origin` of the originator of a transaction. + +## Specification + +### End user process + +1. An end user who controls an externally-owned account, say Alice, will prepare transaction(s) she would like to execute and she signs this (series of) transactions. +2. If Alice will like to provide consideration for executing these transactions, she will ensure that a well-known address on the network, "the free-for-all bucket" will control tokens (such as ERC-20, ERC-721, ERC-1155 tokens) at the end of her series of transactions. +3. Alice orders her transaction nonces carefully considering that what will eventually be executed may be: + 1. None of them; + 2. Only the first; + 3. The first then the second; + 4. The first, then the second, ... then the Nth transaction, which is not the last in her series of transactions; or + 5. All her transactions, in order. +4. Alice sends this series of transactions to a service that communicates with block proposers. + 1. Currently mempools in baseline clients would not propogate such transactoins. + +For example, if consideration is sent to the free-for-all address, this would typically be the last in her series of transactions. + +### Block preparer process + +1. Sign a transaction (from any origin) to send Ether to Alice representing the current gas price times the current block size. +2. (Optional) Prepare and sign a transaction to the free-for-all account, to preload any necessary responses. +3. Start an execution context and include this send-Ether transaction and all of Alice's transactions. +4. In the execution context, identify tokens (e.g. ERC-20, ERC-721, ERC-1155) sent to the free-for-all contract address or other valuable consideration accrued to the free-for-all account. +5. Sign a transaction to (from any any origin) to take security of the consideration from the free-for-all account and include this transaction in the execution context. +6. Evaluate the total gas spent. +7. Rollback the execution context. And repeat steps 1 through 4 with these changes: + 1. Step 1: use the actual required gas amount (in Ether). + 2. Step 4: abort if the consideration received in this second iteration is not the expected amount from the first iteration. +8. Use some local business logic to compare the Ether spent in step 1 (second iteration) versus the consideration receieved in step 4 and classify the result as favorable or not. +9. If the result is favorable, commit this execution context to the mainline. Or if the result is not favorable, rollback this execution context. + 1. The result of this decision may feed into a reputation tracking system to avoid evaluating future unfruitful transaction(s). +10. Continue execution, and publish the block. + +### Free-for-all bucket + +This approach requires that the end user must be able to send consideration the block proposer without knowing who they are, and the block proposer must be able to realize this consideration. + +This EIP proposes to use a well-known contract account deployment for this purpose. And here is the required interface: + +```solidity +interface FreeForAll { + // Performs a call + function execute(address recipient, memory bytes, uint256 gasLimit, uint256 value); + + // Prepare return values for the next N times this contract is called only in this block + // [TODO: spell this out] + function preloadExecutions(memory bytes[]); + + // Return the next return value in this block from preloadExecutions + fallback() { + } +} +``` + +## Rationale + +This approach can be useful for end users that do not want to or are not able to add Ether to their account. + +This approach allows to use the correct `origin.tx` which may be required for important transactions like ERC-721 `setApprovalForAll`. + +This approach may use more gas than other approaches where the consensus client is changed or where transactions can execute from (`origin.tx`) a different account. + +### Alternatives considered + +* Update EIP-1559 so that transactions with gasPrice = 0 are legal, but only if the comensurate amount of gas will be burnt by the block preparer in that same block. +* Create a new transaction type that encapsulates another signed transaction. +* Create a new opcode to get the coinbase of the next block. + +## Backwards Compatibility + +... + +## Reference Implementation + +... + +## Security Considerations + +... + +## Copyright + +Copyright and related rights waived via [CC0](https://eips.ethereum.org/LICENSE). \ No newline at end of file From 686169aef6c3c57f16603349296abb85c9854885 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 16 Sep 2024 19:59:45 -0400 Subject: [PATCH 02/12] Update eip-8888.md --- EIPS/eip-8888.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EIPS/eip-8888.md b/EIPS/eip-8888.md index b0bbf641bb3bf2..e1781e285fc248 100644 --- a/EIPS/eip-8888.md +++ b/EIPS/eip-8888.md @@ -2,6 +2,7 @@ eip: 8888 title: No-Ether transactions with free-for-all tips author: William Entriken (@fulldecent) +discussions-to: https://ethereum-magicians.org/t/eip-8888-no-ether-transactions-with-free-for-all-tips/21108 status: Draft type: Meta created: 2024-09-14 @@ -101,4 +102,4 @@ This approach may use more gas than other approaches where the consensus client ## Copyright -Copyright and related rights waived via [CC0](https://eips.ethereum.org/LICENSE). \ No newline at end of file +Copyright and related rights waived via [CC0](https://eips.ethereum.org/LICENSE). From 005234eb38f55eedc878c648e7510e1fb6eb00ab Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 16 Sep 2024 20:00:12 -0400 Subject: [PATCH 03/12] Update eip-8888.md --- EIPS/eip-8888.md | 1 + 1 file changed, 1 insertion(+) diff --git a/EIPS/eip-8888.md b/EIPS/eip-8888.md index e1781e285fc248..241f8f98485452 100644 --- a/EIPS/eip-8888.md +++ b/EIPS/eip-8888.md @@ -6,6 +6,7 @@ discussions-to: https://ethereum-magicians.org/t/eip-8888-no-ether-transactions- status: Draft type: Meta created: 2024-09-14 +description: A technique is introduced where an externally-owned account having no Ether can send transactions and pay tips using a new "free-for-all" bucket and using their own `origin.tx`. This requires no client changes and is compatible with existing ecosystem parts. --- ## Abstract From ec51efaa371877627e8d42c74c8dddb12466597b Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 16 Sep 2024 20:22:10 -0400 Subject: [PATCH 04/12] Update eip-8888.md --- EIPS/eip-8888.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-8888.md b/EIPS/eip-8888.md index 241f8f98485452..f366870888b4b5 100644 --- a/EIPS/eip-8888.md +++ b/EIPS/eip-8888.md @@ -6,7 +6,7 @@ discussions-to: https://ethereum-magicians.org/t/eip-8888-no-ether-transactions- status: Draft type: Meta created: 2024-09-14 -description: A technique is introduced where an externally-owned account having no Ether can send transactions and pay tips using a new "free-for-all" bucket and using their own `origin.tx`. This requires no client changes and is compatible with existing ecosystem parts. +description: Externally-owned account having no Ether can send transactions and pay tips using a new "free-for-all" bucket --- ## Abstract From ce1b802b0e7ddccc04f9218ee02e36deb68a281c Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 16 Sep 2024 20:23:09 -0400 Subject: [PATCH 05/12] Update eip-8888.md --- EIPS/eip-8888.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-8888.md b/EIPS/eip-8888.md index f366870888b4b5..5f0daf8ca5551f 100644 --- a/EIPS/eip-8888.md +++ b/EIPS/eip-8888.md @@ -26,7 +26,7 @@ In contrast, this proposal introduces and standardizes a solution to this proble ### End user process 1. An end user who controls an externally-owned account, say Alice, will prepare transaction(s) she would like to execute and she signs this (series of) transactions. -2. If Alice will like to provide consideration for executing these transactions, she will ensure that a well-known address on the network, "the free-for-all bucket" will control tokens (such as ERC-20, ERC-721, ERC-1155 tokens) at the end of her series of transactions. +2. If Alice will like to provide consideration for executing these transactions, she will ensure that a well-known address on the network, "the free-for-all bucket" will control tokens (such as [ERC-20](./erc-20), [ERC-721](./erc-721), [ERC-1155](./erc-1155) tokens) at the end of her series of transactions. 3. Alice orders her transaction nonces carefully considering that what will eventually be executed may be: 1. None of them; 2. Only the first; From 7b3ac2f78470afb104c02c3188b2ab09296152d3 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 16 Sep 2024 20:27:55 -0400 Subject: [PATCH 06/12] Update eip-8888.md --- EIPS/eip-8888.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-8888.md b/EIPS/eip-8888.md index 5f0daf8ca5551f..72640456b5a6b3 100644 --- a/EIPS/eip-8888.md +++ b/EIPS/eip-8888.md @@ -1,12 +1,12 @@ --- eip: 8888 title: No-Ether transactions with free-for-all tips +description: Externally-owned account having no Ether can send transactions and pay tips using a new "free-for-all" bucket author: William Entriken (@fulldecent) discussions-to: https://ethereum-magicians.org/t/eip-8888-no-ether-transactions-with-free-for-all-tips/21108 status: Draft type: Meta created: 2024-09-14 -description: Externally-owned account having no Ether can send transactions and pay tips using a new "free-for-all" bucket --- ## Abstract From c0926659a0ffdb5adde50b16c9d6b13437aae12f Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 16 Sep 2024 20:28:32 -0400 Subject: [PATCH 07/12] Update eip-8888.md --- EIPS/eip-8888.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-8888.md b/EIPS/eip-8888.md index 72640456b5a6b3..8c0c7fd9914108 100644 --- a/EIPS/eip-8888.md +++ b/EIPS/eip-8888.md @@ -85,7 +85,7 @@ This approach may use more gas than other approaches where the consensus client ### Alternatives considered -* Update EIP-1559 so that transactions with gasPrice = 0 are legal, but only if the comensurate amount of gas will be burnt by the block preparer in that same block. +* Update [EIP-1559](./erc-1559) so that transactions with gasPrice = 0 are legal, but only if the comensurate amount of gas will be burnt by the block preparer in that same block. * Create a new transaction type that encapsulates another signed transaction. * Create a new opcode to get the coinbase of the next block. From 0729e5874fd39aadcc355614094855400c927603 Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:30:53 -0400 Subject: [PATCH 08/12] Update and rename eip-8888.md to eip-7768.md --- EIPS/{eip-8888.md => eip-7768.md} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename EIPS/{eip-8888.md => eip-7768.md} (98%) diff --git a/EIPS/eip-8888.md b/EIPS/eip-7768.md similarity index 98% rename from EIPS/eip-8888.md rename to EIPS/eip-7768.md index 8c0c7fd9914108..53be1e1bef6a1f 100644 --- a/EIPS/eip-8888.md +++ b/EIPS/eip-7768.md @@ -1,9 +1,9 @@ --- -eip: 8888 +eip: 7768 title: No-Ether transactions with free-for-all tips description: Externally-owned account having no Ether can send transactions and pay tips using a new "free-for-all" bucket author: William Entriken (@fulldecent) -discussions-to: https://ethereum-magicians.org/t/eip-8888-no-ether-transactions-with-free-for-all-tips/21108 +discussions-to: https://ethereum-magicians.org/t/eip-7768-no-ether-transactions-with-free-for-all-tips/21108 status: Draft type: Meta created: 2024-09-14 From acad2216517db5021918bc9c66583168412eee0c Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:35:13 -0400 Subject: [PATCH 09/12] Update eip-7768.md --- EIPS/eip-7768.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/EIPS/eip-7768.md b/EIPS/eip-7768.md index 53be1e1bef6a1f..c683e3d09ab0af 100644 --- a/EIPS/eip-7768.md +++ b/EIPS/eip-7768.md @@ -91,15 +91,11 @@ This approach may use more gas than other approaches where the consensus client ## Backwards Compatibility -... - -## Reference Implementation - -... +... ## Security Considerations -... +... ## Copyright From 119fc0763c5fa749fd735e482be53eceb9a5745a Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 24 Dec 2024 09:16:04 -0500 Subject: [PATCH 10/12] Use new copyright statement --- EIPS/eip-7768.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7768.md b/EIPS/eip-7768.md index c683e3d09ab0af..0fbe5f4a5fca67 100644 --- a/EIPS/eip-7768.md +++ b/EIPS/eip-7768.md @@ -99,4 +99,4 @@ This approach may use more gas than other approaches where the consensus client ## Copyright -Copyright and related rights waived via [CC0](https://eips.ethereum.org/LICENSE). +Copyright and related rights waived via [CC0](../LICENSE.md). From 4d11ff0197ca7c3253fe6166f5c0ae814a8911df Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 24 Dec 2024 09:31:26 -0500 Subject: [PATCH 11/12] Update eip-7768.md --- EIPS/eip-7768.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-7768.md b/EIPS/eip-7768.md index 0fbe5f4a5fca67..06bb92de266d4d 100644 --- a/EIPS/eip-7768.md +++ b/EIPS/eip-7768.md @@ -26,7 +26,7 @@ In contrast, this proposal introduces and standardizes a solution to this proble ### End user process 1. An end user who controls an externally-owned account, say Alice, will prepare transaction(s) she would like to execute and she signs this (series of) transactions. -2. If Alice will like to provide consideration for executing these transactions, she will ensure that a well-known address on the network, "the free-for-all bucket" will control tokens (such as [ERC-20](./erc-20), [ERC-721](./erc-721), [ERC-1155](./erc-1155) tokens) at the end of her series of transactions. +2. If Alice will like to provide consideration for executing these transactions, she will ensure that a well-known address on the network, "the free-for-all bucket" will control tokens (such as 20, 721, 1155 tokens) at the end of her series of transactions. 3. Alice orders her transaction nonces carefully considering that what will eventually be executed may be: 1. None of them; 2. Only the first; @@ -43,7 +43,7 @@ For example, if consideration is sent to the free-for-all address, this would ty 1. Sign a transaction (from any origin) to send Ether to Alice representing the current gas price times the current block size. 2. (Optional) Prepare and sign a transaction to the free-for-all account, to preload any necessary responses. 3. Start an execution context and include this send-Ether transaction and all of Alice's transactions. -4. In the execution context, identify tokens (e.g. ERC-20, ERC-721, ERC-1155) sent to the free-for-all contract address or other valuable consideration accrued to the free-for-all account. +4. In the execution context, identify tokens (e.g. 20, 721, 1155) sent to the free-for-all contract address or other valuable consideration accrued to the free-for-all account. 5. Sign a transaction to (from any any origin) to take security of the consideration from the free-for-all account and include this transaction in the execution context. 6. Evaluate the total gas spent. 7. Rollback the execution context. And repeat steps 1 through 4 with these changes: From f6a1cc34c7f44bcf10d2830e08b2d0dfcf0f6333 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 24 Dec 2024 09:48:11 -0500 Subject: [PATCH 12/12] Update eip-7768.md --- EIPS/eip-7768.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7768.md b/EIPS/eip-7768.md index 06bb92de266d4d..bee099090d409a 100644 --- a/EIPS/eip-7768.md +++ b/EIPS/eip-7768.md @@ -85,7 +85,7 @@ This approach may use more gas than other approaches where the consensus client ### Alternatives considered -* Update [EIP-1559](./erc-1559) so that transactions with gasPrice = 0 are legal, but only if the comensurate amount of gas will be burnt by the block preparer in that same block. +* Update [EIP-1559](./eip-1559) so that transactions with gasPrice = 0 are legal, but only if the comensurate amount of gas will be burnt by the block preparer in that same block. * Create a new transaction type that encapsulates another signed transaction. * Create a new opcode to get the coinbase of the next block.