* 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>
* CMake: Expose CMake options to includes
This change shuffles the order of several CMake steps to expose CMake
options to included files.
By defining options before inclusion, included files are able to access
the input provided by the build system.
* CMake: Exclude test dependencies when building tests
* CMake: Allow build system to provide protobuf compiler
When building without Hunter, it is desirable to pass the path to protoc and
the protobuf include directory from the build system. Allow these variables
to be overridden.
Fixes the error:
| CMake Error at cmake/functions.cmake:52 (message):
| Protobuf_PROTOC_EXECUTABLE is empty
| Call Stack (most recent call first):
| cmake/functions.cmake:96 (compile_proto_to_cpp)
| src/crypto/protobuf/CMakeLists.txt:6 (add_proto_library)
* Fix build error due to missing include
Error was:
| literals.cpp: In function 'libp2p::common::Hash256 libp2p::common::operator""_hash256(const char*, size_t)':
| literals.cpp:17:36: error: no matching function for call to 'min(size_t&, long unsigned int)'
| 17 | std::copy_n(c, std::min(s, 32ul), hash.rbegin());
| | ^
* Fix build error due to mismatched types
Error was:
| literals.cpp: In function 'libp2p::common::Hash256 libp2p::common::operator""_hash256(const char*, size_t)':
| literals.cpp:19:36: error: no matching function for call to 'min(size_t&, long unsigned int)'
| 19 | std::copy_n(c, std::min(s, 32ul), hash.rbegin());
| | ^
* Fix compiler warning due to sign comparison
When compiling with -Werror, this causes the build to fail.
Warning was:
| yamux_frame.cpp:103:28: error: comparison of integers of different signs: 'gsl::span::index_type' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Werror,-Wsign-compare]
| if (frame_bytes.size() < YamuxFrame::kHeaderLength) {
| ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~