Skip to content

Commit

Permalink
Merge pull request ethereum#44 from ethersphere/s/swinx-new
Browse files Browse the repository at this point in the history
S/swinx new
  • Loading branch information
zelig committed Apr 17, 2016
2 parents c2cfb56 + a8e9259 commit cb60d87
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 36 deletions.
20 changes: 10 additions & 10 deletions swarm/docs/sw^3/fig/accuse.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
\node[node, below=of rog] (node1) {node}
(node1.west) edge[pil, <-, bend left=45] node[left=5pt] {\begin{tabular}{r}finger point /\\\quad audit request\end{tabular}} (guardian.south);

\node[punkt, text width=6em] (pseudo) at (3.4,-8.8) {closest node};

\node[punkt, text width=6em] (pseudo) at (3.4,-8.8) {closest node};
%
\node[node] (node2) at (4,-3) {node}
(node2.north east) edge[pil, <-, dashed, bend right=45] node[right=-12pt] {
\begin{tabular}{r}finger point /\\\quad audit request\end{tabular}
} (node1.south east);
% \node[node] (node3) at (9,-4) {node};
\node[punkt] (retriever) at (10,-1) {retriever}
\node[punkt] (retriever) at (4.5,2) {retriever}
% edge[pil, ->, bend right=10] node[left=1pt]{retrieval} node[right=1pt]{ request} (node3)
;
% \node[punkt] (pseudo) at (3.4,-8.8) {closest node};
Expand All @@ -41,19 +41,19 @@
% (node4.south) edge[pil, ->, bend left=45] node[left=3pt]{failed}node[right=1pt]{ retrieval}(pseudo.east)
% (node4.north) edge[pil,<-,dashed, bend left=15] node[auto]{forwarding}(node3);

% \node (chunklabel) at (3.5,-4) {chunk address};
% \node (chunklabel) at (3.5,-4) {chunk address};
% \node (chunk) at (4.2,-5.5) {$\bullet$}
% edge[pil, <-] (chunklabel.south);
% edge[pil, <-] (chunklabel.south);
% \node[draw, shape=circle, dotted, minimum size=6.5cm] at (chunk) {};

% \node at (5.5,-4.5) {most proximate};

\node (chunklabel) at (1,-7) {chunk address};
\node (chunklabel) at (1,-7) {chunk address};
\node (chunk) at (3,-8) {$\bullet$}
edge[pil, <-] (chunklabel.south east)
(retriever.west) edge[pil, ->, bend right=15] node[above=2pt]{accusation} (guardian)
;
(retriever.west) edge[pil, ->, bend right=15] node[left=4pt]{accusation} (guardian)


;

\end{tikzpicture}
20 changes: 10 additions & 10 deletions swarm/docs/sw^3/fig/failedretrieve.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
% (node1.west) edge[pil, <-, bend left=45] node[left=3pt] {finger point} (guardian.south)
;

\node[punkt, text width=6em] (pseudo) at (3.4,-8.8) {closest node};

\node[punkt, text width=6em] (pseudo) at (6.4,-11.8) {closest node};
%
% \node[node] (node2) at (4,-3) {node}
% (node2.east) edge[pil, <-, dashed, bend right=45] node[right=1pt] {finger point} (node1.-60);
\node[node] (node3) at (9,-4) {node};
\node[punkt] (retriever) at (10,-1) {retriever}
edge[pil, ->, bend right=10] node[left=1pt]{retrieval} node[right=1pt]{ request} (node3);
% \node[punkt] (pseudo) at (3.4,-8.8) {closest node};
\node[punkt] (custodian) at (2.5,-6) {custodian}
(custodian.-15) edge[pil,dashed, bend left=30, <->] node[auto]{
\node[punkt] (custodian) at (5.5,-9) {custodian}
(custodian.-15) edge[pil,dashed, bend left=30, <->] node[right]{
\begin{tabular}{c}missing\\ link\end{tabular}
}(pseudo)
% (node4.west) edge[pil,dashed] (custodian)
Expand All @@ -38,18 +38,18 @@
(node4.south) edge[pil, ->, bend left=45] node[left=3pt]{failed}node[right=1pt]{ retrieval}(pseudo.east)
(node4.north) edge[pil,<-,dashed, bend left=15] node[auto]{forwarding}(node3);

% \node (chunklabel) at (3.5,-4) {chunk address};
% \node (chunklabel) at (3.5,-4) {chunk address};
% \node (chunk) at (4.2,-5.5) {$\bullet$}
% edge[pil, <-] (chunklabel.south);
% edge[pil, <-] (chunklabel.south);
% \node[draw, shape=circle, dotted, minimum size=6.5cm] at (chunk) {};

% \node at (5.5,-4.5) {most proximate};

\node (chunklabel) at (1,-7) {chunk address};
\node (chunk) at (3,-8) {$\bullet$}
\node (chunklabel) at (4,-10) {chunk address};
\node (chunk) at (6,-11) {$\bullet$}
edge[pil, <-] (chunklabel.south east)
;

;



Expand Down
Binary file modified swarm/docs/sw^3/fig/failure-and-audit.pdf
Binary file not shown.
12 changes: 6 additions & 6 deletions swarm/docs/sw^3/fig/failure-and-audit.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usetikzlibrary{arrows,positioning}
\tikzset{
%Define standard arrow tip
>=stealth',
Expand All @@ -23,7 +23,7 @@
node/.style={
rectangle,
rounded corners,
draw=black,
draw=black,
text width=4.5em,
minimum height=2em,
text centered,
Expand All @@ -34,19 +34,19 @@
thick,
shorten <=2pt,
shorten >=2pt,}
every node/.style={align=center}
every node/.style={align=center}
}

\begin{document}

\begin{tikzpicture}
% \node[scale=0.25] at (0,0) {
% \node at (0,0) {
% \input{normalops.tex}
% };
\node[scale=0.25] at (0,0) {
\node[scale=0.8] at (-2,0) {
\input{failedretrieve.tex}
};
\node[scale=0.25] at (3.5,0) {
\node[scale=0.8] at (5,0) {
\input{accuse.tex}
};
\end{tikzpicture}
Expand Down
Binary file modified swarm/docs/sw^3/fig/normaloperations.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions swarm/docs/sw^3/fig/normaloperations.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usetikzlibrary{arrows,positioning}
\tikzset{
%Define standard arrow tip
>=stealth',
Expand All @@ -23,7 +23,7 @@
node/.style={
rectangle,
rounded corners,
draw=black,
draw=black,
text width=4.5em,
minimum height=2em,
text centered,
Expand All @@ -34,13 +34,13 @@
thick,
shorten <=2pt,
shorten >=2pt,}
every node/.style={align=center}
every node/.style={align=center}
}

\begin{document}

\begin{tikzpicture}
\node[scale=0.25] at (0,0) {
\node at (0,0) {
\input{normalops.tex}
};
% \node[scale=0.25] at (3,0) {
Expand Down
21 changes: 15 additions & 6 deletions swarm/docs/sw^3/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -475,21 +475,30 @@ This will likely be the receipt(s) that the owner received directly from the gua
.. [#] There is no measure to prevent double receipting, i.e., the same node can sell storage insurance about the same chunks to different parties.
If a node is unable to produce either the refutation or the receipts, it is considered a proof that the node had the chunk, should have kept it but deleted it. This process will end up blaming a single node for the loss. We call these landing nodes :dfn:`custodians`. If syncronisation was correctly followed and all the nodes forwarding kept their receipt, then eventually the blame will point to the node that was closest to the chunk to be stored at the time the request was received.
if an audit request for a a chunk is not responded to, the audit request is delegated to the guardian, and travels the same trajectory as that the original store request. Analogously, if
a chunk is not found and the case is escalated to litigation on the blockchain, then finger pointing will also follow the same path (see :numref:`Figure %s <fig:forwarding>`) [#]_ .
if an audit request for a a chunk is not responded to, the audit request is delegated to the guardian, and travels the same trajectory as that the original store request (see :numref:`Figure %s <fig:normaloperations>`). Analogously, if
a chunk is not found and the case is escalated to litigation on the blockchain, then finger pointing will also follow the same path (see :numref:`Figure %s <fig:failure-and-audit>`) [#]_ .

.. rubric:: Footnotes
.. [#] In the latter case the transaction is more metaphorical, finger pointing is mediated by state changes in the blockchain: when a node gets notified of a challenge (via a log event) they are sending in their receipts as a refutation.
.. [#] In the latter case the transaction is more metaphorical, finger pointing is mediated by state changes in the blockchain: when a node gets notified of a challenge (via a log event) they are sending in their receipts as a refutation and as a result the new closer node gets challenged.
.. _fig:forwarding:
.. _fig:normaloperations:

.. figure:: fig/forwarding.pdf
.. figure:: fig/normaloperations.pdf
:align: center
:alt: chain of local peer to peer interactions
:figclass: align-center

The chain edges represent local transactions between connected peers. In normal operation (left side) these transactions involve the farther nodes (1) sending store request (2) receiving delivery request (3) sending payment (4) receiving a receipt. On the right side, following a failed lookup (middle), the guardian is sent an audit/request and the edges correspond to audit requests forwarded to the peer that the node originally got the receipt from. Analogously when a case is escalated to litigation on the blockchain, the chain of challenges follow the same trajectory.
The arrows represent local transactions between connected peers. In normal operation these transactions involve the farther nodes (1) sending store request (2) receiving delivery request (3) sending payment (4) receiving a receipt.

.. _fig:failure-and-audit:

.. figure:: fig/failure-and-audit.pdf
:align: center
:alt: chain of local peer to peer interactions
:figclass: align-center

The arrows represent local transactions between connected peers. Following a failed lookup (left), the guardian is sent an audit/request and the edges correspond to audit requests forwarded to the peer that the node originally got the receipt from (right). Analogously when a case is escalated to litigation on the blockchain, the chain of challenges follow the same trajectory.


When the network grows, it can happen that a custodian finds a new registered node closer to its chunk. This means they need to forward the original store request, the moment they obtain a receipt they can use it in finger pointing, they cease to be custodians and the ball is in the new custodian's court.
Expand Down

0 comments on commit cb60d87

Please sign in to comment.