forked from hyperledger-iroha/iroha-dco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hyperledger-iroha#501 from hyperledger/develop
Merge v0.95 preview codebase
- Loading branch information
Showing
344 changed files
with
16,266 additions
and
4,295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,10 @@ | |
| Hiroshi Sasagawa | SasagawaHiroshi | [email protected] | | ||
| Takumi Yamashita | satelliteyes | [email protected] | | ||
| Bogdan Vaneev | Warchant | [email protected] | | ||
| Fyodor Muratov | muratovv | [email protected] | | ||
| Andrei Lebedev | lebron | [email protected] | | ||
| Bulat Nasrulin | lebron | [email protected] | | ||
| Kamil Salakhiev | kamilsa | [email protected] | | ||
| Konstantin Munichev | luckychess | [email protected] | | ||
| Evgenii Mininbaev | l4l | [email protected] | | ||
| Nikolay Yushkevich | neewy | [email protected] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,87 @@ | ||
# いろは(iroha) | ||
[![Join the chat at https://gitter.im/hyperledger-iroha/Lobby](https://badges.gitter.im/hyperledger-iroha/Lobby.svg)](https://gitter.im/hyperledger-iroha/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
# What is Hyperledger Iroha? | ||
|
||
[![CircleCI](https://circleci.com/gh/hyperledger/iroha/tree/master.svg?style=svg)](https://circleci.com/gh/hyperledger/iroha/tree/master) | ||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/960/badge)](https://bestpractices.coreinfrastructure.org/projects/960) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4d8edb74d4954c76a4656a9e109dbc4e)](https://www.codacy.com/app/neewy/iroha?utm_source=github.com&utm_medium=referral&utm_content=hyperledger/iroha&utm_campaign=Badge_Grade) | ||
[![CircleCI](https://circleci.com/gh/hyperledger/iroha/tree/master.svg?style=svg)](https://circleci.com/gh/hyperledger/iroha/tree/master) | ||
|
||
Blockchain platform Hyperledger Iroha is designed for simple creation and management of assets. This is a distributed ledger of transactions. | ||
|
||
<img height="300px" src="docs/Iroha_3_sm.png" | ||
alt="Iroha logo" title="Iroha" align="right" /> | ||
|
||
Iroha has the following features: | ||
1. Creation and management of custom complex assets, such as currencies or indivisible rights, serial numbers, patents, etc. | ||
2. Management of user accounts | ||
3. Taxonomy of accounts based on _domains_ — or _sub-ledgers_ in the system | ||
4. The system of rights and verification of user permissions for the execution of transactions and queries in the system | ||
5. Validation of business rules for transactions and queries in the system | ||
|
||
Among the non-functional requirements can be noted a high degree of network fault tolerance _(Byzantine Fault Tolerant)_. | ||
|
||
## Current Status | ||
|
||
Iroha v0.95 preview version is released on [TBD]. | ||
|
||
## Iroha repository 101 | ||
|
||
Iroha runs as a daemon _(irohad)_, representing a single peer in the Iroha network. For each peer, there is the following package structure, corresponding to components in the system: | ||
|
||
* *Torii* (⛩, gate) is a package that contains classes, which are in charge of interaction with users (clients) | ||
* *Network* encompasses interaction with the network of peers | ||
* *Validation* classes check business rules and validity (correct format) of transactions or queries | ||
* *Synchronizer* helps to synchronize new peers in the system or temporarily disconnected peers | ||
* *Simulator* generates a temporary snapshot of storage to validate transactions | ||
* *Ametsuchi* is the ledger block storage | ||
* *Model* classes are system entities, and converters for them | ||
|
||
<br> | ||
|
||
For other components and more explanations, please take a look at the *technical and design docs.* | ||
|
||
## Quickstart | ||
|
||
### Docker | ||
|
||
You may use the docker ennvironment to build and run the system, by executing the following: | ||
|
||
``` | ||
git clone https://github.com/hyperledger/iroha.git | ||
sh iroha/docker/run-ametsuchi-dev.sh | ||
``` | ||
|
||
After that, the container will run in interactive mode. So, you can run any IDE or editor on your local environment, while building the system in docker environment | ||
|
||
### Build | ||
|
||
To build the system, execute the the following: | ||
|
||
Please see the [**wiki**](https://github.com/hyperledger/iroha/wiki) for information about developing for Iroha and explanation of our algorithms. | ||
``` | ||
cmake -H. -Bbuild; cmake --build build -- -j4; | ||
``` | ||
|
||
いろは (Iroha) is a simple, distributed ledger. | ||
Consider executing ``` git clean -ix``` and choosing the `c` option when you want to rebuild the system (to clean up generated protobuf code). | ||
Also, use the `--clean-first` flag for rebuild. | ||
|
||
![alt tag](docs/Iroha_3_sm.png) | ||
### Test | ||
|
||
# Current Status | ||
`[TBD]`. | ||
|
||
Currently Hyperledger Iroha is in development, with an estimate v0.95 beta release in mid July. The current version is undergoing significant changes and it is likely there will be problems with use! Please use the *develop* branch. If you have any issues or questions, please [open an issue](https://github.com/hyperledger/iroha/issues). | ||
## Find out more | ||
|
||
# Pull Requests | ||
Please include a developer certificate with pull requests: https://www.clahub.com/agreements/hyperledger/iroha | ||
| Technical docs | Guides | Contributing | | ||
|---|---|---| | ||
|[![Technical docs](docs/icons/docs.png)](http://google.com/)| [![How-to](docs/icons/how-to.png)](http://google.com/) |[![Contributing](docs/icons/contributing.png)](https://github.com/hyperledger/iroha/wiki/How-to-contribute)| | ||
|
||
# Documentation | ||
- [Architecture](./docs/architecture.md) | ||
- [Build iroha in local environment](./docs/how_to_build.rst) | ||
- [Using docker to build iroha container](./docker/README.md) | ||
- [Deploying a network of N nodes](./docs/iroha_network.md) | ||
## Need help? | ||
|
||
# Authors | ||
* Join [HyperLedger RocketChat](https://chat.hyperledger.org) #iroha channel to discuss your concerns and proposals | ||
* Use mailing list to spread your word within Iroha development community [[email protected]](mailto:[email protected]) | ||
* Submit issues via GitHub Iroha repository | ||
* Communicate in Gitter chat with our development community [![Join the chat at https://gitter.im/hyperledger-iroha/Lobby](https://badges.gitter.im/hyperledger-iroha/Lobby.svg)](https://gitter.im/hyperledger-iroha/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
[MakotoTakemiya](https://github.com/takemiyamakoto) | ||
[MizukiSonoko](https://github.com/MizukiSonoko) | ||
|
||
# License | ||
## License | ||
|
||
Copyright 2016, 2017 Soramitsu Co., Ltd. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
# Copyright (c) 2017 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# | ||
# | ||
# | ||
|
||
# | ||
# Usage: | ||
# include(TBBBuild.cmake) | ||
# tbb_build(ROOT <tbb_root> MAKE_ARGS <arg1> [... <argN>]) | ||
# find_package(TBB <options>) | ||
# | ||
|
||
include(CMakeParseArguments) | ||
|
||
# Save the location of Intel TBB CMake modules here, as it will not be possible to do inside functions, | ||
# see for details: https://cmake.org/cmake/help/latest/variable/CMAKE_CURRENT_LIST_DIR.html | ||
set(_tbb_cmake_module_path ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
## | ||
# Builds Intel TBB. | ||
# | ||
# Parameters: | ||
# TBB_ROOT <directory> - path to Intel TBB root directory (with sources); | ||
# MAKE_ARGS <list> - user-defined arguments to be passed to make-tool; | ||
# CONFIG_DIR <variable> - store location of the created TBBConfig if the build was ok, store <variable>-NOTFOUND otherwise. | ||
# | ||
function(tbb_build) | ||
# NOTE: internal function are used to hide them from user. | ||
|
||
## | ||
# Provides arguments for make-command to build Intel TBB. | ||
# | ||
# Following arguments are provided automatically if they are not defined by user: | ||
# compiler=<value> | ||
# tbb_build_dir=<value> | ||
# tbb_build_prefix=<value> | ||
# -j<n> | ||
# | ||
# Parameters: | ||
# USER_DEFINED_ARGS <list> - list of user-defined arguments; | ||
# RESULT <variable> - resulting list of 'make' arguments. | ||
# | ||
function(tbb_get_make_args) | ||
set(oneValueArgs RESULT) | ||
set(multiValueArgs USER_DEFINED_ARGS) | ||
cmake_parse_arguments(tbb_GMA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
||
set(result ${tbb_GMA_USER_DEFINED_ARGS}) | ||
|
||
if (NOT tbb_GMA_USER_DEFINED_ARGS MATCHES "compiler=") | ||
# TODO: add other supported compilers. | ||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
set(compiler gcc) | ||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") | ||
set(compiler icc) | ||
if (CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
set(compiler icl) | ||
endif() | ||
elseif (MSVC) | ||
set(compiler cl) | ||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
set(compiler clang) | ||
endif() | ||
|
||
set(result "compiler=${compiler}" ${result}) | ||
endif() | ||
|
||
if (NOT tbb_GMA_USER_DEFINED_ARGS MATCHES "tbb_build_dir=") | ||
set(result "tbb_build_dir=${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build" ${result}) | ||
endif() | ||
|
||
if (NOT tbb_GMA_USER_DEFINED_ARGS MATCHES "tbb_build_prefix=") | ||
set(result "tbb_build_prefix=tbb_cmake_build_subdir" ${result}) | ||
endif() | ||
|
||
if (NOT tbb_GMA_USER_DEFINED_ARGS MATCHES "(;|^) *\\-j[0-9]* *(;|$)") | ||
include(ProcessorCount) | ||
ProcessorCount(num_of_cores) | ||
if (NOT num_of_cores EQUAL 0) | ||
set(result "-j${num_of_cores}" ${result}) | ||
endif() | ||
endif() | ||
|
||
if (CMAKE_SYSTEM_NAME MATCHES "Android") | ||
set(result target=android ${result}) | ||
endif() | ||
|
||
set(${tbb_GMA_RESULT} ${result} PARENT_SCOPE) | ||
endfunction() | ||
|
||
## | ||
# Provides release and debug directories basing on 'make' arguments. | ||
# | ||
# Following 'make' arguments are parsed: tbb_build_dir, tbb_build_prefix | ||
# | ||
# Parameters: | ||
# MAKE_ARGS <list> - 'make' arguments (tbb_build_dir and tbb_build_prefix are required) | ||
# RELEASE_DIR <variable> - store normalized (CMake) path to release directory | ||
# DEBUG_DIR <variable> - store normalized (CMake) path to debug directory | ||
# | ||
function(tbb_get_build_paths_from_make_args) | ||
set(oneValueArgs RELEASE_DIR DEBUG_DIR) | ||
set(multiValueArgs MAKE_ARGS) | ||
cmake_parse_arguments(tbb_GBPFMA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
||
foreach(arg ${tbb_GBPFMA_MAKE_ARGS}) | ||
if (arg MATCHES "tbb_build_dir=") | ||
string(REPLACE "tbb_build_dir=" "" tbb_build_dir "${arg}") | ||
elseif (arg MATCHES "tbb_build_prefix=") | ||
string(REPLACE "tbb_build_prefix=" "" tbb_build_prefix "${arg}") | ||
endif() | ||
endforeach() | ||
|
||
set(tbb_release_dir "${tbb_build_dir}/${tbb_build_prefix}_release") | ||
set(tbb_debug_dir "${tbb_build_dir}/${tbb_build_prefix}_debug") | ||
|
||
file(TO_CMAKE_PATH "${tbb_release_dir}" tbb_release_dir) | ||
file(TO_CMAKE_PATH "${tbb_debug_dir}" tbb_debug_dir) | ||
|
||
set(${tbb_GBPFMA_RELEASE_DIR} ${tbb_release_dir} PARENT_SCOPE) | ||
set(${tbb_GBPFMA_DEBUG_DIR} ${tbb_debug_dir} PARENT_SCOPE) | ||
endfunction() | ||
|
||
# -------------------- # | ||
# Function entry point # | ||
# -------------------- # | ||
set(oneValueArgs TBB_ROOT CONFIG_DIR) | ||
set(multiValueArgs MAKE_ARGS) | ||
cmake_parse_arguments(tbb_build "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
||
if (NOT EXISTS "${tbb_build_TBB_ROOT}/Makefile" OR NOT EXISTS "${tbb_build_TBB_ROOT}/src") | ||
message(STATUS "Intel TBB can not be built: Makefile or src directory was not found in ${tbb_build_TBB_ROOT}") | ||
set(${tbb_build_CONFIG_DIR} ${tbb_build_CONFIG_DIR}-NOTFOUND PARENT_SCOPE) | ||
return() | ||
endif() | ||
|
||
set(make_tool_name make) | ||
if (CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
set(make_tool_name gmake) | ||
elseif (CMAKE_SYSTEM_NAME MATCHES "Android") | ||
set(make_tool_name ndk-build) | ||
endif() | ||
|
||
find_program(TBB_MAKE_TOOL ${make_tool_name} DOC "Make-tool to build Intel TBB.") | ||
mark_as_advanced(TBB_MAKE_TOOL) | ||
|
||
if (NOT TBB_MAKE_TOOL) | ||
message(STATUS "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found") | ||
set(${tbb_build_CONFIG_DIR} ${tbb_build_CONFIG_DIR}-NOTFOUND PARENT_SCOPE) | ||
return() | ||
endif() | ||
|
||
tbb_get_make_args(USER_DEFINED_ARGS ${tbb_build_MAKE_ARGS} RESULT tbb_make_args) | ||
|
||
set(tbb_build_cmd ${TBB_MAKE_TOOL} ${tbb_make_args}) | ||
|
||
string(REPLACE ";" " " tbb_build_cmd_str "${tbb_build_cmd}") | ||
message(STATUS "Building Intel TBB: ${tbb_build_cmd_str}") | ||
execute_process(COMMAND ${tbb_build_cmd} | ||
WORKING_DIRECTORY ${tbb_build_TBB_ROOT} | ||
RESULT_VARIABLE tbb_build_result | ||
ERROR_VARIABLE tbb_build_error_output | ||
OUTPUT_QUIET) | ||
|
||
if (NOT tbb_build_result EQUAL 0) | ||
message(STATUS "Building is unsuccessful (${tbb_build_result}): ${tbb_build_error_output}") | ||
set(${tbb_build_CONFIG_DIR} ${tbb_build_CONFIG_DIR}-NOTFOUND PARENT_SCOPE) | ||
return() | ||
endif() | ||
|
||
tbb_get_build_paths_from_make_args(MAKE_ARGS ${tbb_make_args} | ||
RELEASE_DIR tbb_release_dir | ||
DEBUG_DIR tbb_debug_dir) | ||
|
||
include(${_tbb_cmake_module_path}/TBBMakeConfig.cmake) | ||
tbb_make_config(TBB_ROOT ${tbb_build_TBB_ROOT} | ||
SYSTEM_NAME ${CMAKE_SYSTEM_NAME} | ||
CONFIG_DIR tbb_config_dir | ||
CONFIG_FOR_SOURCE | ||
TBB_RELEASE_DIR ${tbb_release_dir} | ||
TBB_DEBUG_DIR ${tbb_debug_dir}) | ||
|
||
set(${tbb_build_CONFIG_DIR} ${tbb_config_dir} PARENT_SCOPE) | ||
endfunction() |
Oops, something went wrong.