Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"maxFeePerGas" may be lower than maxPriorityFeePerGas #1994

Open
oleksandrSydorenkoJ opened this issue Sep 16, 2024 · 1 comment · May be fixed by #2073
Open

"maxFeePerGas" may be lower than maxPriorityFeePerGas #1994

oleksandrSydorenkoJ opened this issue Sep 16, 2024 · 1 comment · May be fixed by #2073
Assignees
Milestone

Comments

@oleksandrSydorenkoJ
Copy link

Describe the bug
Skale uses maxFeePerGas as a gasPrice for type0,1 transactions.
maxPriorityFeePerGas doesn't use anywhere within the skaled functionality
But, eip 1559 provides the formula
maxFeePerGas = baseFeePerGas + maxPriorityFeePerGas
Where maxFeePerGas cannot be lower than maxPriorityFeePerGas.

Versions
skalenetwork/schain:3.19.2-beta.0

Preconditions
Active schain medium type

To Reproduce

  1. Send type2 transaction with transaction params:
    transaction_type2_data = {
        'maxPriorityFeePerGas': 300000,
        'maxFeePerGas': 100000,
        'gas': 100000,
        'chainId': web3.eth.chain_id,
        'type': 2
    }
  1. Check transaction by hash

Expected behavior
Skaled should return the error

E           ValueError: {'code': -32000, 'message': 'max priority fee per gas higher than max fee per gas'}

Actual state
Skaled sends the transaction and receives the transaction by hash without any errors.

Log

2024-09-16 18:41:30 [    INFO] Get transaction is AttributeDict({'accessList': [], 'blockHash': HexBytes('0x86436c0f1adc9b829c6c70e19835a476b00dab598f598a0684baf7e174b122c3'), 'blockNumber': 1358170, 'chainId': 684753045, 'from': '0x71cBE3fedE33905d4D1Bf2Bd51f9d4A62375e659', 'gas': 100000, 'gasPrice': 100000, 'hash': HexBytes('0x1913bdedfecfecb45568ca85cbba716a555c2f4b3c98480bb07872fc643ac73c'), 'input': HexBytes('0x'), 'maxFeePerGas': 100000, 'maxPriorityFeePerGas': 300000, 'nonce': 3725, 'r': HexBytes('0xfdfa54aebc6de39f6b1bc605439ad716ea97906dc713d1aa61559dbf50732abf'), 's': HexBytes('0x408a41d44680e1f987006804f2c8002ec7129d2ad6c305ec50e9f09a593eea14'), 'to': '0x71cBE3fedE33905d4D1Bf2Bd51f9d4A62375e659', 'transactionIndex': 0, 'type': 2, 'v': 0, 'value': 0, 'yParity': 0}) (test_type2_transactions.py:108)


@DmytroNazarenko
Copy link
Collaborator

Needs patch to activate, decided to postpone and include into 3.1

@DmytroNazarenko DmytroNazarenko moved this from In Progress to Code Review in SKALE Engineering 🚀 Sep 18, 2024
@DmytroNazarenko DmytroNazarenko moved this from Code Review to In Progress in SKALE Engineering 🚀 Sep 18, 2024
@PolinaKiporenko PolinaKiporenko modified the milestones: SKALE 3.1, SKALE 3.1.1 Oct 2, 2024
@olehnikolaiev olehnikolaiev moved this from Code Review to To Do in SKALE Engineering 🚀 Dec 26, 2024
@olehnikolaiev olehnikolaiev moved this from To Do to In Progress in SKALE Engineering 🚀 Jan 8, 2025
olehnikolaiev added a commit that referenced this issue Jan 8, 2025
olehnikolaiev added a commit that referenced this issue Jan 8, 2025
olehnikolaiev added a commit that referenced this issue Jan 8, 2025
olehnikolaiev added a commit that referenced this issue Jan 8, 2025
@olehnikolaiev olehnikolaiev linked a pull request Jan 10, 2025 that will close this issue
@olehnikolaiev olehnikolaiev moved this from In Progress to Code Review in SKALE Engineering 🚀 Jan 10, 2025
@olehnikolaiev olehnikolaiev linked a pull request Jan 14, 2025 that will close this issue
olehnikolaiev added a commit that referenced this issue Jan 15, 2025
@PolinaKiporenko PolinaKiporenko removed the bug Something isn't working label Jan 16, 2025
olehnikolaiev added a commit that referenced this issue Jan 16, 2025
olehnikolaiev added a commit that referenced this issue Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Code Review
4 participants