Bug: Querying Geth fails vs Nethermind successful
sambacha opened this issue · 2 comments
sambacha commented
When requesting a diagram of the transaction 0xa76223b08efc5c293437b8f5673ed2b2757ba7f9c405dab5c98620c463ed9b57
Geth will faill
Nethermind will succeed
Geth output
tx2uml Got token information for 6 contracts +0ms
tx2uml Decoded 1 output params for sellToUniswap with selector 0xd9627aa4 +2s
VError: Failed to parse selector 0x0902f1ac in trace with id 4 from 0xdef1c0ded9bec7f1a1670819833240f027b25eff to 0xd3d2e2692501a5c9ca623199d38826e513033a17: data out-of-bounds (length=64, offset=96, code=BUFFER_OVERRUN, version=abi/5.4.0)
at Function.parseTraceParams (/Users/sbacha/tx-uml/tx2uml/lib/transaction.js:149:43)
at tx2uml (/Users/sbacha/tx-uml/tx2uml/lib/tx2uml.js:103:38)
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
jse_shortmsg: 'Failed to parse selector 0x0902f1ac in trace with id 4 from 0xdef1c0ded9bec7f1a1670819833240f027b25eff to 0xd3d2e2692501a5c9ca623199d38826e513033a17',
jse_cause: Error: data out-of-bounds (length=64, offset=96, code=BUFFER_OVERRUN, version=abi/5.4.0)
at Logger.makeError (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/logger/lib/index.js:187:21)
at Logger.throwError (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/logger/lib/index.js:196:20)
at Reader._peekBytes (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:150:24)
at Reader.readBytes (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:162:26)
at Reader.readValue (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:168:48)
at NumberCoder.decode (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/abi/lib/coders/number.js:55:28)
at /Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/abi/lib/coders/array.js:109:31
at Array.forEach (<anonymous>)
at Object.unpack (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/abi/lib/coders/array.js:88:12)
at TupleCoder.decode (/Users/sbacha/tx-uml/tx2uml/node_modules/@ethersproject/abi/lib/coders/tuple.js:74:49) {
reason: 'data out-of-bounds',
code: 'BUFFER_OVERRUN',
length: 64,
offset: 96
Nethermind output
Nethermind request...
tx2uml Enabled tx2uml debug +0ms
tx2uml Using Nethermind client. +1ms
tx2uml About to get transaction trace for 0xa76223b08efc5c293437b8f5673ed2b2757ba7f9c405dab5c98620c463ed9b57 +0ms
+33ms
tx2uml Got contract name Uni for address 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 from Etherscan +33ms
tx2uml Got token information for 6 contracts +0ms
tx2uml Decoded 1 output params for sellToUniswap with selector 0xd9627aa4 +2s
tx2uml Decoded 1 output params for sellToUniswap with selector 0xd9627aa4 +2ms
tx2uml Decoded 1 output params for transfer with selector 0xa9059cbb +2ms
tx2uml Decoded 3 output params for getReserves with selector 0x0902f1ac +1ms
tx2uml Decoded 1 output params for transfer with selector 0xa9059cbb +5ms
tx2uml Decoded 1 output params for balanceOf with selector 0x70a08231 +1ms
tx2uml Decoded 1 output params for balanceOf with selector 0x70a08231 +1ms
tx2uml Write lifeline 0x0000..ebbf with stereotype +0ms
tx2uml Write lifeline 0xdef1..5eff with stereotype <<ZeroEx>> +0ms
tx2uml Write lifeline 0xb255..8042 with stereotype <<UniswapFeature>> +0ms
tx2uml Write lifeline 0xc02a..6cc2 with stereotype <<Wrapped Ether (WETH)>><<WETH9>> +1ms
tx2uml Write lifeline 0xd3d2..3a17 with stereotype <<Uniswap V2 (UNI-V2)>><<UniswapV2Pair>> +0ms
tx2uml Write lifeline 0x1f98..f984 with stereotype <<Uniswap (UNI)>><<Uni>> +0ms
tx2uml Write message 0 from 0x0000..ebbf to 0xdef1..5eff +18ms
tx2uml Write message 1 from 0xdef1..5eff to 0xb255..8042 +1ms
tx2uml Write message 2 from 0xdef1..5eff to 0xc02a..6cc2 +1ms
tx2uml Write message 3 from 0xdef1..5eff to 0xc02a..6cc2 +0ms
tx2uml Write message 4 from 0xdef1..5eff to 0xd3d2..3a17 +1ms
tx2uml Write message 5 from 0xdef1..5eff to 0xd3d2..3a17 +0ms
tx2uml Write message 6 from 0xd3d2..3a17 to 0x1f98..f984 +1ms
tx2uml Write message 7 from 0xd3d2..3a17 to 0x1f98..f984 +0ms
tx2uml Write message 8 from 0xd3d2..3a17 to 0xc02a..6cc2 +0ms
tx2uml Plant UML file written to 0xa76223b08efc5c293437b8f5673ed2b2757ba7f9c405dab5c98620c463ed9b57.puml in raw puml format +0ms
tx2uml Done! +18s
@startuml
title 0xa76223b08efc5c293437b8f5673ed2b2757ba7f9c405dab5c98620c463ed9b57
caption Thu, 01 Oct 2020 05:05:46 GMT
participant "0x0000..ebbf" as 0000ebbf
participant "0xdef1..5eff" as def15eff <<ZeroEx>>
participant "0xb255..8042" as b2558042 <<UniswapFeature>>
participant "0xc02a..6cc2" as c02a6cc2 <<Wrapped Ether (WETH)>><<WETH9>>
participant "0xd3d2..3a17" as d3d23a17 <<Uniswap V2 (UNI-V2)>><<UniswapV2Pair>>
participant "0x1f98..f984" as 1f98f984 <<Uniswap (UNI)>><<Uni>>
note over 0000ebbf
Nonce: 14
Gas Price: 75.0 Gwei
Gas Limit: 150,783
Gas Used: 109,885
Tx Fee: 0.008 ETH
end note
0000ebbf --> def15eff: sellToUniswap(\ntokens: [\n 0: 0xEeee..EEeE,\n 1: 0x1f98..F984],\nsellAmount: 12,000,000,000,000,000,\nminBuyAmount: 1,,007,310,718,918,521,017,\nisSushi: false)\n110,009 gas\n0.012 ETH
activate def15eff
def15eff ->> b2558042: sellToUniswap(\ntokens: [\n 0: 0xEeee..EEeE,\n 1: 0x1f98..F984],\nsellAmount: 12,000,000,000,000,000,\nminBuyAmount: 1,,007,310,718,918,521,017,\nisSushi: false)\n107,455 gas\n0.012 ETH
activate b2558042 #809ECB
def15eff -[#3471CD]> c02a6cc2: deposit()\n22,674 gas\n0.012 ETH
activate c02a6cc2
return
def15eff -[#3471CD]> c02a6cc2: transfer(\ndst: 0xd3d2..3a17,\nwad: 12,000,000,000,000,000)\n10,962 gas
activate c02a6cc2
return\ntrue
def15eff -[#3471CD]> d3d23a17: getReserves()\n1,204 gas
activate d3d23a17
return\n_reserve0: 4,934,359,,823,247,108,870,429,160,\n_reserve1: 57,434,,090,761,458,552,907,834,\n_blockTimestampLast: 1,601,528,713
def15eff -[#3471CD]> d3d23a17: swap(\namount0Out: 1,,027,868,080,529,103,079,\namount1Out: 0,\nto: 0x0000..ebBF,\ndata: 0x)\n60,616 gas
activate d3d23a17
d3d23a17 -> 1f98f984: transfer(\ndst: 0x0000..ebBF,\nrawAmount: 1,,027,868,080,529,103,079)\n18,862 gas
activate 1f98f984
return\ntrue
d3d23a17 -> 1f98f984: balanceOf(\naccount: 0xd3d2..3a17)\n1,497 gas
activate 1f98f984
return\n4,934,358,,795,379,028,341,326,081
d3d23a17 -> c02a6cc2: balanceOf(\n0xd3d2..3a17)\n1,234 gas
activate c02a6cc2
return\n57,434,,102,761,458,552,907,834
return
note right of d3d23a17: \n39,023 gas
return\nbuyAmount: 1,,027,868,080,529,103,079
note right of b2558042: \n11,999 gas
return\nbuyAmount: 1,,027,868,080,529,103,079
note right of def15eff: \n2,554 gas
note over c02a6cc2 #aqua
Deposit:
dst: 0xDef1..5EfF,
wad: 12,000,000,000,000,000
Transfer:
src: 0xDef1..5EfF,
dst: 0xd3d2..3a17,
wad: 12,000,000,000,000,000
end note
note over d3d23a17 #aqua
Sync:
reserve0: 4,934,358,,795,379,028,341,326,081,
reserve1: 57,434,,102,761,458,552,907,834
Swap:
sender: 0xDef1..5EfF,
amount0In: 0,
amount1In: 12,000,000,000,000,000,
amount0Out: 1,,027,868,080,529,103,079,
amount1Out: 0,
to: 0x0000..ebBF
end note
note over 1f98f984 #aqua
Transfer:
from: 0xd3d2..3a17,
to: 0x0000..ebBF,
amount: 1,,027,868,080,529,103,079
end note
@endumls
Unsure if this is upstream or not , but I do occasionally encounter situations when a failure like this occurs selectively
naddison36 commented
I've retested 0xa76223b08efc5c293437b8f5673ed2b2757ba7f9c405dab5c98620c463ed9b57
against TurboGeth using the latest version of tx2uml and it's now working.
Pls let me know if it doesn't work for you or you find other examples
sambacha commented
cheers