-
Notifications
You must be signed in to change notification settings - Fork 304
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
Charge gas according to actual resources consumed #1328
Comments
Note that an option is also to use our STRK allocation to sponsor part of our users' transactions as part of an on-chain incentive to boost usage. At least until Stwo/Cairo native (they will bring L2 fees down) Second note: there are extensive efforts to come up with a Rollup Improvement Proposal for EVM L2s to have multi dimensional gas. |
A fine plan could be:
|
To ensure that the network only accepts pre-EIP1559 transactions, it's necessary to make the wallets understand that the network does not accept EIP1559 transactions. This is done in the network definition by specifying that the network does not support EIP1559, which will automatically allow wallets to send the correct transactions. For example, MetaMask stores the data in a Redux state with metadata, which is used, for example, here and here to verify whether the network supports EIP1559 or not. An example of netowrk configuration that does not accept EIP1559 is the following:
Therefore, to exclude it, it is necessary to modify the configuration file by not including the EIP1559 feature, or by not inheriting from a network that accepts it. Here is an example of a network that does accept EIP1559:
From the SDKs' perspective, the main SDKs allow sending pre-EIP1559 transactions, but we need to ensure that EIP1559 transactions are rejected on the RPC side. |
EVM and Starknet have different ways of pricing resource usages due to the underlying architecture differences. As such, there cannot be a 1 <> 1 mapping between the EVM gas consumed and the Starknet fee to pay.
As such, we need to design a mechanism ensuring that in the majority of cases, the fee charged for the user (based on gas price and gas used) matches the actual fee, paid by our relayers, for the execution of the starknet transcation.
Tasks
The text was updated successfully, but these errors were encountered: