From 20462cc9c3ee140c310235f92d2053e301a0d206 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 21:46:48 +0200 Subject: [PATCH 01/38] save --- EIPS/eip-7779.md | 106 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 EIPS/eip-7779.md diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md new file mode 100644 index 00000000000000..ff67f2c14af1fb --- /dev/null +++ b/EIPS/eip-7779.md @@ -0,0 +1,106 @@ +--- +eip: 7779 +title: Controlled Gas Limit Increase +description: Gradual Gas Limit Increase with Scheduled Deactivation Block +author: Giulio Rebuffo (@Giulio2002) +discussions-to: [Forum URL for Discussion] +status: Draft +type: Standards Track +category: Core +created: 2024-10-06 +--- + +This proposal introduces a mechanism to gradually increase the block gas limit over two years, doubling from 30 million to 60 million gas, with an automatic deactivation at a specified block height. The purpose is to provide a controlled and predictable growth of block capacity to meet increasing network demand while ensuring network stability. + +## **Abstract** + +The EIP proposes a system to increase the block gas limit by a fixed amount at regular intervals over a two-year period. The block gas limit will increase incrementally from 30 million gas to 60 million gas, with a safeguard "deactivation block" that halts the increase after two years. This system is designed to accommodate network growth without imposing abrupt changes, giving developers, node operators, and users time to adapt. The incremental increase is fully automated, ensuring transparent and predictable block size growth. + +## **Motivation** + +### **Predictable Gas Limit Growth** + +- **Current Issue:** + - The Ethereum network faces increasing demand, but changes to the gas limit are often manually adjusted by miners or validators based on their preferences, which may cause unpredictable block sizes and network performance issues. + +- **Need for Change:** + - A systematic and predictable increase of the gas limit will help scale the network while giving the ecosystem time to adjust to larger block sizes, without needing to rely on ad hoc decisions by network participants. + +### **Gradual Increase with Deactivation Safeguard** + +- **Controlled Growth:** + - Instead of sudden or unpredictable changes, this EIP proposes incremental gas limit increases over two years, which will gradually double the block capacity. + +- **Automatic Deactivation:** + - A safeguard deactivation block will halt the increase after two years, ensuring that the gas limit does not grow indefinitely without further consensus from the community. + +## **Specification** + +### **Incremental Gas Limit Increase** + +1. **Initial Block Gas Limit:** + - At the start of the proposal, the block gas limit is set to 30 million gas. + +2. **Increase Rate:** + - The block gas limit will increase by 0.00475% per block (approximately 1.5% per day), such that after approximately 730 days (two years), the gas limit reaches 60 million. + +3. **Deactivation Block:** + - The gas limit increase will automatically halt at a specific block height, calculated as the block occurring roughly two years after the proposal's implementation. This "deactivation block" ensures no further increases occur after this period. + +4. **Formula for Gas Limit Increase:** + - The gas limit `GL_t` at block `t` is calculated as: + ```python + GL_t = GL_0 * (1 + r)^t + ``` + Where: + - `GL_0` is the initial gas limit (30 million gas). + - `r` is the per-block increase rate (0.00475% or 0.0000475). + - `t` is the number of blocks since the implementation of the EIP. + - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). + +5. **Post-Deactivation Block Limit:** + - After the deactivation block, the gas limit remains fixed at 60 million gas unless further action is taken by the community. + +### **Implementation** + +- **Client Updates:** + - Ethereum clients must implement the automatic gas limit increase according to the specified rate and formula, with enforcement of the deactivation block. + +- **Gas Limit Management:** + - Miners and validators are not required to adjust the gas limit manually during this period, as the increase will be automated at the protocol level. + +## **Rationale** + +### **Predictable Growth** + +- **Systematic Adjustment:** + - The gradual increase avoids sudden surges in gas limit that could destabilize the network. Instead, it provides a smooth transition, giving the ecosystem time to adapt to larger block sizes. + +### **Controlled Limit with Deactivation Block** + +- **Automatic Safeguard:** + - The inclusion of a deactivation block ensures that the gas limit does not increase indefinitely, preventing potential negative impacts on network performance beyond the planned growth. + +- **Post-Deactivation Flexibility:** + - After the two-year period, the community can reassess the network's needs and decide on further gas limit adjustments if required. + +- **Community Consensus:** + - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time within any hard fork. + +## **Backwards Compatibility** + +- **Hard Fork Required:** + - The changes to the gas limit management will require a hard fork. Node operators must update their clients to support the new automated gas limit increase mechanism. + + + +## **Security Considerations** + +- **Network Congestion:** + - The gradual increase in block size may result in higher transaction throughput, but the rate of increase is controlled to minimize the risk of overwhelming the network. + + +## **Copyright** + +Copyright and related rights waived via CC0 1.0 Universal. + From 2c09c7678cc42885464d7848d3ea80dd9c96b388 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 21:54:02 +0200 Subject: [PATCH 02/38] save --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index ff67f2c14af1fb..0f9c60e48c34a0 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -3,7 +3,7 @@ eip: 7779 title: Controlled Gas Limit Increase description: Gradual Gas Limit Increase with Scheduled Deactivation Block author: Giulio Rebuffo (@Giulio2002) -discussions-to: [Forum URL for Discussion] +discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 status: Draft type: Standards Track category: Core From 2b0bc1471c2a226ec492d2db1cdd6cb3b010e8c3 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 21:54:50 +0200 Subject: [PATCH 03/38] save --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index 0f9c60e48c34a0..b599c161e60460 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -85,7 +85,7 @@ The EIP proposes a system to increase the block gas limit by a fixed amount at r - After the two-year period, the community can reassess the network's needs and decide on further gas limit adjustments if required. - **Community Consensus:** - - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time within any hard fork. + - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time as part of any hard fork during the two-year period. ## **Backwards Compatibility** From eff2981a5b3f5cd0982d134db503414ec060c72d Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 22:57:05 +0200 Subject: [PATCH 04/38] save --- EIPS/eip-7779.md | 49 +++++++++++++----------------------------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index b599c161e60460..df6aec8c145b2e 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -1,7 +1,7 @@ --- eip: 7779 title: Controlled Gas Limit Increase -description: Gradual Gas Limit Increase with Scheduled Deactivation Block +description: Gradual Gas Limit Increase strategy To Determine Gas Limit over a two-year period. author: Giulio Rebuffo (@Giulio2002) discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 status: Draft @@ -10,11 +10,11 @@ category: Core created: 2024-10-06 --- -This proposal introduces a mechanism to gradually increase the block gas limit over two years, doubling from 30 million to 60 million gas, with an automatic deactivation at a specified block height. The purpose is to provide a controlled and predictable growth of block capacity to meet increasing network demand while ensuring network stability. +This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value. ## **Abstract** -The EIP proposes a system to increase the block gas limit by a fixed amount at regular intervals over a two-year period. The block gas limit will increase incrementally from 30 million gas to 60 million gas, with a safeguard "deactivation block" that halts the increase after two years. This system is designed to accommodate network growth without imposing abrupt changes, giving developers, node operators, and users time to adapt. The incremental increase is fully automated, ensuring transparent and predictable block size growth. +The EIP proposes the introduction of a new gas limit management mechanism that automatically increases the block gas limit over a two-year period. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. ## **Motivation** @@ -29,37 +29,24 @@ The EIP proposes a system to increase the block gas limit by a fixed amount at r ### **Gradual Increase with Deactivation Safeguard** - **Controlled Growth:** - - Instead of sudden or unpredictable changes, this EIP proposes incremental gas limit increases over two years, which will gradually double the block capacity. + - Instead of sudden or unpredictable changes, this EIP proposes incremental gas limit increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas limit in the hand of the community. - **Automatic Deactivation:** - - A safeguard deactivation block will halt the increase after two years, ensuring that the gas limit does not grow indefinitely without further consensus from the community. + - A safeguard deactivation block will halt the increase after some specified time, preventing the gas limit from growing indefinitely and allowing the community to reassess the network's needs. ## **Specification** -### **Incremental Gas Limit Increase** +### **Incremental Gas Limit Increase Strategy** -1. **Initial Block Gas Limit:** - - At the start of the proposal, the block gas limit is set to 30 million gas. +Add a new "Gas Limit" selection strategy that takes in Block Number `N` and spits out the Gas Limit `GL` for that block. The strategy is as follows: -2. **Increase Rate:** - - The block gas limit will increase by 0.00475% per block (approximately 1.5% per day), such that after approximately 730 days (two years), the gas limit reaches 60 million. - -3. **Deactivation Block:** - - The gas limit increase will automatically halt at a specific block height, calculated as the block occurring roughly two years after the proposal's implementation. This "deactivation block" ensures no further increases occur after this period. - -4. **Formula for Gas Limit Increase:** - - The gas limit `GL_t` at block `t` is calculated as: - ```python - GL_t = GL_0 * (1 + r)^t - ``` + - The gas limit `GL_t` at block `t` is calculated as: +```GL_t = GL_0 * (1 + r)^t``` Where: - - `GL_0` is the initial gas limit (30 million gas). + - `GL_0` is the initial gas limit (say 30 million gas). - `r` is the per-block increase rate (0.00475% or 0.0000475). - `t` is the number of blocks since the implementation of the EIP. - - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). - -5. **Post-Deactivation Block Limit:** - - After the deactivation block, the gas limit remains fixed at 60 million gas unless further action is taken by the community. + - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). this parameters are tuned so that there is a doubling of the gas limit in two years. ### **Implementation** @@ -81,23 +68,13 @@ The EIP proposes a system to increase the block gas limit by a fixed amount at r - **Automatic Safeguard:** - The inclusion of a deactivation block ensures that the gas limit does not increase indefinitely, preventing potential negative impacts on network performance beyond the planned growth. -- **Post-Deactivation Flexibility:** - - After the two-year period, the community can reassess the network's needs and decide on further gas limit adjustments if required. - **Community Consensus:** - - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time as part of any hard fork during the two-year period. + - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time and can also switch to a fixed gas limit if needed. ## **Backwards Compatibility** -- **Hard Fork Required:** - - The changes to the gas limit management will require a hard fork. Node operators must update their clients to support the new automated gas limit increase mechanism. - - - -## **Security Considerations** - -- **Network Congestion:** - - The gradual increase in block size may result in higher transaction throughput, but the rate of increase is controlled to minimize the risk of overwhelming the network. +**No Hard Fork Required** ## **Copyright** From e11d5637791e72379b16fa33746ad73c61e8c450 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 22:58:04 +0200 Subject: [PATCH 05/38] save --- EIPS/eip-7779.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index df6aec8c145b2e..ee3e01fc468b22 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -10,11 +10,11 @@ category: Core created: 2024-10-06 --- -This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value. +This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value, ## **Abstract** -The EIP proposes the introduction of a new gas limit management mechanism that automatically increases the block gas limit over a two-year period. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. +The EIP proposes the introduction of a new gas limit management mechanism that automatically increases the block gas limit over a two-year period. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas limit if needed (or different parameters). ## **Motivation** From 19bd32da3e456a3368df4294ba46a07e7dfed715 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:01:09 +0200 Subject: [PATCH 06/38] save --- EIPS/eip-7779.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index ee3e01fc468b22..75ba43a982c823 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -41,11 +41,12 @@ The EIP proposes the introduction of a new gas limit management mechanism that a Add a new "Gas Limit" selection strategy that takes in Block Number `N` and spits out the Gas Limit `GL` for that block. The strategy is as follows: - The gas limit `GL_t` at block `t` is calculated as: -```GL_t = GL_0 * (1 + r)^t``` +```GL_t = GL_0 + (t - t_0)*t``` Where: - `GL_0` is the initial gas limit (say 30 million gas). - `r` is the per-block increase rate (0.00475% or 0.0000475). - `t` is the number of blocks since the implementation of the EIP. + - `t_0` is start block number. - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). this parameters are tuned so that there is a doubling of the gas limit in two years. ### **Implementation** From 180a82ae6406513e72ea799c3b7735ee4a919a67 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:03:57 +0200 Subject: [PATCH 07/38] save --- EIPS/eip-7779.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index 75ba43a982c823..ff57bfddfef5e2 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -77,6 +77,11 @@ Add a new "Gas Limit" selection strategy that takes in Block Number `N` and spit **No Hard Fork Required** +## **Security Considerations** + + +- The controlled gas limit increase strategy is designed to prevent sudden changes that could lead to network instability or security vulnerabilities. +- The fact that validators can re-adjust the gas limit in case of a DDOS attack or other issues, makes the network more secure than to just increase the gas limit manually in a cliff-like manner. ## **Copyright** From 3e4d231cec9c209609ba4a428b875857d9c57aa7 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:07:50 +0200 Subject: [PATCH 08/38] save --- EIPS/eip-7779.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index ff57bfddfef5e2..d6884a3420d97b 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -1,6 +1,6 @@ --- eip: 7779 -title: Controlled Gas Limit Increase +title: Add A Controlled Gas Target Increase Strategy description: Gradual Gas Limit Increase strategy To Determine Gas Limit over a two-year period. author: Giulio Rebuffo (@Giulio2002) discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 @@ -10,7 +10,7 @@ category: Core created: 2024-10-06 --- -This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value, +This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value. ## **Abstract** From 3bde20317ba2997ead05dfb0388e135d3d8937a9 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:08:05 +0200 Subject: [PATCH 09/38] save --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index d6884a3420d97b..a85b21a3a563d7 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -1,6 +1,6 @@ --- eip: 7779 -title: Add A Controlled Gas Target Increase Strategy +title: Add Controlled Gas Target Increase Strategy description: Gradual Gas Limit Increase strategy To Determine Gas Limit over a two-year period. author: Giulio Rebuffo (@Giulio2002) discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 From c87de143f93ca6d80a1dc07a8cbb22e50f4b59df Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:15:05 +0200 Subject: [PATCH 10/38] ops --- EIPS/eip-7779.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index a85b21a3a563d7..aeedf2dcdde3c3 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -1,7 +1,7 @@ --- eip: 7779 title: Add Controlled Gas Target Increase Strategy -description: Gradual Gas Limit Increase strategy To Determine Gas Limit over a two-year period. +description: Add a controlled gas target increase strategy to determine the gas limit of a specific block for a gradual increase in block size, instead than having cliff-like changes. author: Giulio Rebuffo (@Giulio2002) discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 status: Draft @@ -10,68 +10,68 @@ category: Core created: 2024-10-06 --- -This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value. +This proposal describes the introduction in clients of a controlled gas target increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value. ## **Abstract** -The EIP proposes the introduction of a new gas limit management mechanism that automatically increases the block gas limit over a two-year period. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas limit if needed (or different parameters). +The EIP proposes the introduction of a new gas target management mechanism that automatically increases the block gas target over a two-year period. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas target if needed (or different parameters). ## **Motivation** -### **Predictable Gas Limit Growth** +### **Predictable Gas Target Growth** - **Current Issue:** - - The Ethereum network faces increasing demand, but changes to the gas limit are often manually adjusted by miners or validators based on their preferences, which may cause unpredictable block sizes and network performance issues. + - The Ethereum network faces increasing demand, but changes to the gas target are often manually adjusted by miners or validators based on their preferences, which may cause unpredictable block sizes and network performance issues. - **Need for Change:** - - A systematic and predictable increase of the gas limit will help scale the network while giving the ecosystem time to adjust to larger block sizes, without needing to rely on ad hoc decisions by network participants. + - A systematic and predictable increase of the gas target will help scale the network while giving the ecosystem time to adjust to larger block sizes, without needing to rely on ad hoc decisions by network participants. ### **Gradual Increase with Deactivation Safeguard** - **Controlled Growth:** - - Instead of sudden or unpredictable changes, this EIP proposes incremental gas limit increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas limit in the hand of the community. + - Instead of sudden or unpredictable changes, this EIP proposes incremental gas Target increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas Target in the hand of the community. - **Automatic Deactivation:** - - A safeguard deactivation block will halt the increase after some specified time, preventing the gas limit from growing indefinitely and allowing the community to reassess the network's needs. + - A safeguard deactivation block will halt the increase after some specified time, preventing the gas Target from growing indefinitely and allowing the community to reassess the network's needs. ## **Specification** -### **Incremental Gas Limit Increase Strategy** +### **Incremental Gas Target Increase Strategy** -Add a new "Gas Limit" selection strategy that takes in Block Number `N` and spits out the Gas Limit `GL` for that block. The strategy is as follows: +Add a new "Gas Target" selection strategy that takes in Block Number `N` and spits out the Gas Target `GT` for that block. The strategy is as follows: - - The gas limit `GL_t` at block `t` is calculated as: -```GL_t = GL_0 + (t - t_0)*t``` + - The gas target `GL_t` at block `t` is calculated as: +```GT_t = GT_0 + (t - t_0)*r``` Where: - - `GL_0` is the initial gas limit (say 30 million gas). - - `r` is the per-block increase rate (0.00475% or 0.0000475). + - `GT_0` is the initial gas target (say 15 million gas). + - `r` is the per-block increase rate (for example 2.89). - `t` is the number of blocks since the implementation of the EIP. - `t_0` is start block number. - - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). this parameters are tuned so that there is a doubling of the gas limit in two years. + - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). these parameters are tuned so that there is a doubling (from 15 million to 30 million) of the gas target in two years. ### **Implementation** - **Client Updates:** - - Ethereum clients must implement the automatic gas limit increase according to the specified rate and formula, with enforcement of the deactivation block. + - Ethereum clients must implement the automatic gas target increase according to the specified rate and formula, with enforcement of the deactivation block. -- **Gas Limit Management:** - - Miners and validators are not required to adjust the gas limit manually during this period, as the increase will be automated at the protocol level. +- **Gas Target Management:** + - Miners and validators are not required to adjust the gas target manually during this period, as the increase will be automated at the protocol level. ## **Rationale** ### **Predictable Growth** - **Systematic Adjustment:** - - The gradual increase avoids sudden surges in gas limit that could destabilize the network. Instead, it provides a smooth transition, giving the ecosystem time to adapt to larger block sizes. + - The gradual increase avoids sudden surges in gas target that could destabilize the network. Instead, it provides a smooth transition, giving the ecosystem time to adapt to larger block sizes. -### **Controlled Limit with Deactivation Block** +### **Controlled Target with Deactivation Block** - **Automatic Safeguard:** - - The inclusion of a deactivation block ensures that the gas limit does not increase indefinitely, preventing potential negative impacts on network performance beyond the planned growth. + - The inclusion of a deactivation block ensures that the gas target does not increase indefinitely, preventing potential negative impacts on network performance beyond the planned growth. - **Community Consensus:** - - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time and can also switch to a fixed gas limit if needed. + - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas target increase, however, in the two-year period, the community can decide to halt the increase at any time and can also switch to a fixed gas target if needed. ## **Backwards Compatibility** @@ -80,8 +80,8 @@ Add a new "Gas Limit" selection strategy that takes in Block Number `N` and spit ## **Security Considerations** -- The controlled gas limit increase strategy is designed to prevent sudden changes that could lead to network instability or security vulnerabilities. -- The fact that validators can re-adjust the gas limit in case of a DDOS attack or other issues, makes the network more secure than to just increase the gas limit manually in a cliff-like manner. +- The controlled gas target increase strategy is designed to prevent sudden changes that could lead to network instability or security vulnerabilities. +- The fact that validators can re-adjust the gas target in case of a DDOS attack or other issues, makes the network more secure than to just increase the gas target manually in a cliff-like manner. ## **Copyright** From 6304e66ef5c8173770fd75c53bcde26235f0a070 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:16:19 +0200 Subject: [PATCH 11/38] ops --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index aeedf2dcdde3c3..fd859692c03de6 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -6,7 +6,7 @@ author: Giulio Rebuffo (@Giulio2002) discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 status: Draft type: Standards Track -category: Core +category: Informational created: 2024-10-06 --- From 5eadb64e72e16a33c06106b7a6b38e3035be38a7 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:18:20 +0200 Subject: [PATCH 12/38] ops --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index fd859692c03de6..f942ade3a8c2bf 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -44,7 +44,7 @@ Add a new "Gas Target" selection strategy that takes in Block Number `N` and spi ```GT_t = GT_0 + (t - t_0)*r``` Where: - `GT_0` is the initial gas target (say 15 million gas). - - `r` is the per-block increase rate (for example 2.89). + - `r` is gas increase per block (for example 2.89). - `t` is the number of blocks since the implementation of the EIP. - `t_0` is start block number. - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). these parameters are tuned so that there is a doubling (from 15 million to 30 million) of the gas target in two years. From da5bc905aab2a2aa4985d517b3eccd364632dfc5 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:18:52 +0200 Subject: [PATCH 13/38] ops --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index f942ade3a8c2bf..a57bb6d6d9be86 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -47,7 +47,7 @@ Add a new "Gas Target" selection strategy that takes in Block Number `N` and spi - `r` is gas increase per block (for example 2.89). - `t` is the number of blocks since the implementation of the EIP. - `t_0` is start block number. - - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). these parameters are tuned so that there is a doubling (from 15 million to 30 million) of the gas target in two years. + - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). these parameters are tuned so that there is a doubling (from 15 million to 30 million) of the gas target in two years. Additionally, all of these parameters can be changed by validators. ### **Implementation** From 13d702e414e4a89978813121fb957c320dbb49c6 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:24:05 +0200 Subject: [PATCH 14/38] ops --- EIPS/eip-7779.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index a57bb6d6d9be86..ce43dcfd96e64f 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -46,8 +46,11 @@ Add a new "Gas Target" selection strategy that takes in Block Number `N` and spi - `GT_0` is the initial gas target (say 15 million gas). - `r` is gas increase per block (for example 2.89). - `t` is the number of blocks since the implementation of the EIP. - - `t_0` is start block number. - - The increase halts once `t` reaches the block corresponding to two years (approximately 5,184,000 blocks, assuming 12-second block times). these parameters are tuned so that there is a doubling (from 15 million to 30 million) of the gas target in two years. Additionally, all of these parameters can be changed by validators. + - `t_0` is a start block number for the gradual increase. + - `t_last? is the block number at which the gas target increase stops. + - The increase halts once `t` reaches the block `t_last`. + +If `GT_0` is set to 15 million gas, `r` to 2.89, `t_0` to 0, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period. ### **Implementation** From e6eafb8f7ae22aed25e6c541c4d91a217d7e4ef9 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Oct 2024 23:31:24 +0200 Subject: [PATCH 15/38] fix lint --- EIPS/eip-7779.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index ce43dcfd96e64f..63b76a23598589 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -1,12 +1,11 @@ --- eip: 7779 title: Add Controlled Gas Target Increase Strategy -description: Add a controlled gas target increase strategy to determine the gas limit of a specific block for a gradual increase in block size, instead than having cliff-like changes. +description: Adds a controlled gas target increase strategy. author: Giulio Rebuffo (@Giulio2002) discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 status: Draft -type: Standards Track -category: Informational +type: Informational created: 2024-10-06 --- @@ -43,12 +42,12 @@ Add a new "Gas Target" selection strategy that takes in Block Number `N` and spi - The gas target `GL_t` at block `t` is calculated as: ```GT_t = GT_0 + (t - t_0)*r``` Where: - - `GT_0` is the initial gas target (say 15 million gas). - - `r` is gas increase per block (for example 2.89). - - `t` is the number of blocks since the implementation of the EIP. + - `GT_0` is the initial gas target (say 15 million gas). + - `r` is gas increase per block (for example 2.89). + - `t` is the number of blocks since the implementation of the EIP. - `t_0` is a start block number for the gradual increase. - `t_last? is the block number at which the gas target increase stops. - - The increase halts once `t` reaches the block `t_last`. + - The increase halts once `t` reaches the block `t_last`. If `GT_0` is set to 15 million gas, `r` to 2.89, `t_0` to 0, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period. From ea0e61b32b01e3744dc29954a6f71033ea2b174d Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 00:37:48 +0200 Subject: [PATCH 16/38] fix lint --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index 63b76a23598589..c0ccff11630097 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -3,7 +3,7 @@ eip: 7779 title: Add Controlled Gas Target Increase Strategy description: Adds a controlled gas target increase strategy. author: Giulio Rebuffo (@Giulio2002) -discussions-to: https://ethresear.ch/t/eip-7779-discussion-thread/20574 +discussions-to: https://ethereum-magicians.org/t/eip-7779-add-controlled-gas-target-increase-strategy/21282 status: Draft type: Informational created: 2024-10-06 From 71f6d2a25245f63d18ff6f3a65733e3b6d06aeac Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 00:40:18 +0200 Subject: [PATCH 17/38] fix lint --- EIPS/eip-7779.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7779.md index c0ccff11630097..d23b56c749161c 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7779.md @@ -54,7 +54,7 @@ If `GT_0` is set to 15 million gas, `r` to 2.89, `t_0` to 0, and `t_last` to 51 ### **Implementation** - **Client Updates:** - - Ethereum clients must implement the automatic gas target increase according to the specified rate and formula, with enforcement of the deactivation block. + - Ethereum clients must implement the automatic gas target increase according to the specified rate and formula, with enforcement of the deactivation block. However, If the GasTarget has been locally set by the validator that will override the formula and take precedence. - **Gas Target Management:** - Miners and validators are not required to adjust the gas target manually during this period, as the increase will be automated at the protocol level. From 2ae0f0a5f429f318290d74839761be5dcc0c13ce Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 00:40:59 +0200 Subject: [PATCH 18/38] fix lint --- EIPS/{eip-7779.md => eip-7783.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename EIPS/{eip-7779.md => eip-7783.md} (99%) diff --git a/EIPS/eip-7779.md b/EIPS/eip-7783.md similarity index 99% rename from EIPS/eip-7779.md rename to EIPS/eip-7783.md index d23b56c749161c..2f9467e916bb55 100644 --- a/EIPS/eip-7779.md +++ b/EIPS/eip-7783.md @@ -1,5 +1,5 @@ --- -eip: 7779 +eip: 7783 title: Add Controlled Gas Target Increase Strategy description: Adds a controlled gas target increase strategy. author: Giulio Rebuffo (@Giulio2002) From d56d238d8671ae57b9ee02cddbec9e6eb00bcef1 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 00:41:44 +0200 Subject: [PATCH 19/38] fix lint --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 2f9467e916bb55..54d752c5f4a9cc 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -3,7 +3,7 @@ eip: 7783 title: Add Controlled Gas Target Increase Strategy description: Adds a controlled gas target increase strategy. author: Giulio Rebuffo (@Giulio2002) -discussions-to: https://ethereum-magicians.org/t/eip-7779-add-controlled-gas-target-increase-strategy/21282 +discussions-to: https://ethereum-magicians.org/t/eip-7783-add-controlled-gas-target-increase-strategy/21282 status: Draft type: Informational created: 2024-10-06 From 0fd9dee746aaac2eb9601634c100d554eb3cf4a8 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 01:10:23 +0200 Subject: [PATCH 20/38] fix lint --- EIPS/eip-7783.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 54d752c5f4a9cc..0b3502beb06359 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -40,16 +40,15 @@ The EIP proposes the introduction of a new gas target management mechanism that Add a new "Gas Target" selection strategy that takes in Block Number `N` and spits out the Gas Target `GT` for that block. The strategy is as follows: - The gas target `GL_t` at block `t` is calculated as: -```GT_t = GT_0 + (t - t_0)*r``` +```GT_t = min(GT_0 + (t - t_0)*r, GT_cap)``` Where: - `GT_0` is the initial gas target (say 15 million gas). - `r` is gas increase per block (for example 2.89). - `t` is the number of blocks since the implementation of the EIP. - `t_0` is a start block number for the gradual increase. - - `t_last? is the block number at which the gas target increase stops. - - The increase halts once `t` reaches the block `t_last`. + - `GT_cap is the gas limit cap at which the function stops at. -If `GT_0` is set to 15 million gas, `r` to 2.89, `t_0` to 0, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period. +If `GT_0` is set to 15 million gas, `r` to 2.89, `t_0` to 0, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). ### **Implementation** From 8bea505a08a1a358acd578d857a2747d16261eca Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 01:11:42 +0200 Subject: [PATCH 21/38] fix lint --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 0b3502beb06359..85722efd82b1f4 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -39,7 +39,7 @@ The EIP proposes the introduction of a new gas target management mechanism that Add a new "Gas Target" selection strategy that takes in Block Number `N` and spits out the Gas Target `GT` for that block. The strategy is as follows: - - The gas target `GL_t` at block `t` is calculated as: + - The gas target `GT_t` at block `t` is calculated as: ```GT_t = min(GT_0 + (t - t_0)*r, GT_cap)``` Where: - `GT_0` is the initial gas target (say 15 million gas). From b06b52d24d1ae4bf5634fe402a08a235c7b36c23 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 02:04:28 +0200 Subject: [PATCH 22/38] fix lint --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 85722efd82b1f4..2548a85f0cdc4e 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -46,7 +46,7 @@ Add a new "Gas Target" selection strategy that takes in Block Number `N` and spi - `r` is gas increase per block (for example 2.89). - `t` is the number of blocks since the implementation of the EIP. - `t_0` is a start block number for the gradual increase. - - `GT_cap is the gas limit cap at which the function stops at. + - `GT_cap` is the gas limit cap at which the function stops at. If `GT_0` is set to 15 million gas, `r` to 2.89, `t_0` to 0, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). From ef88692c272fd0a493cef4e995ed720eb75a655b Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 02:59:31 +0200 Subject: [PATCH 23/38] fix --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 2548a85f0cdc4e..847e59bdc64ee3 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -13,7 +13,7 @@ This proposal describes the introduction in clients of a controlled gas target i ## **Abstract** -The EIP proposes the introduction of a new gas target management mechanism that automatically increases the block gas target over a two-year period. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas target if needed (or different parameters). +The EIP proposes the introduction of a new gas target management mechanism that automatically increases the block gas target over time. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas target if needed (or different parameters). ## **Motivation** From 8a18a681c8c10b24cf5143de5205ad07dd0466e5 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 04:39:19 +0200 Subject: [PATCH 24/38] save --- EIPS/eip-7783.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 847e59bdc64ee3..e561fcc83c0547 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -40,15 +40,14 @@ The EIP proposes the introduction of a new gas target management mechanism that Add a new "Gas Target" selection strategy that takes in Block Number `N` and spits out the Gas Target `GT` for that block. The strategy is as follows: - The gas target `GT_t` at block `t` is calculated as: -```GT_t = min(GT_0 + (t - t_0)*r, GT_cap)``` +```GT_t = min(GT_(t-1) + r, GT_cap)``` Where: - - `GT_0` is the initial gas target (say 15 million gas). + - `GT_(t-1)` is the gas target of the block `t-1`. - `r` is gas increase per block (for example 2.89). - `t` is the number of blocks since the implementation of the EIP. - - `t_0` is a start block number for the gradual increase. - `GT_cap` is the gas limit cap at which the function stops at. -If `GT_0` is set to 15 million gas, `r` to 2.89, `t_0` to 0, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). +If `GT_0` is set to 15 million gas, `r` to 2.89, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). ### **Implementation** From a3fb33152ed9c40ed6c968c09dcd9714a3939fc7 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 04:39:34 +0200 Subject: [PATCH 25/38] save --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index e561fcc83c0547..416e9861c9b8a3 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -47,7 +47,7 @@ Add a new "Gas Target" selection strategy that takes in Block Number `N` and spi - `t` is the number of blocks since the implementation of the EIP. - `GT_cap` is the gas limit cap at which the function stops at. -If `GT_0` is set to 15 million gas, `r` to 2.89, and `t_last` to 5184000 (two years), the gas target will increase by 2.89 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). +If `GT_0` is set to 15 million gas, `r` to 3, and `t_last` to 5184000 (two years), the gas target will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). ### **Implementation** From b4001151f56fca093f52cd7b9efa445ebb321d04 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 18:46:39 +0200 Subject: [PATCH 26/38] save --- EIPS/eip-7783.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 416e9861c9b8a3..3a9d515ba5c5bb 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -40,12 +40,16 @@ The EIP proposes the introduction of a new gas target management mechanism that Add a new "Gas Target" selection strategy that takes in Block Number `N` and spits out the Gas Target `GT` for that block. The strategy is as follows: - The gas target `GT_t` at block `t` is calculated as: -```GT_t = min(GT_(t-1) + r, GT_cap)``` - Where: - - `GT_(t-1)` is the gas target of the block `t-1`. - - `r` is gas increase per block (for example 2.89). - - `t` is the number of blocks since the implementation of the EIP. - - `GT_cap` is the gas limit cap at which the function stops at. + +```python +def compute_gas_target(blockNum: int, blockNumStart: int, initialGasTarget: int, r: int, gasTargetCap: int, GT_cap: int) -> int: + if blockNum < blockNumStart: + return initialGasTarget + else: + return min(gasTargetCap, initialGasTarget + r * (blockNum - blockNumStart)) +``` + +Where: If `GT_0` is set to 15 million gas, `r` to 3, and `t_last` to 5184000 (two years), the gas target will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). From eb6e83c10fc393807f31bf5886a4933e6e9654b1 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 18:48:35 +0200 Subject: [PATCH 27/38] save --- EIPS/eip-7783.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 3a9d515ba5c5bb..28e3777746e50f 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -42,7 +42,7 @@ Add a new "Gas Target" selection strategy that takes in Block Number `N` and spi - The gas target `GT_t` at block `t` is calculated as: ```python -def compute_gas_target(blockNum: int, blockNumStart: int, initialGasTarget: int, r: int, gasTargetCap: int, GT_cap: int) -> int: +def compute_gas_target(blockNum: int, blockNumStart: int, initialGasTarget: int, r: int, gasTargetCap: int) -> int: if blockNum < blockNumStart: return initialGasTarget else: @@ -51,7 +51,14 @@ def compute_gas_target(blockNum: int, blockNumStart: int, initialGasTarget: int, Where: -If `GT_0` is set to 15 million gas, `r` to 3, and `t_last` to 5184000 (two years), the gas target will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period (with `GT_cap` set to 30 millions). + +- `blockNum` is the block number for which the gas target is being calculated. +- `blockNumStart` is the block number at which the gas target increase starts. +- `initialGasTarget` is the initial gas target at block `blockNumStart`. +- `r` is the rate at which the gas target increases per block. +- `gasTargetCap` is the maximum gas target that can be reached. + +If we set `blockNumStart` to the current block number, `initialGasTarget` to the current gas target (`15_000_000`), `r` to 3, and `gasTargetCap` to `30_000_000`, the gas target will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. ### **Implementation** From 1e2b04eb05fe4918e51bfac8d4f38d7802c5a67a Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 7 Oct 2024 18:48:50 +0200 Subject: [PATCH 28/38] save --- EIPS/eip-7783.md | 1 - 1 file changed, 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 28e3777746e50f..75aa749daed44d 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -51,7 +51,6 @@ def compute_gas_target(blockNum: int, blockNumStart: int, initialGasTarget: int, Where: - - `blockNum` is the block number for which the gas target is being calculated. - `blockNumStart` is the block number at which the gas target increase starts. - `initialGasTarget` is the initial gas target at block `blockNumStart`. From c2852e6335731087ad300b9f45c37e0ebc44867a Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Tue, 8 Oct 2024 00:39:01 +0200 Subject: [PATCH 29/38] Update EIPS/eip-7783.md Co-authored-by: Ben Adams --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 75aa749daed44d..b95bdfc7f91a50 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -91,7 +91,7 @@ If we set `blockNumStart` to the current block number, `initialGasTarget` to the - The controlled gas target increase strategy is designed to prevent sudden changes that could lead to network instability or security vulnerabilities. -- The fact that validators can re-adjust the gas target in case of a DDOS attack or other issues, makes the network more secure than to just increase the gas target manually in a cliff-like manner. +- The fact that validators can re-adjust the gas target in case of a DOS attack or other issues, makes the network more secure than to just increasing the gas target manually in a cliff-like manner. ## **Copyright** From 46c81433ce950c76563f30b8c92c774db2031e6a Mon Sep 17 00:00:00 2001 From: Giulio Date: Wed, 9 Oct 2024 18:32:55 +0200 Subject: [PATCH 30/38] save --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 75aa749daed44d..31237425dae821 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -57,7 +57,7 @@ Where: - `r` is the rate at which the gas target increases per block. - `gasTargetCap` is the maximum gas target that can be reached. -If we set `blockNumStart` to the current block number, `initialGasTarget` to the current gas target (`15_000_000`), `r` to 3, and `gasTargetCap` to `30_000_000`, the gas target will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. +If we set `blockNumStart` to the current block number, `initialGasTarget` to the current gas target (`15_000_000`), `r` to 3, and `gasTargetCap` to `30_000_000`, the gas target will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. This means that the Gas Limit will grow proportionally to the Gas Target, and will end up being twice the value of the gas target ### **Implementation** From ca563f3e3f1da1644caa3c2bceebe87ec483b05a Mon Sep 17 00:00:00 2001 From: Giulio Date: Wed, 9 Oct 2024 18:46:48 +0200 Subject: [PATCH 31/38] save --- EIPS/eip-7783.md | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 31237425dae821..31b254061e931b 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -1,87 +1,87 @@ --- eip: 7783 -title: Add Controlled Gas Target Increase Strategy -description: Adds a controlled gas target increase strategy. +title: Add Controlled Gas Limit Increase Strategy +description: Adds a controlled gas limit increase strategy. author: Giulio Rebuffo (@Giulio2002) -discussions-to: https://ethereum-magicians.org/t/eip-7783-add-controlled-gas-target-increase-strategy/21282 +discussions-to: https://ethereum-magicians.org/t/eip-7783-add-controlled-gas-limit-increase-strategy/21282 status: Draft type: Informational created: 2024-10-06 --- -This proposal describes the introduction in clients of a controlled gas target increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value. +This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value. ## **Abstract** -The EIP proposes the introduction of a new gas target management mechanism that automatically increases the block gas target over time. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas target if needed (or different parameters). +The EIP proposes the introduction of a new gas limit management mechanism that automatically increases the block gas limit over time. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas limit if needed (or different parameters). ## **Motivation** -### **Predictable Gas Target Growth** +### **Predictable Gas Limit Growth** - **Current Issue:** - - The Ethereum network faces increasing demand, but changes to the gas target are often manually adjusted by miners or validators based on their preferences, which may cause unpredictable block sizes and network performance issues. + - The Ethereum network faces increasing demand, but changes to the gas limit are often manually adjusted by miners or validators based on their preferences, which may cause unpredictable block sizes and network performance issues. - **Need for Change:** - - A systematic and predictable increase of the gas target will help scale the network while giving the ecosystem time to adjust to larger block sizes, without needing to rely on ad hoc decisions by network participants. + - A systematic and predictable increase of the gas limit will help scale the network while giving the ecosystem time to adjust to larger block sizes, without needing to rely on ad hoc decisions by network participants. ### **Gradual Increase with Deactivation Safeguard** - **Controlled Growth:** - - Instead of sudden or unpredictable changes, this EIP proposes incremental gas Target increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas Target in the hand of the community. + - Instead of sudden or unpredictable changes, this EIP proposes incremental gas Limit increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas Limit in the hand of the community. - **Automatic Deactivation:** - - A safeguard deactivation block will halt the increase after some specified time, preventing the gas Target from growing indefinitely and allowing the community to reassess the network's needs. + - A safeguard deactivation block will halt the increase after some specified time, preventing the gas Limit from growing indefinitely and allowing the community to reassess the network's needs. ## **Specification** -### **Incremental Gas Target Increase Strategy** +### **Incremental Gas Limit Increase Strategy** -Add a new "Gas Target" selection strategy that takes in Block Number `N` and spits out the Gas Target `GT` for that block. The strategy is as follows: +Add a new "Gas Limit" selection strategy that takes in Block Number `N` and spits out the Gas Limit `GL` for that block. The strategy is as follows: - - The gas target `GT_t` at block `t` is calculated as: + - The gas limit `GL_t` at block `t` is calculated as: ```python -def compute_gas_target(blockNum: int, blockNumStart: int, initialGasTarget: int, r: int, gasTargetCap: int) -> int: +def compute_gas_limit(blockNum: int, blockNumStart: int, initialGasLimit: int, r: int, gasLimitCap: int) -> int: if blockNum < blockNumStart: - return initialGasTarget + return initialGasLimit else: - return min(gasTargetCap, initialGasTarget + r * (blockNum - blockNumStart)) + return min(gasLimitCap, initialGasLimit + r * (blockNum - blockNumStart)) ``` Where: -- `blockNum` is the block number for which the gas target is being calculated. -- `blockNumStart` is the block number at which the gas target increase starts. -- `initialGasTarget` is the initial gas target at block `blockNumStart`. -- `r` is the rate at which the gas target increases per block. -- `gasTargetCap` is the maximum gas target that can be reached. +- `blockNum` is the block number for which the gas limit is being calculated. +- `blockNumStart` is the block number at which the gas limit increase starts. +- `initialGasLimit` is the initial gas limit at block `blockNumStart`. +- `r` is the rate at which the gas limit increases per block. +- `gasLimitCap` is the maximum gas limit that can be reached. -If we set `blockNumStart` to the current block number, `initialGasTarget` to the current gas target (`15_000_000`), `r` to 3, and `gasTargetCap` to `30_000_000`, the gas target will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. This means that the Gas Limit will grow proportionally to the Gas Target, and will end up being twice the value of the gas target +If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`15_000_000`), `r` to 3, and `gasLimitCap` to `30_000_000`, the gas limit will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. This means that the Gas Limit will grow proportionally to the Gas Limit, and will end up being twice the value of the gas limit ### **Implementation** - **Client Updates:** - - Ethereum clients must implement the automatic gas target increase according to the specified rate and formula, with enforcement of the deactivation block. However, If the GasTarget has been locally set by the validator that will override the formula and take precedence. + - Ethereum clients must implement the automatic gas limit increase according to the specified rate and formula, with enforcement of the deactivation block. However, If the GasLimit has been locally set by the validator that will override the formula and take precedence. -- **Gas Target Management:** - - Miners and validators are not required to adjust the gas target manually during this period, as the increase will be automated at the protocol level. +- **Gas Limit Management:** + - Miners and validators are not required to adjust the gas limit manually during this period, as the increase will be automated at the protocol level. ## **Rationale** ### **Predictable Growth** - **Systematic Adjustment:** - - The gradual increase avoids sudden surges in gas target that could destabilize the network. Instead, it provides a smooth transition, giving the ecosystem time to adapt to larger block sizes. + - The gradual increase avoids sudden surges in gas limit that could destabilize the network. Instead, it provides a smooth transition, giving the ecosystem time to adapt to larger block sizes. -### **Controlled Target with Deactivation Block** +### **Controlled Limit with Deactivation Block** - **Automatic Safeguard:** - - The inclusion of a deactivation block ensures that the gas target does not increase indefinitely, preventing potential negative impacts on network performance beyond the planned growth. + - The inclusion of a deactivation block ensures that the gas limit does not increase indefinitely, preventing potential negative impacts on network performance beyond the planned growth. - **Community Consensus:** - - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas target increase, however, in the two-year period, the community can decide to halt the increase at any time and can also switch to a fixed gas target if needed. + - The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time and can also switch to a fixed gas limit if needed. ## **Backwards Compatibility** @@ -90,8 +90,8 @@ If we set `blockNumStart` to the current block number, `initialGasTarget` to the ## **Security Considerations** -- The controlled gas target increase strategy is designed to prevent sudden changes that could lead to network instability or security vulnerabilities. -- The fact that validators can re-adjust the gas target in case of a DDOS attack or other issues, makes the network more secure than to just increase the gas target manually in a cliff-like manner. +- The controlled gas limit increase strategy is designed to prevent sudden changes that could lead to network instability or security vulnerabilities. +- The fact that validators can re-adjust the gas limit in case of a DDOS attack or other issues, makes the network more secure than to just increase the gas limit manually in a cliff-like manner. ## **Copyright** From ce7ae0f85a620dd03ee9edf3db5d48f87ec79706 Mon Sep 17 00:00:00 2001 From: Giulio Date: Thu, 10 Oct 2024 15:56:42 +0200 Subject: [PATCH 32/38] save --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 5e7da28f92f15e..6dda243cffdb80 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -57,7 +57,7 @@ Where: - `r` is the rate at which the gas limit increases per block. - `gasLimitCap` is the maximum gas limit that can be reached. -If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`15_000_000`), `r` to 3, and `gasLimitCap` to `30_000_000`, the gas limit will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. This means that the Gas Limit will grow proportionally to the Gas Limit, and will end up being twice the value of the gas limit +If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`30_000_000`), `r` to 6, and `gasLimitCap` to `60_000_000`, the gas limit will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. ### **Implementation** From 30ac5933b56d263444464ecf18d2e176d604a3b7 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Thu, 10 Oct 2024 16:19:16 +0200 Subject: [PATCH 33/38] Update EIPS/eip-7783.md Co-authored-by: g11tech --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 6dda243cffdb80..35e35b7eb97235 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -57,7 +57,7 @@ Where: - `r` is the rate at which the gas limit increases per block. - `gasLimitCap` is the maximum gas limit that can be reached. -If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`30_000_000`), `r` to 6, and `gasLimitCap` to `60_000_000`, the gas limit will increase by 3 gas per block for two years, reaching 30 million gas at the end of a 2 years period. +If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`30_000_000`), `r` to 6, and `gasLimitCap` to `60_000_000`, the gas limit will increase by 6 gas per block for two years, reaching 30 million gas at the end of a 2 years period. ### **Implementation** From 4fd3f44bd08efb53ec9635b9ca012ade6be4cbdb Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Mon, 14 Oct 2024 16:11:33 +0200 Subject: [PATCH 34/38] Update EIPS/eip-7783.md Co-authored-by: Jochem Brouwer --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 35e35b7eb97235..02794cd4ddc8ec 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -62,7 +62,7 @@ If we set `blockNumStart` to the current block number, `initialGasLimit` to the ### **Implementation** - **Client Updates:** - - Ethereum clients must implement the automatic gas limit increase according to the specified rate and formula, with enforcement of the deactivation block. However, If the GasLimit has been locally set by the validator that will override the formula and take precedence. + - Ethereum clients must implement the automatic gas limit increase according to the specified rate and formula, with enforcement of the deactivation block. However, if the gas limit has been locally set by the validator that will override the formula and take precedence. - **Gas Limit Management:** - Miners and validators are not required to adjust the gas limit manually during this period, as the increase will be automated at the protocol level. From 13d8bae5c62766e9854be68b62fd56097be6ee19 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Mon, 14 Oct 2024 16:11:42 +0200 Subject: [PATCH 35/38] Update EIPS/eip-7783.md Co-authored-by: Jochem Brouwer --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 02794cd4ddc8ec..9494e6c16474ec 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -28,7 +28,7 @@ The EIP proposes the introduction of a new gas limit management mechanism that a ### **Gradual Increase with Deactivation Safeguard** - **Controlled Growth:** - - Instead of sudden or unpredictable changes, this EIP proposes incremental gas Limit increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas Limit in the hand of the community. + - Instead of sudden or unpredictable changes, this EIP proposes incremental gas limit increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas limit in the hand of the community. - **Automatic Deactivation:** - A safeguard deactivation block will halt the increase after some specified time, preventing the gas Limit from growing indefinitely and allowing the community to reassess the network's needs. From e98e237b20648113553b296a4bc24805f5f23f1b Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 14 Oct 2024 16:13:42 +0200 Subject: [PATCH 36/38] save --- EIPS/eip-7783.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 9494e6c16474ec..a7e1f8fdf8f8b8 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -57,15 +57,7 @@ Where: - `r` is the rate at which the gas limit increases per block. - `gasLimitCap` is the maximum gas limit that can be reached. -If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`30_000_000`), `r` to 6, and `gasLimitCap` to `60_000_000`, the gas limit will increase by 6 gas per block for two years, reaching 30 million gas at the end of a 2 years period. - -### **Implementation** - -- **Client Updates:** - - Ethereum clients must implement the automatic gas limit increase according to the specified rate and formula, with enforcement of the deactivation block. However, if the gas limit has been locally set by the validator that will override the formula and take precedence. - -- **Gas Limit Management:** - - Miners and validators are not required to adjust the gas limit manually during this period, as the increase will be automated at the protocol level. +If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`30_000_000`), `r` to 6, and `gasLimitCap` to `60_000_000`, the gas limit will increase by 6 gas per block for two years, reaching 30 million gas at the end of a $\approx$ 2 years period. ## **Rationale** From ee9613ca4e2f2ca291288eebe95cf46b5d98ed65 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 14 Oct 2024 16:16:26 +0200 Subject: [PATCH 37/38] save --- EIPS/eip-7783.md | 1 + 1 file changed, 1 insertion(+) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index a7e1f8fdf8f8b8..4d4fb8d71e8bf4 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -58,6 +58,7 @@ Where: - `gasLimitCap` is the maximum gas limit that can be reached. If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`30_000_000`), `r` to 6, and `gasLimitCap` to `60_000_000`, the gas limit will increase by 6 gas per block for two years, reaching 30 million gas at the end of a $\approx$ 2 years period. +The result of `compute_gas_limit` will be the gas limit aimed by the proposer for the block `blockNum`. none of this is enforced at the protocol level. ## **Rationale** From cc8bdb8d7d20162e424221716a90c79044f74fa1 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 14 Oct 2024 16:17:01 +0200 Subject: [PATCH 38/38] save --- EIPS/eip-7783.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-7783.md b/EIPS/eip-7783.md index 4d4fb8d71e8bf4..214511f61954dc 100644 --- a/EIPS/eip-7783.md +++ b/EIPS/eip-7783.md @@ -58,7 +58,7 @@ Where: - `gasLimitCap` is the maximum gas limit that can be reached. If we set `blockNumStart` to the current block number, `initialGasLimit` to the current gas limit (`30_000_000`), `r` to 6, and `gasLimitCap` to `60_000_000`, the gas limit will increase by 6 gas per block for two years, reaching 30 million gas at the end of a $\approx$ 2 years period. -The result of `compute_gas_limit` will be the gas limit aimed by the proposer for the block `blockNum`. none of this is enforced at the protocol level. +The result of `compute_gas_limit` will be the gas limit aimed by the proposer for the block `blockNum`. none of this is enforced at the protocol level, and the proposer needs to still follow protocol rules related to the gas limit. ## **Rationale**