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 branch 'develop' into feature/test-peer-serivce
- Loading branch information
Showing
33 changed files
with
1,981 additions
and
50 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
find_path(CPP_redis_INCLUDE_DIR cpp_redis/cpp_redis) | ||
mark_as_advanced(CPP_redis_INCLUDE_DIR) | ||
|
||
find_library(CPP_redis_LIBRARY cpp_redis) | ||
mark_as_advanced(CPP_redis_LIBRARY) | ||
|
||
find_package(PackageHandleStandardArgs REQUIRED) | ||
find_package_handle_standard_args(CPP_redis | ||
REQUIRED_VARS CPP_redis_INCLUDE_DIR CPP_redis_LIBRARY | ||
) | ||
|
||
if (CPP_redis_FOUND) | ||
add_library(cpp_redis UNKNOWN IMPORTED) | ||
set_target_properties(cpp_redis PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES ${CPP_redis_INCLUDE_DIR} | ||
IMPORTED_LOCATION ${CPP_redis_LIBRARY} | ||
INTERFACE_LINK_LIBRARIES "tacopie;pthread" | ||
) | ||
endif () |
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,19 @@ | ||
find_path(PQxx_INCLUDE_DIR pqxx/pqxx) | ||
mark_as_advanced(PQxx_INCLUDE_DIR) | ||
|
||
find_library(PQxx_LIBRARY pqxx) | ||
mark_as_advanced(PQxx_LIBRARY) | ||
|
||
find_package(PackageHandleStandardArgs REQUIRED) | ||
find_package_handle_standard_args(PQxx | ||
REQUIRED_VARS PQxx_INCLUDE_DIR PQxx_LIBRARY | ||
) | ||
|
||
if (PQxx_FOUND) | ||
add_library(pqxx UNKNOWN IMPORTED) | ||
set_target_properties(pqxx PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES ${PQxx_INCLUDE_DIR} | ||
IMPORTED_LOCATION ${PQxx_LIBRARY} | ||
INTERFACE_LINK_LIBRARIES "pq" | ||
) | ||
endif () |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
# this is temporal solution | ||
export IROHA_PEER_PUBKEY_PATH=/home/bogdan/iroha/testbase.pub | ||
export IROHA_PEER_PRIVKEY_PATH=/home/bogdan/iroha/testbase.priv | ||
export IROHA_POSTGRES_HOST=localhost | ||
export IROHA_POSTGRES_PORT=5432 | ||
export IROHA_POSTGRES_USER=kek | ||
export IROHA_POSTGRES_PASSWORD=helloworld | ||
export IROHA_REDIS_HOST=localhost | ||
export IROHA_REDIS_PORT=6379 | ||
export IROHA_KAFKA_HOST=localhost | ||
export IROHA_KAFKA_PORT=2181 | ||
export IROHA_PATH=/home/bogdan/iroha | ||
|
||
# debug, info, warning, error, critical, debug, trace, off | ||
export IROHA_VERBOSITY=debug | ||
|
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,59 @@ | ||
version: '3' | ||
|
||
# How to run: | ||
# docker-compose -f docker-compose-dev.yml up | ||
# | ||
# This file creates persistent redis and postgres containers. | ||
# Even after container removal stored data will be available. | ||
# | ||
# redis: | ||
# - host: 192.168.9.2 or 127.0.0.1 or localhost | ||
# - port: 6379 | ||
# postgres: | ||
# - host: 192.168.9.3 or 127.0.0.1 or localhost | ||
# - port: 5432 | ||
# - user: kek | ||
# - password: helloworld | ||
|
||
services: | ||
redis: | ||
image: redis:3.2.8 | ||
ports: | ||
- 127.0.0.1:6379:6379 | ||
volumes: | ||
- redis_data:/data | ||
networks: | ||
peernet: | ||
ipv4_address: 192.168.9.2 | ||
|
||
|
||
postgres: | ||
image: postgres:9.5 | ||
ports: | ||
- 127.0.0.1:5432:5432 | ||
environment: | ||
- POSTGRES_USER=kek | ||
- POSTGRES_PASSWORD=helloworld | ||
volumes: | ||
- postgresql:/var/lib/postgresql | ||
- postgresql_data:/var/lib/postgresql/data | ||
networks: | ||
peernet: | ||
ipv4_address: 192.168.9.3 | ||
|
||
|
||
# network for single peer | ||
networks: | ||
peernet: | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 192.168.9.0/24 | ||
|
||
|
||
# make persistence for docker containers | ||
volumes: | ||
redis_data: | ||
postgresql: | ||
postgresql_data: |
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,12 +1,21 @@ | ||
# here will be the code, which is responsible for connection to ametsuchi | ||
message(STATUS "Ametsuchi") | ||
|
||
add_subdirectory(block_store) | ||
add_subdirectory(index) | ||
add_subdirectory(wsv) | ||
|
||
add_library(storage | ||
storage.cpp | ||
impl/ametsuchi.cpp | ||
index_mediator.cpp | ||
) | ||
|
||
target_link_libraries(storage PUBLIC | ||
ametsuchi | ||
schema | ||
cpp_redis | ||
pqxx | ||
optional | ||
block_store | ||
index | ||
wsv | ||
) |
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,3 @@ | ||
add_library(block_store | ||
backend/flat_file.cpp | ||
) |
Oops, something went wrong.