From b603cdc9e65f89bc03c9da65380143a0616a25a9 Mon Sep 17 00:00:00 2001
From: James Ray <16969914+jamesray1@users.noreply.github.com>
Date: Tue, 9 Jan 2018 17:50:27 +1100
Subject: [PATCH 1/4] Add links to issues 90 and 114.
---
EIPS/eip-150.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/EIPS/eip-150.md b/EIPS/eip-150.md
index 012f76e3..ebc5effe 100644
--- a/EIPS/eip-150.md
+++ b/EIPS/eip-150.md
@@ -21,7 +21,7 @@ If `block.number >= FORK_BLKNUM`, then:
- If SELFDESTRUCT hits a newly created account, it triggers an additional gas cost of 25000 (similar to CALLs)
- Increase the recommended gas limit target to 5.5 million
- Define "all but one 64th" of `N` as `N - floor(N / 64)`
-- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of #90 plus #114). CREATE only provides all but one 64th of the parent gas to the child call.
+- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of [#90](https://github.com/ethereum/EIPs/issues/90) plus [#114](https://github.com/ethereum/EIPs/issues/114)). CREATE only provides all but one 64th of the parent gas to the child call.
That is, substitute:
From fbdfb8673287e710331c1d1c31f5f169d1ab4ee8 Mon Sep 17 00:00:00 2001
From: James Ray <16969914+jamesray1@users.noreply.github.com>
Date: Wed, 10 Jan 2018 21:23:41 +1100
Subject: [PATCH 2/4] Modify links based on feedback
---
EIPS/eip-150.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/EIPS/eip-150.md b/EIPS/eip-150.md
index ebc5effe..4b8af5a1 100644
--- a/EIPS/eip-150.md
+++ b/EIPS/eip-150.md
@@ -21,7 +21,7 @@ If `block.number >= FORK_BLKNUM`, then:
- If SELFDESTRUCT hits a newly created account, it triggers an additional gas cost of 25000 (similar to CALLs)
- Increase the recommended gas limit target to 5.5 million
- Define "all but one 64th" of `N` as `N - floor(N / 64)`
-- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of [#90](https://github.com/ethereum/EIPs/issues/90) plus [#114](https://github.com/ethereum/EIPs/issues/114)). CREATE only provides all but one 64th of the parent gas to the child call.
+- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of [EIP-90](ethereum/EIPs/issues/90) plus [EIP-114](ethereum/EIPs/issues/114)). CREATE only provides all but one 64th of the parent gas to the child call.
That is, substitute:
From a8fb2597d100ace63d24a46b1c076dc2f400d8d1 Mon Sep 17 00:00:00 2001
From: James Ray <16969914+jamesray1@users.noreply.github.com>
Date: Wed, 10 Jan 2018 21:27:44 +1100
Subject: [PATCH 3/4] Further modifications to links, more in line with
Wikipedia style
---
EIPS/eip-150.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/EIPS/eip-150.md b/EIPS/eip-150.md
index 4b8af5a1..72ab1efd 100644
--- a/EIPS/eip-150.md
+++ b/EIPS/eip-150.md
@@ -21,7 +21,7 @@ If `block.number >= FORK_BLKNUM`, then:
- If SELFDESTRUCT hits a newly created account, it triggers an additional gas cost of 25000 (similar to CALLs)
- Increase the recommended gas limit target to 5.5 million
- Define "all but one 64th" of `N` as `N - floor(N / 64)`
-- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of [EIP-90](ethereum/EIPs/issues/90) plus [EIP-114](ethereum/EIPs/issues/114)). CREATE only provides all but one 64th of the parent gas to the child call.
+- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of EIP-90[1](ethereum/EIPs/issues/90) plus EIP-114[2](ethereum/EIPs/issues/114)). CREATE only provides all but one 64th of the parent gas to the child call.
That is, substitute:
From b926c9020cfec6cc811b375f9a68af861c3c315e Mon Sep 17 00:00:00 2001
From: James Ray <16969914+jamesray1@users.noreply.github.com>
Date: Wed, 10 Jan 2018 21:32:57 +1100
Subject: [PATCH 4/4] Modify links, references sections
---
EIPS/eip-150.md | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/EIPS/eip-150.md b/EIPS/eip-150.md
index 72ab1efd..8231cf81 100644
--- a/EIPS/eip-150.md
+++ b/EIPS/eip-150.md
@@ -21,7 +21,7 @@ If `block.number >= FORK_BLKNUM`, then:
- If SELFDESTRUCT hits a newly created account, it triggers an additional gas cost of 25000 (similar to CALLs)
- Increase the recommended gas limit target to 5.5 million
- Define "all but one 64th" of `N` as `N - floor(N / 64)`
-- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of EIP-90[1](ethereum/EIPs/issues/90) plus EIP-114[2](ethereum/EIPs/issues/114)). CREATE only provides all but one 64th of the parent gas to the child call.
+- If a call asks for more gas than the maximum allowed amount (ie. total amount of gas remaining in the parent after subtracting the gas cost of the call and memory expansion), do not return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is equivalent to a version of EIP-90[1](https://github.com/ethereum/EIPs/issues/90) plus EIP-114[2](https://github.com/ethereum/EIPs/issues/114)). CREATE only provides all but one 64th of the parent gas to the child call.
That is, substitute:
@@ -57,3 +57,8 @@ This EIP aims to be simple, and adds a flat penalty of 300 gas on top of the cos
The EIP 90 gas mechanic is introduced because without it, all current contracts that make calls would stop working as they use an expression like `msg.gas - 40` to determine how much gas to make a call with, relying on the gas cost of calls being 40. Additionally, EIP 114 is introduced because, given that we are making the cost of a call higher and less predictable, we have an opportunity to do it at no extra cost to currently available guarantees, and so we also achieve the benefit of replacing the call stack depth limit with a "softer" gas-based restriction, thereby eliminating call stack depth attacks as a class of attack that contract developers have to worry about and hence increasing contract programming safety. Note that with the given parameters, the de-facto maximum call stack depth is limited to ~340 (down from ~1024), mitigating the harm caused by any further potential quadratic-complexity DoS attacks that rely on calls.
The gas limit increase is recommended so as to preserve the de-facto transactions-per-second processing capability of the system for average contracts.
+
+## References
+
+1. EIP-90, https://github.com/ethereum/EIPs/issues/90
+2. EIP-114, https://github.com/ethereum/EIPs/issues/114