Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Frozen
Copy link
Collaborator

@Frozen Frozen commented Feb 7, 2025

Fixed issue with effective gas price panic. Covered wth tests.

@sophoah
Copy link
Contributor

sophoah commented Feb 18, 2025

@Frozen

@Frozen Frozen force-pushed the fix/rpc-effetive-gas-price branch from 460c1a6 to 6f126d8 Compare February 19, 2025 20:19
@Frozen
Copy link
Collaborator Author

Frozen commented Feb 25, 2025

returns nil by default

@sophoah sophoah changed the title Fix effetive gas price for rpc getTransactionReceipt Fix effective gas price for rpc getTransactionReceipt Feb 26, 2025
@mur-me
Copy link
Collaborator

mur-me commented Mar 3, 2025

Hey @Frozen, can you please explain why can't we have the same behavior as Ethereum has for transactions before EIP-1559?

I've checked numerous sources and all them saying that pre-London(eip1559) transactions should have gasUsed == effectiveGasUsed

I've checked numerous sources and all them saying that pre-London(eip1559) transactions should have gasPrice == effectiveGasPrice

For example:

@Frozen
Copy link
Collaborator Author

Frozen commented Mar 4, 2025

updated to return effectiveGasPrice==gasUsed if no value for effectiveGasPrice

@mur-me
Copy link
Collaborator

mur-me commented Mar 4, 2025

updated to return effectiveGasPrice==gasUsed if no value for effectiveGasPrice

Thanks, I'll install this version to the testnet RPC node and verify how will it work

@mur-me
Copy link
Collaborator

mur-me commented Mar 4, 2025

Hey @Frozen, sorry, but I've mistakenly mentioned gasUsed == effectiveGasUsed instead of GasPrice==effectiveGasPrice, all the source links mentioned are correct, sorry for this

@Frozen Frozen force-pushed the fix/rpc-effetive-gas-price branch from bb93067 to 06b7fc0 Compare March 5, 2025 04:49
@Frozen Frozen force-pushed the fix/rpc-effetive-gas-price branch from 06b7fc0 to 1d4ef93 Compare March 12, 2025 16:53
@Frozen
Copy link
Collaborator Author

Frozen commented Mar 12, 2025

updated to return nil if value is not set

@Frozen
Copy link
Collaborator Author

Frozen commented Mar 12, 2025

Eth Receipt does not contains GasPrice field, so it's better to return nil insted of GasPrice value

@mur-me
Copy link
Collaborator

mur-me commented Mar 17, 2025

@Frozen, please rebase on the latest dev 🙏

@sophoah
Copy link
Contributor

sophoah commented Mar 17, 2025

@Frozen let's fix the effective gas price to 100.

@Frozen Frozen force-pushed the fix/rpc-effetive-gas-price branch from 2be272f to 9264887 Compare March 18, 2025 20:10
@Frozen
Copy link
Collaborator Author

Frozen commented Mar 18, 2025

@Frozen, please rebase on the latest dev 🙏

Done

@Frozen
Copy link
Collaborator Author

Frozen commented Mar 18, 2025

@Frozen let's fix the effective gas price to 100.

updated to return 100 as default value

@mur-me
Copy link
Collaborator

mur-me commented Mar 21, 2025

Thanks @Frozen, I've installed your branch on the testnet and run regression test suite for the old transactions and now all the tests passed:

test_effective_gas_price_regression.py::test_effective_gas_price[eth-staking_call-0xfc78151506dfa4b2f01b5bacac698203348a92eb70fd2b8179b51897a580e26c] PASSED  [  8%]
test_effective_gas_price_regression.py::test_effective_gas_price[eth-smart_contract_call-0x5df75796f9a563d0cd84d8bf86d62f5bbeb696d63b656cf7b659ec3244ff4c1f] PASSED [ 16%]
test_effective_gas_price_regression.py::test_effective_gas_price[eth-coin_transfer-0x174a4ff5073ee5e811e117e9ee950f382dcb388aa50bac45f75e9f50aa051c15] PASSED [ 25%]
test_effective_gas_price_regression.py::test_effective_gas_price[eth-latest-retrived_from_blockscout] PASSED                                                  [ 33%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmy-staking_call-0xfc78151506dfa4b2f01b5bacac698203348a92eb70fd2b8179b51897a580e26c] PASSED  [ 41%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmy-smart_contract_call-0x5df75796f9a563d0cd84d8bf86d62f5bbeb696d63b656cf7b659ec3244ff4c1f] PASSED [ 50%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmy-coin_transfer-0x174a4ff5073ee5e811e117e9ee950f382dcb388aa50bac45f75e9f50aa051c15] PASSED [ 58%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmy-latest-retrived_from_blockscout] PASSED                                                  [ 66%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmyv2-staking_call-0xfc78151506dfa4b2f01b5bacac698203348a92eb70fd2b8179b51897a580e26c] PASSED [ 75%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmyv2-smart_contract_call-0x5df75796f9a563d0cd84d8bf86d62f5bbeb696d63b656cf7b659ec3244ff4c1f] PASSED [ 83%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmyv2-coin_transfer-0x174a4ff5073ee5e811e117e9ee950f382dcb388aa50bac45f75e9f50aa051c15] PASSED [ 91%]
test_effective_gas_price_regression.py::test_effective_gas_price[hmyv2-latest-retrived_from_blockscout] PASSED                                                [100%]

@mur-me
Copy link
Collaborator

mur-me commented Mar 21, 2025

Let's also merge harmony-one/harmony-test#38 after merge of this PR 🙏

@sophoah sophoah merged commit 2d2fc5c into dev Mar 26, 2025
4 checks passed
@sophoah sophoah deleted the fix/rpc-effetive-gas-price branch March 26, 2025 08:29
GheisMohammadi pushed a commit that referenced this pull request Jun 4, 2025
* fixed effectiveGasPrice.
* Tests for effective gas price receipt.
* gas 100 gwei
GheisMohammadi pushed a commit that referenced this pull request Jun 4, 2025
* fixed effectiveGasPrice.
* Tests for effective gas price receipt.
* gas 100 gwei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants