erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.14k stars 1.12k forks source link

dependency issue for `github.com/anacrolix/torrent` #9956

Closed yutianwu closed 6 months ago

yutianwu commented 6 months ago

If we run go mod tidy, it will complain as below:

Actually the commit 7ea994b6bbd8 does not exist in the repo, can we fix this since if I use v1.52.6, it will fail in ci.

❯ go mod tidy  
go: downloading github.com/anacrolix/torrent v1.52.6-0.20231201115409-7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/downloader imports
        github.com/anacrolix/torrent/metainfo: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/downloader/downloadernat imports
        github.com/anacrolix/torrent: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/snapshots/sync imports
        github.com/anacrolix/torrent/storage: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/ledgerwatch/erigon-lib/downloader imports
        github.com/anacrolix/torrent/bencode: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/ledgerwatch/erigon-lib/downloader imports
        github.com/anacrolix/torrent/types/infohash: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon imports
        github.com/fjl/gencodec tested by
        github.com/fjl/gencodec.test imports
        github.com/kylelemons/godebug/diff: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/beacon/beacontest imports
        sigs.k8s.io/yaml tested by
        sigs.k8s.io/yaml.test imports
        github.com/google/go-cmp/cmp: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/persistence/beacon_indicies imports
        modernc.org/sqlite tested by
        modernc.org/sqlite.test imports
        github.com/mattn/go-sqlite3: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/persistence/beacon_indicies imports
        modernc.org/sqlite tested by
        modernc.org/sqlite.test imports
        modernc.org/fileutil/ccgo: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/phase1/forkchoice/fork_graph/diff_storage imports
        github.com/alecthomas/atomic tested by
        github.com/alecthomas/atomic.test imports
        github.com/alecthomas/assert/v2: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p-pubsub tested by
        github.com/libp2p/go-libp2p-pubsub.test imports
        github.com/libp2p/go-libp2p-testing/net: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/alecthomas/kong tested by
        github.com/alecthomas/kong.test imports
        github.com/alecthomas/repr: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/anacrolix/log tested by
        github.com/anacrolix/log.test imports
        github.com/frankban/quicktest: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/ledgerwatch/erigon-lib/downloader/downloadercfg imports
        github.com/anacrolix/dht/v2 imports
        github.com/anacrolix/torrent/iplist: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/ledgerwatch/erigon-lib/downloader/downloadercfg imports
        github.com/anacrolix/dht/v2 imports
        github.com/anacrolix/torrent/logonce: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/rpcdaemon/graphql/graph imports
        github.com/vektah/gqlparser/v2/ast tested by
        github.com/vektah/gqlparser/v2/ast.test imports
        github.com/andreyvit/diff: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/core/state imports
        github.com/VictoriaMetrics/fastcache tested by
        github.com/VictoriaMetrics/fastcache.test imports
        github.com/allegro/bigcache: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/node imports
        golang.org/x/net/http2 tested by
        golang.org/x/net/http2.test imports
        slices: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/tests/fuzzers/bls12381 imports
        github.com/consensys/gnark-crypto/ecc/bls12-381 tested by
        github.com/consensys/gnark-crypto/ecc/bls12-381.test imports
        github.com/leanovate/gopter: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/tests/fuzzers/bls12381 imports
        github.com/consensys/gnark-crypto/ecc/bls12-381 tested by
        github.com/consensys/gnark-crypto/ecc/bls12-381.test imports
        github.com/leanovate/gopter/prop: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/tests/fuzzers/bls12381 imports
        github.com/consensys/gnark-crypto/ecc/bls12-381/fp tested by
        github.com/consensys/gnark-crypto/ecc/bls12-381/fp.test imports
        github.com/leanovate/gopter/gen: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon imports
        github.com/fjl/gencodec imports
        github.com/garslo/gogen tested by
        github.com/garslo/gogen.test imports
        github.com/onsi/ginkgo: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon imports
        github.com/fjl/gencodec imports
        github.com/garslo/gogen tested by
        github.com/garslo/gogen.test imports
        github.com/onsi/gomega: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/beacon/beacontest imports
        github.com/google/cel-go/cel imports
        google.golang.org/protobuf/reflect/protoregistry tested by
        google.golang.org/protobuf/reflect/protoregistry.test imports
        github.com/google/go-cmp/cmp/cmpopts: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem tested by
        github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.test imports
        go.uber.org/goleak: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/p2p/net/swarm tested by
        github.com/libp2p/go-libp2p/p2p/net/swarm.test imports
        github.com/libp2p/go-libp2p-testing/ci: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/p2p/protocol/holepunch tested by
        github.com/libp2p/go-libp2p/p2p/protocol/holepunch.test imports
        github.com/libp2p/go-libp2p-testing/race: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        go.uber.org/fx tested by
        go.uber.org/fx.test imports
        go.uber.org/atomic: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p/core/crypto imports
        github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa tested by
        github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa.test imports
        github.com/decred/dcrd/crypto/blake256: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p/p2p/transport/tcp imports
        github.com/marten-seemann/tcp tested by
        github.com/marten-seemann/tcp.test imports
        github.com/mikioh/tcp: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/ledgerwatch/erigon-lib/downloader/downloadercfg imports
        github.com/anacrolix/go-libutp tested by
        github.com/anacrolix/go-libutp.test imports
        github.com/anacrolix/lsan: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/downloader imports
        github.com/grpc-ecosystem/go-grpc-middleware/recovery tested by
        github.com/grpc-ecosystem/go-grpc-middleware/recovery.test imports
        github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto imports
        github.com/golang/protobuf/proto: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/config imports
        github.com/quic-go/quic-go tested by
        github.com/quic-go/quic-go.test imports
        github.com/onsi/gomega/gbytes: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/p2p/transport/webtransport imports
        github.com/quic-go/quic-go/http3 tested by
        github.com/quic-go/quic-go/http3.test imports
        github.com/onsi/gomega/types: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel/service imports
        github.com/ledgerwatch/erigon-lib/diagnostics imports
        github.com/shirou/gopsutil/v3/cpu imports
        github.com/shoenig/go-m1cpu tested by
        github.com/shoenig/go-m1cpu.test imports
        github.com/shoenig/test/must: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/capcli imports
        github.com/ledgerwatch/erigon-lib/downloader/downloadercfg imports
        github.com/anacrolix/dht/v2 imports
        github.com/anacrolix/dht/v2/bep44 tested by
        github.com/anacrolix/dht/v2/bep44.test imports
        filippo.io/edwards25519: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/rpcdaemon/graphql/graph imports
        github.com/vektah/gqlparser/v2 imports
        github.com/vektah/gqlparser/v2/validator imports
        github.com/agnivade/levenshtein tested by
        github.com/agnivade/levenshtein.test imports
        github.com/arbovm/levenshtein: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cmd/rpcdaemon/graphql/graph imports
        github.com/vektah/gqlparser/v2 imports
        github.com/vektah/gqlparser/v2/validator imports
        github.com/agnivade/levenshtein tested by
        github.com/agnivade/levenshtein.test imports
        github.com/dgryski/trifles/leven: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/relay imports
        github.com/libp2p/go-libp2p-asn-util imports
        github.com/libp2p/go-cidranger tested by
        github.com/libp2p/go-cidranger.test imports
        github.com/ipfs/go-detect-race: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/config imports
        github.com/quic-go/quic-go imports
        github.com/onsi/ginkgo/v2/ginkgo imports
        github.com/onsi/ginkgo/v2/types tested by
        github.com/onsi/ginkgo/v2/types.test imports
        github.com/onsi/gomega/format: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/config imports
        github.com/quic-go/quic-go imports
        github.com/onsi/ginkgo/v2/ginkgo imports
        github.com/onsi/ginkgo/v2/types tested by
        github.com/onsi/ginkgo/v2/types.test imports
        github.com/onsi/gomega/ghttp: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/config imports
        github.com/quic-go/quic-go imports
        github.com/onsi/ginkgo/v2/ginkgo tested by
        github.com/onsi/ginkgo/v2/ginkgo.test imports
        github.com/onsi/ginkgo/v2/internal/test_helpers imports
        github.com/onsi/gomega/gcustom: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
github.com/ledgerwatch/erigon/cl/sentinel imports
        github.com/libp2p/go-libp2p imports
        github.com/libp2p/go-libp2p/config imports
        github.com/quic-go/quic-go imports
        github.com/onsi/ginkgo/v2/ginkgo tested by
        github.com/onsi/ginkgo/v2/ginkgo.test imports
        github.com/onsi/ginkgo/v2/internal/test_helpers imports
        github.com/onsi/gomega/gstruct: github.com/anacrolix/torrent@v1.52.6-0.20231201115409-7ea994b6bbd8: invalid version: unknown revision 7ea994b6bbd8
Giulio2002 commented 6 months ago

post the whole log

yutianwu commented 6 months ago

it is the whole log

AskAlexSharov commented 6 months ago

unknown revision 7ea994b6bbd8 (which exists https://github.com/anacrolix/torrent/commit/7ea994b6bbd8 just remote branch was removed after PR merge) - means you using too old git version.

yutianwu commented 6 months ago

do u mean I use the old git version(which is 2.44.0) local?

image

not sure why this commit can not work on my side. maybe the reason it works on your side is for the local cache.

Giulio2002 commented 6 months ago

Just cleaned mod cache on my side. still works on my side.

yutianwu commented 6 months ago

I also cleaned my mod cache and it still does not work. My go version is go version go1.20.14 darwin/arm64.

Anyway, why do we use such a strange commit instead a specific tag.

image

yutianwu commented 6 months ago

another proof is when I clone the repo and checkout the commit, it also complains:

~/torrent master
❯ git checkout 7ea994b6bbd8                         
error: pathspec '7ea994b6bbd8' did not match any file(s) known to git

It is truly wrong to import such a commit but it's weird that it works for u guys...

yperbasis commented 6 months ago

I believe that was fixed with PR #10052. Please re-open if that's not the case.