-
Notifications
You must be signed in to change notification settings - Fork 23
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
Pessimistic Gas Estimation RPC Sandbox Bug #189
Comments
Hey are there any updates on this? It's a pretty major blocker for NEARCon POAPS testing. |
I did some digging and ended up finding the root cause. When I go to my temp folder and view the sandbox information for tests, the higher than the Gas price for testnet and mainnet that can be queried for. For example, if you run the following HTTP req, it will return a {
"jsonrpc": "2.0",
"id": "dontcare",
"method": "gas_price",
"params": [null]
} Returns: {
"jsonrpc": "2.0",
"result": {
"gas_price": "100000000"
},
"id": "dontcare"
} When comparing this value with the value in |
So after talking with @BenKurrek, the error is further down in |
I think I may have found an issue with the sandbox RPC gas estimation. It's consistently off by a factor of 10x. The RPC is calculating that a transaction costs 100x more than it should on Testnet. For example, a transaction costing 100 TGas on Testnet requires an allowance of at least
0.018742435949557556914715
but when replicating the same behaviour with workspaces sandbox, the number is0.18742435949557556914715
which is 10x higher. In both scenarios, the GAS being attached to the txn is 100 TGas.Steps to reproduce:
ben/tests
branchyarn && yarn test:stage3
The text was updated successfully, but these errors were encountered: