
* 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>
12 KiB
Configuration Settings
Every Planetmint Server configuration setting has two names: a config-file name and an environment variable name. For example, one of the settings has the config-file name database.host
and the environment variable name PLANETMINT_DATABASE_HOST
. Here are some more examples:
database.port
↔ PLANETMINT_DATABASE_PORT
database.keyfile_passphrase
↔ PLANETMINT_DATABASE_KEYFILE_PASSPHRASE
server.bind
↔ PLANETMINT_SERVER_BIND
The value of each setting is determined according to the following rules:
- If it's set by an environment variable, then use that value
- Otherwise, if it's set in a local config file, then use that value
- 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. 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. (The link is to the latest version.)
database.*
The settings with names of the form database.*
are for the backend database
(currently only Tarantool). They are:
database.backend
can only belocaltarantool
, currently.database.host
is the hostname (FQDN) of the backend database.database.port
is self-explanatory.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 two ways for Planetmint Server to authenticate itself with Tarantool (or a specific Tarantool service): no authentication, username/password.
No Authentication
If you use all the default Planetmint configuration settings, then no authentication will be used.
Username/Password Authentication
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
"database": {
"backend": "tarantool",
"host": "localhost",
"port": 3301,
"username": null,
"password": null
}
server.*
server.bind
, server.loglevel
and server.workers
are settings for the Gunicorn HTTP server, which is used to serve the HTTP client-server API.
server.bind
is where to bind the Gunicorn HTTP server socket. It's a string. It can be any valid value for Gunicorn's bind setting. For example:
- If you want to allow IPv4 connections from anyone, on port 9984, use
0.0.0.0:9984
- If you want to allow IPv6 connections from anyone, on port 9984, use
[::]:9984
In a production setting, we recommend you use Gunicorn behind a reverse proxy server such as NGINX. If Gunicorn and the reverse proxy are running on the same machine, then you can use localhost:9984
(the default value), meaning Gunicorn will talk to the reverse proxy on port 9984. The reverse proxy could then be bound to port 80 (for HTTP) or port 443 (for HTTPS), so that external clients would connect using that port. For example:
[External clients]---(port 443)---[NGINX]---(port 9984)---[Gunicorn / Planetmint Server]
If Gunicorn and the reverse proxy are running on different machines, then server.bind
should be hostname:9984
, where hostname is the IP address or FQDN of the reverse proxy.
There's more information about deploying behind a reverse proxy in the Gunicorn documentation. (They call it a proxy.)
server.loglevel
sets the log level of Gunicorn's Error log outputs. See
Gunicorn's documentation
for more information.
server.workers
is the number of worker processes for handling requests. If set to None
, the value will be (2 × cpu_count + 1). Each worker process has a single thread. The HTTP server will be able to handle server.workers
requests simultaneously.
Example using environment variables
export PLANETMINT_SERVER_BIND=0.0.0.0:9984
export PLANETMINT_SERVER_LOGLEVEL=debug
export PLANETMINT_SERVER_WORKERS=5
Example config file snippet
"server": {
"bind": "0.0.0.0:9984",
"loglevel": "debug",
"workers": 5,
}
Default values (from a config file)
"server": {
"bind": "localhost:9984",
"loglevel": "info",
"workers": null,
}
wsserver.*
wsserver.scheme, wsserver.host and wsserver.port
These settings are for the
aiohttp server,
which is used to serve the
WebSocket Event Stream API.
wsserver.scheme
should be either "ws"
or "wss"
(but setting it to "wss"
does not enable SSL/TLS).
wsserver.host
is where to bind the aiohttp server socket and
wsserver.port
is the corresponding port.
If you want to allow connections from anyone, on port 9985,
set wsserver.host
to 0.0.0.0 and wsserver.port
to 9985.
Example using environment variables
export PLANETMINT_WSSERVER_SCHEME=ws
export PLANETMINT_WSSERVER_HOST=0.0.0.0
export PLANETMINT_WSSERVER_PORT=9985
Example config file snippet
"wsserver": {
"scheme": "wss",
"host": "0.0.0.0",
"port": 65000
}
Default values (from a config file)
"wsserver": {
"scheme": "ws",
"host": "localhost",
"port": 9985
}
wsserver.advertised_scheme, wsserver.advertised_host and wsserver.advertised_port
These settings are for the advertising the Websocket URL to external clients in the root API endpoint. These configurations might be useful if your deployment is hosted behind a firewall, NAT, etc. where the exposed public IP or domain is different from where Planetmint is running.
Example using environment variables
export PLANETMINT_WSSERVER_ADVERTISED_SCHEME=wss
export PLANETMINT_WSSERVER_ADVERTISED_HOST=myplanetmint.io
export PLANETMINT_WSSERVER_ADVERTISED_PORT=443
Example config file snippet
"wsserver": {
"advertised_scheme": "wss",
"advertised_host": "myplanetmint.io",
"advertised_port": 443
}
Default values (from a config file)
"wsserver": {
"advertised_scheme": "ws",
"advertised_host": "localhost",
"advertised_port": 9985
}
log.*
The log.*
settings are to configure logging.
Example
{
"log": {
"file": "/var/log/planetmint.log",
"error_file": "/var/log/planetmint-errors.log",
"level_console": "info",
"level_logfile": "info",
"datefmt_console": "%Y-%m-%d %H:%M:%S",
"datefmt_logfile": "%Y-%m-%d %H:%M:%S",
"fmt_console": "%(asctime)s [%(levelname)s] (%(name)s) %(message)s",
"fmt_logfile": "%(asctime)s [%(levelname)s] (%(name)s) %(message)s",
"granular_levels": {}
}
Default values
{
"log": {
"file": "~/planetmint.log",
"error_file": "~/planetmint-errors.log",
"level_console": "info",
"level_logfile": "info",
"datefmt_console": "%Y-%m-%d %H:%M:%S",
"datefmt_logfile": "%Y-%m-%d %H:%M:%S",
"fmt_logfile": "[%(asctime)s] [%(levelname)s] (%(name)s) %(message)s (%(processName)-10s - pid: %(process)d)",
"fmt_console": "[%(asctime)s] [%(levelname)s] (%(name)s) %(message)s (%(processName)-10s - pid: %(process)d)",
"granular_levels": {}
}
log.file
The full path to the file where logs should be written.
The user running planetmint
must have write access to the
specified path.
Log rotation: Log files have a size limit of about 200 MB
and will be rotated up to five times.
For example, if log.file
is set to "~/planetmint.log"
, then
logs would always be written to planetmint.log
. Each time the file
planetmint.log
reaches 200 MB it will be closed and renamed
planetmint.log.1
. If planetmint.log.1
and planetmint.log.2
already exist they
would be renamed planetmint.log.2
and planetmint.log.3
. This pattern would be
applied up to planetmint.log.5
after which planetmint.log.5
would be
overwritten by planetmint.log.4
, thus ending the rotation cycle of whatever
logs were in planetmint.log.5
.
log.error_file
Similar to log.file
(see above), this is the
full path to the file where error logs should be written.
log.level_console
The log level used to log to the console. Possible allowed values are the ones defined by Python, but case-insensitive for the sake of convenience:
"critical", "error", "warning", "info", "debug", "notset"
log.level_logfile
The log level used to log to the log file. Possible allowed values are the ones defined by Python, but case-insensitive for the sake of convenience:
"critical", "error", "warning", "info", "debug", "notset"
log.datefmt_console
The format string for the date/time portion of a message, when logged to the console.
For more information on how to construct the format string please consult the table under Python's documentation of time.strftime(format[, t]).
log.datefmt_logfile
The format string for the date/time portion of a message, when logged to a log file.
For more information on how to construct the format string please consult the table under Python's documentation of time.strftime(format[, t]).
log.fmt_console
A string used to format the log messages when logged to the console.
For more information on possible formatting options please consult Python's documentation on LogRecord attributes.
log.fmt_logfile
A string used to format the log messages when logged to a log file.
For more information on possible formatting options please consult Python's documentation on LogRecord attributes.
log.granular_levels
Log levels for Planetmint's modules. This can be useful to control the log
level of specific parts of the application. As an example, if you wanted the
logging of the core.py
module to be more verbose, you would set the
configuration shown in the example below.
Example
{
"log": {
"granular_levels": {
"bichaindb.core": "debug"
}
}
Default value
{}
tendermint.*
The settings with names of the form tendermint.*
tell Planetmint Server
where it can connect to the node's Tendermint instance.
tendermint.host
is the hostname (FQDN)/IP address of the Tendermint instance.tendermint.port
is self-explanatory.
Example using environment variables
export PLANETMINT_TENDERMINT_HOST=tendermint
export PLANETMINT_TENDERMINT_PORT=26657
```Planetmint
**Default values**
```js
"tendermint": {
"host": "localhost",
"port": 26657
}