From d988fcf7152ce1042d5982e86a6f74ab90f99704 Mon Sep 17 00:00:00 2001 From: Darren Kelly Date: Fri, 26 Apr 2024 10:02:27 +0100 Subject: [PATCH 1/5] add new VIP to increase the base fee coefficient --- vips/vip-increase-base-fee-coefficient.md | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 vips/vip-increase-base-fee-coefficient.md diff --git a/vips/vip-increase-base-fee-coefficient.md b/vips/vip-increase-base-fee-coefficient.md new file mode 100644 index 0000000..17a8816 --- /dev/null +++ b/vips/vip-increase-base-fee-coefficient.md @@ -0,0 +1,28 @@ +--- +Title: Increase the base fee coefficient +Description: This VIP proposes to increase the base fee coefficient range from 0-255 (2^8) to a larger range of 0-65535 (2^16) +Author: Darren Kelly (darren.kelly@vechain.org) +Discussions: TODO +Category: Core +Status: Draft +CreatedAt: 2024-04-26 + +--- + +## Overview + +Currently the gas price coefficient range is from 0-255, which limits the range of values that can be used. This VIP proposes to increase the base fee coefficient to a `uint16` to allow for a larger range of values. + +## Motivation + +Client's of the blockchain can ensure that their transactions receive priority by setting a higher gas price coefficient. However, the current range of values is limited to 0-255. This VIP proposes to increase the base fee coefficient to a uint16 to allow for a larger range of values. + +## Specification + +The implementation will change the `GasPriceCoef` of the transaction types from `uint8` to `uint16` in transaction models. + +## Test Cases + +Build, sign and send a transaction with a gas price coefficient of 65535. The transaction should be included in the next block. + +Copyright and related rights waived via [CC0](./LICENSE.md). From 3c70579bca27fe03475ac3edc73b154e1ceec4ed Mon Sep 17 00:00:00 2001 From: Darren Kelly Date: Fri, 26 Apr 2024 10:04:42 +0100 Subject: [PATCH 2/5] add discussions url --- vips/vip-increase-base-fee-coefficient.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vips/vip-increase-base-fee-coefficient.md b/vips/vip-increase-base-fee-coefficient.md index 17a8816..77256b7 100644 --- a/vips/vip-increase-base-fee-coefficient.md +++ b/vips/vip-increase-base-fee-coefficient.md @@ -2,7 +2,7 @@ Title: Increase the base fee coefficient Description: This VIP proposes to increase the base fee coefficient range from 0-255 (2^8) to a larger range of 0-65535 (2^16) Author: Darren Kelly (darren.kelly@vechain.org) -Discussions: TODO +Discussions: https://vechain.discourse.group/t/increase-the-base-fee-coefficient/109 Category: Core Status: Draft CreatedAt: 2024-04-26 From 9f6f114e51043a8b4085bb25a8c6bb6ca7301049 Mon Sep 17 00:00:00 2001 From: Darren Kelly <107671032+darrenvechain@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:15:16 +0100 Subject: [PATCH 3/5] Update vip-increase-base-fee-coefficient.md --- vips/vip-increase-base-fee-coefficient.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vips/vip-increase-base-fee-coefficient.md b/vips/vip-increase-base-fee-coefficient.md index 77256b7..0e9bd69 100644 --- a/vips/vip-increase-base-fee-coefficient.md +++ b/vips/vip-increase-base-fee-coefficient.md @@ -19,7 +19,7 @@ Client's of the blockchain can ensure that their transactions receive priority b ## Specification -The implementation will change the `GasPriceCoef` of the transaction types from `uint8` to `uint16` in transaction models. +The implementation will change the `GasPriceCoef` of the transaction models from `uint8` to `uint16`. ## Test Cases From 58cd86f755d669bba08a3a31a5a3a903d1eeb8d1 Mon Sep 17 00:00:00 2001 From: Darren Kelly Date: Fri, 26 Apr 2024 10:47:34 +0100 Subject: [PATCH 4/5] update VIP --- vips/vip-increase-base-fee-coefficient.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/vips/vip-increase-base-fee-coefficient.md b/vips/vip-increase-base-fee-coefficient.md index 0e9bd69..0708505 100644 --- a/vips/vip-increase-base-fee-coefficient.md +++ b/vips/vip-increase-base-fee-coefficient.md @@ -1,6 +1,6 @@ --- Title: Increase the base fee coefficient -Description: This VIP proposes to increase the base fee coefficient range from 0-255 (2^8) to a larger range of 0-65535 (2^16) +Description: This VIP proposes a change to the base fee coefficient to make it uncapped. Author: Darren Kelly (darren.kelly@vechain.org) Discussions: https://vechain.discourse.group/t/increase-the-base-fee-coefficient/109 Category: Core @@ -11,18 +11,26 @@ CreatedAt: 2024-04-26 ## Overview -Currently the gas price coefficient range is from 0-255, which limits the range of values that can be used. This VIP proposes to increase the base fee coefficient to a `uint16` to allow for a larger range of values. +Currently the gas price coefficient range is from 0-255, which limits the range of values that can be used. This VIP proposes to uncap the base fee coefficient. ## Motivation -Client's of the blockchain can ensure that their transactions receive priority by setting a higher gas price coefficient. However, the current range of values is limited to 0-255. This VIP proposes to increase the base fee coefficient to a uint16 to allow for a larger range of values. +The reason for increasing the range for the base fee coefficient is to provide network participants with the ability to give higher priority to their transactions. With the current implement network participants are bound to twice the gas price, 0.42 VTHO. ## Specification -The implementation will change the `GasPriceCoef` of the transaction models from `uint8` to `uint16`. +The most simple way to achieve this is to perhaps just change the divisor from 255 to be 1. This maintains backwards compatibility and also reduces the code changes. The base fee coefficient would remain bounded between 0 and 255 however this range would be sufficiently large enough. -## Test Cases - -Build, sign and send a transaction with a gas price coefficient of 65535. The transaction should be included in the next block. +The current formula is: + +```md +Transaction Fee = Base Gas Fee + ( Base Gas Fee * ( Base Fee Coefficient / 255 ) ) +``` + +The new formula would be: + +```md +Transaction Fee = Base Gas Fee + ( Base Gas Fee * ( Base Fee Coefficient / 1 ) ) +``` Copyright and related rights waived via [CC0](./LICENSE.md). From 7b2bdfc4a62a412975dd5ebeae6eaaf831c0d4b9 Mon Sep 17 00:00:00 2001 From: Darren Kelly <107671032+darrenvechain@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:20:00 +0100 Subject: [PATCH 5/5] Update vip-increase-base-fee-coefficient.md --- vips/vip-increase-base-fee-coefficient.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vips/vip-increase-base-fee-coefficient.md b/vips/vip-increase-base-fee-coefficient.md index 0708505..82960d2 100644 --- a/vips/vip-increase-base-fee-coefficient.md +++ b/vips/vip-increase-base-fee-coefficient.md @@ -1,5 +1,5 @@ --- -Title: Increase the base fee coefficient +Title: Uncapped base fee coefficient Description: This VIP proposes a change to the base fee coefficient to make it uncapped. Author: Darren Kelly (darren.kelly@vechain.org) Discussions: https://vechain.discourse.group/t/increase-the-base-fee-coefficient/109