starknet-devnet-rs
starknet-devnet-rs copied to clipboard
Account deploy fee estimate
Describe the bug (observed vs expected behavior)
With the starknet.js PR #985 we noticed a behaviour that might indicate an issue with devnet. After the transition from 804b361 to c6ffb99, that is, after the devnet PR #364 a test from the mentioned starknet.js PR fails. This can be seen in the following GitHub CI test runs:
- workflow run, branch
ETHsignerContract_1using 804b361 - workflow run, branch
ETHsignerContract_2using c6ffb99
What happens is that the maxFee parameter of an account deployment, which is set automatically in the code based on the starknet_estimateFee response by increasing it by 50%, is still insufficient. Note that it only arises for the ETH account tx V2 test suite.
Not reproducible on alpha-goerli
- [x] This issue is only present on Devnet and cannot be reproduced on alpha-goerli (check the box if true).
To Reproduce Steps to reproduce the behaviour:
- Fork
starknet.js - Create branches based on
ETHsignerContract_1andETHsignerContract_2 - Go to the
Actionstab and run[Manual] Test Devnet
(or equivalent steps in a local environment)
Devnet version
- I am using Devnet version: c6ffb99
- [x] This happens with a dockerized Devnet (check the box if true).
- This does not appear on the following Devnet version: 804b361
System specifications
- OS: GitHub CI runner - Ubuntu 22.04.4
Thank you for the descriptive issue
{"method":"starknet_estimateFee","params":{"request":[{"type":"DEPLOY_ACCOUNT","constructor_calldata":["0x7f22c6fc6f80910801f6b01a4131da1e","0x829307f82a1883c2414503ba85fc8503","0x89e11b926e2615268db6ad1af8d8da96","0x2a23f7bddf3715d11767b1247eccc68c"],"class_hash":"0x23e416842ca96b1f7067693892ed00881d97a4b0d9a4c793b75cb887944d98d","contract_address_salt":"0x7f22c6fc6f80910801f6b01a4131da1e","version":"0x100000000000000000000000000000001","signature":["0x26e0af7f325bc4aa4518b005af1078bd","0xa8314c60ae365582b866d3170110f37f","0xabff9197b7329ef12ff6598292037c05","0x36f96c42cac8571d2ead1615e07da954","0x0"],"nonce":"0x0","max_fee":"0x0"}],"block_id":"pending","simulation_flags":["SKIP_VALIDATE"]}}
In the starknet_estimateFee request a flag SKIP_VALIDATE is passed. I assume this is the reason for returning not enough fee when the transaction is executed
with https://github.com/0xSpaceShard/starknet-devnet-rs/pull/364 there is a change in resource weights and there is a difference between estimating fee with validation and without. So just increasing by 50% is not enough to cover the validation execution
Closing as resolved