From 2c8cfc55840a142482c0ade75a1ba7e883961ea1 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 3 Jan 2021 11:01:35 +0100 Subject: Scale figures down a fair bit Signed-off-by: Matthias Beyer --- doc/paper/main.tex | 30 ++++++++++++++---------------- doc/paper/shell.nix | 1 + 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/doc/paper/main.tex b/doc/paper/main.tex index 0d800c0..17bdae8 100644 --- a/doc/paper/main.tex +++ b/doc/paper/main.tex @@ -9,6 +9,7 @@ \usepackage{xcolor} \usepackage{url} \usepackage{listings} +\usepackage{wrapfig} \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} @@ -158,22 +159,15 @@ As shown in \ref{jsonblock}, minimal data is held in the "Block" object. Because of the small size, replication of block objects is cheap and every modern end-user device can easily hold millions of blocks. -\begin{figure}[ht] - \centering - \includegraphics[width=0.45\textwidth]{gen/blockchain.png} +\begin{wrapfigure}[]{l}{0.25\textwidth} + \includegraphics[width=0.24\textwidth]{gen/blockchain.png} \caption{A chain of blocks} \label{pic:blockchain} -\end{figure} +\end{wrapfigure} If $S_{parents}(b)$ is the size of the list of parents of a block $b$, -and -$S_{base}$ is the size of a block without any parents, -the required disk space can be described by - -\begin{equation} - S_{sum} = n * S_{base} + \sum_{i=1}^{n} S_{parents}(b_i) -\end{equation} - +and $S_{base}$ is the size of a block without any parents, +the required disk space can be described by \eqref{eq:blockchainsize} where $b_i$ is a block and $n$ is the number of blocks. Depending on the overhead of the encoding technology used, the size of an individual block is in the lower bytes range. @@ -181,6 +175,11 @@ E.G. assuming a size of 46 bytes for a IPFS hash, a block with only one parent f into 100 bytes, even if encoded as JSON. That means that one Gigabyte of storage could hold more than 10 Million blocks. +\begin{equation}\label{eq:blockchainsize} + S_{sum} = n * S_{base} + \sum_{i=1}^{n} S_{parents}(b_i) +\end{equation} + + \subsection{Metadata-Block} % What a "metadata-block" is used for and what data it holds @@ -230,12 +229,11 @@ As its name tells, it holds the metadata of the post, that is Because of its size, this object type might not be replicated as much as the "block" object type. -\begin{figure}[ht] - \centering - \includegraphics[width=0.45\textwidth]{gen/blockchain_meta.png} +\begin{wrapfigure}[]{l}{0.25\textwidth} + \includegraphics[width=0.24\textwidth]{gen/blockchain_meta.png} \caption{A chain of blocks with pointers to their corrosponding meta block} \label{pic:blockchain:meta} -\end{figure} +\end{wrapfigure} In the chain of blocks from \ref{pic:blockchain}, each block (except $D$) would point to another metadata block, resulting in \ref{pic:blockchain:meta}. diff --git a/doc/paper/shell.nix b/doc/paper/shell.nix index d9fd979..1bbdd82 100644 --- a/doc/paper/shell.nix +++ b/doc/paper/shell.nix @@ -24,6 +24,7 @@ pkgs.mkShell rec { xcolor makeglos listings + wrapfig ; }) ]; -- cgit v1.2.3