debug_traceTransaction, Invalid string length
See original GitHub issuei’m using ganache by brownie
ganache-cli --chain.vmErrorsOnRPCResponse true --wallet.totalAccounts 10 --hardfork istanbul --miner.blockGasLimit 12000000 --wallet.mnemonic brownie --server.port 8545 --wallet.defaultBalance 1000000000
node --version
v16.14.2
ganache --version
ganache v7.5.0 (@ganache/cli: 0.6.0, @ganache/core: 0.6.0)
brownie test error
brownie.exceptions.RPCRequestError: Invalid string length
correstponding ganache log
Transaction: 0x13652715b80a821ff9e3945e2c8b059b0cfecec6fd4c65c6e0794348b2051146
Gas usage: 467626
Block number: 159
Block time: Fri Nov 18 2022 17:01:45 GMT+0900 (Korean Standard Time)
Runtime error: revert
Revert reason: testing...
When i call an error transaction to eth_call, a revert message (testing…) in response.
Issue Analytics
- State:
- Created 10 months ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Strange crash with RangeError: invalid string length #1968
I'm using Ganache CLI v6.12.2 (ganache-core: 2.13.2) Here's my brownie logs for this problem. Right at the top you see a transaction which ......
Read more >Uncaught RangeError: Invalid string length in JavaScript
The issue is that on each iteration you add the text two times, but you assign the result to text again. iteration 1:...
Read more >debug_traceTransaction - Alchemy Docs
timeout : String - A duration string of decimal numbers that overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Max...
Read more >debug Namespace | go-ethereum
Returns the raw value of a key stored in the database. Client, Method invocation. Console, debug.dbGet(key string). RPC, {" ...
Read more >Besu API methods
Use debug_standardTraceBadBlockToFile to view the trace for an invalid block. Parameters . blockHash : string - block hash. txHash : string -...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve created a PR with a potential fix here: https://github.com/trufflesuite/ganache/pull/3997 and an issue for a possible better long term solution here: https://github.com/trufflesuite/ganache/issues/3998
The threshold for chunked JSON streaming is 100000 debug struct logs, but this transaction only has ~38000! I’m experimenting with a way of automatically falling back to chunking if normal
JSON.stringify
fails due to thisInvalid string length
error, but getting this fix in a release likely won’t happen for a couple of weeks, as we’ve got a huge backlog of PRs as it is.If you are OK with building ganache yourself while you wait on us you can change the
BUFFERIFY_THRESHOLD
value in./src/chains/ethereum/ethereum/src/connector.ts
to something low, like10000
.You only need Node.js installed to get it working.
You can run ganache in dev mode via
npm run tsc && npm start -- --chain.vmErrorsOnRPCResponse=true --wallet.totalAccounts=10 --hardfork=istanbul --miner.blockGasLimit=12000000 --wallet.mnemonic=brownie --server.port=8545 --wallet.defaultBalance=1000000000
to start up the chain (notice the extra--
in the command after start:start -- --
, it is important).See https://github.com/trufflesuite/ganache/blob/develop/CONTRIBUTING.md for more information about building ganache (note: you won’t need to use Node v12.0.0 for any of this).