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

Optimist crashes recurrently - out of gas? #1059

Open
israelboudoux opened this issue Oct 6, 2022 · 0 comments
Open

Optimist crashes recurrently - out of gas? #1059

israelboudoux opened this issue Oct 6, 2022 · 0 comments
Labels

Comments

@israelboudoux
Copy link
Contributor

israelboudoux commented Oct 6, 2022

The Optimist application crashes - Returned values aren't valid, did it run Out of Gas?

This error happened many times during the load testing on the Optimist and Proposer applications.

  • Optimist's logs:
2022-09-27T09:23:16.759+01:00	throw new Error('Returned values aren\'t valid, did it run Out of Gas? ' +	
2022-09-27T09:23:16.759+01:00	^	
2022-09-27T09:23:16.759+01:00	Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.	
2022-09-27T09:23:16.759+01:00	at ABICoder.decodeParametersWith (/app/node_modules/web3-eth-abi/lib/index.js:304:15)	
2022-09-27T09:23:16.759+01:00	at ABICoder.decodeParameters (/app/node_modules/web3-eth-abi/lib/index.js:291:17)	
2022-09-27T09:23:16.759+01:00	at Contract._decodeMethodReturn (/app/node_modules/web3-eth-contract/lib/index.js:493:22)	
2022-09-27T09:23:16.759+01:00	at Method.outputFormatter (/app/node_modules/web3-eth-contract/lib/index.js:800:42)	
2022-09-27T09:23:16.759+01:00	at Method.formatOutput (/app/node_modules/web3-core-method/lib/index.js:148:54)	
2022-09-27T09:23:16.759+01:00	at sendTxCallback (/app/node_modules/web3-core-method/lib/index.js:536:33)	
2022-09-27T09:23:16.759+01:00	at Object.callback (/app/node_modules/web3-core-requestmanager/lib/index.js:305:9)	
2022-09-27T09:23:16.759+01:00	at /app/node_modules/web3-providers-ws/lib/index.js:114:45	
2022-09-27T09:23:16.759+01:00	at Array.forEach (<anonymous>)	
2022-09-27T09:23:16.759+01:00	at WebsocketProvider._onMessage (/app/node_modules/web3-providers-ws/lib/index.js:102:69)	
2022-09-27T09:23:16.759+01:00	at W3CWebSocket._dispatchEvent [as dispatchEvent] (/app/node_modules/yaeti/lib/EventTarget.js:115:12)	
2022-09-27T09:23:16.759+01:00	at W3CWebSocket.onMessage (/app/node_modules/websocket/lib/W3CWebSocket.js:234:14)	
2022-09-27T09:23:16.759+01:00	at WebSocketConnection.<anonymous> (/app/node_modules/websocket/lib/W3CWebSocket.js:205:19)	
2022-09-27T09:23:16.759+01:00	at WebSocketConnection.emit (node:events:513:28)	
2022-09-27T09:23:16.759+01:00	at WebSocketConnection.processFrame (/app/node_modules/websocket/lib/WebSocketConnection.js:554:26)	
2022-09-27T09:23:16.759+01:00	at /app/node_modules/websocket/lib/WebSocketConnection.js:323:40	
2022-09-27T09:29:38.156+01:00	Waiting for connection with web3-ws.staging.polygon-nightfall.technology...	
2022-09-27T09:29:38.187+01:00	Connect to web3-ws.staging.polygon-nightfall.technology...	
2022-09-27T09:29:38.862+01:00	> [email protected] prestart	
2022-09-27T09:29:38.862+01:00	> ./pre-start-script.sh	
2022-09-27T09:29:39.172+01:00	> [email protected] start	
2022-09-27T09:29:39.172+01:00	> node src/index.mjs

This error is difficult to replay because it didn't happen all the time tested, it isn't deterministic. Maybe it happens when the Optimist is under a heavy load. It happened during block generation.

To simulate one can insert the following transaction many times into the Optimist's DB:

{  "transactionHash": "0x8a7b9acd484cede76f381b19e5c3372516f77f1c4a7acff84b700a78fd6622df",  "blockNumber": 673,  "blockNumberL2": -1,  "commitments": [    "0x1a8460ca2081714b7d5e35411a0dcb85aec7eefb0f773e3b6b51126f731ad766",    "0x26fc127cedff5a8a2b773d4a58ba2ad95ed552844f15d0804c2d2130ca4fb952",    "0x0000000000000000000000000000000000000000000000000000000000000000"  ],  "compressedSecrets": [    "0x0092873880fbab1270b0dbfe2f5528acec8ce016081d68e80a6e0e2022859d72",    "0x1e66920e9dc17a684680e74f84db4ea79baca4d71f90d225a49ddf79c719e37a"  ],  "ercAddress": "0x247476db73d0cd6135f801fe3a3cc3b2ed59a6853c04634de5e633ee010d23f7",  "fee": "10",  "historicRootBlockNumberL2": [    "1",    "0",    "0",    "0"  ],  "mempool": true,  "nullifiers": [    "0x18cd91877c299934efc2bd108fbd6f87a636a3173cae5539b1c2a95e3854d3c4",    "0x0000000000000000000000000000000000000000000000000000000000000000",    "0x0000000000000000000000000000000000000000000000000000000000000000",    "0x0000000000000000000000000000000000000000000000000000000000000000"  ],  "proof": [    "0x1f6d4b69883d3fbc11f8de641df4df5019495845bcd0a284d9c6bb5de91d3460",    "0x023f21464663211684b74c87625521f4f096468129a2b5e1355c37ca80de757c",    "0x10b4fa08926435186fc46cd22a1a4bb6db97426ab8f52f5e854e12311182592e",    "0x120cefac44a522b67ba9b76af659860bd1c47bc18937885a85136d9104a9e477",    "0x150c4610b5723c0f962e63379690cdbb87f153f7ca0e948a1ae0e8267c8bf04a",    "0x2a8594ac94d9e2e1f9dfd237381388a7f6217466154d8fb9e3ad679d151bd2ba",    "0x272acc771822351ffeb50b5ac3dfb26f7266d8dd89d7bfc2714b6d4aef9a2435",    "0x161c6a74f6af5c5bca9270c3b25b511be938e0977a9b442bb2092dacb2c36281"  ],  "recipientAddress": "0x07f5bcf51747b070f3a36976f540fcb214c83d7e7d6f44b932b13fedeeeddbef",  "tokenId": "0x2e7955a01a807dce3f7f1d1152893adc378bd8a2c380d334a481fd0389bcf2c5",  "tokenType": "0",  "transactionHashL1": "0x6bb90ec983cf110fea2cd7364578ac22d137fa9edba18f52e48757407b7f4c2b",  "transactionType": "1",  "value": "1000000000"}

The application should be resilient and whatever failure happens it shouldn't crash.

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

No branches or pull requests

1 participant