Is there a way to set the block size and the block number in Remix IDE? If not, could you suggest another platform where I can change these parameters?
Thanks
If you want to change parameters of the eth network, you can run ganache locally on your computer. This is an Ethereum simulator where you can change the parameters of the network. For example - this starts a simulate network with a higher gas limit (aka setting the blocksize larger)
ganache-cli -l 0xFFFFFFFF
Note when you run this command an output will be Listening on 127.0.0.1:8545
-- this will be important in the next step.
After having run this command you can connect to this local ganache instance through remix by changing the Environment
variable in the Deploy & Run Transactions
page. In this drop down, select web3 provider
and then use default suggest end point http://127.0.0.1:8545
(we saw this earlier). Now any transactions you submit through remix will be sent to your ganche-cli network which you have the power to easily change the parameters of - like gas limit.
For increasing the block number - there are a few options - by default, ganache mines a block every time a signed transaction is submitted. You can just submit a ton of transactions to increase the block number. You can also try changing the --blockTime
flag in ganache-cli so that blocks will be mined over time (I've had trouble with this in ganache-cli, but it's worked with ganache-ui)
Depending on what you are trying to do - openzeppelin-test-helper - advanceBlock function may also be an alternative helpful way to address this
advanceBlock async function time.advanceBlock() Forces a block to be mined, incrementing the block height.