planetmint/docs/root/source/tools/planetmint-cli.md
Lorenz Herzberger b57bbe21d2
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>
2022-07-05 14:56:53 +02:00

209 lines
8.3 KiB
Markdown

<!---
Copyright © 2020 Interplanetary Database Association e.V.,
Planetmint and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
# Command Line Interface (CLI)
The command-line command to interact with Planetmint Server is `planetmint`.
## planetmint \-\-help
Show help for the `planetmint` command. `planetmint -h` does the same thing.
## planetmint \-\-version
Show the version number. `planetmint -v` does the same thing.
## planetmint configure
Generate a local configuration file (which can be used to set some or all [Planetmint node configuration settings](../node-setup/configuration)). It will ask you for the values of some configuration settings.
If you press Enter for a value, it will use the default value.
At this point, only one database backend is supported: `tarantool`.
If you use the `-c` command-line option, it will generate the file at the specified path:
```text
planetmint -c path/to/new_config.json configure tarantool
```
If you don't use the `-c` command-line option, the file will be written to `$HOME/.planetmint` (the default location where Planetmint looks for a config file, if one isn't specified).
If you use the `-y` command-line option, then there won't be any interactive prompts: it will use the default values for all the configuration settings.
```text
planetmint -y configure tarantool
```
## planetmint show-config
Show the values of the [Planetmint node configuration settings](../node-setup/configuration).
## planetmint init
Create a backend database (local tarantool), all database tables/collections,
various backend database indexes, and the genesis block.
## planetmint drop
Drop (erase) the backend database (the local tarantool database used by this node).
You will be prompted to make sure.
If you want to force-drop the database (i.e. skipping the yes/no prompt), then use `planetmint -y drop`
## planetmint start
Start Planetmint. It always begins by trying a `planetmint init` first. See the documentation for `planetmint init`.
The database initialization step is optional and can be skipped by passing the `--no-init` flag, i.e. `planetmint start --no-init`.
### Options
The log level for the console can be set via the option `--log-level` or its
abbreviation `-l`. Example:
```bash
$ planetmint --log-level INFO start
```
The allowed levels are `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `CRITICAL`.
For an explanation regarding these levels please consult the
[Logging Levels](https://docs.python.org/3.9/library/logging.html#levels)
section of Python's documentation.
For a more fine-grained control over the logging configuration you can use the
configuration file as documented under
[Configuration Settings](../node-setup/configuration).
## planetmint election
Manage elections to govern the Planetmint network. The specifics of the election process are defined in [BEP-18](https://github.com/planetmint/BEPs/tree/master/18).
Election management is broken into several subcommands. Below is the command line syntax for each of them.
### election new
Create a new election which proposes a change to the Planetmint network.
If the command succeeds, it will post an election transaction and output `election_id`.
The election proposal consists of vote tokens allocated to every current validator proportional to his voting power. Validators spend their votes to approve the election using the [election-approve command](election-approve).
Every election has a type. Currently supported types are `upsert-validator` and `chain-migration`. Their transaction operations are `VALIDATOR_ELECTION` and `CHAIN_MIGRATION` accordingly. See below for how to create an election of a particular type.
Note that elections can only be proposed and approved by existing validators.
#### election new upsert-validator
Create an election to add, update, or remove a validator.
```bash
$ planetmint election new upsert-validator <public-key> <power> <node-id> --private-key <path-to-the-private-key>
```
- `<public-key>` is the public key of the node to be added/updated/removed. The encoding and type of the key have to match those specified in `genesis.json` in the supported Tendermint version.
- `<power>` is the new power for the validator. To remove the validator, set the power to `0`.
- `<node-id>` is the node identifier from Tendermint. A node operator can learn his node identifier by executing `tendermint show_node_id`.
- `<path-to-the-private-key>` is the path to the private key of the validator who proposes the election. Tendermint places it at `.tendermint/config/priv_validator.json`.
Example:
```bash
$ planetmint election new upsert-validator HHG0IQRybpT6nJMIWWFWhMczCLHt6xcm7eP52GnGuPY= 1 fb7140f03a4ffad899fabbbf655b97e0321add66 --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Submitted proposal with id: 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa
```
A successful execution of the above command does not imply the validator set has been updated but rather the proposal has been accepted by the network.
Once `election_id` has been generated, the proposer should share it with other validators of the network (e.g. via email) and ask them to approve the proposal.
Note that election proposers do not automatically approve elections by proposing them.
For more details about how validator set changes work, refer to [BEP-21](https://github.com/planetmint/BEPs/tree/master/21).
#### election new chain-migration
Create an election to halt block production, to coordinate on making a Tendermint upgrade with a backwards-incompatible chain.
```bash
$ planetmint election new chain-migration --private-key <path-to-the-private-key>
```
- `<path-to-the-private-key>` is the path to the private key of the validator who proposes the election. Tendermint places it at `.tendermint/config/priv_validator.json`.
Example:
```bash
$ planetmint election new migration --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Submitted proposal with id: 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa
```
Concluded chain migration elections halt block production at whichever block height they are approved.
Afterwards, validators are supposed to upgrade Tendermint, set new `chain_id`, `app_hash`, and `validators` (to learn these values, use the [election show](#election-show) command) in `genesis.json`, make and save a tarantool dump, and restart the system.
For more details about how chain migrations work, refer to [Type 3 scenarios in BEP-42](https://github.com/planetmint/BEPs/tree/master/42).
(election-approve)=
### election approve
Approve an election by voting for it. The command places a `VOTE` transaction, spending all of the validator's vote tokens to the election address.
```bash
$ planetmint election approve <election-id> --private-key <path-to-the-private-key>
```
- `election-id` is the election identifier the approval is given for.
- `<path-to-the-private-key>` is the path to the private key of the validator who votes for the election. Tendermint places it at `.tendermint/config/priv_validator.json`.
Example:
```bash
$ planetmint election approve 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Your vote has been submitted
```
Once a proposal has been approved by the sufficient amount of validators (contributing more than `2/3` of the total voting power), the proposed change is applied to the network.
(election-show)=
### election show
Retrieves the information about elections.
```bash
$ planetmint election show <election-id>
status=<status>
```
`status` has three possible values:
- `ongoing`, if the election can be concluded but has not yet collected enough votes,
- `concluded`, if the election has been concluded,
- `inconclusive`, if the validator set changed while the election was in process, rendering it undecidable.
After a chain migration is concluded, the `show` command also outputs `chain_id`, `app_hash`, and `validators` for `genesis.json` of the new chain.
## planetmint tendermint-version
Show the Tendermint versions supported by Planetmint server.
```bash
$ planetmint tendermint-version
{
"description": "Planetmint supports the following Tendermint version(s)",
"tendermint": [
"0.22.8"
]
}
```