Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Tx-fuzz exits with exceeds block gas limit #24

Open
bshastry opened this issue Mar 8, 2023 · 1 comment
Open

[Documentation] Tx-fuzz exits with exceeds block gas limit #24

bshastry opened this issue Mar 8, 2023 · 1 comment

Comments

@bshastry
Copy link
Contributor

bshastry commented Mar 8, 2023

Geth cmdline invocation:

geth --http --http.port 8545 --miner.gaslimit 800000000000000000

Tx-fuzz invocation (other options such as send, airdrop etc. run into same error):

./cmd/livefuzzer/livefuzzer spam
could not airdrop: exceeds block gas limit
exceeds block gas limit

Geth log

...
WARN [03-07|07:21:04.357] Served eth_sendRawTransaction conn=127.0.0.1:58318 reqid=4 t="671.196µs" err="exceeds block gas limit"

How could this be avoided so livefuzzer can continue fuzzing?

@radkomih
Copy link

radkomih commented Aug 29, 2023

@bshastry I did run into the same problem and I was able to get rid of the error by:

  • in Geth, added genesis.json with enough balance for the account that is used to send transactions
  • in tx-fuzz, changed the private key with the one corresponding to the address that is used to send transactions
  • in tx-fuzz, changed the value to be sent, so that it doesn't run out of balance
// changed to SK corresponding to the address that is used to send transactions
sk := crypto.ToECDSAUnsafe(common.FromHex(txfuzz.SK2))

// big.NewInt(10) so it does not run out of balance
value := new(big.Int).Mul(big.NewInt(100000), big.NewInt(params.Ether)) 
{
  "config": {
    "chainId": 12345,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "muirGlacierBlock": 0,
    "berlinBlock": 0,
    "londonBlock": 0,
    "arrowGlacierBlock": 0,
    "grayGlacierBlock": 0,
    "clique": {
      "period": 5,
      "epoch": 30000
    }
  },
  "difficulty": "1",
  "gasLimit": "800000000",
  "extradata": "0x00000000000000000000000000000000000000000000000000000000000000007df9a875a174b3bc565e6424a0050ebc1b2d1d820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "alloc": {
    "b02A2EdA1b317FBd16760128836B0Ac59B560e9D": {
      "balance": "50000000000000000000"
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants