* gossip: moved to new scheduler and chrono::milliseconds
* minor update in address repo impl
* gossip update WIP (peer ctx expiration)
* gossip forgetting peers
* gossip updating addresses in repo
* hotfix about improper reschedulting in gossip core
* lowered log level of yamux ping messages sending
* review-related minor changes
* gossip: lazy protobuf serializing and deep cleanup
* sublogger fix
* memory stabilizing changes in gossip
* little fix due to merge
* clang-tidy vs gsl::span + remove something ambigous in yamuxed connection
* abandoned streams rst and cleanup in yamuxed connections
* another gsl::span vs clang-tidy delivery delay
* error codes for connections and streams are part of interfaces
* yamux and build-in ping
* host is explicitly stopped in test
* added expire timer for yamux connection
* fixes in event bus
* feedback on connections close
* cyclic dependencies resolved, connectedness is a function of Host
* bugfixes in yamux creation
* minor format fixes
* post-review corrections
* error codes for connections and streams are part of interfaces
* test corrected
* Update src/connection/error_codes.cpp
Co-authored-by: Igor Egorov <igor@soramitsu.co.jp>
Co-authored-by: Igor Egorov <igor@soramitsu.co.jp>
* new scheduler: WIP
* macro args corrected in outcome.hpp
* little fixes of occasional bulk rename
* more precise use of scheduler threshold
* explanations added to scheduler test
* build fix for macos
* corrections
* init changes for replaceable peers in k bucket
* correct usage
* fixing test cases, fixing bad reference usage
* Apply suggestions from code review
Co-authored-by: Dmitriy Khaustov <khaustov.dm@gmail.com>
* allow older connected peers to not be recycled first
* prefer long lived peers
Co-authored-by: Dmitriy Khaustov <khaustov.dm@gmail.com>
* feature: improve random generator
* fix: getting listened multiaddress in tcp listener
* fix: reduce logging in secio
* feature: new implementation of kademlia
* feature: validation
* fix: DSA
* feature: CIDv1 encoding
* refactoring: replace deprecated sha256 function by hasher
* fix: multiaddress operations
* feature: make PeerId comparable to using in std::set
* refactoring: addr repo
* feature: rendezvous chat as example of Kademlia using
* feature: unit-test for kademlia parts
* wipe: remove previous implementation of Kademlia
* fix: cmake files
* fix: some warnings
* feature: using timeout for make new stream
* feature: smart using of peer routing
* fix: kademlia message parsing
* refactoring: headers including
* feature: add handle and timeout as argument of Host::connect
* fix: some log messages
* feature: Host::disconnect method
* fix: providing listen-addr in messages of Identify protocol
* refactoring: improve multiaddress manipulations
* refactoring: one way for naming of target for protobuf
* fix: clean up; format
* fix: change level some log
* fix: suppress connection to themselves
* fix: prepare rendezvous chat as example to introduction and provide README
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* test - AsioScheduler called onTimer after being destructed
Signed-off-by: Alexey-N-Chernyshov <alexey.n.chernyshov@gmail.com>
* fix AsioScheduler
Signed-off-by: Alexey-N-Chernyshov <alexey.n.chernyshov@gmail.com>
* add comment
Signed-off-by: Alexey-N-Chernyshov <alexey.n.chernyshov@gmail.com>
* add correct asio_scheduler cancellation
From boost docs:
"These (scheduled after cancel() called) handlers can no longer be cancelled, and therefore are passed an error code that indicates the successful completion of the wait operation."
Adds shared_pointer flag for cancellation.
Signed-off-by: Alexey-N-Chernyshov <alexey.n.chernyshov@gmail.com>
* gossip: wire protocol
* gossip: peer set and wire protocol utilities revised
* gossip: msg cache w/expiration
* data structures for gossip: fixes and unittest
* changes due to pr 1 feedback
* one more fix due to PR requests
* one more try against ci
* gossip part 2
* gossip: pr1 reflects pr2
* gossip: pr1 reflects pr2
* Fix/gossip pr 1 (#46)
* Fix build for macos
* Improvements
* deprecated logic removed
* gossip: cleanups and renamings
* gossip: renmings
* gossip serialization method signature changed
* gossip: serialization signature changed
* Gossip pr 1 (#37)
* gossip: wire protocol
* gossip: peer set and wire protocol utilities revised
* gossip: msg cache w/expiration
* data structures for gossip: fixes and unittest
* changes due to pr 1 feedback
* one more fix due to PR requests
* one more try against ci
* gossip: pr1 reflects pr2
* gossip: pr1 reflects pr2
* Fix/gossip pr 1 (#46)
* Fix build for macos
* Improvements
* deprecated logic removed
* gossip: cleanups and renamings
* gossip: renmings
* gossip serialization method signature changed
Co-authored-by: kamilsa <kamilsa16@gmail.com>
* refactorings
* typo fixed
* minor fixes
* +gossip-example
* +gossip-example
* fixes and example
* debug things
* gossip: subscriptions test and bugfixes
* dont forward messages back to their origins
* injectors made parametric (to build examples)
* gossip: fixes
* more fixes in pub-sub
* fixes in gossip example
* sublogger can set new instance name
* message cache fix exp times
* chat example
* logs and traces added for debug purposes
* README.md for gossip examples
* small patch for older stdlibs support
* more logs and traces
* more logs and traces
* new inbound protocol streams are allowed for all connections
* streams issues fixed
* gossip injector fixed
* gossip new example
* boost_program_options in dependencies
* scheduler with config param (strong type for injector)
* tests fixed due to recent changes
* cleanup in yamux and dialer-listener hotfixes
* hotfixes to yamux and dialer
* yamux changes
* parametrized netork and host injectors
* streams regression test
* patched mplex connections/streams so that streams get notified about EOF
Co-authored-by: kamilsa <kamilsa16@gmail.com>
* Fix public key part in echo server example
* Remove unused Plaintext session class
* Rename Plaintext header guards
* Fix illegal comparison in crypto provider impl
* Implement SECIO
* Switch Kademlia to boost::optional instead of std
* Add -insecure option to echo server
* Add MessageReadWriterBigEndian
* Add SECIO cases to host_integration_test
* Add SECIO marshallers tests
Possible Drawbacks
Not possible to perform cross-implementation testing by now (go implementation of libp2p got updated much so c++ implementation needs to be changed too).
P521 curve-based algorithm could be faulty - needs to be tested when cross-implementation testing gets possible.
User's callback could be called twice in case of error inside secureInbound and secureOutbound methods - this could be easily fixed if we count this as an issue.
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
* Enable RSA crypto provider
* Make secure use of user's input buffers in crypto providers
* Enable ECDSA crypto provider
* Enable Secp256k1 crypto provider
* Remove all the legacy and redundant code from the crypto provider
* Use boost::optional in Kademlia and apply clang-format
* Refactor keygen test
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>