Comments (10)
The gas consumption of blocks in Darwinia is far less from the block gas target? Why the gas price is not decreasing? cc @boundless-forest
from darwinia.
I am confused that why the gas price will affect the contract deployment. Can you explain more? Is there some hardcoded gas price requirement in that repo?
Hey, Ryan from Sphinx here. I wanted to chime in with some info on this.
On most networks, the deterministic create2 factory is deployed at the address 0x4e59b44847b379578588920ca78fbf26c0b4956c
. Having this create2 factory deployed at the same address across networks is helpful because it allows for other contracts to be deployed at consistent addresses (we rely on this heavily at Sphinx). This factory contract has become very popular because it can be permissionlessly deployed by anyone to the expected address on any network as long as it meets certain compatibility conditions.
This contract's deployment works by using a transaction signed with the account 0x3fab184622dc19b6109349b94811493bf2a45362
that does not include a chain ID. Since the transaction does not include a chain ID, it can be replayed on any EVM-compatible network without access to the deployer's private key. This makes the contract permissionlessly deployable on any network.
The downside of this setup is that the transaction has a fixed gas price (100 gwei) and gas limit (100k). If a network's gas price permanently exceeds 100 gwei or has opcode gas fee changes that result in the cost of deploying the factory exceeding 100k, then the factory cannot be deployed on that network.
Since we heavily rely on this factory contract for Sphinx, we unfortunately cannot support your networks unless this issue is resolved.
from darwinia.
The current gas price mechnism of all the Darwinia chains uses the underlying substrate block weight fee calculator https://github.com/darwinia-network/darwinia/blob/main/runtime/darwinia/src/pallets/evm.rs#L150-L157, there is an initial fee value even if the block weight doesn't reach the target. This is designed to prevent the gas price from dropping to zero.Check out the test: https://github.com/darwinia-network/darwinia/blob/main/runtime/common/src/test.rs#L720-L735
from darwinia.
the widely used create2 factory that does not require a key (keyless) cannot be deployed.
I am confused that why the gas price will affect the contract deployment. Can you explain more? Is there some hardcoded gas price requirement in that repo?
from darwinia.
+ curl -fsS https://pangolin-rpc.darwinia.network -d '{"id":1,"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222"]}' -H 'Content-Type: application/json'
from darwinia.
I have done some tracking of the gas price increases over the last year and have sorted them out and summarised them here for your reference.
- Before #1066, the gas price of all the darwinia runtime is low, the darwinia and crab chain used fixed gas price 1GWEI and the dynamic gas price has been loaded in the pangolin network, but the initial gas price is 18_779GWEI(too high in today's view)
- In #1237, update the weight to fee polynomial params again, this also affects the gas price across all networks, the value remains to be used today.
- In #1103 enable the dynamic fee over all the networks and update the block gas limit to the 20m at the same time.
from darwinia.
Will close after runtime upgrade on chain.
from darwinia.
I think the Pangolin testnet gas price is low enough to test the contract. Please testing and feedback here. @hujw77
from darwinia.
I think the Pangolin testnet gas price is low enough to test the contract. Please testing and feedback here. @hujw77
https://pangolin.subscan.io/tx/0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26
No problem.
from darwinia.
https://darwinia.subscan.io/tx/0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26
Deployed.
from darwinia.
Related Issues (20)
- `estimateGas` incompatible method param type HOT 3
- getBlock("latest") often returns the previous block? HOT 10
- Msgscan missed some logs using `eth_getLogs` HOT 2
- Log discrepancies for the same block between two requests within a specified interval. HOT 3
- Review and clear accounts that have non-zero`frozen` field HOT 13
- Review places that create reserved in balance, and why it is not counted in reducible_balance HOT 5
- Issue reported with tx showing in MM failed but actually success.
- Support asynchronous backing HOT 5
- Update EVM `OnChargeTransaction` to deal with onBalance HOT 1
- Darwinia DOT HOT 4
- Deprecated BLS precompile
- KTON asset ownership transfer HOT 1
- XCM v4 HOT 1
- Test if non zero tx value works or not in forward_transact HOT 3
- Migrate `AssetId` to `u32`
- Docs for makefile
- Failed to fetch internal transactions for blocks on darwinia tracing node.
- Support `EthereumXcm` tracing
- Steps of removing vesting pallet on Darwinia
- Set contract address for KTON DAO
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darwinia.