From 4f89e3fb24e33eebf6c412d3d9def88966ad966a Mon Sep 17 00:00:00 2001 From: Wanwiset Peerapatanapokin Date: Tue, 23 Dec 2025 14:57:03 +0400 Subject: [PATCH] cmd/puppeth: increase gaslimit during genesis block creation (#1851) * increase gaslimit during genesis block creation for puppeth command * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- cmd/puppeth/wizard_genesis.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index bb79ce490f..c5da9626ae 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -332,7 +332,8 @@ func (w *wizard) makeGenesis() { // Validator Smart Contract Code pKey, _ := crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") addr := crypto.PubkeyToAddress(pKey.PublicKey) - contractBackend := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(1000000000)}}, 10000000, params.TestXDPoSMockChainConfig) + // Gas limit increased to 10,000,000,000 to support validator contract deployment with large masternode counts (>38). + contractBackend := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(1000000000)}}, 10_000_000_000, params.TestXDPoSMockChainConfig) //lint:ignore SA1019 chainID is not determined at this time transactOpts := bind.NewKeyedTransactor(pKey)