paradigmxyz / cryo

cryo is the easiest way to extract blockchain data to parquet, csv, json, or python dataframes
Apache License 2.0
1.12k stars 97 forks source link

Cryo crashes on BSC: Integer overflow when casting to u32 #173

Open shouc opened 7 months ago

shouc commented 7 months ago

Version cryo 0.3.1-10-g5a1a3bf

Platform Linux dev1 5.10.75-051075-generic #202110201038 SMP Wed Oct 20 11:20:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Description When collecting call traces on BSC, error integer overflow happens when casting to u32 is thrown by cryo. We believe it is because the gas field (u32) has overflowed.

For following transaction, https://bscscan.com/tx/0x33bd1edf49838cf61c88305b470f63a72f4559b0eefbdb8f9321db0bf07920a6, the gas limit is larger than u32 max.
photo_2024-01-12_19-05-34

I tried this code:

cryo traces

I expected to see this happen: Not crash

Instead, this happened: Crash

Screenshot 2024-01-12 at 6 52 59 PM