Argument --max-gas-per-bundle doesn't affect anything
Describe the bug Hello there
Right now I'm working on a tool, that could activate a huge amount of smart accounts derived from one deployer address. Basically I'm sending all of them without waiting for the transaction to be minted and then waiting for the userOp statuses to become included into . But I faced an issue, where I have a lot of userOps in the state non_submited, which means that they are in mempool waiting to be included in the bundle. And they do but only like 4-5 userOps at a time.
So I started researching how to increase a bandwidth and found those flags: max-gas-per-bundle and mempool-max-parallel-ops. After increasing default values of it -- nothing happened. And I tried to reduce it to the ridiculously low value of 5 which I assumed will make bundler to not include any transaction to the bundle. But nothing happened again, I had the same 4-5 userOps at a time.
So is there any problem with this argument, or an issue with the bandwidth is in something else?
To Reproduce Try to send a lot of transactions to the bundler and then wait for them to be mined.
The way I used to start bundler:
node src/lib/cli/alto.js run "--port" "3000" "--network-name" "mainnet" "--entrypoints" "0x" "--executor-private-keys" "0x" "--utility-private-key" "0x" "--min-executor-balance" "1000000000000000000" "--rpc-url" "http://eth_node:8545" "--log-level" "info" "--safe-mode" "false" "--max-gas-per-bundle" "5" "--mempool-max-parallel-ops" "50"
Expected behavior
With a increase of max-gas-per-bundle argument, amount of time for the processing of all userOps should be decreased
Environment:
- Bundler Image: ghcr.io/pimlicolabs/alto:v1.2.0
- Ethereum Node Image: ghcr.io/foundry-rs/foundry:nightly-156cb1396b7076c6f9cb56f3719f8c90f7f52064
Hey Max, thanks for reaching out!
max-gas-per-bundlelimits the amount of gas a single bundle tx can consume. Take a look onmaxGasLimitheremempool-max-parallel-opslimits the amount of userops with the same sender and different nonce keys to be included in the same bundle tx. Take a look here
I guess I found the bug, can you try this branch? Let me know if it helps!
https://github.com/pimlicolabs/alto/pull/265
Yeap, it definitely helped. But something still limits amount of userops in a single bundle. After increasing max-gas-per-bundle to the certain amount it stops including more transactions to the bundle. Right now the highest amount I was able to achieve is 10-15 userops per bundle (for the reference, there is no difference between 50m and 500m value of that arg).
Is there something else that could affect such behaviour?
Oh, I see. What is the block gas limit of the network you're using? Eg Ethereum's is 30m, so there's a natural limitation to the amount of user operations in the single bundle :(
Since I'm using custom development node, I could change the block gas limit. But even without it, used gas for the single bundle transaction is 1-3m (and there is one bundle tx per block), which is much less than default gas limit value.
Hey, I believe this issue was resolved privately on tg. Sharing the resolution here incase anyone else runs into the same issue.
The issue with the --max-gas-per-bundle not doing anything was solved in #265 (this patch was included in Docker version v1.2.1)
The second issue with the limited userops per bundle appeared to be due to hardware limitations as running the same demo on different machines produced different bundling rates (this was discussed on tg)