crypto-com / chain-indexing

Other
35 stars 28 forks source link

Chain Indexing: Panic on parsing multiple reward amount #856

Closed vincentysc closed 1 year ago

vincentysc commented 1 year ago

Error log from Cosmos Hub staging

"2023-10-17T15:56:38Z INF synchronizing block blockHeight=13718136 module=SyncManager projection=AccountRawEvent submodule=SyncBlockWorker
panic: error parsing auto claimed rewards amount: invalid decimal coin expression: 1ibc/DEC41A02E47658D40FC71E5A35A9C807111F5A6662A3FB5DA84C4E6F53E616B3,228208828uatom [recovered]
    panic: panic when parsing block at height 13718088: error parsing auto claimed rewards amount: invalid decimal coin expression: 1ibc/DEC41A02E47658D40FC71E5A35A9C807111F5A6662A3FB5DA84C4E6F53E616B3,228208828uatom

goroutine 185 [running]:
github.com/crypto-com/chain-indexing/usecase/parser.ParseBlockToCommands.func1()
    /go/pkg/mod/github.com/crypto-com/chain-indexing@v1.7.21/usecase/parser/block.go:28 +0xb9
panic({0x19d5800, 0xc000d9b940})
    /usr/local/go/src/runtime/panic.go:838 +0x207
github.com/crypto-com/chain-indexing/usecase/parser.ParseMsgBeginRedelegate({{0xc00102d040, 0x6}, {0xc00102cff8, 0x5}, {0x0, {0xc0016da940, 0x3e}, {0xc000e653e0, 0x1, 0x1}, ...}, ...})
    /go/pkg/mod/github.com/crypto-com/chain-indexing@v1.7.21/usecase/parser/msg.go:1205 +0xb1c
github.com/crypto-com/chain-indexing/usecase/parser.ParseBlockTxsMsgToCommands(0xc000278090, 0xd15248, 0xc001898820, {0xc00010b400, 0x3, 0x1f4?}, {0xc00102d040, 0x6}, {0xc00102cff8, 0x5})
    /go/pkg/mod/github.com/crypto-com/chain-indexing@v1.7.21/usecase/parser/msg.go:141 +0x179a
github.com/crypto-com/chain-indexing/usecase/parser.ParseBlockToCommands({0x20f5c60, 0xc001604a60}, 0x0?, {0x20f66e0, 0xc000278150}, 0xc00158bcb0, 0xc0000c2018, 0xc001898820, {0xc00010b400, 0x3, ...}, ...)
    /go/pkg/mod/github.com/crypto-com/chain-indexing@v1.7.21/usecase/parser/block.go:42 +0x41b
github.com/crypto-com/chain-indexing/bootstrap.(*SyncManager).syncBlockWorker(0xc00160c000, 0xd15248)
    /go/pkg/mod/github.com/crypto-com/chain-indexing@v1.7.21/bootstrap/syncmanager.go:297 +0x592
github.com/crypto-com/chain-indexing/usecase/syncstrategy.(*Window).Sync.func1()
    /go/pkg/mod/github.com/crypto-com/chain-indexing@v1.7.21/usecase/syncstrategy/window.go:57 +0x45
golang.org/x/sync/errgroup.(*Group).Go.func1()
    /go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
    /go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5"