Created
March 1, 2019 21:16
-
-
Save mafintosh/cb2972874b3a59b2b397d78b5eecc374 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S | |
/ \ | |
B - A | |
A requests 0 when there only one piece of data | |
A (0) | |
A goes offline | |
S pushes 7 pieces | |
B requests 7 when there are 8 pieces | |
B (7, 12, 9, 3) | |
A goes online | |
# S pushes FF proof to A. Latest 7, it sends 2, 5, 11 | |
Airplane problem: | |
A and B goes flying without S then B cannot get 0 from A | |
PING, request random hash | |
MULTI_SIG | |
FF, proofs spread out really fast | |
S | |
/ \ (5 connections) | |
0 .... 10000000 | |
HANDSHAKE: Seed distance: 0 if you are the seed | |
directly connected: 1 | |
otherwise min(of peers seed distance) + 1 | |
S (has 0, 1, ... , 7) | |
| | |
B (has 7) (7, 12, 9, 3) | |
| | |
A (has 0) (0) | |
HI: My length is X and I'm A | |
HI: My length is Y and I'm B | |
if X < Y, send FF proof if we can | |
if no FF proof A can request P if B has Y-1 | |
feed/bitfield <-- data bitfield, index, and tree bitfield | |
feed/data <-- the data | |
feed/tree <-- merkle tree | |
feed/key <-- public key | |
feed/secret_key <-- secret key | |
feed/signatures <-- signatures of merkle roots | |
Bad case: | |
x | |
0 | |
x | |
x x | |
x x x x | |
x x x x x x x x | |
| | | |
0 1 2 3 4 5 6 7 | |
Source peer has the keypair | |
Peer A: 0 (flat-tree 0) | |
A goes offline | |
Peer B: 7 (flat-tree 7, 12, 9, 3) | |
Peer A and B starts swarming | |
B requests 0, B ends up with 2 signatures | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment