Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 1547b18

Browse files
authored
Bump maxPriorityFeePerGas to 2.5 Gwei - Closes #4283 (#4284)
* 🎨 Update default value for maxPriorityFeePerGas to 2.5 Gwei * ✅ Update test fixtures to use old value for maxPriorityFeePerGas * ✅ Fix unit tests for contract * 📝 Update the docs with default value of maxPriorityFeePerGas * 🔊 Add change long entry * ✅ Fix e2e test for method signing
1 parent 8e8785e commit 1547b18

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,4 +439,5 @@ Released with 1.0.0-beta.37 code base.
439439
- ethers from 5.1.4 to 5.4.4 (#4231)
440440
- karma from 5.2.3 to 6.3.4 (#4231)
441441
- lerna from 3.22.1 to 4.0.0 (#4231)
442-
- Droped build tests in CI for Node v8 and v10, and added support for Node v14
442+
- Dropped build tests in CI for Node v8 and v10, and added support for Node v14
443+
- Change default value for `maxPriorityFeePerGas` from `1 Gwei` to `2.5 Gwei` (#4284)

docs/web3-eth.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ Parameters
14601460
- ``gasPrice`` - ``Number|String|BN|BigNumber``: (optional) The price of gas for this transaction in :ref:`wei <what-is-wei>`, defaults to :ref:`web3.eth.gasPrice <eth-gasprice>`.
14611461
- ``type`` - ``Number|String|BN|BigNumber``: (optional) A positive unsigned 8-bit number between 0 and 0x7f that represents the type of the transaction.
14621462
- ``maxFeePerGas`` - ``Number|String|BN``: (optional, defaulted to ``(2 * block.baseFeePerGas) + maxPriorityFeePerGas``) The maximum fee per gas that the transaction is willing to pay in total
1463-
- ``maxPriorityFeePerGas`` - ``Number|String|BN`` (optional, defaulted to ``1 Gwei``) The maximum fee per gas to give miners to incentivize them to include the transaction (Priority fee)
1463+
- ``maxPriorityFeePerGas`` - ``Number|String|BN`` (optional, defaulted to ``2.5 Gwei``) The maximum fee per gas to give miners to incentivize them to include the transaction (Priority fee)
14641464
- ``accessList`` - ``List of hexstrings`` (optional) a list of addresses and storage keys that the transaction plans to access
14651465
- ``data`` - ``String``: (optional) Either a `ABI byte string <http://solidity.readthedocs.io/en/latest/abi-spec.html>`_ containing the data of the function call on a contract, or in the case of a contract-creation transaction the initialisation code.
14661466
- ``nonce`` - ``Number``: (optional) Integer of the nonce. This allows to overwrite your own pending transactions that use the same nonce.

packages/web3-core-method/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ function _handleTxPricing(method, tx) {
863863
maxFeePerGas = tx.gasPrice;
864864
delete tx.gasPrice;
865865
} else {
866-
maxPriorityFeePerGas = tx.maxPriorityFeePerGas || '0x3B9ACA00'; // 1 Gwei
866+
maxPriorityFeePerGas = tx.maxPriorityFeePerGas || '0x9502F900'; // 2.5 Gwei
867867
maxFeePerGas = tx.maxFeePerGas ||
868868
utils.toHex(
869869
utils.toBN(block.baseFeePerGas)

packages/web3-eth-accounts/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ function _handleTxPricing(_this, tx) {
390390
maxFeePerGas = tx.gasPrice;
391391
delete tx.gasPrice;
392392
} else {
393-
maxPriorityFeePerGas = tx.maxPriorityFeePerGas || '0x3B9ACA00'; // 1 Gwei
393+
maxPriorityFeePerGas = tx.maxPriorityFeePerGas || '0x9502F900'; // 2.5 Gwei
394394
maxFeePerGas = tx.maxFeePerGas ||
395395
utils.toHex(
396396
utils.toBN(block.baseFeePerGas)

test/contract.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,8 +2678,8 @@ var runTests = function(contractFactory) {
26782678
'0000000000000000000000000000000000000000000000000000000000000011' ,
26792679
to: addressLowercase,
26802680
from: addressLowercase,
2681-
maxPriorityFeePerGas: '0x3B9ACA00',
2682-
maxFeePerGas: '0x3b9aca0e'
2681+
maxPriorityFeePerGas: '0x9502F900',
2682+
maxFeePerGas: '0x9502f90e'
26832683
}]);
26842684

26852685
done();

test/e2e.method.signing.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ describe('transaction and message signing [ @E2E ]', function() {
253253
value: web3.utils.toHex(web3.utils.toWei('0.1', 'ether')),
254254
gas: web3.utils.toHex(21000),
255255
maxFeePerGas: '0x59682F00', // 1.5 Gwei
256+
maxPriorityFeePerGas: '0x1DCD6500', // .5 Gwei
256257
accessList: []
257258
};
258259

test/eth.accounts.signTransaction.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ var tests = [
614614
chainId: 1,
615615
nonce: 0,
616616
gas: 27200,
617+
maxPriorityFeePerGas: '0x3B9ACA00',
617618
gasLimit: '0x6A40',
618619
to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
619620
toIban: 'XE04S1IRT2PR8A8422TPBL9SR6U0HODDCUT', // will be switched to "to" in the test
@@ -636,6 +637,7 @@ var tests = [
636637
chainId: 1,
637638
nonce: 0,
638639
gas: 27200,
640+
maxPriorityFeePerGas: '0x3B9ACA00',
639641
gasLimit: '0x6A40',
640642
to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
641643
toIban: 'XE04S1IRT2PR8A8422TPBL9SR6U0HODDCUT', // will be switched to "to" in the test
@@ -757,6 +759,7 @@ describe("eth", function () {
757759
})
758760
.catch(e => {
759761
console.log(i, e)
762+
done(e);
760763
});
761764
});
762765

@@ -789,6 +792,7 @@ describe("eth", function () {
789792
})
790793
.catch(e => {
791794
console.log(i, e)
795+
done(e);
792796
});
793797
});
794798

@@ -828,6 +832,7 @@ describe("eth", function () {
828832
})
829833
.catch(e => {
830834
console.log(i, e)
835+
done(e);
831836
});
832837
});
833838

@@ -868,6 +873,7 @@ describe("eth", function () {
868873
})
869874
.catch(e => {
870875
console.log(i, e)
876+
done(e);
871877
});
872878
});
873879

@@ -909,6 +915,7 @@ describe("eth", function () {
909915
})
910916
.catch(e => {
911917
console.log(i, e)
918+
done(e);
912919
});
913920
});
914921

@@ -955,6 +962,7 @@ describe("eth", function () {
955962
})
956963
.catch(e => {
957964
console.log(i, e)
965+
done(e);
958966
});
959967
});
960968

@@ -1016,6 +1024,7 @@ describe("eth", function () {
10161024
})
10171025
.catch(e => {
10181026
console.log(i, e)
1027+
done(e);
10191028
});
10201029
});
10211030

@@ -1044,6 +1053,7 @@ describe("eth", function () {
10441053
})
10451054
.catch(e => {
10461055
console.log(i, e)
1056+
done(e);
10471057
})
10481058
});
10491059
}

0 commit comments

Comments
 (0)