Commit 8546ddd
authored
feat(dkg): implement sync (#311)
* fix: correct sync proto
* feat: add read/write fixed size proto
* feat: initial implementation of sync
* fix: skip relay connection handler
* refactor: simplify sync client
* refactor: inline functions
* fix: don't need to self-manage pending dial
* fix: simplify code write/read proto
* feat: add events
* feat: implement example sync
* fix: clear server connected state
* fix: simplify code
* fix: sync example allow a peer is disconnected
* fix: clippy
* fix: retry connect when dial fail
* fix: Client cancel will stop outbound stream
* fix: remove decode and encode error
* fix: check stop_rx when return canceled
* fix: drop duplicated inbound sync
* fix: initial backoff on retry
* fix: don't retry on NegotiationFailed
* fix: check server error on await_all_Shutdown
* fix: add comments
* refactor: avoid double hash
* fix: fmt
* fix: address comments
* fix: set max msg size to 32MB for sync msg
* fix: update sync example
* fix: sync example now use pluto create cluster
* fix: bcast example now use pluto create cluster
* fix: update sync example to use the p2p_context in side node
* fix: change log level of relay event
* fix: remove PartialEq and Eq on error
* fix: address comments
* fix: clippy
* fix: duplicate key in cargo.toml
* fix: test
* fix: single lock for client state
* fix: finish should acquire the lock once
* fix: call server.clear_connected on ConnectionClosed
* fix: handler sleep more when the outbound is claimed
* fix: check all type of relay io error
* fix: add PeerRttObserved event
* fix: retry on NoAddresses also
* fix: make state.error one-shot, only retain the first error
* fix: handle NoAddresses retry properly, wait a time
* refactor: simplify retry logic
* fix: add more test for edge cases
* doc: add documentation for for sync package
* doc: add documentation for for sync package
* fix: compile error after merge1 parent e8099c8 commit 8546ddd
15 files changed
Lines changed: 3370 additions & 54 deletions
File tree
- crates
- dkg
- examples
- src
- dkgpb
- v1
- sync
- p2p/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 1 | + | |
9 | 2 | | |
10 | 3 | | |
11 | 4 | | |
12 | 5 | | |
13 | | - | |
14 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 31 | + | |
| 32 | + | |
37 | 33 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 34 | + | |
| 35 | + | |
47 | 36 | | |
48 | | - | |
49 | | - | |
50 | 37 | | |
51 | 38 | | |
52 | 39 | | |
53 | 40 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 41 | | |
59 | 42 | | |
60 | | - | |
61 | 43 | | |
62 | 44 | | |
63 | 45 | | |
| |||
110 | 92 | | |
111 | 93 | | |
112 | 94 | | |
113 | | - | |
| 95 | + | |
| 96 | + | |
114 | 97 | | |
115 | 98 | | |
116 | 99 | | |
| |||
0 commit comments