Skip to content

Log txhash when tx fails to help debug #13

@samlaf

Description

@samlaf

Example error message is

2024-02-13T23:05:04.599Z        ERROR   logging/zap_logger.go:57        Error updating stakes of entire operator set for quorum {"err": "execution reverted", "quorum": 0}
github.com/Layr-Labs/eigensdk-go/logging.(*ZapLogger).Error
        /go/pkg/mod/github.com/!layr-!labs/[email protected]/logging/zap_logger.go:57
main.(*AvsSync).tryNTimesUpdateStakesOfEntireOperatorSetForQuorum
        /usr/src/app/avssync.go:157
main.(*AvsSync).updateStakes
        /usr/src/app/avssync.go:99
main.(*AvsSync).Start
        /usr/src/app/avssync.go:67
main.avsSyncMain
        /usr/src/app/main.go:115
github.com/urfave/cli.HandleAction
        /go/pkg/mod/github.com/urfave/[email protected]/app.go:524
github.com/urfave/cli.(*App).Run
        /go/pkg/mod/github.com/urfave/[email protected]/app.go:286
main.main
        /usr/src/app/main.go:28
runtime.main
        /usr/local/go/src/runtime/proc.go:267

We only see "tx reverted", which makes it hard to debug. We should print the txhash of the failed tx so that we can look it up on etherscan.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions