Skip to content

Commit

Permalink
Merge pull request hyperledger-iroha#697 from hyperledger/develop
Browse files Browse the repository at this point in the history
- Hot join of peer to the network
- Mac builds are checked in CI
- Increased number of transaction responses
- Separation of transport layer in between ordering gate and ordering service
- Sonarqube bot checking technical debt of the codebase
- Improved initialisation pipeline
- Fix of synchronisation service
- Effective implementation of cryptography: validation of payload signatures, signatures of block made by peer
- Improved representation of asset amount — now supports uint256
- RBAC permission model, supporting grant command
- Integration test for transaction pipeline, wide usage of mocks
- Implementation of block index storage, based on Redis
- Pagination for queries, which return wide range of transaction (GetTransactionHistory, etc.)
- Improved implementation of Yet Another Consensus
- Provisioning of the system via Ansible Playbook
- Builds of Iroha delivered in .deb, .rpm, .tar.gz, and soon brew for macOS
- Fixed build for ARMv7, macOS platform
- Several improvements in iroha-cli (C++ command-line interface)
  • Loading branch information
Warchant authored Nov 23, 2017
2 parents ee0b4fc + 62946b7 commit 1965193
Show file tree
Hide file tree
Showing 550 changed files with 28,755 additions and 17,512 deletions.
521 changes: 370 additions & 151 deletions .circleci/config.yml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
BasedOnStyle: Google
NamespaceIndentation: All
BreakBeforeBinaryOperators: NonAssignment
AlignOperands: false
DerivePointerAlignment: false
PointerAlignment: Right
BinPackArguments: false
BinPackParameters: false
DerivePointerAlignment: false
PointerAlignment: Right
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
28 changes: 28 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
codecov:
branch: default
coverage:
range: 50...100
status:
patch:
default:
target: 50
project:
default:
target: auto
threshold: 0.05
cli:
target: auto
threshold: 0.05
paths: "iroha-cli/"
daemon:
target: auto
threshold: 0.05
paths: "irohad/"
tests:
target: auto
paths: "test/"
changes:
default:
enabled: no
comment:
layout: "reach, diff, flags, files, footer"
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ build/*
*.o
*.pb.cc
*.pb.h
*.retry
.gradle/*
.vscode/*
.idea/*
*xcworkspace*
*cmake-build-debug*
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles/*
cmake-build-debu/*
docker/build/iroha.tar
cmake-build-debug/*
Expand All @@ -25,3 +28,10 @@ core/infra/protobuf
docker/tiny/iroha/
include/generated/*
.scannerwork/
iroha.conf
peers.list
cmake-build*

cmake-build*
.gtm
/.gtm/
68 changes: 47 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,43 @@
cmake_minimum_required(VERSION 3.0)

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
message(STATUS "ccache enabled (${CCACHE_PROGRAM})")
endif()

PROJECT(iroha C CXX)

SET(CMAKE_CXX_FLAGS "-std=c++1y -Wall -fPIC")
SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
SET(CMAKE_CXX_FLAGS "-std=c++1y -Wall")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wextra -Wno-unused-parameter -O0")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wextra -Wno-unused-parameter -Wno-deprecated-declarations -O0")
SET(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
SET(CMAKE_INSTALL_RPATH "../lib")

SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
SET(GCC_COVERAGE_LINK_FLAGS "-lgcov")
if(COVERAGE)
set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
set(CMAKE_CXX_FLAGS "--coverage ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "--coverage ${CMAKE_C_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "--coverage ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "--coverage ${CMAKE_EXE_LINKER_FLAGS}")

set(REPORT_DIR ${CMAKE_BINARY_DIR}/reports)
file(MAKE_DIRECTORY ${REPORT_DIR})
include(cmake/analysis.cmake)
endif()

SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)

option(BENCHMARKING "Build benchmarks" OFF)
option(TESTING "Build tests" ON)
option(COVERAGE "Enable coverage" OFF)
option(FUZZING "Build fuzzing binaries" OFF)
option(BENCHMARKING "Build benchmarks" OFF)
option(TESTING "Build tests" ON )
option(COVERAGE "Enable coverage" OFF)
option(FUZZING "Build fuzzing binaries" OFF)
option(PACKAGE_ZIP "Create ZIP package" OFF)
option(PACKAGE_TGZ "Create TGZ package" OFF)
option(PACKAGE_RPM "Create RPM package" OFF)
option(PACKAGE_DEB "Create DEB package" OFF)
option(ENABLE_LIBS_PACKAGING "Enable libs packaging" ON)

if (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug)
Expand All @@ -24,43 +47,46 @@ message(STATUS "-DTESTING=${TESTING}")
message(STATUS "-DBENCHMARKING=${BENCHMARKING}")
message(STATUS "-DFUZZING=${FUZZING}")
message(STATUS "-DCOVERAGE=${COVERAGE}")
message(STATUS "-DPACKAGE_ZIP=${PACKAGE_ZIP}")
message(STATUS "-DPACKAGE_TGZ=${PACKAGE_TGZ}")
message(STATUS "-DPACKAGE_RPM=${PACKAGE_RPM}")
message(STATUS "-DPACKAGE_DEB=${PACKAGE_DEB}")
message(STATUS "-DENABLE_LIBS_PACKAGING=${ENABLE_LIBS_PACKAGING}")

SET(IROHA_SCHEMA_DIR "${PROJECT_SOURCE_DIR}/schema")
include_directories(
${PROJECT_SOURCE_DIR}/irohad
${PROJECT_SOURCE_DIR}/libs
${PROJECT_SOURCE_DIR}/libs/gsl/include
${IROHA_SCHEMA_DIR}
)

include(cmake/dependencies.cmake)
include(FeatureSummary)
include(cmake/functions.cmake)
include(cmake/dependencies.cmake)

if(NOT PACKAGE_TGZ OR NOT PACKAGE_ZIP OR NOT PACKAGE_RPM OR NOT PACKAGE_DEB)
include(cmake/release.cmake)
endif()

add_subdirectory(schema)
add_subdirectory(libs)
add_subdirectory(irohad)
add_subdirectory(iroha-cli)

link_directories(${PROJECT_BINARY_DIR}/lib)

if (COVERAGE)
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}" )
endif()

if(TESTING)
enable_testing()
add_subdirectory(test)
endif()


if(BENCHMARKING)
add_subdirectory(benchmark)
endif()

if (FUZZING)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_subdirectory(fuzz)
else()
message(Fuzzing with compilers other than clang does not supported yet)
endif()
endif()




43 changes: 35 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
# Contributing guidelines

## Project structure
To contribute, please follow this process:

Moved to wiki: https://github.com/hyperledger/iroha/wiki/Project-structure
## 1. Sign CLA agreement
Please sign it via GitHub credentials:
[Developer Certificate of Origin Version 1.1](https://cla-assistant.io/hyperledger/iroha)

## Developers guide
## 2. Read Iroha working agreement

Moved to wiki: https://github.com/hyperledger/iroha/wiki/Developers-guide
[Iroha working agreement](https://github.com/hyperledger/iroha/wiki/Iroha-working-agreement)

## Versioning policy
## 3. Talk to us
Before writing any code, please discuss your intention with us, so that we can help you with your solution. It can also help to reduce situations with duplicated effort.

Do anything that is more convenient to you:
* Join [Hyperledger RocketChat](https://chat.hyperledger.org/) #iroha channel
* Open new issue in GitHub or discuss existing issue
* Join telegram [Iroha chat](https://t.me/joinchat/AgzrTUCZ6efra09wz35oww)
* Use mailing list to discuss [email protected]
* Communicate in [Gitter chat](https://gitter.im/hyperledger-iroha/Lobby) with our development community

Releases are numbered according to the [Hyperledger standard release taxonomy](https://docs.google.com/document/d/1u9pt-bXeOXefYBB1uYE6M-D6CtmkC1lGCjmicSlZgVA/edit).
## 4. Check codestyle

## Branch policy
Take a look briefly at [CppCoreGuidelines](https://github.com/isocpp/CppCoreGuidelines) and use [clang-format](https://github.com/hyperledger/iroha/blob/master/.clang-format) to check your code style before creating pull request.

We use [GitHub flow](https://guides.github.com/introduction/flow/) with [squash-and-merge pull requests](https://help.github.com/articles/about-pull-request-merges/#squash-and-merge-your-pull-request-commits).
## 5. Get acquainted with design

As you are going to discuss your change in prior, we will help you to understand design of the system. Please, check architecture section to understand responsibilities of components and interfaces.

## 6. Test your code

Please, follow test policy for the code you write. New code should be covered by at least 80% (see coverage reports in pull requests).

## 7. Create pull request

Follow gitflow approach to create a branch for your code:
* feature/whatever-feature-you-implement, create a branch from develop
* fix/whatever-you-fix-in-develop
* hotfix/whatever-you-fix-in-master

Follow the flow in Iroha working agreement.

Thank you for your interest to Iroha project!
8 changes: 5 additions & 3 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
| Makoto Takemiya | takemiyamakoto | [email protected] |
| Ryu Okada | ryuo88 | [email protected] |
| Taisei Igarashi | MizukiSonoko | [email protected] |
| Motohiko Abe | motxx | [email protected] |
| Daisuke Shimada | cimadai | [email protected] |
| Sushant D. Mayekar | Sushantdm | [email protected] |
| Yanno Ban | yannoban | [email protected]
| 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] |
| Andrei Lebedev | lebdron | [email protected] |
| Bulat Nasrulin | grimadas | [email protected] |
| Kamil Salakhiev | kamilsa | [email protected] |
| Konstantin Munichev | luckychess | [email protected] |
| Evgenii Mininbaev | l4l | [email protected] |
| Nikolay Yushkevich | neewy | [email protected] |
| Nikolay Yushkevich | neewy | [email protected] |
34 changes: 6 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[![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)
[![codecov](https://codecov.io/gh/hyperledger/iroha/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/iroha)

[![Throughput Graph](https://graphs.waffle.io/hyperledger/iroha/throughput.svg)](https://waffle.io/hyperledger/iroha/metrics/throughput)

Blockchain platform Hyperledger Iroha is designed for simple creation and management of assets. This is a distributed ledger of transactions.

Expand All @@ -19,13 +22,6 @@ Iroha has the following features:

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 6 of August.
Please, get familiar with [preview notes](https://github.com/hyperledger/iroha/releases).

Next milestone is [Alpha](https://github.com/hyperledger/iroha/wiki/Iroha-release-lifecycle) version, coming at [September 2017] (https://github.com/hyperledger/iroha/wiki/Iroha-release-plan).

## 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:
Expand All @@ -44,33 +40,15 @@ For other components and more explanations, please take a look at the *technical

## 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:

```
cmake -H. -Bbuild; cmake --build build -- -j4;
```
Please, follow [build process](https://hyperledger.github.io/iroha-api/#build).
After building Iroha daemon, try to use [CLI](https://hyperledger.github.io/iroha-api/#command-line-interface) or launch Iroha [peer network](https://soramitsu.atlassian.net/wiki/spaces/IS/pages/12517377/Create+swarm+network+of+Iroha+nodes).

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.

## Find out more

| 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)|
|[![Technical docs](docs/icons/docs.png)](https://hyperledger.github.io/iroha-api)| [![How-to](docs/icons/how-to.png)](https://github.com/hyperledger/iroha/wiki) |[![Contributing](docs/icons/contributing.png)](https://github.com/hyperledger/iroha/wiki/How-to-contribute)|

## Need help?

Expand Down
4 changes: 4 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
rm schema/*.{cc,h}
rm -rf external
rm -rf build
19 changes: 0 additions & 19 deletions cmake/Modules/FindCPP_redis.cmake

This file was deleted.

Loading

0 comments on commit 1965193

Please sign in to comment.