💥 Publish Pre-Signed Transactions With Lower Gas Prices
Describe the desired feature:
Hi there! We're looking to mass-deploy CreateX on a number of rollups, but at the cost of 0.3ETH / chain is quite steep. The default gas price of 100 gwei is much higher than it needs to be for most chains, even for Ethereum it's around 0.5 gwei these days, and around 0.01 gwei for many rollups.
It would be great if we could also have pre-signed transactions with different gas prices, like 10 gwei and 1 gwei.
Hey @albertlai431 - what rollups do you refer to exactly? If you plan to mass-deploy CreateX I would rather recommend pushing it as a predeploy for the main stack of these rollups (e.g. Optimism has CreateX in their OP stack). Just to explain why I haven't added pre-signed transactions with super low gas prices so far: some L1s and L2s have buggy RPCs or weird mempool behaviour - they might accept a transaction into the mempool even if the deployer doesn't have enough ETH, and it would only fail at execution time (at the EVM level), burning the deployer nonce. If I offered very low gas price pre-signed transactions, people would start using them by default most probably, and it's only a matter of time before some deployments fuck up on some (exotic) chains. CreateX has now been successfully deployed to 147 chains, and the current approach has proven to be very future-proof.
@pcaversaccio thanks for the detailed response! I'm aware of the OP stack pre-install, but unfortunately that's not part of other rollup stacks like Arbitrum Nitro or ZK Stack. Understood that setting a high gas price is more robust, but how about something like 25 gwei? I would think that it should still be high enough to succeed on some pretty exotic chains but would cut the gas cost by 4x which would be pretty nice.
For context, I'm part of the team at Caldera and we run 30+ mainnets across OP stack, Arb Nitro and ZK Stack and we're looking to get CreateX deployed on them. At this scale, we'd be spending close to close to 10 ETH on this, where default gas prices on all of these rollups are under 0.1 gwei
Well, I'm still pretty hesitant to drop to e.g. 25 gwei. Even that can become too low if any of these rollups experience congestion, sequencer issues, or just mispriced L1 data fees. Part of why CreateX deployment has worked across 147 chains is that it over-prioritises reliability rather than optimising gas for today's conditions. Also, for ZK Stack there are some important differences to note: https://github.com/matter-labs/era-contracts/blob/release-v27/docs/evm_emulation/differences_from_cancun_evm.md#gas-behavior-differences.
Why do you not push Arbitrum Nitro and ZK Stack to include CreateX as a predeploy? An alternative way that I can offer is that I deploy them one-by-one using the private key, but only once the first project requires it on the used rollup.
I understand your reasoning and appreciate you flagging for ZK Stack! We'll talk to Arbitrum and Matter Labs about adding CreateX as a predeploy, but we'll still have to deploy CreateX as on all existing chains.
Thanks for offering to deploy them one-by-one, will share a list when I have it for you.
I understand your reasoning and appreciate you flagging for ZK Stack! We'll talk to Arbitrum and Matter Labs about adding CreateX as a predeploy, but we'll still have to deploy
CreateXas on all existing chains.Thanks for offering to deploy them one-by-one, will share a list when I have it for you.
Sgtm! The best and simplest approach to get this deployed in a fast manner would be that you open a PR that already preconfigures all the chains in the hardhat.config.ts file (example PR: https://github.com/pcaversaccio/createx/pull/193):
- Add the new networks including the RPCs to the
networksnamespace, e.g.:
hoodi: {
chainId: 560048,
url: vars.get(
"ETH_HOODI_TESTNET_URL",
"https://rpc.hoodi.ethpandaops.io",
),
accounts,
},
- Add the networks to the
etherscannamespace, e.g.:
apiKey: {
hoodi: vars.get("ETHERSCAN_API_KEY", ""),
}
customChains: [
{
network: "hoodi",
chainId: 560048,
urls: {
apiURL: "https://hoodi.cloud.blockscout.com/api",
browserURL: "https://hoodi.cloud.blockscout.com",
},
},
]
And you prefund the deployer address 0xeD456e05CaAb11d66C4c797dD6c1D6f9A7F352b5 on all of those chains. Make sure all of them are supporting the paris EVM version and have EVM equivalence.
Closing this issue as not planned. I've suggested a different approach that should resolve the issue.
CreateX will be added as a predeploy to the ZKstack via the next upgrade v29: https://github.com/matter-labs/era-contracts/blob/db12da671a8821028e5641be19074d44e70a56de/system-contracts/contracts/EvmPredeploysManager.sol#L65.
Now only Arbitrum Nitro is left 😄.