wealdtech / ethereal

Apache License 2.0
208 stars 41 forks source link

[panic: runtime error: slice bounds out of range] when get contract transaction info #7

Closed passionofvc closed 6 years ago

passionofvc commented 6 years ago
[root@localhost ethereal]# ethereal version
1.2.128
[root@localhost ethereal]# ethereal transaction info --transaction=0x449684b204f02783f3f1d5d75c6ada45fcd9d179844db731e4e646433d323a0d

Type:           Mined transaction
Result:         Succeeded
Block:          6317943
From:           0xF2015A9160C9C9381FF99F19Fc18E5Af57cAc8Ed
To:         0x7ddf4ED06FE5EcC646fAD19d257cD3f05A884d70
Nonce:          195361
Gas limit:      200000
Gas used:       59244
Gas price:      4.5 GWei
Value:          0
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/wealdtech/ethereal/util/txdata.valueToString(0x0, 0x17, 0x1538420, 0xc35aa0, 0x0, 0x8, 0xe52b91, 0x5, 0x400000005, 0xc42033a540, ...)
    /root/go/src/github.com/wealdtech/ethereal/util/txdata/signature.go:142 +0x10ad
github.com/wealdtech/ethereal/util/txdata.contractValueToString(0x0, 0x17, 0x1538420, 0xc35aa0, 0x0, 0x8, 0xe52b91, 0x5, 0x5, 0xc42033a540, ...)
    /root/go/src/github.com/wealdtech/ethereal/util/txdata/signature.go:107 +0x8c
github.com/wealdtech/ethereal/util/txdata.DataToString(0xc42033a540, 0x1a4, 0x1a4, 0xc42033a540, 0x1a4)
    /root/go/src/github.com/wealdtech/ethereal/util/txdata/signature.go:50 +0x369
github.com/wealdtech/ethereal/cmd.glob..func37(0x1504ae0, 0xc4201afd90, 0x0, 0x1)
    /root/go/src/github.com/wealdtech/ethereal/cmd/transactioninfo.go:164 +0xbd0
github.com/wealdtech/ethereal/vendor/github.com/spf13/cobra.(*Command).execute(0x1504ae0, 0xc4201afd70, 0x1, 0x1, 0x1504ae0, 0xc4201afd70)
    /root/go/src/github.com/wealdtech/ethereal/vendor/github.com/spf13/cobra/command.go:704 +0x2c6
github.com/wealdtech/ethereal/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1502920, 0xb7973e, 0x1502920, 0xc4201e1f20)
    /root/go/src/github.com/wealdtech/ethereal/vendor/github.com/spf13/cobra/command.go:785 +0x30e
github.com/wealdtech/ethereal/vendor/github.com/spf13/cobra.(*Command).Execute(0x1502920, 0x0, 0xba2457)
    /root/go/src/github.com/wealdtech/ethereal/vendor/github.com/spf13/cobra/command.go:738 +0x2b
github.com/wealdtech/ethereal/cmd.Execute()
    /root/go/src/github.com/wealdtech/ethereal/cmd/root.go:150 +0x31
main.main()
    /root/go/src/github.com/wealdtech/ethereal/main.go:19 +0x20
mcdee commented 6 years ago

This should be fixed in 1.2.131. Please go get -u github.com/wealdtech/ethereal and see if it still happens.

passionofvc commented 6 years ago

thanks fixed!

$ ethereal transaction info --transaction=0x449684b204f02783f3f1d5d75c6ada45fcd9d179844db731e4e646433d323a0d
Type:                   Mined transaction
Result:                 Succeeded
Block:                  6317943
From:                   0xF2015A9160C9C9381FF99F19Fc18E5Af57cAc8Ed
To:                     0x7ddf4ED06FE5EcC646fAD19d257cD3f05A884d70
Nonce:                  195361
Gas limit:              200000
Gas used:               59244
Gas price:              4.5 GWei
Value:                  0
Data:                   transfer(15028802227680798167003936007430499107,0xa36ae0f959046a18d109dc5b1fb8df655cf0aa81,0x1eae6021df129474a2847b9f6c53e9dd5fd256df,0xad66ece9bf8c71870aecdaf01b06dcf4b3c2f579,1668085290000000000,0x8c17f89444544294e49ea58b29cb3d7d94fd671a021c6f07df4cdc3ad8069fe42a0af9299b1e877989a8e4205b4db22380c8c6e818efeeb863ab402c9897851f1c,0x)