chainlib

Generic blockchain access library and tooling
Info | Log | Files | Refs | README | LICENSE

config.texi (3077B)


      1 @anchor{chainlib-config}
      2 @chapter Rendering configurations
      3 
      4 Configurations in @code{chainlib} are processed, rendered and interfaced using the @code{confini} python package.
      5 
      6 In short, @code{confini} extends the functionality of Python's standard library @code{configparser} package to allow merging of directives by parsing multiple ini-files from multiple directories.
      7 
      8 Furthermore, it employs this same multi-file approach when defining a configuration @emph{schema}, aswell as defining source to @emph{override} the values defined in the schema.
      9 
     10 See @url{https://gitlab.com/nolash/python-confini} for further details on @code{confini}.
     11 
     12 
     13 @section Configuration schema in chainlib
     14 
     15 The chainlib configuration schema is, along with the provided command line arguments and environment variables, designed to cover the settings necessary for most normal chain RPC operations.
     16 
     17 
     18 @subsection Configuration mapping
     19 
     20 Below follows a mapping of configuration directives to command line arguments and environment variables.
     21 
     22 Note that any configuration directives prefixed by @code{"_"} are not defined in the configuration schema, and are not overrideable by environment variables. These are values typically are only valid within the context of a single execution of the implemented tool.
     23 
     24 @multitable .40 .30 .30
     25 @headitem arg
     26 @tab config
     27 @tab env
     28 @item ---
     29 @tab ---
     30 @tab CONFINI_DIR @footnote{The @code{CONFINI_DIR} environment variable defines an explicit configuration @emph{schema} path. }
     31 @item -c. --config @footnote{The @code{-c} flag defines an explicit configuration @emph{override} path.}
     32 @tab ---
     33 @tab ---
     34 @item -i, --chain-spec
     35 @tab CHAIN_SPEC
     36 @tab CHAIN_SPEC
     37 @item --height
     38 @tab _HEIGHT
     39 @tab ---
     40 @item --fee-limit
     41 @tab _FEE_LIMIT
     42 @tab ---
     43 @item --fee-price
     44 @tab _FEE_PRICE
     45 @tab ---
     46 @item -n, --namespace
     47 @tab CONFIG_USER_NAMESPACE
     48 @tab CONFIG_USER_NAMESPACE
     49 @item --nonce
     50 @tab _NONCE
     51 @tab ---
     52 @item -p, --rpc-provider
     53 @tab RPC_HTTP_PROVIDER
     54 @tab RPC_HTTP_PROVIDER
     55 @item -a, -recipient
     56 @tab _RECIPIENT
     57 @tab ---
     58 @item -e, --executable-address
     59 @tab _EXEC_ADDRESS
     60 @tab ---
     61 @item --rpc-auth
     62 @tab RPC_AUTH
     63 @tab RPC_AUTH
     64 @item ---
     65 @tab RPC_PROVIDER
     66 @tab RPC_PROVIDER @footnote{RPC_PROVIDER will always be set to the same value as RPC_HTTP_PROVIDER by default.}
     67 @item ---
     68 @tab RPC_SCHEME
     69 @tab RPC_SCHEME @footnote{The RPC_SCHEME configuration directive is always set to 'http' by default.}
     70 @item --rpc-credentials
     71 @tab RPC_CREDENTIALS
     72 @tab RPC_CREDENTIALS
     73 @item --rpc-dialect
     74 @tab RPC_DIALECT
     75 @tab RPC_DIALECT
     76 @item -s, --send
     77 @tab _RPC_SEND
     78 @tab ---
     79 @item --seq
     80 @tab _SEQ
     81 @tab ---
     82 @item -u, --unsafe
     83 @tab _UNSAFE
     84 @tab ---
     85 @item -w
     86 @tab _WAIT
     87 @tab ---
     88 @item -ww
     89 @tab _WAIT_ALL
     90 @tab ---
     91 @item -y, --key-file
     92 @tab WALLET_KEY_FILE
     93 @tab WALLET_KEY_FILE
     94 @item --- @footnote{This flag is not provided because it is simply not safe to define passphrases as an argument on the command line.}
     95 @tab WALLET_PASSPHRASE
     96 @tab WALLET_PASSPHRASE
     97 @end multitable 
     98 
     99 Currently @code{chainlib} only supports HTTP(S) when building RPC connections from command line arguments and configuration.
    100