Skip to content

Commit

Permalink
md converted to rst
Browse files Browse the repository at this point in the history
  • Loading branch information
spikeekips committed Sep 23, 2019
1 parent 698322f commit ab6b94a
Show file tree
Hide file tree
Showing 28 changed files with 508 additions and 371 deletions.
5 changes: 0 additions & 5 deletions .gitbook.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.sw?
.*.sw?
tmp
/_build
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
11 changes: 0 additions & 11 deletions README.md

This file was deleted.

13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
MITUM
============================================================

.. note::
This document still in heavy development.

Documentation is published on https://mitum.gitbook.io .


![MITUM](./images/mitum-logo-1000.png "MITUM")

:
`Inveniet viam aut faciet` `拔苗助長` `배고프다고 아무거나 먹으면, 식중독 걸린다`
32 changes: 0 additions & 32 deletions SUMMARY.md

This file was deleted.

19 changes: 19 additions & 0 deletions _static/common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.strike {
text-decoration: line-through;
}

th > p {
margin-bottom: 0;
}

.wy-table thead th, .rst-content table.docutils thead th, .rst-content table.field-list thead th {
border-bottom-width: 1px;
}

code, .rst-content tt, .rst-content code {
padding-right: 0;
padding-left: 0;
border: none;
font-size: 87%;
color: #5d9f00 !important;
}
4 changes: 4 additions & 0 deletions common.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

.. role:: strike
:class: strike

74 changes: 74 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'mitum'
copyright = '2019, Spike^ekipS'
author = 'Spike^ekipS'

# The full version, including alpha/beta/rc tags
release = 'proto2'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'tmp', '.swp']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_css_files = [
'common.css',
]

html_theme_options = {
'canonical_url': '',
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'style_nav_header_background': 'rgb(52, 49, 49)',
# Toc options
'collapse_navigation': False,
'sticky_navigation': False,
'navigation_depth': 10,
'includehidden': True,
'titles_only': False
}
12 changes: 0 additions & 12 deletions contribution.md

This file was deleted.

14 changes: 14 additions & 0 deletions docs/contribution.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
============================================================
Contribution
============================================================

mitum started as opensource project and it will be. Any kind of contribution will be welcome. At this time, mitum needs your help at this parts:

* Development
* Documentation
* Applications for mitum

When you have idea or proposal for mitum, please submit `new issue at github <https://github.com/spikeekips/mitum/issues>`_ or email to `spikeekips@gmail.com <mailto:spikeekips@gmail.com>`_.

This document is managed at `github <https://github.com/spikeekips/mitum-doc>`_. Please feel free to submit your PR.

74 changes: 74 additions & 0 deletions docs/how-mitum-works.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
============================================================
How mitum Works
============================================================

.. include: common.rst
TL;DR
============================================================

As described in the section, "[Introduction](/)", the mitum network consists of the multiple consensus nodes.

.. seealso::

Standalone mode
For development or research purpose, you can compose the network with only one node. In standalone mode, every operation will be same, even with the consensus process.

As mitum is blockchain, basically mitum network tries to store the incoming data by trusted way. This is simple process for new data.

1. New message is received by one of nodes in the network
2. New message contains the user data
3. Message and it's data are validated by the nodes
4. Each node tries to get the agreement for the new message and it's data
5. If nodes get agreement to store new data, the new data will be established in the next block

The important things in the process are,

* The agreement will be done by the consensus protocol, ISAAC+, and the agreement is made by voting with consensus nodes
* All the incoming message is validated by consensus nodes
* Only agreed data is established(stored) in the block

This is the normal process of PBFT-based blockchain. mitum follows the classic scenario of PBFT.

Uncompressed Version
============================================================

For detailed explanation, we can assume the simple situation,

* 10 nodes: ``m0``, ``m1``, ``m2``, ``m3``, ``m4``, ``m5``, ``m6``, ``m7``, ``m8``, ``m9``
* suffrage group members: all node
* number of acting suffrage group members: 4 nodes
* Each node can reach others.
* Each node does not share the storage and network with others.
* Nodes, ``m0``, ... , ``m8`` are already working and ``m9`` is just booted.

This example situation will be applied throughout this document.

.. seealso::
4 nodes is the minimum number of consensus nodes. The detailed mitum network will be described in the section, ":doc:`network/designing-network`".

.. seealso::
:strike:`The detailed information about the bootstrapping mitum, will be described in the section, ""`

.. seealso::
About the consensus process, the section, ":doc:`isaac+/isaac+-introduction`".


``m9`` is booted
------------------------------------------------------------

* After ``m9`` are booted, each node will check it's current block state and environment to join the network. At this time, node also tries to check the global network consensus state, which block height and round are proceeded currently.
* When everything is OK for joining consensus, ``m9`` joins consensus.
* The next consensus voting is for the next block, which has the height, ``H33`` and it's round is ``R0``.

New data message received
------------------------------------------------------------

* ``m9`` got the new data message, ``B1``. It has the data, ``D1``.
* ``m9`` tries to broadcast ``B1`` to the other consensus nodes.
* The network selects ``m1`` as the new proposer for the next block(``H33`` and ``R0``)
* ``m1`` will propose the new proposal, ``P1`` with ``B1``.
* All the consensus nodes tries to establish ``P1`` for the next block.
* To establish ``m1``'s ``P1``, the majority should be reached for 2 steps.
* When each node receives the new proposal, ``P1`` from the legitimated proposer, it estimates ``P1`` and vote on ``P1``.
* After ``P1`` is passed thru *SIGN* and *ACCEPT* voting stage, ``P1`` will be established in the next block(``H33``, ``R0``)
File renamed without changes
37 changes: 37 additions & 0 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
============================================================
Introduction
============================================================

mitum is a general privacy blockchain with flexible and resilient way. Mitum can be used for various kind of purposes, public and private blockchain like cryptocurrency network, data-centric blockchain for arbitrary data, or secure anonymity voting system, etc.

Basically mitum can provides these main features.

* **SECURITY**: All the in-coming and out-coming messages is signed, so there will be no chance some damaged or malicious messages to be infiltrated.

* **DESIGNING NETWORK**: mitum network is designed at bootstrap with various policies, network own data types and it's native features. These designed factors can be updated without downtime or termination of node and the entire network.

* **APPLIANCE**: Data in mitum can be defined and designed. Any arbitrary type of data can be supported in mitum. Inside mitum there is a plugin system, so new type of data can be added thru plugin. If you want to launch cryptocurrency network, you can design currency model, define your own currency unit and even inflation rate, etc.

* **CONSENSUS**: mitum guarantees finality. Once the block and it's data are established, it will not be changed or revoked.

* **CONSENSUS**: mitum verifies and establishes data by the consensus protocol. We created the consensus protocol, called ISAAC+, which is newly devised and based on the manner of PBFT. ISAAC+ focuses on finality of block. It guarantees liveness, security and limited fault tolerance. ISAAC+ can be extended for the open and public environment, so new nodes can join the network without the external allowance.

* **CONSENSUS**: ISAAC+ works like well-hardened axe, it is hard to break and resilient from external impact. When some of nodes are not intact, it tries to continue agreement. When some blocks are lost in nodes, these data are restored without breaking consensus, the missed consensus messages also be delivered to the edge of network.

* **CONSENSUS**: Due to ISAAC+, mitum can process huge amount of messages, like currency transactions, consensus ballots, or any kind of messages for agreement.

* **DATA PRIVACY**: For privacy of user, mitum supports untraceable account. Basically thanks to the consensus process, accounts can be easily traced by anyone, who did fund it, who sent to it, whom it sent, and it's related data too. But unlike zcash, or hyperledge, mitum tries to support the privacy by transparent account. Transparent account be created by the legitimate account, but hides which source account makes it. It breaks the link from the originated source account.

* **DATA**: All the data is stored by hierarchical tree structure(AVL tree). It makes to store and search data efficiently.

* **DATA**: mitum does only rely on the data in the established data in block. The volatile data in node will not be used for consensus process and most of important data will be saved in block, so it can be updated by agreement by consensus protocol.

* **NETWORK**: the basic networking protocol is UDP for consensus process . By the nature of UDP, there is no need to keep or check the connection between consensus nodes.

* **DATA**: mitum supports various kind of storage database: LevelDB, MongoDB, MySQL, PostgreSQL, etc. By the purpose and scale of mitum network, you can choose the best storage database.

* **MANAGEMENT**: For handling the expected or unexpected situation, mitum will provide the management console to the node operator. By this management console, node operator will control his/her node manually.

* **NETWORK VOTING**: All consensus node has the special right to vote for the important decision of network, e.g. allowance or exile of newbie consensus node, updating network policies, etc.

This document will introduce mitum and will describe the working mechanism of mitum.
22 changes: 12 additions & 10 deletions how-isaac+-works.md → docs/isaac+/how-isaac+-works.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# ISAAC+, Mechanism
============================================================
ISAAC+ Mechanism
============================================================

As described at the previous section, the consensus voting is processed thru voting stages, *INIT*, *SIGN* and *ACCEPT*. The node, which can participate in consensus process, set it's state to *Consensus* state. If node is under other state, it means node is not ready for participating consensus process.

## Voting and Round
Voting and Round
------------------------------------------------------------

In ISAAC+, node votes to make agreement with the others. How node can vote? The voting process is simple, just broadcasts Ballot to the entire network and gathers ballots from others.

Every node knows which nodes are in suffrage group and which nodes are in acting suffrage group at this stage and round. The member information does not need to be shared or synced, because it is managed and established at block like other data of block.

Voting occurs by round. For example,
Voting occurs by round. For example, latest block is ``H33``,

* latest block is `H33`
#. *INIT* : ``H34``, ``R0``
#. *SIGN* : ``H34``, ``R0``

1. *INIT*: `H34`, `R0`
2. *SIGN*: `H34`, `R0`
1. Failed to get agreement: *INIT*: `H34`, `R1`
3. *SIGN*: `H34`, `R1`
4. *ACCEPT*: `H34`, `R1`
5. new *INIT*: `H35`, `R0`
- Failed to get agreement: *INIT* : ``H34``, ``R1``
#. *SIGN* : ``H34``, ``R1``
#. *ACCEPT* : ``H34``, ``R1``
#. new *INIT* : ``H35``, ``R0``

Like the example, round is unique within new block voting.

0 comments on commit ab6b94a

Please sign in to comment.