Ruslan Tushov
2e375280e1
qtils ( #249 )
- outcome
- hex, unhex
- lexicographical_compare_three_way
- optionTake
- append, bytestr
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
5 months ago
Ruslan Tushov
f27f9fb9a2
thread safe scheduler ( #241 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
7 months ago
Ruslan Tushov
f128f56279
refactor (for qtils) ( #225 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
7 months ago
Ruslan Tushov
06adba22c9
write free function ( #223 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
9 months ago
Dmitriy Khaustov
d117c3c76e
Refactor: format, include-guards, copyrights, git-hooks ( #222 )
* refactor: change copyright comments
* refactor: replace include-guards by pragma-once
* update: clang-format config
* feature: git-hook for format
* fix: target `clang-format`
* refactor: reapply updated clang-format config
* update: bump version to 0.1.17
* fix: clang-format version selector
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
1 year ago
Dmitriy Khaustov
e1c2393081
Replace Microsoft.GSL by STL analogs ( #221 )
* refactor: remove GSL
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: review issues
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* lexicographical_compare_three_way
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
* remove concept
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
* fix: review issues
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: review issues
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: review issue
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: review issue
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: review issue
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fixup: incomplete rename
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: deduction guideline for FinalAction
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
---------
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Co-authored-by: turuslan <turuslan.devbox@gmail.com>
1 year ago
Dmitriy Khaustov
3afa249279
Refactor, remove redundants, update hunter ( #216 )
* fix: formatters
* fix: use ::fmt::format explicitly
* update: hunter
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
1 year ago
Dmitriy Khaustov
f38725b3db
Fixes for C++20 support ( #215 )
* fix: using soralog
* feature: formatter for outcome
* fix: muxer and streams test
* update: hunter
* update: own version
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
1 year ago
kamilsa
b5da81b6c2
Update hunter, switch to C++20 ( #214 )
* Update hunter links
* Switch to C++20
* Update ci.yml
* Remove ninja, fix cmake version
* Fix event emitter test
* Update cmake/toolchain/clang-15_cxx17.cmake
Co-authored-by: Dmitriy Khaustov <khaustov.dm@gmail.com>
---------
Co-authored-by: Dmitriy Khaustov <khaustov.dm@gmail.com>
1 year ago
Ruslan Tushov
42982bf471
tcp listener ws wss address ( #211 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
1 year ago
Ruslan Tushov
530d6cc68f
wss ( #205 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
2 years ago
Ruslan Tushov
400ceb8f1d
ws beast ( #204 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
2 years ago
Dmitriy Khaustov
baed94dc62
Connection layers mechanism; Websocket layer ( #201 )
* feature: layers of connections
* feature: upgrade layers of connection
* fix: tests
* feature: test of layers upgrade
* refactor: enable disabled upgrader tests
* feature: sha-1 hash
* feature: websocket layer
* fix: read-buffer extending
* feature: decide layers for connection upgrade by provided multiaddress
* refactor: combine regular and websocket echo-client/-server to single one
* refactor: rename peer::Protocol to peer::ProtocolName
* refactor: implement addressToBytes, as replacement addressToHex
* refactor: mark addressToHex as deprecated
* feature: extend ConversionError
* fix: multiaddress manipulations
* feature: dummy protocols for tests
* fix: tests of converters
* fix: collision in DI
* refactor: update outcome macros for tests
* fix: connection upgrader in part of layers
* fix: ws read-writer in case big data fragmented by frames
* experiment: add delay of sending jumbo message, to give a chance for Id-protocol to end his work
* experiment: log difference sent and received data for analyse
* feature: control frames (ping/pong/close)
* fix: sending huge portions of data
* fix: echo sessions
* feature: optional hex dump in dumpBin
* fix: echo client
* update: hunter package manager
* fix: hardcoded request and response in http-to-ws upgraded
* fix: add ws version header
* fix: reduce length of ws-key header
* fix: make ws-header check case-insensitive
* fix: use locale independent predicate for ci-compare
* fix: use boost endian conversion instead endian macros
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
2 years ago
Dmitriy Khaustov
5e13b979ea
Remove unused 'ls' command ( #194 )
* update: update hunter hub
* fix: remove deprecated command 'ls'
* fix: clang-tidy issues
* fix: clang-tidy issues
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
2 years ago
Ruslan Tushov
48f3457dd7
Fix kademlia ( #191 )
Signed-off-by: ortyomka <iurin.art@gmail.com>
Co-authored-by: turuslan <turuslan.devbox@gmail.com>
2 years ago
Ruslan Tushov
6cab799394
Protocol select ( #189 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
2 years ago
Igor Egorov
2970185c8b
Let x-parity-ws/wss multiaddrs to be constructed ( #186 )
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
2 years ago
Ruslan Tushov
c116cef987
Remove old scheduler ( #184 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
2 years ago
Dmitriy Khaustov
c904db6c5f
Reorganize 'event' namespaces ( #171 )
*refactoring: reorganize 'event' namespaces
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
3 years ago
Igor Egorov
c97b3959e7
Fix Dialer ( #170 )
* Fix dialer to establish only one outgoing connection by peer
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
3 years ago
Dmitriy Khaustov
eaa37aab24
Fix of exposing mock classes ( #169 )
*fix: mocks
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
3 years ago
Ruslan Tushov
b6de6a91ee
sha ( #165 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
3 years ago
Florian Franzen
7c9d83bf07
tests: add missing cares dep to net injector test ( #142 )
3 years ago
Ruslan Tushov
04faee4602
remove gossip multi-topic ( #159 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
3 years ago
Alexey
7b4ee1f22a
Replace protocol::common::Scheduler with basic::Scheduler in kademlia ( #157 )
Signed-off-by: Alexey-N-Chernyshov <alexey.n.chernyshov@gmail.com>
3 years ago
Igor Egorov
c56fb58cf2
Let varint reader propagate the error ( #152 )
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
3 years ago
Ruslan Tushov
30f59b8698
metrics ( #149 )
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
3 years ago
art-gor
2de082a0e8
Gossip self cleanup ( #140 )
* 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
3 years ago
Artem Iurin
7ef167cf56
Fix size_t problem ( #145 )
* Using std::size_t
Signed-off-by: ortyomka <iurin.art@gmail.com>
4 years ago
Dmitriy Khaustov
d51a7f7d62
Provide default logger group explicitly ( #143 )
* feature: using default group explicitly
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
4 years ago
art-gor
846a881547
non-reentrant dialer, all dialer tests enabled ( #137 )
4 years ago
art-gor
c9fb624371
workaround in old scheduler due to possible lifetime issues ( #135 )
4 years ago
art-gor
2ea76cd4b4
Connections anti-leak measures ( #136 )
* 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
4 years ago
art-gor
a8d9f98cd7
Error codes updated ( #134 )
* 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>
4 years ago
art-gor
0aacd5d20c
New Scheduler ( #127 )
* 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
4 years ago
art-gor
c76b5f091e
Outbound streams optimistic creation ( #131 )
* yamux connection sends window update msg on new outbound streams
* optimistic outbound stream creation added
* fix
4 years ago
Igor Egorov
75eb8b2736
Move LoopbackStream from Kagome ( #124 )
* Move LoopbackStream from Kagome, add test
* Install Loopbackstream target
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
4 years ago
Dmitriy Khaustov
5ddc91034e
Configure logging for testutil ( #128 )
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
4 years ago
art-gor
8d1b7efe56
Feature/reentrancy ( #111 )
* gossip confirmance fixes #1
* gossip: bugfixes
* gossip: more fixes
* gossip: build related minor changes
* gossip: one more fix
* gossip: flush hello message asap
* experiment with noise protocol
* made injector creation fns inline to prevent multiple definitions
* gossip restructured, interop issues fixed
* Noise::write now reports the correct amount of bytes
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
* refactoring: move prev implementation of Kademlia to other namespace
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: kademlia dependency injection
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: improve random generator
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: getting listened multiaddress in tcp listener
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: reduce logging in secio
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* draft: new implementation of kademlia
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* draft: processing with kademlia
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* draft: continue processing with kademlia
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* draft: continue
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* draft: kademlia
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: validation
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: DSA
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: CIDv1 encoding
refactoring: replace deprecated sha256 function by hasher
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: multiaddress operations
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: make PeerId comparable to using in std::set
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* refactoring: addr repo
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: Go-implementation compatibility
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: rendezvous chat as example of Kademlia using
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: unit-test for kademlia parts
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: StorageBackend interface
fix: ContentValue
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* wipe: remove previous implementation of Kademlia
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: cmake files
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
cmake
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: some warnings
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: resolve TODOes, comments, format
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: clang-tidy issues
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: clang-tidy issues
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: clang-tidy issues
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: using timeout for make new stream
feature: smart using of peer routing
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: kademlia message parsing
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* refactoring: optimize executors' working
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* refactoring: optimize start of rendezvous chat
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* refactoring: headers including
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* refactoring: remaining request executors; naming
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* feature: add handle and timeout as argument of Host::connect
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* fix: some log messages
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
* injectors temp fix
* gossip: uncommented writing bytes checking
* removed redundant std::hash definition
* Hack yamux to allow weighty messages processing
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
* fix vtable
* fixes in DI injectors
* yamux test corrected according to curent window update policy
* added buffering primitives
* defer* functions in Reader/Writer interfaces and Yamux redesign pt.1
* scheduler fix regarding move assignment + cancel
* write queue interface change
* read buffer fix regarding subspan
* some diagnostic logging
* tcp connection fixes related to closing behavior
* yamux bugfixes
* yamux tests regression WIP
* build fix
* .
* .
* bugfixes
* fixes
* .
* .
* suppressed most verbose logging in yamux and multiselect
* yamux stream adjustWindowSize adjusted
* fixes regarding std::move of r/w callbacks (against possible ptrs invalidation)
* test cases with jumbo messages transfer added for yamux on noise/tls/plaintext
* bugfixes related to yamux window sizes, overflow, and acknowledgements
* echo protocol and examples support very large msgs
* changes in tests
* all muxers acceptance test recovered
* all muxers acceptance test: fixed issue with mock lifetime
* CI fixes
* yamux refactorings helped to avoid memory issues caused by reentrant callbacks
* build fix for mac
* another yamux fix to avoid memory issues caused by reentrant callbacks
* gossip: hotfix related to unbanning peers
* minor fixes reflecting review feedback
* temp loggers workaround
* Feature/multiselect upd (#121 )
* multiselect revised, WIP
* multiselect: simple outbound stream negotiate
* multiselect numerous fixes
* multiselect: instances and reuse
* multiselect: fixes
* multiselect: removed old implementation
* multiselect: interop with go impl fixes
* multiselect: bugfixes
* multiselect: ProtocolMuxer interface abstracts simple outbound stream negotiation
* multiselect: cleanups and logging
* trigger CI
* temporarily disabled tests that required synchronous reaction of multiselect
* just removed unused lines
* reverted back ci.yml
Co-authored-by: Igor Egorov <igor@soramitsu.co.jp>
Co-authored-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Co-authored-by: turuslan <turuslan.devbox@gmail.com>
4 years ago
Dmitriy Khaustov
f6104193ad
Sync logging with updated soralog ( #125 )
* feature: sync logging
* update: bump hunter version
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
4 years ago
vvarma
af3d243fee
init changes for replaceable peers in k bucket ( #115 )
* 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>
4 years ago
Dmitriy Khaustov
b653ef9d5a
Change logging system to soralog ( #116 )
* feature: replace spdlog by soralog
* refactoring: changes logging to use soralog
* fix: use ubuntu-20.04 in github actions
* feature: using soralog macros
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
4 years ago
Igor Egorov
4953f30bc0
Dnsaddr support ( #105 )
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Co-authored-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
4 years ago
Dmitriy Khaustov
4a5963ff7a
Peer discovery with Kademlia protocol ( #100 )
* 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>
4 years ago
Igor Egorov
1a78dce701
Fix Dialing to Peers (allow use all peers' addresses) ( #102 )
* Add test for Dialer
* Fix Dialer
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
4 years ago
Igor Egorov
aebc95f195
Add timeout parameter to newStream and dial methods ( #98 )
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
4 years ago
Alexander Lednev
f075370398
on new connection event subscription ( #93 )
* on new connection event subscription
Signed-off-by: iceseer <iceseer@gmail.com>
* const callback
Signed-off-by: iceseer <iceseer@gmail.com>
4 years ago
Igor Egorov
fa3e8d6f79
Add Noise Protocol Support ( #90 )
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Co-authored-by: artyom-yurin <artem_yrin@mail.ru>
Co-authored-by: turuslan <turuslan.devbox@gmail.com>
4 years ago
art-gor
6f0e310069
Feature/tls ( #89 )
* tls transport
* build-related tiny fix
* removed unused file
4 years ago
Alexander Lednev
a60298dd44
protocol fields serialization fix ( #85 )
* protocol fields serialization fix
Signed-off-by: iceseer <iceseer@gmail.com>
* fixup!
Signed-off-by: iceseer <iceseer@gmail.com>
* issues fixup!
Signed-off-by: iceseer <iceseer@gmail.com>
* fixup!
Signed-off-by: iceseer <iceseer@gmail.com>
4 years ago