Skip to content

Commit

Permalink
Deploy input-output-hk/jormungandr to github.com/input-output-hk/jorm…
Browse files Browse the repository at this point in the history
…ungandr.git:gh-pages
  • Loading branch information
traviscibot committed May 14, 2019
0 parents commit 3d0eb95
Show file tree
Hide file tree
Showing 43 changed files with 9,526 additions and 0 deletions.
Binary file added .architecture-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file makes sure that Github Pages doesn't process mdBook's output.
4 changes: 4 additions & 0 deletions FontAwesome/css/font-awesome.css

Large diffs are not rendered by default.

Binary file added FontAwesome/fonts/FontAwesome.ttf
Binary file not shown.
Binary file added FontAwesome/fonts/fontawesome-webfont.eot
Binary file not shown.
2,671 changes: 2,671 additions & 0 deletions FontAwesome/fonts/fontawesome-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FontAwesome/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file added FontAwesome/fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file added FontAwesome/fonts/fontawesome-webfont.woff2
Binary file not shown.
333 changes: 333 additions & 0 deletions advanced/01_the_genesis_block.html

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions advanced/02_starting_bft_blockchain.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Starting a bft blockchain - Jormungandr</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />

<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
<link rel="stylesheet" href="../css/chrome.css">
<link rel="stylesheet" href="../css/print.css" media="print">

<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">

<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">

<!-- Custom theme stylesheets -->



</head>
<body class="light">
<!-- Provide site root to javascript -->
<script type="text/javascript">
var path_to_root = "../";
var default_theme = "light";
</script>

<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');

if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}

if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>

<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
document.body.className = theme;
document.querySelector('html').className = theme + ' js';
</script>

<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>

<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<ol class="chapter"><li class="affix"><a href="../introduction.html">Introduction</a></li><li><a href="../quickstart/introduction.html"><strong aria-hidden="true">1.</strong> Quickstart</a></li><li><ol class="section"><li><a href="../quickstart/01_command_line.html"><strong aria-hidden="true">1.1.</strong> Command lines tools</a></li><li><a href="../quickstart/02_passive_node.html"><strong aria-hidden="true">1.2.</strong> Starting a passive node</a></li><li><a href="../quickstart/03_rest_api.html"><strong aria-hidden="true">1.3.</strong> REST API</a></li></ol></li><li><a href="../stake_pool/introduction.html"><strong aria-hidden="true">2.</strong> Starting a stake pool</a></li><li><a href="../jcli/introduction.html"><strong aria-hidden="true">3.</strong> jcli</a></li><li><ol class="section"><li><a href="../jcli/key.html"><strong aria-hidden="true">3.1.</strong> Cryptographic keys</a></li><li><a href="../jcli/address.html"><strong aria-hidden="true">3.2.</strong> Address</a></li><li><a href="../jcli/transaction.html"><strong aria-hidden="true">3.3.</strong> Transaction</a></li><li><a href="../jcli/certificate.html"><strong aria-hidden="true">3.4.</strong> Certificate</a></li><li><a href="../jcli/rest.html"><strong aria-hidden="true">3.5.</strong> REST</a></li></ol></li><li><a href="../advanced/introduction.html"><strong aria-hidden="true">4.</strong> Advanced</a></li><li><ol class="section"><li><a href="../advanced/01_the_genesis_block.html"><strong aria-hidden="true">4.1.</strong> Genesis block</a></li><li><a href="../advanced/02_starting_bft_blockchain.html" class="active"><strong aria-hidden="true">4.2.</strong> Starting a bft blockchain</a></li><li><a href="../advanced/03_starting_genesis_praos_blockchain.html"><strong aria-hidden="true">4.3.</strong> Starting a genesis blockchain</a></li></ol></li></ol>
</nav>

<div id="page-wrapper" class="page-wrapper">

<div class="page">

<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>

<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>

</div>

<h1 class="menu-title">Jormungandr</h1>

<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>

</div>
</div>
</div>


<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>


<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>

<div id="content" class="content">
<main>
<a class="header" href="#starting-a-bft-node" id="starting-a-bft-node"><h1>starting a bft node</h1></a>
<p>BFT stands for the Byzantine Fault Tolerant
(<a href="https://iohk.io/research/papers/#L5IHCV53">read the paper</a>).</p>
<p>Jormungandr allows you to start a BFT blockchain fairly easily. The main
downside is that it is centralized, only a handful of nodes will ever have
the right to create blocks.</p>
<a class="header" href="#how-does-it-work" id="how-does-it-work"><h2>How does it work</h2></a>
<p>It is fairly simple. A given number of Nodes (<code>N</code>) will generate
a key pairs of type <code>Ed25519Extended</code> (see
<a href="./../jcli/key.html">JCLI's Keys</a>).</p>
<p>They all share the public key and add them in the genesis.yaml file.
It is the source of truth, the file that will generate the first block
of the blockchain: the <strong>Block 0</strong>.</p>
<p>Then, ony by one after the other, each Node will be allowed to create a block.
Utilising a Round Robin algorithm.</p>
<a class="header" href="#example-of-genesis-file" id="example-of-genesis-file"><h2>Example of genesis file</h2></a>
<pre><code class="language-yaml">blockchain_configuration:
block0_date: 1550822014
discrimination: test
block0_consensus: bft
slots_per_epoch: 5
slot_duration: 15
epoch_stability_depth: 10
consensus_genesis_praos_active_slot_coeff: 0.22
consensus_leader_ids:
- ed25519e_pk1k3wjgdcdcn23k6dwr0cyh88ad7a4ayenyxaherfazwy363pyy8wqppn7j3
- ed25519e_pk13talprd9grgaqzs42mkm0x2xek5wf9mdf0eefdy8a6dk5grka2gstrp3en
allow_account_creation: true
linear_fees:
constant: 0
coefficient: 0
certificate: 0
block_version: 1
initial_funds:
- address: ta1svy0mwwm7mdwcuj308aapjw6ra4c3e6cygd0f333nvtjzxg8ahdvxlswdf0
value: 10000
</code></pre>
<p>In order to start your blockchain in BFT mode you need to be sure that:</p>
<ul>
<li><code>block_version</code> is set to <code>1</code>;</li>
<li><code>bft_leaders</code> is non empty;</li>
</ul>
<p>more information regarding the <a href="./01_the_genesis_block.html">genesis file here</a>.</p>
<a class="header" href="#creating-the-block-0" id="creating-the-block-0"><h2>Creating the block 0</h2></a>
<pre><code>jcli genesis encode --input genesis.yaml --output block-0.bin
</code></pre>
<p>This command will create (or replace) the <strong>Block 0</strong> of the blockchain
from the given genesis configuration file (<code>genesis.yaml</code>).</p>
<a class="header" href="#starting-the-node" id="starting-the-node"><h2>Starting the node</h2></a>
<p>Now that the blockchain is initialized, you need to start your node.</p>
<p>Write you private key in a file on your HD:</p>
<pre><code>$ cat node_secret.yaml
bft:
signing_key: ed25519e_sk1hpvne...
</code></pre>
<p>Configure your Node (config.yml) and run the following command:</p>
<pre><code>$ jormungandr --genesis-block block-0.bin \
--config example.config \
--secret node_secret.yaml
</code></pre>

</main>

<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->

<a rel="prev" href="../advanced/01_the_genesis_block.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>



<a rel="next" href="../advanced/03_starting_genesis_praos_blockchain.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>


<div style="clear: both"></div>
</nav>
</div>
</div>

<nav class="nav-wide-wrapper" aria-label="Page navigation">

<a href="../advanced/01_the_genesis_block.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>



<a href="../advanced/03_starting_genesis_praos_blockchain.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>

</nav>

</div>








<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>


<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>

<!-- Custom JS scripts -->




</body>
</html>
Loading

0 comments on commit 3d0eb95

Please sign in to comment.