Fantom-foundation / go-opera

Opera blockchain protocol secured by the Lachesis consensus algorithm
https://fantom.foundation/
GNU Lesser General Public License v3.0
278 stars 282 forks source link

panic: runtime error: slice bounds out of range #510

Closed ironatalie closed 1 year ago

ironatalie commented 1 year ago

Hi, I have a fantom node running in version release/txtracing/1.1.2-rc.5 The node was working as it supposed to for over a month and then it just stopped working and these are the logs I get:

panic: runtime error: slice bounds out of range [:-8628854311100398772]

goroutine 244 [running]:
github.com/Fantom-foundation/go-opera/txtrace.(*TraceStructLogger).CaptureState(0xc00022b1e0, 0x0?, 0xc4b1ca4d72b62a64?, 0xf1, 0x698d4, 0x0?, 0xc01bd7b050, {0x0, 0x0, 0x0}, ...)
    /home/ubuntu/go-opera/txtrace/trace_logger.go:178 +0x2710
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run.func4()
    /home/ubuntu/go/pkg/mod/github.com/!fantom-foundation/go-ethereum@v1.10.8-ftm-rc11/core/vm/interpreter.go:174 +0x123
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run(0xc00027ad00, 0xc01be7cf00, {0xc028902460, 0x44, 0x44}, 0x0)
    /home/ubuntu/go/pkg/mod/github.com/!fantom-foundation/go-ethereum@v1.10.8-ftm-rc11/core/vm/interpreter.go:234 +0xe2f
github.com/ethereum/go-ethereum/core/vm.(*EVM).Call(0xc0191cd500, {0x1989440, 0xc01bc7dab8}, {0x6e, 0x2f, 0x9b, 0x54, 0x48, 0x98, 0xf6, ...}, ...)
    /home/ubuntu/go/pkg/mod/github.com/!fantom-foundation/go-ethereum@v1.10.8-ftm-rc11/core/vm/evm.go:237 +0xd05
github.com/Fantom-foundation/go-opera/evmcore.(*StateTransition).TransitionDb(0xc028608a80)
    /home/ubuntu/go-opera/evmcore/state_transition.go:292 +0x599
github.com/Fantom-foundation/go-opera/evmcore.ApplyMessage(0x1684040?, {0x199acf8?, 0xc01a68c900?}, 0xfc54f24db7c4adc2?)
    /home/ubuntu/go-opera/evmcore/state_transition.go:173 +0x32
github.com/Fantom-foundation/go-opera/evmcore.applyTransaction({0xc01bc7d938, {0x0, 0x1a, 0x5, 0x55, 0x7b, 0xd0, 0xd9, 0x21, 0x2, ...}, ...}, ...)
    /home/ubuntu/go-opera/evmcore/state_processor.go:137 +0x4a8
github.com/Fantom-foundation/go-opera/evmcore.(*StateProcessor).Process(_, _, _, {0x1, {0x1994820, 0xc00022b1e0}, 0x0, 0x0, 0x0, {0x0, ...}, ...}, ...)
    /home/ubuntu/go-opera/evmcore/state_processor.go:85 +0x60d
github.com/Fantom-foundation/go-opera/gossip/blockproc/evmmodule.(*OperaEVMProcessor).Execute(0xc0001dd500, {0xc0002e4820?, 0x6, 0xc018faa740?})
    /home/ubuntu/go-opera/gossip/blockproc/evmmodule/evm.go:91 +0x145
github.com/Fantom-foundation/go-opera/gossip.consensusCallbackBeginBlockFn.func1.3.4()
    /home/ubuntu/go-opera/gossip/c_block_callbacks.go:322 +0x7ae
github.com/Fantom-foundation/go-opera/gossip.consensusCallbackBeginBlockFn.func1.3.5()
    /home/ubuntu/go-opera/gossip/c_block_callbacks.go:469 +0x83
github.com/Fantom-foundation/lachesis-base/utils/workers.worker(...)
    /home/ubuntu/go/pkg/mod/github.com/!fantom-foundation/lachesis-base@v0.0.0-20221208123620-82a6d15f995c/utils/workers/workers.go:66
github.com/Fantom-foundation/lachesis-base/utils/workers.(*Workers).Start.func1()
    /home/ubuntu/go/pkg/mod/github.com/!fantom-foundation/lachesis-base@v0.0.0-20221208123620-82a6d15f995c/utils/workers/workers.go:31 +0x88
created by github.com/Fantom-foundation/lachesis-base/utils/workers.(*Workers).Start
    /home/ubuntu/go/pkg/mod/github.com/!fantom-foundation/lachesis-base@v0.0.0-20221208123620-82a6d15f995c/utils/workers/workers.go:29 +0x2b

I tried upgrading to version release/txtracing/1.1.2-rc.6 but I still get the same error.

Help anyone? Thanks

uprendis commented 1 year ago

Duplication of https://github.com/Fantom-foundation/go-opera/issues/505 , please read https://github.com/Fantom-foundation/go-opera/issues/505#issuecomment-1698084024