Commit Graph

49 Commits

Author SHA1 Message Date
Giovanni Petrantoni ec00c7fc50
Peer resultification and defect only (#245)
* Peer resultification and defect only

* Fixing some tests

* test fixes

* Rename peer into peerid

* better result error message in identify

* further merge fixes
2020-07-01 08:25:09 +02:00
Giovanni Petrantoni 7852c6dd0f
Noise and eth2/nbc fixes (#226)
* Remove noise padding payload (spec removed it)

* add log scope in secure

* avoid defect array out of range in switch secure when "na"

* improve identify traces

* wip noise fixes

* noise protobuf adjustments (trying)

* add more debugging messages/traces, improve their actual contents

* re-enable ID check in noise

* bump go daemon tag version

* bump go daemon tag version

* enable noise in daemonapi

* interop testing, (both secio and noise will be tested)

* azure cache bump (p2pd)

* CI changes

- Travis: use Go 1.14
- azure-pipelines.yml: big cleanup
- Azure: bump cache keys
- build 64-bit p2pd on 32-bit Windows
- install both Mingw-w64 architectures

* noise logging fixes

* alternate testing between noise and secio

* increase timeout to avoid VM errors in CI (multistream tests)

* refactor heartbeat management in gossipsub

* remove locking within heartbeat

* refactor heartbeat management in gossipsub

* remove locking within heartbeat

Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com>
2020-06-20 19:56:55 +09:00
Giovanni Petrantoni 6affcda937
Less exceptions more results (#188)
* Less exceptions more results

* Fix daemonapi and interop tests

* Add multibase

* wip multiaddress

* fix the build, consuming new result types

* fix standard setup

* Simplify match, rename into MaError, add more exaustive err text

* Fix the CI issues

* Fix directchat build

* daemon api fixes

* better err messages formatting

Co-authored-by: Zahary Karadjov <zahary@gmail.com>
2020-05-31 16:22:49 +02:00
cheatfate 1f5d994700
Fix compilation errors introduced by latest chronos. 2020-03-24 09:48:05 +02:00
Eugene Kabanov 5701d937c8
Signed variable integers fixes. (#96)
* Fix signed varints.
Add tests for signed varints.
Remove some casts to allow usage at compile time.

* Fix vsizeof() on 32bit platforms.

* Add `hint` and `zint` types for proper signed integer encoding.

* Fix varint related bugs.

* Update requirements.

* Fix interop tests because of fixed readLine.

* Add putVarint, getVarint and tests.
2020-03-06 20:19:43 +01:00
Yuriy Glukhov e0aae6d8ac Moved base32, 58 and 64 to stew 2019-12-13 16:00:39 +02:00
Dmitriy Ryajov 903e79ede1
Feat/conn cleanup (#41)
Backporting proper connection cleanup from #36 to align with latest chronos changes.

* add close event

* use proper varint encoding

* add proper channel cleanup in mplex

* add connection cleanup in secio

* tidy up

* add dollar operator

* fix tests

* don't close connections prematurely

* handle closing streams properly

* misc

* implement address filtering logic

* adding pipe tests

* don't use gcsafe if not needed

* misc

* proper connection cleanup and stream muxing

* re-enable pubsub tests
2019-12-03 22:44:54 -06:00
Dmitriy Ryajov 9e437a681b fix: revert to proper exception handling 2019-12-03 01:26:59 +02:00
cheatfate dde8c01448
Workaround for https://github.com/nim-lang/Nim/issues/12764 .
Remove usage of getCurrentException().
2019-11-28 20:58:56 +02:00
Ștefan Talpalaru f3fc763895
daemonapi: direct p2pd's output to parent's streams 2019-11-05 21:16:56 +01:00
cheatfate 15a7136ad1
Add more supported `go-libp2p-daemon` flags to DaemonAPI. 2019-08-28 09:19:16 +03:00
cheatfate 53fb5924ea
Fix daemonapi flags in startProcess. 2019-08-25 13:53:41 +03:00
cheatfate 0bbd87b536
Fix bug in daemonapi length decoding message. 2019-08-25 10:09:54 +03:00
cheatfate 78f6afb544
Change default logging level to Debug. 2019-08-22 13:29:54 +03:00
cheatfate c5925d0d9a
Fix appveyor problems. 2019-08-22 13:01:28 +03:00
cheatfate 236c685fb7
Attempt #4 to fix Appveyor CI freeze. 2019-08-22 09:17:49 +03:00
cheatfate 708dcbd1a1
Attempt #3 to fix Appveyor CI freeze. 2019-08-22 09:09:44 +03:00
cheatfate 5a45944489
Attempt #2 to fix Appveyor CI freeze. 2019-08-22 08:56:36 +03:00
cheatfate 2ab6b2c3ca
Fix #17.
Add go-libp2p-daemon logging to file.
Fix mistypes in tests.
Fix issues with connection to dedicated go-libp2p2-daemon.
2019-08-22 00:42:44 +03:00
cheatfate dfd824bd03
Fix #22.
Fix wire.initTAddress(MultiAddress).
Add Windows support to daemonapi.
Add CI tests for daemonapi on Windows.
Fix Linux CI tests to install latest daemon.
2019-08-01 08:56:59 +03:00
cheatfate bf7a7f9b73
Fix #23. 2019-06-25 11:27:38 +03:00
Zahary Karadjov dbcc6ce78b Add support for specifying the listening address of the Daemon 2019-06-24 05:39:13 +03:00
Zahary Karadjov d5b51bcf9e Use CatchableError 2019-06-24 05:39:13 +03:00
cheatfate ab8b87be9a
Fix deprecation warnings. 2019-03-31 01:32:04 +02:00
Zahary Karadjov d21953e458 Add a userdata field to the DaemonAPI to support attaching application data 2019-03-11 13:07:19 +02:00
cheatfate dc2d0538ff
Fix import bugs.
Add PublicKey and Signature types to daemonapi.
Add more tests for crypto.nim
2019-03-06 13:23:12 +02:00
cheatfate 68f3f506f3
Fix multihash dependency. 2019-03-05 02:04:45 +02:00
cheatfate d7d9d7bd40
Fix daemonapi and examples. 2019-03-05 01:57:18 +02:00
cheatfate 1e6c8b2171
Fix examples.
Add peer.nim.
Switch daemonapi to use PeerID from peer.nim.
2019-03-04 20:22:38 +02:00
cheatfate ab274f0bdc Rename asyncdispatch2 -> chronos. 2019-02-14 03:15:48 +02:00
cheatfate 7593d4d970 Fix unix path multiaddress serialization/deserialization.
Add tests for unix path multiaddress.
Add wire.nim.
Fix latest breaking changes from go-libp2p-daemon.
2019-01-09 19:12:15 +02:00
cheatfate e9785bb509 Make unix socket name generation more reliable (depending on process id).
Add examples of bootstrap node and gossipsub node.
2018-12-18 16:31:58 +02:00
cheatfate 79fbd74acd Remove debug echo. 2018-12-18 05:19:11 +02:00
cheatfate 4ba727b768 Add NAT-PMP support. 2018-12-17 22:39:25 +02:00
cheatfate bf2737525d Fix cid with proper CIDv1 code.
Fix daemonapi to use proper Cid type.
Make daemonapi cid test more complex.
2018-12-16 15:51:12 +02:00
cheatfate 0b807e7ee5 Workaround for bug https://github.com/libp2p/go-libp2p-pubsub/issues/130. 2018-12-13 11:17:02 +02:00
cheatfate 39deeca600 Fix for MacOS. 2018-12-12 16:52:29 +02:00
cheatfate 0eb649c990 Add logging `go-libp2p-daemon`.
Comment FloodSub test.
2018-12-12 16:08:55 +02:00
cheatfate fc6902dda2 Add PeerInfo string representation procedure.
Use only IPv4 for pubsub tests.
2018-12-11 04:17:36 +02:00
cheatfate 01a268a440 Attempt to fix tests. 2018-12-10 22:55:06 +02:00
cheatfate 337c6c932c Fix go-libp2p-daemon shutdown. 2018-12-10 12:38:12 +02:00
cheatfate 7e5f52afff Fixes for pubsub methods and full tests for both methods. 2018-12-09 18:44:20 +02:00
cheatfate 09facf55e4 Compiler got fail on this. 2018-12-04 19:53:36 +02:00
cheatfate b4e9a7b8a6 Fix daemonapi connect/streamOpen to support timeouts.
Add more commands to chat example.
2018-11-27 14:33:41 +02:00
cheatfate 98aa3ed281 Add VBuffer implementation.
Add MultiAddress implementation and tests.
Adapt chat to use /p2p-circuit
2018-11-27 14:16:04 +02:00
cheatfate 83c18a5906 Add timeout to CONNECT, STREAM_OPEN. 2018-11-23 12:16:35 +02:00
cheatfate 3b554d0f51 Add LibP2P varint and tests.
Generalize Varint.
2018-11-20 23:39:35 +02:00
cheatfate f49d67bc0d Add one more test for self-connect-open-accept-stream. 2018-11-19 19:30:40 +02:00
cheatfate 1211ffbb5c Add daemon api sources. 2018-11-19 04:52:11 +02:00