diff --git a/source/Lab07/Guide/assignment.tex b/source/Lab07/Guide/assignment.tex new file mode 100644 index 0000000..bb1b0e2 --- /dev/null +++ b/source/Lab07/Guide/assignment.tex @@ -0,0 +1,472 @@ +\documentclass[12pt,a4paper]{article} +% AUTHOR: Rafael Belchior +% Thanks to Prof. RUI SANTOS CRUZ for providing the template +% +\usepackage{helvet} +\renewcommand{\familydefault}{\sfdefault} +\usepackage{a4wide} +\usepackage{ucs} +\usepackage[utf8x]{inputenc} +\usepackage{amsthm} +\usepackage{amsmath} +\usepackage{minted} + +\newenvironment{code}{\captionsetup{type=listing}}{} + +\theoremstyle{definition} +\newtheorem{definition}{Definition}[section] +\newtheorem{threat}{Threat}[] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% SELECT ONE OF THE FOLLOWING PACKAGES FOR THE LANGUAGE +\usepackage[english]{babel} +% \usepackage[portuges]{babel} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{subfig} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage{cite} +\usepackage[absolute]{textpos} +\usepackage{tabularx} +\usepackage{tabulary} +\usepackage{fancyhdr} +\usepackage[table]{xcolor} +\pagestyle{fancy} +\headsep=50pt +\setlength{\headheight}{50pt} +\usepackage{listings} +\usepackage{minted} +\definecolor{LightGray}{rgb}{0.95, 0.95, 0.95} +\definecolor{darkblue}{rgb}{0.0,0.0,0.6} +\definecolor{editorOcher}{rgb}{1, 0.5, 0} + +% Clever Referencing of document parts +\usepackage{cleveref} + +\lstdefinestyle{commandline} {% +language={[WinXP]command.com}, +breaklines=true, +%aboveskip=\baselineskip, +belowskip=\baselineskip, +showstringspaces=false, +backgroundcolor=\color{LightGray}, +basicstyle=\small\color{black}\ttfamily, +showstringspaces=false, +keywordstyle=\color{cyan}\bfseries, +stringstyle=\color{cyan}\ttfamily, +commentstyle=\color{green}\itshape, +moredelim=[s][\color{blue}\bfseries]{C:}{\>} +} + +\lstdefinestyle{Bash} {% +language=bash, +breaklines=true, +belowskip=\baselineskip, +backgroundcolor=\color{LightGray}, +showstringspaces=false, +keywordstyle=\color{black}\bfseries, +basicstyle=\small\color{black}\ttfamily, +stringstyle=\color{editorOcher}\ttfamily, +commentstyle=\color{cyan}\itshape, +otherkeywords={xcode-select, mkdir,rm}, +moredelim=[s][\color{red}]{~$}, +literate={~} {$\sim$}{1} +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% PLEASE FILL THE ADEQUATE DATA IN THE TABLE REPLACING +% THE VALUES EXEMPLIFIED +\lhead{} +{\renewcommand{\arraystretch}{1.1} +\fancyhead[C]{\begin{tabularx}{1.0\textwidth}{|l|X|l|l|} +\hline +% In the following line change Course Name: PPIII, PPB +\textbf{EB 20/21} & \textbf{Enterprise Blockchain Technologies} & \textbf{Number:} & 7 \\ +\hline +% In the following line insert your Name and IST ID +\multicolumn{2}{|l|}{Module II - Hyperledger Fabric} & \textbf{Issue Date:} & - \\ +\hline +% In the following line insert the Activity CODE and Title (abridged) +%\textbf{WP n.} (99) & (Subject) & \textbf{Group:} & (99) \\ +\multicolumn{2}{|l|}{Advanced Topics: Hyperledger Umbra} & \textbf{Due Date:} & - \\ +\hline +\end{tabularx}} +\rhead{}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% DO NOT CHANGE THIS BLOCK +\begin{document} +\textblockorigin{-34pt}{-12pt} +\begin{textblock*}{10cm}(2cm,1cm) +\includegraphics[width=6cm]{hyperledger.png} +\end{textblock*} +\newtheorem{mydef}{Definition} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%,sdist2017 + +\section*{Preliminary Notes} +We now introduce the Hyperledger Umbra (Umbra)\footnote{https://github.com/hyperledger-labs/umbra} project, a project initiated as an Hyperledger Internship. This laboratory has been created with the cooperation of Raphael Rosa, creator, and maintainer of Umbra. Please, mind the official documentation page for eventual questions\footnote{https://umbra-labs.readthedocs.io/en/latest/intro.html}, and the official channels to communicate issues\footnote{https://github.com/hyperledger-labs/umbra/issues}. Beware with copying -paste the commands in this lab to the terminal: the buffer might contain invalid characters that corrupt the command. We recommend writing the command instead of copying it. + +During this laboratory, start building an answer to the following question: \textbf{What are the advantages and disadvantages of Umbra, regarding the evolution of enterprise blockchain technologies?}. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% YOUR TEXT STARTS HERE +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Hyperledger Umbra Overview} +The simulation research internship during the summer of 2018 led to the creation of the Hyperledger Umbra Lab (Umbra). Due to the overall difficulty of getting Hyperledger blockchain frameworks running under the Shadow simulation tool, work on the Umbra lab has slowed to a crawl. A different network emulation tool called Mininet was proposed as an alternative to using Shadow, and it has the potential to drastically reduce the startup cost of getting a network emulation tool running Hyperledger blockchains. + +\subsection{Scope} +Umbra is a platform employing Mininet and plugins for Hyperledger distributed ledgers to run under emulation in a lab environment. + +It is intended to be an ongoing project to provide a research tool for understanding and improving the Hyperledger blockchain platforms and conducting future research in consensus algorithms, scalability, security, etc. + + +\subsection{How does it Work} + + +Umbra works with the support of virtualization technologies, containers (Docker), and programmable switches (Open vSwitch). Using containernet, it deploys an underlying network that serves as the infrastructure for the blockchain platform of choice (e.g., Iroha, Fabric, Indy, etc.) to be executed as the overlay application network. Nodes and links can be configured with resource constraint rules (e.g., CPU, memory, bandwidth, latency, etc.). Besides, umbra allows events (e.g., transactions, chaincode invoke, etc.) to be scheduled targeting the blockchain platform using plugins. Umbra is supporting by Mininet. + +Mininet was developed for fast prototyping of emulated programmable networks on a laptop. Later there were different extensions proposed on top of it, such as maxinet enabling experiments in distributed clusters of servers and containernet enabling the experimentation with Docker containers. Mininet was developed for high fidelity and later on extended to support the features proposed by Maxinet. Containernet was built on top of mininet version 2.2.0, therefore inheriting its most recent enhancements. Umbra elaborates its architecture on top of the upgrades proposed by containernet. As being evaluated, possible contributions to containernet will be performed to enhance it with the most recent features provided by Docker (i.e., current docker-py API) and mininet (i.e., currently in version 2.3). + + +\section{Getting Started With Hyperledger Umbra} +To get started with Umbra, please go to the official Umbra's repository\footnote{https://github.com/raphaelvrosa/umbra}, and clone it (tag umbra-course). Alternatively, you can fork it and then clone it. + + +Umbra is developed and tested in Ubuntu 20.04. The hardware requirements needed for umbra will depend on the scale of the experiments to be played with it (e.g., number of nodes in a blockchain topology, amount of events triggered into the topology, the topology resource settings, etc.). It is recommended for a simple setup to have available at least: 4 logical CPU cores, 8 GB of RAM, and 10GB of storage. + + +\subsection{Installing Hyperledger Umbra} +To install Hyperledger Umbra, first, we need to install prerequisites. Please run: +\begin{verbatim} +sudo apt install make +\end{verbatim} + +To obtain Umbra's code, run: +\begin{verbatim} +git clone https://github.com/raphaelvrosa/umbra +\end{verbatim} + +Go to the projects' folder: +\begin{verbatim} +cd umbra +\end{verbatim} + +Given the installation of the umbra requirements, the commands below install umbra. +\begin{verbatim} +sudo make install +\end{verbatim} + +ALTERNATIVELY, Umbra can also be installed using a Vagrant virtual machine, either using qemu-kvm/libvirt or virtualbox as providers, as stated below: +\begin{verbatim} +sudo make vagrant-run-libvirt # Installs umbra in a virtual machine using qemu-kvm/libvirt, and turn it up +sudo make vagrant-run-virtualbox # Installs umbra in a virtual machine using virtualbox, and turn it up + +\end{verbatim} + +\subsection{Generating the experiments} +Having umbra installed, it is possible to experiment with it using the provided examples, inside examples/ folder. To do this, run: + + +\begin{verbatim} +cd examples +\end{verbatim} + + +Now, let us examine the file ``local-2orgs.py'', under the \emph{fabric} folder, which sets up a configuration file that defines a network with two organizations. At the core, this script builds a network configuration (fuction build), and logs the procedure, by importing a logger: + +\begin{minted}[breaklines]{python} + setup_logging() + builds() +\end{minted} + +Next, focus on the first lines of the same file: + +\begin{minted}[breaklines]{python} + + +# Then, import the configtx definitions, which are going +# to be used by each one of the orgs policies, and also +# for the whole construction of the configtx.yml file. +# Each experiment/topology can have its own configtx custom definitions. + +from base_configtx.configtx_2orgs import ( + org1_policy, + org2_policy, + orderer_policy, + configtx, +) +\end{minted} + +This code sample imports pre-defined policies to generate a two-org Fabric network. The next steps happen throughout the file: + + +\begin{minted}[breaklines, linenos]{python} + + fab_topo = FabricTopology("local-2orgs", chaincode_dir=chaincode_dir) + + experiment = Experiment("local-2orgs") + experiment.set_topology(fab_topo) + + fab_topo.add_network("s1", envid="umbra-default") + + fab_topo.add_org("org1", domain, policies=org1_policy) + fab_topo.add_peer( + "peer0", "org1", anchor=True, profile="nodes", image_tag=image_tag + ) + + [...] + + fab_topo.configtx(configtx) + p1 = "TwoOrgsOrdererGenesis.Consortiums.SampleConsortium.Organizations" + p2 = "TwoOrgsOrdererGenesis.Orderer.Organizations" + p3 = "TwoOrgsChannel.Application.Organizations" + fab_topo.set_configtx_profile(p1, ["org1", "org2"]) + fab_topo.set_configtx_profile(p2, ["orderer"]) + fab_topo.set_configtx_profile(p3, ["org1", "org2"]) + + # The interconnection of umbra orgs/orderer to the network must be defined. + # When an org is connected to a network, all its peers/CAs are connected to the network too. + fab_topo.add_org_network_link("org1", "s1", "links") + fab_topo.add_org_network_link("org2", "s1", "links") + fab_topo.add_org_network_link("orderer", "s1", "links") + + node_resources = fab_topo.create_node_profile(cpus=1, memory=1024, disk=None) + link_resources = fab_topo.create_link_profile(bw=1, delay="2ms", loss=None) + + experiment.save() + + +\end{minted} + +Line 1 defines a Fabric topology by setting its name (local-2orgs) and chaincode directory. The topology is the definition of a Fabric network comprising the orgs, peers, CAs, and orderers. This is the building base of an Experiment (lines 2 and 3), along with Events. + +Environments in umbra are the places (i.e., baremetal servers and/or virtual machines) where the components of umbra are executed, and consequently, the topology itself. An environment can be remote or local (remote parameter set to true or false). All the proper settings regarding the reachability of the nodes, network, environment are handled by umbra. The network must be associated with the environment where it is going to be placed/executed. All the nodes connected to the network will be deployed in the environment where the network is placed. + +Eventually, an org is added (line 8), as well as its peers (line 9), orderer, and CA (see example). For each organization, two peer nodes and a CA is added to the topology. An orderer is added as well, with a predefined policy, \emph{orderer\_policy}. + +The script loads the \emph{configtx} file, a specification that contains the definition of the profiles to be used by the network to generate the fabric topology artifacts (lines 15-21). An interesting aspect about Umbra is that we can define the links between an org and the network, so later we can alter them. We can define resources allocated for each node (line 29) and network parameters (line 30). In future experiments, this allows us to understand what happens if a node experiences a degradation in terms of performance or network resources (e.g., bandwidth). Finally, the experiment is persisted in the form of a configuration file that Umbra can parse (line 32). + +To generate this configuration, run: + +\begin{verbatim} + python3 examples/fabric/local-2orgs.py + +\end{verbatim} +According to the official documentation, ``The command will compile the experiment's definition (and its artifacts) and save it in /tmp/umbra/. The configuration is saved under a folder of its referenced blockchain project, with the name used to define the experiment, and in a JSON format. For instance, the command above configuration will produce a folder /local-2orgs inside the folder /tmp/umbra/fabric/. In the folder /tmp/umbra/fabric/local-2orgs/ a file named local-2orgs.json is the one that defines all the configuration of the experiment compiles. This file references all the generated topology (nodes and links) and their respective resource profiles and artifacts (e.g., certificates, crypto keys, genesis block).'' + + +This configuration can be loaded by Umbra, as we will see in the next section. + +\subsection{Running Umbra} + +Running the configurations +Start the umbra-cli component: +\begin{verbatim} + umbra-cli --uuid umbra-cli --address 127.0.0.1:9988 + +\end{verbatim} + +You should see the following output on your terminal: + + +\begin{minted}[breaklines, linenos]{shell} + +rafael@x:~/Projects/umbra$ umbra-cli --uuid umbra-cli --address 127.0.0.1:9988 + + <<< Welcome to Umbra >>> + +:umbra> +\end{minted} + + +Executing the command above a command-line interface (CLI) prompt will start. To exit it, just type CTRL+D. Using the umbra-cli all the interactions with an umbra experiment and its environments are possible. The uuid and address fields are needed because umbra-cli uses those parameters to receive status logs from umbra-broker. + +In umbra-cli, load your configuration: + +\begin{verbatim} + umbra-cli> load /tmp/umbra/fabric/local-2orgs/local-2orgs.json + +\end{verbatim} + +The expected response is: +\begin{minted}[breaklines, linenos]{shell} +:umbra> load /tmp/umbra/fabric/local-2orgs/local-2orgs.json + +-> task: Loading configuration file at /tmp/umbra/fabric/local-2orgs/local-2orgs.json +-> result: Configuration loaded + +:umbra> + +\end{minted} + + +Loading the configuration means umbra-cli is ready to work with it, meaning the installation of umbra in the defined configuration environments, the start of the umbra components needed in each environment, and the topology's instantiation its events as programmed by the experiment. Likewise, the tear-down of the topology, stop of the components, and uninstall of umbra in the environments can be executed with umbra-cli. + +In umbra-cli, install the environments of your configuration: +\begin{verbatim} + umbra-cli> install + +\end{verbatim} + + +The expected response is: +\begin{minted}[breaklines, linenos]{shell} +:umbra> install + +: Installing : + +-> task: Installing Umbra at environment umbra-default +[sudo] password for rafael: +-> result: Install Umbra in environment umbra-default Ok + +:umbra> + + +\end{minted} + + +The install command means umbra is going to reach all the environments defined by the configuration, included umbra-default, and install umbra and the dependencies needed to run the experiment in the configuration's assigned environments. For instance, if an experiment requires fabric dependencies, all the fabric container images will be downloaded in the environment(s) needed to run the configuration. + +In umbra-cli, start the components of your configuration: + +\begin{verbatim} + umbra-cli> start + +\end{verbatim} + + +The expected response is: +\begin{minted}[breaklines, linenos]{shell} +:umbra> start + +: Starting : + +-> task: Starting component 'umbra-broker' in environment umbra-default +-> result: Started component 'umbra-broker' in environment umbra-default Ok + + +-> task: Starting component 'umbra-monitor' in environment umbra-default +-> result: Started component 'umbra-monitor' in environment umbra-default Ok + + +-> task: Starting component 'umbra-scenario' in environment umbra-default +-> result: Started component 'umbra-scenario' in environment umbra-default Ok + +:umbra> + + +\end{minted} + +When the start is called, all the components in all the environments are initiated. Each of those components is a process (e.g., umbra-monitor, umbra-scenario, umbra-broker) with an UUID and address. + +In umbra-cli, begin the experiment: + +\begin{verbatim} + umbra-cli> begin + +\end{verbatim} + + +The expected response is: +\begin{minted}[breaklines, linenos]{shell} + +:umbra> begin + +: Beginning : + +-> task: Experiment Begin +-> result: Umbra Experiment Ok + +:umbra> + +\end{minted} + +The beginning of an experiment means the instantiation of the topology, and the triggering of its events went fine. Here, the experiment indicates that the topology was created. + +Congratulations! You have an entire Fabric network running over Umbra. + +\subsection{Shutting Down Umbra} + + +In umbra-cli, after performing the topology and the events' instantiation and the events, it is possible to end the experiment. The command below indicates umbra-broker to tear down the instantiated topology and stop monitoring its components (environments and containers). + +\begin{verbatim} + umbra-cli> end + +\end{verbatim} + +In umbra-cli, stop the components of your configuration: + +\begin{verbatim} + umbra-cli> stop + +\end{verbatim} + +Stop means all the components will be finished in their execution environment. + + +Type ctrl+d to exit umbra-cli: + +\begin{verbatim} + umbra-cli> + +\end{verbatim} + +If all went fine, this should be what you saw: +\begin{minted}[breaklines, linenos]{shell} +:umbra> end + +: Ending : + +-> task: Experiment End +-> result: Ended Umbra Experiment + +:umbra> stop + +: Stopping : + +-> task: Stopping component 'umbra-broker' in environment umbra-default +[sudo] password for rafael: +-> result: Stopped component 'umbra-broker' in environment umbra-default Ok + + +-> task: Stopping component 'umbra-monitor' in environment umbra-default +-> result: Stopped component 'umbra-monitor' in environment umbra-default Ok + + +-> task: Stopping component 'umbra-scenario' in environment umbra-default +-> error: Stopped component 'umbra-scenario' in environment umbra-default Error + +:umbra> + + <<< See you soon! Cheers, Umbra >>> + + +\end{minted} + + +\subsection{Exercises} + + +\subsubsection*{What are the advantages and disadvantages of Umbra, regarding the evolution of enterprise blockchain technologies?} + + + +\subsubsection*{Creating a topology with Umbra} +Setup an Umbra topology with 3 orgs, 2 peers each, one orderer, and one CA per org. The endorsement policy should be at least two orgs. + +Hint: +Create a Python file called \emph{local-3orgs.py}, and start from the studied file. +Duplicate the file configtx\_2orgs.py under fabric/base\_configtx, and rename it to configtx\_3orgs.py. +Adapt it to your needs. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% YOUR TEXT ENDS HERE +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\bibliographystyle{abbrv} +%\bibliography{lab.bib} + +\end{document} % The required last line \ No newline at end of file diff --git a/source/Lab07/Guide/header_table.tgn b/source/Lab07/Guide/header_table.tgn new file mode 100644 index 0000000..45ff871 --- /dev/null +++ b/source/Lab07/Guide/header_table.tgn @@ -0,0 +1 @@ +{"rows_views":[[{"style":{"borders":"tb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"tb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"font-weight":"normal","bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"b","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"b","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"font-weight":"normal","bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}]],"model":{"rows":[[{"value":"\\includegraphics[width=6cm]{hyperledger.png}","cspan":2,"rspan":3,"markup":[1,44]},{"value":"","cspan":-1,"rspan":3,"markup":[]},{"value":"Course\n","cspan":1,"rspan":1,"markup":[1,7]},{"value":"Enterprise Blockchain\nTechnologies","cspan":1,"rspan":1,"markup":[1,34]},{"value":"Number\n","cspan":1,"rspan":1,"markup":[1,7]},{"value":"01\n","cspan":1,"rspan":1,"markup":[1,3]}],[{"value":"","cspan":2,"rspan":-1,"markup":[]},{"value":"","cspan":-1,"rspan":-1,"markup":[]},{"value":"Module","cspan":1,"rspan":1,"markup":[1,6]},{"value":"I - Introduction","cspan":1,"rspan":1,"markup":[1,16]},{"value":"Issue Date","cspan":1,"rspan":1,"markup":[1,10]},{"value":"14 Sept 2020","cspan":1,"rspan":1,"markup":[1,12]}],[{"value":"","cspan":2,"rspan":-2,"markup":[]},{"value":"","cspan":-1,"rspan":-2,"markup":[]},{"value":"Title","cspan":1,"rspan":1,"markup":[1,5]},{"value":"Fundamentals on\nDistributed Systems\nand Cryptography","cspan":1,"rspan":1,"markup":[1,52]},{"value":"Due Date","cspan":1,"rspan":1,"markup":[1,8]},{"value":"21 Sept 2020\n","cspan":1,"rspan":1,"markup":[1,13]}]]},"theme":null,"fixed_layout":false,"markup":{"instances":[{},{"style":{"fontWeight":"","fontStyle":"","textDecoration":"","color":"","backgroundColor":""}},null]},"options":{"table_caption":"","table_label":"tab:my-table"}} \ No newline at end of file diff --git a/source/Lab07/Guide/hyperledger.png b/source/Lab07/Guide/hyperledger.png new file mode 100644 index 0000000..0610041 Binary files /dev/null and b/source/Lab07/Guide/hyperledger.png differ diff --git a/source/Lab07/Instructors Guide/assignment.tex b/source/Lab07/Instructors Guide/assignment.tex new file mode 100644 index 0000000..9117a76 --- /dev/null +++ b/source/Lab07/Instructors Guide/assignment.tex @@ -0,0 +1,117 @@ +\documentclass[12pt,a4paper]{article} +% AUTHOR: Rafael Belchior +% Thanks to Prof. RUI SANTOS CRUZ for providing the template +% +\usepackage{helvet} +\renewcommand{\familydefault}{\sfdefault} +\usepackage{a4wide} +\usepackage{ucs} +\usepackage[utf8x]{inputenc} +\usepackage{amsmath} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% SELECT ONE OF THE FOLLOWING PACKAGES FOR THE LANGUAGE +\usepackage[english]{babel} +% \usepackage[portuges]{babel} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{subfig} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage{cite} +\usepackage[absolute]{textpos} +\usepackage{tabularx} +\usepackage{tabulary} +\usepackage{fancyhdr} +\usepackage[table]{xcolor} +\pagestyle{fancy} +\headsep=50pt +\setlength{\headheight}{50pt} +\usepackage{listings} +\usepackage{minted} +\definecolor{LightGray}{rgb}{0.95, 0.95, 0.95} +\definecolor{darkblue}{rgb}{0.0,0.0,0.6} +\definecolor{editorOcher}{rgb}{1, 0.5, 0} + +% Clever Referencing of document parts +\usepackage{cleveref} + +\lstdefinestyle{commandline} {% +language={[WinXP]command.com}, +breaklines=true, +%aboveskip=\baselineskip, +belowskip=\baselineskip, +showstringspaces=false, +backgroundcolor=\color{LightGray}, +basicstyle=\small\color{black}\ttfamily, +showstringspaces=false, +keywordstyle=\color{cyan}\bfseries, +stringstyle=\color{cyan}\ttfamily, +commentstyle=\color{green}\itshape, +moredelim=[s][\color{blue}\bfseries]{C:}{\>} +} + +\lstdefinestyle{Bash} {% +language=bash, +breaklines=true, +belowskip=\baselineskip, +backgroundcolor=\color{LightGray}, +showstringspaces=false, +keywordstyle=\color{black}\bfseries, +basicstyle=\small\color{black}\ttfamily, +stringstyle=\color{editorOcher}\ttfamily, +commentstyle=\color{cyan}\itshape, +otherkeywords={xcode-select, mkdir,rm}, +moredelim=[s][\color{red}]{~$}, +literate={~} {$\sim$}{1} +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% PLEASE FILL THE ADEQUATE DATA IN THE TABLE REPLACING +% THE VALUES EXEMPLIFIED +\lhead{} +{\renewcommand{\arraystretch}{1.1} +\fancyhead[C]{\begin{tabularx}{1.0\textwidth}{|l|X|l|l|} +\hline +% In the following line change Course Name: PPIII, PPB +\textbf{EB 20/21} & \textbf{Enterprise Blockchain Technologies} & \textbf{Number:} & 7\\ +\hline +% In the following line insert your Name and IST ID +\multicolumn{2}{|l|}{Module II - Hyperledger Fabric} & \textbf{Issue Date:} & - \\ +\hline +% In the following line insert the Activity CODE and Title (abridged) +%\textbf{WP n.} (99) & (Subject) & \textbf{Group:} & (99) \\ +\multicolumn{2}{|l|}{Advanced Topics: Hyperledger Umbra} & \textbf{Due Date:} & - \\ +\hline +\end{tabularx}} +\rhead{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% DO NOT CHANGE THIS BLOCK +\begin{document} +\textblockorigin{-34pt}{-12pt} +\begin{textblock*}{10cm}(2cm,1cm) +\includegraphics[width=6cm]{hyperledger.png} +\end{textblock*} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%,sdist2017 + +\section*{Instructors Guide} +The Hyperledger Umbra (Umbra)\footnote{https://github.com/hyperledger-labs/umbra} project, is a project initiated as an Hyperledger Internship. This laboratory has been created with the cooperation of Raphael Rosa, creator, and maintainer of Umbra. Please, mind the official documentation page for eventual questions\footnote{https://umbra-labs.readthedocs.io/en/latest/intro.html}, and the official channels to communicate issues\footnote{https://github.com/hyperledger-labs/umbra/issues}. + + +\section{Exercises} + + +\subsubsection*{What are the advantages and disadvantages of Umbra, regarding the evolution of enterprise blockchain technologies?} + +A: Allows to empirically test blockchain properties such as scalability, consensus resiliency, and privacy. This allows fixing issues that are difficult to verify in an ad-hoc way. As the disadvantages, to integrate a new blockchain, it requires more effort than an ad-hoc evaluation. + +\subsubsection*{Creating a topology with Umbra} + +Please refer to the official repository. + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\bibliographystyle{IEEEtran} +\bibliography{lab.bib} + +\end{document} % The required last line \ No newline at end of file diff --git a/source/Lab07/Instructors Guide/header_table.tgn b/source/Lab07/Instructors Guide/header_table.tgn new file mode 100644 index 0000000..45ff871 --- /dev/null +++ b/source/Lab07/Instructors Guide/header_table.tgn @@ -0,0 +1 @@ +{"rows_views":[[{"style":{"borders":"tb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"tb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"font-weight":"normal","bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"b","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"b","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"font-weight":"normal","bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{"bold":true},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"ltrb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}]],"model":{"rows":[[{"value":"\\includegraphics[width=6cm]{hyperledger.png}","cspan":2,"rspan":3,"markup":[1,44]},{"value":"","cspan":-1,"rspan":3,"markup":[]},{"value":"Course\n","cspan":1,"rspan":1,"markup":[1,7]},{"value":"Enterprise Blockchain\nTechnologies","cspan":1,"rspan":1,"markup":[1,34]},{"value":"Number\n","cspan":1,"rspan":1,"markup":[1,7]},{"value":"01\n","cspan":1,"rspan":1,"markup":[1,3]}],[{"value":"","cspan":2,"rspan":-1,"markup":[]},{"value":"","cspan":-1,"rspan":-1,"markup":[]},{"value":"Module","cspan":1,"rspan":1,"markup":[1,6]},{"value":"I - Introduction","cspan":1,"rspan":1,"markup":[1,16]},{"value":"Issue Date","cspan":1,"rspan":1,"markup":[1,10]},{"value":"14 Sept 2020","cspan":1,"rspan":1,"markup":[1,12]}],[{"value":"","cspan":2,"rspan":-2,"markup":[]},{"value":"","cspan":-1,"rspan":-2,"markup":[]},{"value":"Title","cspan":1,"rspan":1,"markup":[1,5]},{"value":"Fundamentals on\nDistributed Systems\nand Cryptography","cspan":1,"rspan":1,"markup":[1,52]},{"value":"Due Date","cspan":1,"rspan":1,"markup":[1,8]},{"value":"21 Sept 2020\n","cspan":1,"rspan":1,"markup":[1,13]}]]},"theme":null,"fixed_layout":false,"markup":{"instances":[{},{"style":{"fontWeight":"","fontStyle":"","textDecoration":"","color":"","backgroundColor":""}},null]},"options":{"table_caption":"","table_label":"tab:my-table"}} \ No newline at end of file diff --git a/source/Lab07/Instructors Guide/hyperledger.png b/source/Lab07/Instructors Guide/hyperledger.png new file mode 100644 index 0000000..0610041 Binary files /dev/null and b/source/Lab07/Instructors Guide/hyperledger.png differ diff --git a/source/Lab07/Instructors Guide/lab.bib b/source/Lab07/Instructors Guide/lab.bib new file mode 100644 index 0000000..0f17935 --- /dev/null +++ b/source/Lab07/Instructors Guide/lab.bib @@ -0,0 +1,248 @@ +@techreport{, +abstract = {Distributed messaging systems form the core of big data streaming, cloud native applications and microservice architecture. With real-time critical applications there is a growing need for well-built messaging platform that is scalable, fault tolerant and has low latency. There are multiple modern messaging systems that have come up in the recent past, all with their own pros and cons. This has become problematic for the industry to decide which messaging system is the most suitable for a specific application. An in-depth study is required to decide which features of a messaging system meet the needs of the application. This survey paper outlines the modern messaging technologies and delves deep on three popular publisher/subscriber systems-Apache Kafka, RabbitMQ and NATS Streaming. The paper provides information about messaging systems, the use cases, similarities and differences of features to facilitate users to make an informed decision and also pave way for future research and development.}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Unknown - Unknown - A study on Modern Messaging Systems-Kafka, RabbitMQ and NATS Streaming.pdf:pdf}, +keywords = {Apache Kafka,NATS,RabbitMQ,commit log,distributed messaging systems,publisher-subscriber systems}, +title = {{A study on Modern Messaging Systems-Kafka, RabbitMQ and NATS Streaming}} +} +@article{belchior2020, +abstract = {Blockchain interoperability is emerging as one of the crucial features of blockchain technology, but the knowledge necessary for achieving it is fragmented. This fact makes it challenging for academics and the industry to seamlessly achieve interoperability among blockchains. Given the novelty and potential of this new domain, we conduct a literature review on blockchain interoperability, by collecting 262 papers, and 70 grey literature documents, constituting a corpus of 332 documents. From those 332 documents, we systematically analyzed and discussed 80 documents, including both peer-reviewed papers and grey literature. Our review classifies studies in three categories: Cryptocurrency-directed interoperability approaches, Blockchain Engines, and Blockchain Connectors. Each category is further divided into sub-categories based on defined criteria. We discuss not only studies within each category and subcategory but also across categories, providing a holistic overview of blockchain interoperability, paving the way for systematic research in this domain. Our findings show that blockchain interoperability has a much broader spectrum than cryptocurrencies. The present survey leverages an interesting approach: we systematically contacted the authors of grey literature papers and industry solutions to obtain an updated view of their work. Finally, this paper discusses supporting technologies, standards, use cases, open challenges, and provides several future research directions.}, +archivePrefix = {arXiv}, +arxivId = {2005.14282}, +author = {Belchior, Rafael and Vasconcelos, Andr{\'{e}} and Guerreiro, S{\'{e}}rgio and Correia, Miguel}, +eprint = {2005.14282}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Belchior et al. - 2020 - A Survey on Blockchain Interoperability Past, Present, and Future Trends(2).pdf:pdf}, +journal = {arXiv}, +month = {may}, +number = {1}, +pages = {58}, +title = {{A Survey on Blockchain Interoperability: Past, Present, and Future Trends}}, +url = {http://arxiv.org/abs/2005.14282}, +volume = {1}, +year = {2020} +} +@article{wiener90, +abstract = {exponents is described. The attack makes use of an algorithm based on continued fractions that finds the numerator and denominator of a fraction in polynomial time when a close enough estimate of the fraction is known. The public exponent e and the modulus pq can be used to create an estimate of a fraction that involves the secret exponent d. The algorithm based on continued fractions uses this estimate to discover sufficiently short secret exponents. For a typical case where e {\textless} pq, GCD(p - 1, q- 1) is small, and p and q have approximately the same number of bits, this attack will discover secret exponents with up to approximately one-quarter as many bits as the modulus. Ways to combat this attack, ways to improve it, and two open problems are described. This attack poses no threat to the normal case of RSA where the secret exponent is approximately the same size as the modulus. This is because this attack uses information provided by the public exponent and, in the normal case, the public exponent can be chosen almost independently of the modulus. A cryptanalvtic attack on the use of short RSA secret. {\textcopyright} 1990 IEEE}, +author = {Wiener, M. J.}, +doi = {10.1109/18.54902}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Wiener - 1990 - Cryptanalysis of Short RSA Secret Exponents.pdf:pdf}, +issn = {15579654}, +journal = {IEEE Transactions on Information Theory}, +number = {3}, +pages = {553--558}, +title = {{Cryptanalysis of Short RSA Secret Exponents}}, +volume = {36}, +year = {1990} +} +@techreport{rogaway2004, +abstract = {We consider basic notions of security for cryptographic hash functions: collision resistance, preimage resistance, and second-preimage resistance. We give seven different definitions that correspond to these three underlying ideas, and then we work out all of the implications and separations among these seven definitions within the concrete-security, provable-security framework. Because our results are concrete, we can show two types of implications, conventional and provisional, where the strength of the latter depends on the amount of compression achieved by the hash function. We also distinguish two types of separations, conditional and unconditional. When constructing counterexamples for our separations, we are careful to preserve specified hash-function domains and ranges; this rules out some pathological counterexamples and makes the separations more meaningful in practice. Four of our definitions are standard while three appear to be new; some of our relations and separations have appeared, others have not. Here we give a modern treatment that acts to catalog, in one place and with carefully-considered nomenclature, the most basic security notions for cryptographic hash functions.}, +author = {Rogaway, P and Shrimpton, T}, +booktitle = {Lecture Notes in Computer Science}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Rogaway, Shrimpton - 2004 - Cryptographic Hash-Function Basics Definitions, Implications, and Separations for Preimage Resistance, Secon.pdf:pdf}, +keywords = {collision resistance,cryptographic hash functions,preimage resistance,provable security,second-preimage resistance *}, +publisher = {Springer-Verlag}, +title = {{Cryptographic Hash-Function Basics: Definitions, Implications, and Separations for Preimage Resistance, Second-Preimage Resistance, and Collision Resistance}}, +year = {2004} +} +@misc{simmons, +author = {Simmons, Gustavus}, +title = {{Cryptology - History of cryptology | Britannica}}, +url = {https://www.britannica.com/topic/cryptology/History-of-cryptology}, +urldate = {2020-07-07} +} +@misc{Wong2014, +author = {Wong, Bernard}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Wong - 2014 - CS454654 Distributed Systems.pdf:pdf}, +title = {{CS454/654 Distributed Systems}}, +urldate = {2020-06-20}, +year = {2014} +} +@misc{, +title = {{CSCBE 2020 Qualifiers Write-Up - 0xkasper}}, +url = {https://www.0xkasper.com/articles/cscbe-2020-qualifiers-write-up{\#}a-pirates-life-for-me}, +urldate = {2020-06-30} +} +@misc{Ousterhout_presentation, +author = {Ousterhout, John and Ongaro, Diego}, +title = {{Designing for Understandability: The Raft Consensus Algorithm - YouTube}}, +url = {https://www.youtube.com/watch?v=vYp4LYbnnW8}, +urldate = {2020-06-22}, +year = {2016} +} +@misc{md2020, +author = {{Tecnico Lisboa}}, +title = {{Discrete Mathematics}}, +url = {https://fenix.tecnico.ulisboa.pt/cursos/leic-a/disciplina-curricular/1529008373641}, +urldate = {2020-07-09}, +year = {2020} +} +@book{Ver\issimo2001, +abstract = {Distributed Systems for System Architects addresses these issues.}, +author = {Ver$\backslash$'issimo, Paulo and Rodrigues, Lu$\backslash$'is}, +doi = {10.1007/978-1-4615-1663-7}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Ver'issimo, Rodrigues - 2001 - Distributed systems for system architects.pdf:pdf}, +isbn = {978-0792372660}, +keywords = {Computers}, +pages = {623}, +title = {{Distributed systems for system architects}}, +url = {http://www.google.com/books?hl=en{\&}lr={\&}id=oOzwLX1{\_}bpkC{\&}oi=fnd{\&}pg=PR13{\&}dq=Distributed+systems+for+system+architects{\&}ots=AoTDFJClxL{\&}sig=AZVUrUivDNOc{\_}hFwZLB9S2zrKYQ}, +year = {2001} +} +@book{dscd, +address = {USA}, +author = {Coulouris, George and Dollimore, Jean and Kindberg, Tim and Blair, Gordon}, +edition = {5th}, +isbn = {0132143011}, +publisher = {Addison-Wesley Publishing Company}, +title = {{Distributed Systems: Concepts and Design}}, +year = {2011} +} +@incollection{conrad2016, +abstract = {Domain 3: Security Engineering, represents a large and complex technical domain. The chapter presents key cryptographic concepts of authentication and non-repudiation in addition to confidentiality and integrity, which are concepts presented in many of the domains. Beyond the foundational operations such as substitution and permutation and types of cryptosystems, symmetric, asymmetric, and hashing, this chapter also introduces key modes of operation for symmetric cryptosystems, Electronic Code Book (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB), and Counter Mode (CTR). The goal of the domain's final section is to ensure that the safety of personnel is a key consideration when considering physical and environmental security. To ensure this safety requires an understanding of common issues that could negatively impact personnel's safety, such as fire, smoke, flood, and toxins, with particular emphasis on smoke and fire detection and suppression. Physical security is the other main focus of this chapter and attention is given to physical access control matters including fences, gates, lights, cameras, locks, mantraps, and guards.}, +author = {Conrad, Eric and Misenar, Seth and Feldman, Joshua}, +booktitle = {CISSP Study Guide}, +doi = {10.1016/b978-0-12-802437-9.00004-7}, +month = {jan}, +pages = {103--217}, +publisher = {Elsevier}, +title = {{Domain 3: Security Engineering (Engineering and Management of Security)}}, +year = {2016} +} +@article{correia2019byzantine, +author = {Correia, Miguel}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Correia - 2019 - From Byzantine Consensus to Blockchain Consensus(2).pdf:pdf}, +journal = {Essentials of Blockchain Technology}, +keywords = {INCLUDED{\_}AFTER,Support}, +mendeley-tags = {INCLUDED{\_}AFTER,Support}, +pages = {41}, +title = {{From Byzantine Consensus to Blockchain Consensus}}, +year = {2019} +} +@inproceedings{wang2005, +abstract = {MD5 is one of the most widely used cryptographic hash functions nowadays. It was designed in 1992 as an improvement of MD4, and its security was widely studied since then by several authors. The best known result so far was a semi free-start collision, in which the initial value of the hash function is replaced by a non-standard value, which is the result of the attack. In this paper we present a new powerful attack on MD5 which allows us to find collisions efficiently. We used this attack to find collisions of MD5 in about 15 minutes up to an hour computation time. The attack is a differential attack, which unlike most differential attacks, does not use the exclusive-or as a measure of difference, but instead uses modular integer subtraction as the measure. We call this kind of differential a modular differential. An application of this attack to MD4 can find a collision in less than a fraction of a second. This attack is also applicable to other hash functions, such as RIPEMD and HAVAL. {\textcopyright} International Association for Cryptologic Research 2005.}, +author = {Wang, Xiaoyun and Yu, Hongbo}, +booktitle = {Lecture Notes in Computer Science}, +doi = {10.1007/11426639_2}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Wang, Yu - 2005 - How to break MD5 and other hash functions.pdf:pdf}, +issn = {03029743}, +pages = {19--35}, +publisher = {Springer Verlag}, +title = {{How to break MD5 and other hash functions}}, +url = {https://link.springer.com/chapter/10.1007/11426639{\_}2}, +volume = {3494}, +year = {2005} +} +@inproceedings{fabric, +abstract = {Fabric is a modular and extensible open-source system for deploying and operating permissioned blockchains and one of the Hyperledger projects hosted by the Linux Foundation (www.hyperledger.org). Fabric is the first truly extensible blockchain system for running distributed applications. It supports modular consensus protocols, which allows the system to be tailored to particular use cases and trust models. Fabric is also the first blockchain system that runs distributed applications written in standard, general-purpose programming languages, without systemic dependency on a native cryptocurrency. This stands in sharp contrast to existing blockchain platforms that require “smart-contracts” to be written in domain-specific languages or rely on a cryptocurrency. Fabric realizes the permissioned model using a portable notion of membership, which may be integrated with industry-standard identity management. To support such flexibility, Fabric introduces an entirely novel blockchain design and revamps the way blockchains cope with non-determinism, resource exhaustion, and performance attacks. This paper describes Fabric, its architecture, the rationale behind various design decisions, its most prominent implementation aspects, as well as its distributed application programming model. We further evaluate Fabric by implementing and benchmarking a Bitcoin-inspired digital currency. We show that Fabric achieves end-to-end throughput of more than 3500 transactions per second in certain popular deployment configurations, with sub-second latency, scaling well to over 100 peers.}, +address = {New York, New York, USA}, +author = {Androulaki, Elli and Barger, Artem and Bortnikov, Vita and Muralidharan, Srinivasan and Cachin, Christian and Christidis, Konstantinos and {De Caro}, Angelo and Enyeart, David and Murthy, Chet and Ferris, Christopher and Laventman, Gennady and Manevich, Yacov and Nguyen, Binh and Sethi, Manish and Singh, Gari and Smith, Keith and Sorniotti, Alessandro and Stathakopoulou, Chrysoula and Vukoli{\'{c}}, Marko and Cocco, Sharon Weed and Yellick, Jason}, +booktitle = {Proceedings of the 13th EuroSys Conference, EuroSys 2018}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Androulaki et al. - 2018 - Hyperledger Fabric A Distributed Operating System for Permissioned Blockchains(2).pdf:pdf}, +keywords = {Support}, +mendeley-tags = {Support}, +month = {apr}, +pages = {1--15}, +publisher = {Association for Computing Machinery, Inc}, +title = {{Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains}}, +year = {2018} +} +@inproceedings{raft_paper, +abstract = {Raft is a consensus algorithm for managing a replicated log. It produces a result equivalent to (multi-)Paxos, and it is as efficient as Paxos, but its structure is different from Paxos; this makes Raft more understandable than Paxos and also provides a better foundation for building practical systems. In order to enhance understandabil-ity, Raft separates the key elements of consensus, such as leader election, log replication, and safety, and it enforces a stronger degree of coherency to reduce the number of states that must be considered. Results from a user study demonstrate that Raft is easier for students to learn than Paxos. Raft also includes a new mechanism for changing the cluster membership, which uses overlapping majorities to guarantee safety.}, +author = {Ongaro, Diego and Ousterhout, John}, +booktitle = {USENIX Annual Technical Conference}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Ongaro, Ousterhout - Unknown - In Search of an Understandable Consensus Algorithm (Extended Version).pdf:pdf}, +title = {{In Search of an Understandable Consensus Algorithm}}, +year = {2014} +} +@misc{sdist2017, +author = {Lisboa, T{\'{e}}cnico}, +title = {{Initial Page {\textperiodcentered} Distributed Systems}}, +url = {https://fenix.tecnico.ulisboa.pt/disciplinas/SDis12645111326/2016-2017/2-semestre}, +urldate = {2020-06-20}, +year = {2017} +} +@phdthesis{belchior2019_thesis, +abstract = {The auditability of information systems plays an important role in public administration. Information system accesses to resources are saved in log files so auditors can later inspect them. However, there are two problems with managing conventional audit logs: i) audit logs are vulnerable to attacks where adversaries can tamper data, without being detected and ii) there can be distinct stakeholders with different roles and different levels of trust with different access rights to data. This scenario happens in the Portuguese judicial system, where stakeholders utilize an information system managed by a third-party. This document proposes using blockchain technology to make the storage of access logs more resilient while supporting such a multi-stakeholder scenario, in which different entities have different access rights to data. Towards that, we implemented this proposal in the Portuguese judicial system through JusticeChain. JusticeChain is divided into the blockchain components and blockchain client components. The blockchain components, implemented with Hyperledger Fabric, grant log integrity and improve its resiliency. The blockchain client component, JusticeChain Client, is responsible for saving logs on behalf of an information system and comprises the JusticeChain Log Manager and JusticeChain Audit Manager. The latter allows audits mediated by the blockchain. The evaluation results show that the system can obtain a throughput of 37 transactions per second, and latency lower than 1 minute. The required storage for each peer, for a year, is in the order of terabytes. As an extension of JusticeChain, which achieves even more trust distribution, we present a blockchain-based access control system, JusticeChain v2. JusticeChain v2 allows distributing the authorization process while providing the same advantages as JusticeChain. Our evaluation shows that our system can handle around 250 access control requests per second, with a latency lower than 12 seconds. The storage required is approximately the same as JusticeChain.}, +author = {Belchior, Rafael}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Belchior - 2019 - JusticeChain Using Blockchain To Protect Justice Data.pdf:pdf;:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Belchior - 2019 - JusticeChain Using Blockchain To Protect Justice Data(2).pdf:pdf}, +school = {Instituto Superior T{\'{e}}cnico}, +title = {{JusticeChain: Using Blockchain To Protect Justice Data}}, +url = {https://fenix.tecnico.ulisboa.pt/cursos/meic-a/dissertacao/846778572212223}, +year = {2019} +} +@article{Kreps, +author = {Kreps, Jay and Kreps, Jay and Corp, Linkedin and Narkhede, Neha and Rao, Jun and Corp, Linkedin}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Kreps et al. - Unknown - Kafka a distributed messaging system for log processing. NetDB'11.pdf:pdf}, +title = {{Kafka: a distributed messaging system for log processing. NetDB'11}}, +url = {https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.233.1726} +} +@misc{, +title = {{Leader Election and Log Replication in Raft – Part 1 – Loonytek – Delving into Tech}}, +url = {https://loonytek.com/2015/10/18/leader-election-and-log-replication-in-raft-part-1/}, +urldate = {2020-06-22} +} +@techreport{ecdsa2, +author = {Kak, Avi}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Kak - 2020 - Lecture 14 Elliptic Curve Cryptography and Digital Rights Management Lecture Notes on Computer and Network Security.pdf:pdf}, +title = {{Lecture 14: Elliptic Curve Cryptography and Digital Rights Management Lecture Notes on "Computer and Network Security"}}, +year = {2020} +} +@misc{quc, +title = {{QUC System | Qualidade das Unidades Curriculares • QUC}}, +url = {http://quc.tecnico.ulisboa.pt/en/o-sistema-quc/}, +urldate = {2020-08-06} +} +@misc{raft_viz, +author = {Johnson, Ben}, +title = {{Raft - Understandable Distributed Consensus}}, +url = {http://thesecretlivesofdata.com/raft/}, +urldate = {2020-06-21}, +year = {2013} +} +@misc{raft_homepage, +author = {RAFT}, +title = {{Raft Consensus Algorithm}}, +url = {https://raft.github.io/}, +urldate = {2020-06-21}, +year = {2016} +} +@article{raft_paper_apps, +abstract = {Raft consensus algorithm is one of the commonly used consensus algorithms in distributed systems. It is mainly used to manage the consistency of log replication. It has the same function as Paxos, but compared to Paxos, Raft algorithm is easier to understand and easier to apply to actual systems. The Raft algorithm is a consensus algorithm adopted by the alliance chain. This article describes the details of Raft consensus algorithm and its application in detail.}, +author = {Hu, Junjie and Liu, Ke}, +doi = {10.1088/1742-6596/1544/1/012079}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Hu, Liu - 2020 - Raft consensus mechanism and the applications.pdf:pdf}, +journal = {Journal of Physics: Conference Series}, +keywords = {affordable,fast,flexible,open access,proceedings,template}, +pages = {12079}, +publisher = {IOP Publishing}, +title = {{Raft consensus mechanism and the applications}}, +volume = {1544}, +year = {2020} +} +@misc{, +title = {replicated-state-machines-l.jpg (1024×768)}, +url = {https://image3.slideserve.com/5547558/replicated-state-machines-l.jpg}, +urldate = {2020-06-21} +} +@techreport{byzantine_generals, +abstract = {Reliable computer systems must handle malfunctioning components that give conflicting information to different parts of the system. This situation can be expressed abstractly in terms of a group of generals of the Byzantine army camped with their troops around an enemy city. Communicating only by messenger, the generals must agree upon a common battle plan. However, one or more of them may be traitors who will try to confuse the others. The problem is to find an algorithm to ensure that the loyal generals will reach agreement. It is shown that, using only oral messages, this problem is solvable if and only if more than two-thirds of the generals are loyal; so a single traitor can confound two loyal generals. With unforgeable written messages, the problem is solvable for any number of generals and possible traitors. Applications of the solutions to reliable computer systems are then discussed.}, +author = {Lamport, Leslie and Shostak, Robert and Pease, Marshall}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Lamport, Shostak, Pease - 1982 - The Byzantine Generals Problem.pdf:pdf}, +keywords = {C24 [Computer-Communication Networks]: Distributed,D44 [Operating Systems]: Communications Management,D45 [Operating Systems]: Reliability-fault toleran,Reliability Additional Key Words and Phrases: Inte}, +title = {{The Byzantine Generals Problem}}, +url = {https://people.eecs.berkeley.edu/{~}luca/cs174/byzantine.pdf}, +year = {1982} +} +@inproceedings{belchior2019_audits, +author = {Belchior, Rafael and Vasconcelos, Andr{\'{e}} and Correia, Miguel}, +booktitle = {European Conference on Information Systems}, +file = {:C$\backslash$:/Users/rafae/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Belchior, Vasconcelos, Correia - 2020 - Towards Secure, Decentralized, and Automatic Audits with Blockchain(2).pdf:pdf}, +keywords = {Support}, +mendeley-tags = {Support}, +title = {{Towards Secure, Decentralized, and Automatic Audits with Blockchain}}, +year = {2020} +} +@misc{ecdsa1, +title = {{Understanding How ECDSA Protects Your Data. : 15 Steps - Instructables}}, +url = {https://www.instructables.com/id/Understanding-how-ECDSA-protects-your-data/}, +urldate = {2020-07-08} +}