Planetmint tarantool the merge (#181)

* assets changes

* fixed init db code

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed some other test cases

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* Fixed 1/3 from test_queries.py

* test_queries.py ALL PASSED

* removed junk comment

* test_schema.py fixed

* added funcationilty to init a DB in case it hasn't been initialized before

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed test_schema.py

* last commit

* fixed some minor bugs

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* test_schema.py ALL PASSING + changes in TarantoolDB Class

* test_schema.py ALL PASSING + changes in TarantoolDB Class

* commit err

* fixed asset issues

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed assets handling

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed missing Config().get() migrations

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed unit test error in case tx id is not defined

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed some minor bugs

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* simplified return of metadata

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* reconnect function added to reset_database if statement

* removed some print

* fixed TX compose bug about threshold information

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed usage of from_db part 1

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed tarantool/tendermint status management

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed some backend init issues and error handling

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed output public_keys order bug

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed deepcopy bug and another small assignment bug

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* s

* fixed last asset bug

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* merge

* fixed another set of tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed test_core.py by converting dict transaction to Transaction Object

* fixed delete_transaction function

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* commit

* pre_commit_state singledispatch issue

* fixed global variable of backend

* fixed backend problem with command make tests

* args_reset_db added, fixed error with incorrect handling of kwargs

* test_validator passing

* fixed test_core.py by adding HDict in saved_key_orders function

* fixed pre_commiT-state bug

* init chain recoginez function fixed .

* fixed last error from tendermint/test_core.py

* tendermint/test_core.py all passing

* fixed function from fast_query.py, problem was in deleteting functions

* fixed error from test_fastquery.py, by chaning the algorithm of verifying returnred transactions id

* fixed test_core.py by adding HDict in saved_key_orders function

Signed-off-by: Sangat Das <sangatdas5@gmail.com>

* Fix make test issue - unhealthy planetmint container because non-init of tarantool spaces

Signed-off-by: Sangat Das <sangatdas5@gmail.com>

* Fix tarantool connection issues in test

Signed-off-by: Sangat Das <sangatdas5@gmail.com>

* _save_keys_order, changes behaviour

* hash problem fixed

* separated asset test fixed

* Removed all Errors in Make Test

Signed-off-by: Sangat Das <sangatdas5@gmail.com>

* mock error solved

* mock solved

* problem with stdout from Popen

* fixed output from calling subprocess

* Now planetmint drop and planemint init, is working throught schema.py file.

* Fixed some lib and web issues

Signed-off-by: Sangat Das <sangatdas5@gmail.com>

* test_lib test_update_utxoset passing

* test_commands.py -> all tests are passing

* test_queries.py -> fixed

* rollback my changes

* fixed test_quries.py -> problem with assets

* test_quries.py -> metadata error fixed

* test_bigchain_api -> fixed by adding ErrorHandling for Tarantool operation

* test_bigchain_api

* test_integration.py -> fixed issue with block object

* test_lib.py -> fixed

* store and get utxo fixed

* NoneType error, fixed in test_lib.py

* test_lib.py fixed error, adopting verification for tarantool

* test_lib.py fixed one more function

* test_store_bulk_transaction -> adopted for tarantool

* test_store_transaction -> changed to work with tarantool

* test_asset_is_separated_from_transaciton -> skipped for Tarantool connection type

* Fixed 4 issues in test/tendermint

Signed-off-by: Sangat Das <sangatdas5@gmail.com>

* fixed merge issues

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed last misspelling of backend config

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* test_block_tendermint.py -> solved by returning empty list if not found

* readded test_core tests, fixed some linter issues

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* last changes

* removed test fixture

* removed planetmint_env folder

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* .idea/ added to gitignore file

* removed .idea/ folder from project

* create 3 files. init: indexes, schema, tables(spaces). this is used for initializing space,index and schema separately, and getting an output for specific command

* added to schema all execute commands in dictionary format

* Added create_tables function for tarantool connection

* 'create_database' function from schema file, is ignored using TarantoolDB Class.

* Implemented planetmint init via schema.py !

* added execute drop commands for spaces

* drop_databases improved

* Removed .lua files that was created temporarily.

* replaced TarantoolDB with TarantoolDBConnection

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* Added output to console for creating indexes.

* fixed connection instantiation

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* Added exception for NetworkError, to get specific error from connection class.

* _setup_database fixture restored.(STILL NOT WORKING in this commit)

* added 'universe' name as database name for tarantool

* created flush_db for tarantool connection type

* function create_database will call create_tables only for tarantool connection

* _bdb, setup_database restored as it was before

* Fixed flush_dbtarantool

* Fixed fatal crashing at beginning of starting planetmint. problem was solved by returning None value if where is no space.

* adding try except to some queries from tarantool/query.py.

* implemented decorator for running queries in try catch

* removed import of interface

* Removed print + removed import of interface directly

* removed importing of interface

* fixed some imports, refactored TarantoolDBConnection.conn handling

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added new requirement to setup.py

* added query() method, that will return Lazy Object

* removed unecessary comments from connection class

* get_space method is the same as old space method.

* Added run() method to TarantoolDBConnection Class.

* tarantool/query.py changed for using Lazy() implementation + little changes

* queries from tarantool/query.py was adjusted to not get NonType error

* adjusted some function calls, and connection calls

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixes for error NoneType

* fix for flush function (freezing of pytest) + NoneType error

* store_transactions changed to use new format of query

* Changed from .space() method to .get_space()

* putted from new line

* fixed Lazy() has no len

* adjusted _group_transaction_by_ids and store_transactions for connection.run

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* removed .data from select queries

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed run_command_without_output config and removed faulty error handling

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* made rollback db agnostic

* Added assign for pre_commit

* resolved comments and clean-up of unused code

* Fixed no attribute .run(). Fixed | Fixed no attribute .data

* Fixed no atribute .data

* Fixed list has no attribute .data

* Removed comments

* Fixed flush_db_tarantool, not it removes also from blocks spaces

* Fixed test_queries.py PASSED

* Fixed SystemExit error by inversing sorting of array

* Cleaned up test_core.py

* fixed upsert() functions, incorrect behaviour

* removed unused print

* removed unused print (2)

* Fixed test_txlist.py by improving flush_db_tarantool

* Small fixes in .upsert() functions for tarantool_db

* Fixes some test cases in tendermint/test_lib.py

* Fixed flush_tarantool_db Function.

* added utxos to SPACE_NAMES to delete data from utxo space

* fixed this module by restoring original function instructions.

* added hash generation to create primary key for abci_chain tuple.

* Added field 'id' to abci_chains

* changed flush function to delete abci_chains tuples

* added indexed_pattern_search to basic lua, implemented text_search

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* adjusted some queries, wip print statements to be removed

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed get_metadata

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added some prints and simplified code

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed __asset_check

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* removed print statements

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added limit to text_Search

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* Planetmint tarantool (#152)

* added indexed_pattern_search to basic lua, implemented text_search

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* adjusted some queries, wip print statements to be removed

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed get_metadata

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added some prints and simplified code

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed __asset_check

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* removed print statements

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added limit to text_Search

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* adjusted store_asset behaviour to match mongodb implementation

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed test_write_metadata test case

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed pattern search for meta_data

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed text_search result conversion

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* adjusted connect config error handling and test case for new signature

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* Resolved issues related to key error

* Added convert.py for storing interfaces

* Added convert.py implementation for tarantool

* Implemented to lib.py, functions from converted.py

* Added initializing for convert.py

* init of convert.py for mongodb implementation

* implemented convert.py for mongodatabase [NOT TESTED]

* adjusted get_assets and from_db for tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added comment

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fix get_assets issue (#160)

* adjusted get_assets and from_db for tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added comment

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* resolve conflicts

* docker all in one now install tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added user to integration init.lua

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated integration test setup for tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* removed print statements

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated changelog

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed error messaging

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed exception verification

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed printing of testdata

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* Planetmint tarantool (#169)

* 31 restructue documentation (#138)

* removed korean documentation

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed CN and KOR readme

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* changed to the press theme

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* first changes

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixe H3 vs H1 issues

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added missing png

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added missing file

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed warnings

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* moved documents

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obsolete files

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obsolete folder

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obs. file

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added some final changes

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obs. reference

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* moved chain migration to election types (#109)

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* Final zenroom (#147)

* zenroom fixes

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* expl. defined the aiohttp package

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased version number and fixed a zenroom runtime bug

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added fialing zenroom tx signing test

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* extended test to pass zenrooom validation, but to fail planetmint validation.

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added manual tx crafting

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added zenroom fulfillment verification

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* the last mile before integration

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* zenroom unit tests are passing

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* simplified zenroom unit tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obsolte lines from the zenroom tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed acceptance tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* adjusted zenroom integraiton tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed linting errors

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* simplified zenroom unit test

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased version number

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* using cryptoconditions without print message

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased cc usage to 0.9.9 readded daemon proceses

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased version to 0.9.6

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed deployment issue for 0.9.6

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* adjusted get_assets and from_db for tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added comment

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* improve usability of zenroom (#159)

* improve usability of zenroom

* * increased version
* fixed test cases
* added changelog

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>

* migrated to AGPLv3

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* 150 add cryptoconditions documentation (#166)

* added smaller logos fixed reference issue

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed some erros and typos

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added cryptoconditions reference to the subproject

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* docker all in one now install tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added user to integration init.lua

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated integration test setup for tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* removed print statements

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated changelog

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed error messaging

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed exception verification

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed printing of testdata

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

Co-authored-by: Jürgen Eckel <eckelj@users.noreply.github.com>
Co-authored-by: Lorenz Herzberger <64837895+LaurentDeMontBlanc@users.noreply.github.com>
Co-authored-by: Alberto Lerda <30939098+albertolerda@users.noreply.github.com>
Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>

* Removing naughty strings test cases

* updated quickstart with tarantool installation

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated all-in-one-planetmint with tarantool port and data persistence

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed typo

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* update documentation about tarantool (#174)

* 31 restructue documentation (#138)

* removed korean documentation

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed CN and KOR readme

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* changed to the press theme

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* first changes

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixe H3 vs H1 issues

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added missing png

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added missing file

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed warnings

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* moved documents

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obsolete files

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obsolete folder

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obs. file

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added some final changes

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obs. reference

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* moved chain migration to election types (#109)

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* Final zenroom (#147)

* zenroom fixes

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* expl. defined the aiohttp package

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased version number and fixed a zenroom runtime bug

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added fialing zenroom tx signing test

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* extended test to pass zenrooom validation, but to fail planetmint validation.

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added manual tx crafting

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added zenroom fulfillment verification

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* the last mile before integration

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* zenroom unit tests are passing

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* simplified zenroom unit tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obsolte lines from the zenroom tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed acceptance tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* adjusted zenroom integraiton tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed linting errors

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* simplified zenroom unit test

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased version number

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* using cryptoconditions without print message

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased cc usage to 0.9.9 readded daemon proceses

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* increased version to 0.9.6

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed deployment issue for 0.9.6

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* adjusted get_assets and from_db for tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added comment

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* improve usability of zenroom (#159)

* improve usability of zenroom

* * increased version
* fixed test cases
* added changelog

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>

* migrated to AGPLv3

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* 150 add cryptoconditions documentation (#166)

* added smaller logos fixed reference issue

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed some erros and typos

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* added cryptoconditions reference to the subproject

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* docker all in one now install tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* added user to integration init.lua

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated integration test setup for tarantool

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* removed print statements

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated changelog

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed error messaging

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed exception verification

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* fixed printing of testdata

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* updated quickstart with tarantool installation

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* updated all-in-one-planetmint with tarantool port and data persistence

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

* fixed typo

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>

Co-authored-by: Jürgen Eckel <eckelj@users.noreply.github.com>
Co-authored-by: Lorenz Herzberger <64837895+LaurentDeMontBlanc@users.noreply.github.com>
Co-authored-by: Alberto Lerda <30939098+albertolerda@users.noreply.github.com>
Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>

* Fixes lint issues  (#176)

* Resolved lint issues

* resolved other lint issues

Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>
Co-authored-by: andrei <deffuls@debian-BULLSEYE-live-builder-AMD64>
Co-authored-by: Sangat Das <sangatdas5@gmail.com>
Co-authored-by: liviu-lesan <31960632+liviu-lesan@users.noreply.github.com>
Co-authored-by: Lorenz Herzberger <64837895+LaurentDeMontBlanc@users.noreply.github.com>
Co-authored-by: andreitricolici <97448537+andreitricolici@users.noreply.github.com>
Co-authored-by: ArpitShukla007 <arpitnshukla@gmail.com>
Co-authored-by: Jürgen Eckel <eckelj@users.noreply.github.com>
Co-authored-by: Alberto Lerda <30939098+albertolerda@users.noreply.github.com>
This commit is contained in:
Lorenz Herzberger
2022-07-05 14:56:53 +02:00
committed by GitHub
parent a34862b8bc
commit b57bbe21d2
96 changed files with 4179 additions and 2244 deletions

View File

@@ -15,7 +15,7 @@ Docker image and a
This image contains all the services required for a Planetmint node i.e.
- Planetmint Server
- MongoDB
- Tarantool
- Tendermint
**Note:** **NOT for Production Use:** *This is an single node opinionated image not well suited for a network deployment.*
@@ -40,10 +40,9 @@ $ docker run \
--name planetmint \
--publish 9984:9984 \
--publish 9985:9985 \
--publish 27017:27017 \
--publish 3303:3303 \
--publish 26657:26657 \
--volume $HOME/planetmint_docker/mongodb/data/db:/data/db \
--volume $HOME/planetmint_docker/mongodb/data/configdb:/data/configdb \
--volume $HOME/planetmint_docker/tarantool:/var/lib/tarantool \
--volume $HOME/planetmint_docker/tendermint:/tendermint \
planetmint/planetmint:all-in-one
```
@@ -55,14 +54,12 @@ Let's analyze that command:
* `publish 9984:9984` map the host port `9984` to the container port `9984`
(the Planetmint API server)
* `9985` Planetmint Websocket server
* `27017` Default port for MongoDB
* `26657` Tendermint RPC server
* `--volume "$HOME/planetmint_docker/mongodb:/data"` map the host directory
`$HOME/planetmint_docker/mongodb` to the container directory `/data`;
this allows us to have the data persisted on the host machine,
* `3303` Configured port for Tarantool
* `$HOME/planetmint_docker/tarantool:/var/lib/tarantool` this allows us to have the data persisted on the host machine,
you can read more in the [official Docker
documentation](https://docs.docker.com/engine/tutorials/dockervolumes)
* `$HOME/planetmint_docker/tendermint:/tendermint` to persist Tendermint data.
* `$HOME/planetmint_docker/tendermint:/tendermint` to persist Tendermint data.
* `planetmint/planetmint:all-in-one` the image to use. All the options after the container name are passed on to the entrypoint inside the container.
## Verify

View File

@@ -22,28 +22,24 @@ The value of each setting is determined according to the following rules:
* Otherwise, use the default value
The local config file is `$HOME/.planetmint` by default (a file which might not even exist), but you can tell Planetmint to use a different file by using the `-c` command-line option, e.g. `planetmint -c path/to/config_file.json start`
or using the `PLANETMINT_CONFIG_PATH` environment variable, e.g. `BIGHAINDB_CONFIG_PATH=.my_planetmint_config planetmint start`.
or using the `PLANETMINT_CONFIG_PATH` environment variable, e.g. `PLANETMINT_CONFIG_PATH=.my_planetmint_config planetmint start`.
Note that the `-c` command line option will always take precedence if both the `PLANETMINT_CONFIG_PATH` and the `-c` command line option are used.
You can read the current default values in the file [planetmint/\_\_init\_\_.py](https://github.com/planetmint/planetmint/blob/master/planetmint/__init__.py). (The link is to the latest version.)
Running `planetmint -y configure localmongodb` will generate a local config file in `$HOME/.planetmint` with all the default values.
## database.*
The settings with names of the form `database.*` are for the backend database
(currently only MongoDB). They are:
(currently only Tarantool). They are:
* `database.backend` can only be `localmongodb`, currently.
* `database.backend` can only be `localtarantool`, currently.
* `database.host` is the hostname (FQDN) of the backend database.
* `database.port` is self-explanatory.
* `database.name` is a user-chosen name for the database inside MongoDB, e.g. `planetmint`.
* `database.connection_timeout` is the maximum number of milliseconds that Planetmint will wait before giving up on one attempt to connect to the backend database.
* `database.max_tries` is the maximum number of times that Planetmint will try to establish a connection with the backend database. If 0, then it will try forever.
* `database.replicaset` is the name of the MongoDB replica set. The default value is `null` because in Planetmint 2.0+, each Planetmint node has its own independent MongoDB database and no replica set is necessary. Replica set must already exist if this option is configured, Planetmint will not create it.
* `database.ssl` must be `true` or `false`. It tells Planetmint Server whether it should connect to MongoDB using TLS/SSL or not. The default value is `false`.
* `database.user` is a user-chosen name for the database inside Tarantool, e.g. `planetmint`.
* `database.pass` is the password of the user for connection to tarantool listener.
There are three ways for Planetmint Server to authenticate itself with MongoDB (or a specific MongoDB database): no authentication, username/password, and x.509 certificate authentication.
There are two ways for Planetmint Server to authenticate itself with Tarantool (or a specific Tarantool service): no authentication, username/password.
**No Authentication**
@@ -51,58 +47,18 @@ If you use all the default Planetmint configuration settings, then no authentica
**Username/Password Authentication**
To use username/password authentication, a MongoDB instance must already be running somewhere (maybe in another machine), it must already have a database for use by Planetmint (usually named `planetmint`, which is the default `database.name`), and that database must already have a "readWrite" user with associated username and password. To create such a user, login to your MongoDB instance as Admin and run the following commands:
```text
use <database.name>
db.createUser({user: "<database.login>", pwd: "<database.password>", roles: [{role: "readWrite", db: "<database.name>"}]})
```
* `database.login` is the user's username.
* `database.password` is the user's password, given in plaintext.
* `database.ca_cert`, `database.certfile`, `database.keyfile`, `database.crlfile`, and `database.keyfile_passphrase` are not used so they can have their default values.
**x.509 Certificate Authentication**
To use x.509 certificate authentication, a MongoDB instance must be running somewhere (maybe in another machine), it must already have a database for use by Planetmint (usually named `planetmint`, which is the default `database.name`), and that database must be set up to use x.509 authentication. See the MongoDB docs about how to do that.
* `database.login` is the user's username.
* `database.password` isn't used so the default value (`null`) is fine.
* `database.ca_cert`, `database.certfile`, `database.keyfile` and `database.crlfile` are the paths to the CA, signed certificate, private key and certificate revocation list files respectively.
* `database.keyfile_passphrase` is the private key decryption passphrase, specified in plaintext.
**Example using environment variables**
```text
export PLANETMINT_DATABASE_BACKEND=localmongodb
export PLANETMINT_DATABASE_HOST=localhost
export PLANETMINT_DATABASE_PORT=27017
export PLANETMINT_DATABASE_NAME=database8
export PLANETMINT_DATABASE_CONNECTION_TIMEOUT=5000
export PLANETMINT_DATABASE_MAX_TRIES=3
```
To use username/password authentication, a Tarantool instance must already be running somewhere (maybe in another machine), it must already have a spaces for use by Planetmint, and that database must already have a "readWrite" user with associated username and password.
**Default values**
If (no environment variables were set and there's no local config file), or you used `planetmint -y configure localmongodb` to create a default local config file for a `localmongodb` backend, then the defaults will be:
```js
"database": {
"backend": "localmongodb",
"backend": "tarantool",
"host": "localhost",
"port": 27017,
"name": "planetmint",
"connection_timeout": 5000,
"max_tries": 3,
"replicaset": null,
"login": null,
"port": 3301,
"username": null,
"password": null
"ssl": false,
"ca_cert": null,
"certfile": null,
"keyfile": null,
"crlfile": null,
"keyfile_passphrase": null,
}
```

View File

@@ -10,17 +10,15 @@ Code is Apache-2.0 and docs are CC-BY-4.0
A production Planetmint node must include:
* Planetmint Server
* MongoDB Server 3.4+ (mongod)
* Tarantool
* Tendermint
* Storage for MongoDB and Tendermint
It could also include several other components, including:
* NGINX or similar, to provide authentication, rate limiting, etc.
* An NTP daemon running on all machines running Planetmint Server or mongod, and possibly other machines
* Probably _not_ MongoDB Automation Agent. It's for automating the deployment of an entire MongoDB cluster.
* MongoDB Monitoring Agent
* MongoDB Backup Agent
* An NTP daemon running on all machines running Planetmint Server or tarantool, and possibly other machines
* Log aggregation software
* Monitoring software
* Maybe more

View File

@@ -7,7 +7,7 @@ Code is Apache-2.0 and docs are CC-BY-4.0
# Production Node Requirements
**This page is about the requirements of Planetmint Server.** You can find the requirements of MongoDB, Tendermint and other [production node components](node-components) in the documentation for that software.
**This page is about the requirements of Planetmint Server.** You can find the requirements of Tarantool, Tendermint and other [production node components](node-components) in the documentation for that software.
## OS Requirements

View File

@@ -14,5 +14,5 @@ Here are some references about how to secure an Ubuntu 18.04 server:
Also, here are some recommendations a node operator can follow to enhance the privacy of the data coming to, stored on, and leaving their node:
- Ensure that all data stored on a node is encrypted at rest, e.g. using full disk encryption. This can be provided as a service by the operating system, transparently to Planetmint, MongoDB and Tendermint.
- Ensure that all data stored on a node is encrypted at rest, e.g. using full disk encryption. This can be provided as a service by the operating system, transparently to Planetmint, Tarantool and Tendermint.
- Ensure that all data is encrypted in transit, i.e. enforce using HTTPS for the HTTP API and the Websocket API. This can be done using NGINX or similar, as we do with the IPDB Testnet.

View File

@@ -5,11 +5,11 @@ SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
# Set Up Planetmint, MongoDB and Tendermint
# Set Up Planetmint, Tarantool and Tendermint
We now install and configure software that must run
in every Planetmint node: Planetmint Server,
MongoDB and Tendermint.
Tarantool and Tendermint.
## Install Planetmint Server
@@ -69,25 +69,18 @@ under `"wsserver"`:
where `bnode.example.com` should be replaced by your node's actual subdomain.
## Install (and Start) MongoDB
## Install (and Start) Tarantool
Install a recent version of MongoDB.
Install a recent version of Tarantool.
Planetmint Server requires version 3.4 or newer.
```
sudo apt install mongodb
curl -L https://tarantool.io/DDJLJzv/release/2.8/installer.sh | bash
sudo apt-get -y install tarantool
```
If you install MongoDB using the above command (which installs the `mongodb` package),
it also configures MongoDB, starts MongoDB (in the background),
and installs a MongoDB startup script
(so that MongoDB will be started automatically when the machine is restarted).
Note: The `mongodb` package is _not_ the official MongoDB package
from MongoDB the company. If you want to install the official MongoDB package,
please see
[the MongoDB documentation](https://docs.mongodb.com/manual/installation/).
Note that installing the official package _doesn't_ also start MongoDB.
## Install Tendermint