`multiplication overflowed` on large uint256 api response values
halljson opened this issue · comments
API is logging this:
thread 'tokio-runtime-worker' panicked at 'Multiplication overflowed',
/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_decimal-1.30.0/src/arithmetic_impls.rs:232:18
When trying to query for this tx hash (or any swap with a large enough uint256 value): https://etherscan.io/tx/0x6b78c939b0d3f55e776fc6e43a1fe790466bfb8d6e85d1b54d061ab15728696a
the max uint256:
115792089237316195423570985008687907853269984665640564039457584007913129639935
the max Decimal (per this):
79_228_162_514_264_337_593_543_950_335
appears to be occurring here:
https://github.com/joshstevens19/reth-indexer/blob/master/src/api.rs#L115-L117
i think its probably wise i make these start store as strings due to all these overflows
should be fixed now uint256 are now text so it never overflows 9eb12af
you have to resync db to fix this or migrate your db column to TEXT in sql
thank you, will test this soon!
works perfectly now, thank you