hedera-local-node icon indicating copy to clipboard operation
hedera-local-node copied to clipboard

Allow for hedera local node config options similar to hardhat network config

Open mshakeg opened this issue 1 year ago • 4 comments

Problem

The hardhat local node allows for the following network config that the hedera local node does not currently allow. The full list can be found here. I've only listed the options I think would be most useful:

  • blockGasLimit: hedera does not imu have a block gas limit but rather a gas/s throttle of 15m gas/s which given an ~"block time" of ~2s is effectively 30m gas/block. The hedera local node is likely capable of handling at least 1B gas/s.
  • initialDate: the hedera local node uses the start time as the initial date.
  • allowUnlimitedContractSize: the hedera local node only allows contracts within the max contract size of 24KB to be deployed. This flag if set to true allows any size.

Solution

See above.

Alternatives

No response

mshakeg avatar Mar 10 '23 08:03 mshakeg

Thanks @mshakeg we'll take a look. As usual if it's a simple change on the command line it's just a case of scheduling the work or approving a PR of your own. Some of these items are likely consensus node changes which require much more design and coordination. Just FYI as we look into this.

Nana-EC avatar Mar 15 '23 02:03 Nana-EC

@Nana-EC all 3 of the config options listed would likely require changes to the consensus node. The last option i.e. allowUnlimitedContractSize will likely also require changes to the relay assuming the relay validates contract bytecode size to be <24KB before attempting to create the file.

mshakeg avatar Mar 15 '23 05:03 mshakeg

Hey @mshakeg , The team looked into this and as we discussed earlier on it does seem this requires consensus node changes and in other places relies on Hardhats ability to inform the modification. This isn't something we're able to explore further at this time.

However, we'll look to revisit once the modularized hedera services is completed. There may some potential options in that case.

Nana-EC avatar Jul 27 '23 16:07 Nana-EC

Additionally, we're going to check to see if any of these items directly map to current node configs. If so developers can be unblocked by configuring their local properties to set these items ahead of running hardhat tests

Nana-EC avatar Jul 27 '23 16:07 Nana-EC