Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a full example somewhere? #1

Open
remon-nashid opened this issue Dec 18, 2020 · 3 comments
Open

Is there a full example somewhere? #1

remon-nashid opened this issue Dec 18, 2020 · 3 comments

Comments

@remon-nashid
Copy link

remon-nashid commented Dec 18, 2020

Thank you for extracting this out of the go-bazaar repo!

The example in the README file is helpful, but I can't figure out the correct dependency versions. The example spits many error when running with latest dependencies, or with older IPFS versions (0.5). Could you please share a reasonable go.mod file that's compatible with the readme example?

Thank you!

@remon-nashid
Copy link
Author

This is my test repo https://github.com/remon-nashid/go-onion-transport-test

Following are the errors printed by go run node.go:

→ go run node.go 
# github.com/libp2p/go-eventbus
../../go/pkg/mod/github.com/libp2p/[email protected]/basic.go:22:5: cannot use (*basicBus)(nil) (type *basicBus) as type event.Bus in assignment:
        *basicBus does not implement event.Bus (missing GetAllEventTypes method)
../../go/pkg/mod/github.com/libp2p/[email protected]/basic.go:50:9: cannot use &basicBus literal (type *basicBus) as type event.Bus in return argument:
        *basicBus does not implement event.Bus (missing GetAllEventTypes method)
# github.com/libp2p/go-libp2p-swarm
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:243:14: cannot use c (type *Conn) as type network.Conn in argument to f.Connected:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:253:7: cannot use c (type *Conn) as type network.Conn in argument to h:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:355:13: cannot use c (type *Conn) as type network.Conn in assignment:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:407:18: cannot use c (type *Conn) as type network.Conn in append:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:76:20: cannot use c (type *Conn) as type network.Conn in argument to f.Disconnected:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:116:7: cannot use s (type *Stream) as type network.Stream in argument to h:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:175:2: cannot use *Stream value as type network.Stream in return argument:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:207:19: cannot use s (type *Stream) as type network.Stream in argument to f.OpenedStream:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:220:19: cannot use s (type *Stream) as type network.Stream in append:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_stream.go:26:5: cannot use &Stream literal (type *Stream) as type network.Stream in assignment:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:220:19: too many errors
# github.com/libp2p/go-libp2p-connmgr
../../go/pkg/mod/github.com/libp2p/[email protected]/connmgr.go:50:5: cannot use (*BasicConnMgr)(nil) (type *BasicConnMgr) as type connmgr.ConnManager in assignment:
        *BasicConnMgr does not implement connmgr.ConnManager (missing IsProtected method)
# github.com/libp2p/go-libp2p-peerstore/pstoremem
../../go/pkg/mod/github.com/libp2p/[email protected]/pstoremem/protobook.go:29:5: cannot use (*memoryProtoBook)(nil) (type *memoryProtoBook) as type "github.com/libp2p/go-libp2p-core/peerstore".ProtoBook in assignment:
        *memoryProtoBook does not implement "github.com/libp2p/go-libp2p-core/peerstore".ProtoBook (missing FirstSupportedProtocol method)

@Type-IIx
Copy link

Type-IIx commented Jun 5, 2021

This transport needs some love! I would love to see Tor support in IPFS.

@Type-IIx
Copy link

Type-IIx commented Jun 5, 2021

This is my test repo https://github.com/remon-nashid/go-onion-transport-test

Following are the errors printed by go run node.go:

→ go run node.go 
# github.com/libp2p/go-eventbus
../../go/pkg/mod/github.com/libp2p/[email protected]/basic.go:22:5: cannot use (*basicBus)(nil) (type *basicBus) as type event.Bus in assignment:
        *basicBus does not implement event.Bus (missing GetAllEventTypes method)
../../go/pkg/mod/github.com/libp2p/[email protected]/basic.go:50:9: cannot use &basicBus literal (type *basicBus) as type event.Bus in return argument:
        *basicBus does not implement event.Bus (missing GetAllEventTypes method)
# github.com/libp2p/go-libp2p-swarm
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:243:14: cannot use c (type *Conn) as type network.Conn in argument to f.Connected:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:253:7: cannot use c (type *Conn) as type network.Conn in argument to h:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:355:13: cannot use c (type *Conn) as type network.Conn in assignment:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm.go:407:18: cannot use c (type *Conn) as type network.Conn in append:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:76:20: cannot use c (type *Conn) as type network.Conn in argument to f.Disconnected:
        *Conn does not implement network.Conn (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:116:7: cannot use s (type *Stream) as type network.Stream in argument to h:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:175:2: cannot use *Stream value as type network.Stream in return argument:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:207:19: cannot use s (type *Stream) as type network.Stream in argument to f.OpenedStream:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:220:19: cannot use s (type *Stream) as type network.Stream in append:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_stream.go:26:5: cannot use &Stream literal (type *Stream) as type network.Stream in assignment:
        *Stream does not implement network.Stream (missing ID method)
../../go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:220:19: too many errors
# github.com/libp2p/go-libp2p-connmgr
../../go/pkg/mod/github.com/libp2p/[email protected]/connmgr.go:50:5: cannot use (*BasicConnMgr)(nil) (type *BasicConnMgr) as type connmgr.ConnManager in assignment:
        *BasicConnMgr does not implement connmgr.ConnManager (missing IsProtected method)
# github.com/libp2p/go-libp2p-peerstore/pstoremem
../../go/pkg/mod/github.com/libp2p/[email protected]/pstoremem/protobook.go:29:5: cannot use (*memoryProtoBook)(nil) (type *memoryProtoBook) as type "github.com/libp2p/go-libp2p-core/peerstore".ProtoBook in assignment:
        *memoryProtoBook does not implement "github.com/libp2p/go-libp2p-core/peerstore".ProtoBook (missing FirstSupportedProtocol method)

Thank you for working on this. It's in dire need of some work.

Does this post referring to the old code on OpenBazaar's issues help you at all?

OpenBazaar/go-onion-transport#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants