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 fails during block creation - Invalid data length #1058

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

Optimist fails during block creation - Invalid data length #1058

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

Comments

@israelboudoux
Copy link
Contributor

israelboudoux commented Oct 6, 2022

The Optimist's application crashes during this failure

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

  • Optimist's logs:
2022-09-29T11:10:51.754+01:00	var error = new Error(message);
2022-09-29T11:10:51.754+01:00	^
2022-09-29T11:10:51.754+01:00	Error: incorrect data length (argument=null, value=0, code=INVALID_ARGUMENT, version=abi/5.6.4)
2022-09-29T11:10:51.754+01:00	at Logger.makeError (/app/node_modules/@ethersproject/logger/lib/index.js:233:21)
2022-09-29T11:10:51.754+01:00	at Logger.throwError (/app/node_modules/@ethersproject/logger/lib/index.js:242:20)
2022-09-29T11:10:51.754+01:00	at Logger.throwArgumentError (/app/node_modules/@ethersproject/logger/lib/index.js:245:21)
2022-09-29T11:10:51.754+01:00	at FixedBytesCoder.Coder._throwError (/app/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:41:16)
2022-09-29T11:10:51.754+01:00	at FixedBytesCoder.encode (/app/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js:37:18)
2022-09-29T11:10:51.754+01:00	at /app/node_modules/@ethersproject/abi/lib/coders/array.js:74:19
2022-09-29T11:10:51.754+01:00	at Array.forEach (<anonymous>)
2022-09-29T11:10:51.754+01:00	at pack (/app/node_modules/@ethersproject/abi/lib/coders/array.js:60:12)
2022-09-29T11:10:51.754+01:00	at TupleCoder.encode (/app/node_modules/@ethersproject/abi/lib/coders/tuple.js:71:33)
2022-09-29T11:10:51.754+01:00	at /app/node_modules/@ethersproject/abi/lib/coders/array.js:74:19
2022-09-29T11:10:51.754+01:00	at Array.forEach (<anonymous>)
2022-09-29T11:10:51.754+01:00	at pack (/app/node_modules/@ethersproject/abi/lib/coders/array.js:60:12)
2022-09-29T11:10:51.754+01:00	at TupleCoder.encode (/app/node_modules/@ethersproject/abi/lib/coders/tuple.js:71:33)
2022-09-29T11:10:51.754+01:00	at AbiCoder.encode (/app/node_modules/@ethersproject/abi/lib/abi-coder.js:91:15)
2022-09-29T11:10:51.754+01:00	at ABICoder.encodeParameters (/app/node_modules/web3-eth-abi/lib/index.js:127:27)
2022-09-29T11:10:51.754+01:00	at calcBlockHash (file:///app/src/services/block-utils.mjs:32:32)
2022-09-29T11:10:51.754+01:00	Emitted 'error' event on Queue instance at:
2022-09-29T11:10:51.754+01:00	at next (/app/node_modules/queue/index.js:108:14)
2022-09-29T11:10:51.754+01:00	at /app/node_modules/queue/index.js:150:14
2022-09-29T11:10:51.754+01:00	at processTicksAndRejections (node:internal/process/task_queues:96:5) {
2022-09-29T11:10:51.754+01:00	reason: 'incorrect data length',
2022-09-29T11:10:51.754+01:00	code: 'INVALID_ARGUMENT',
2022-09-29T11:10:51.754+01:00	argument: null,
2022-09-29T11:10:51.754+01:00	value: 0
2022-09-29T11:10:51.754+01:00	}

This error 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": "0"}

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