Closed imxyb closed 1 year ago
The issue is that Lotus depends on github.com/filecoin-project/go-crypto
, which imports github.com/ipsn/go-secp256k
. The latter is just the secp256k1 Cgo package extracted from go-ethereum as a standalone library. When you import go-ethereum and lotus at the same time, you bring into scope both Cgo secp256k1 libraries, which ends up doubly exporting those symbols.
Perhaps a surgical replace directive could coalesce both imports into a single one -- but I don't think replace directives work at a package level. I belive the OP is just the Lotus RPC client and the Ethereum RPC client. It's a bit suss anyway that Go doesn't tree-shake to realise that it doesn't actually need to import the crypto parts (or does it?). Also, both Lotus and go-ethereum could afford to offer client libraries just for RPC interaction.
Checklist
Latest release
, or the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.Lotus component
Lotus Version
Describe the Bug
os: mac os golang version: 1.19
I need to require in the
go-ethereum
sdk to parse the events of the fvm contract, and also the lotus sdk, this is my go.mod:when run
go build
will happen:Logging Information
Repo Steps
go build