Skip to content

replace legacy gasPrice with EIP-1559 fee fields in Alpha client#267

Open
verseon0980 wants to merge 1 commit intoOpenGradient:mainfrom
verseon0980:fix/eip1559-gas-price-1
Open

replace legacy gasPrice with EIP-1559 fee fields in Alpha client#267
verseon0980 wants to merge 1 commit intoOpenGradient:mainfrom
verseon0980:fix/eip1559-gas-price-1

Conversation

@verseon0980
Copy link
Copy Markdown

Description

Every transaction sent by the Alpha client uses the legacy gasPrice field
instead of the EIP-1559 fields maxFeePerGas and maxPriorityFeePerGas.

Affected functions in src/opengradient/client/alpha.py:

  • _send_tx_with_revert_handling() line 166
  • new_workflow() line 311
  • _register_with_scheduler() line 362
  • run_workflow() line 428

Why This Is a Problem

Base Sepolia and the OpenGradient network both use EIP-1559 transaction
pricing. When a transaction is built with gasPrice instead of
maxFeePerGas and maxPriorityFeePerGas, two things can go wrong:

  1. On strictly EIP-1559 nodes the transaction is rejected outright and
    the call fails.
  2. On nodes that accept both formats, the legacy format causes users
    to overpay on gas because the fee estimation is less efficient.

This means all on-chain operations in the Alpha client including model
inference, workflow deployment, scheduler registration, and workflow
execution are all affected.

Fix

Replace gasPrice with the two EIP-1559 fields in all four transaction builders:

"maxFeePerGas": self._blockchain.eth.gas_price,
"maxPriorityFeePerGas": self._blockchain.eth.gas_price,

Files Changed

  • src/opengradient/client/alpha.py: updated all four transaction
    builders to use EIP-1559 fee fields

Signed-off-by: verseon0980 <klokrc74@gmail.com>
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.

1 participant