From 7becc0dde0b2bfb653dd0b12866bf02ab7f15cf4 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 25 Feb 2022 14:23:38 +0000 Subject: [PATCH] Add man page start --- CHANGELOG | 2 ++ eth_monitor/runnable/sync.py | 4 ++-- man/eth-monitor.head.groff | 28 ++++++++++++++++++++++++++++ requirements.txt | 5 +++-- 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 man/eth-monitor.head.groff diff --git a/CHANGELOG b/CHANGELOG index 694c75a..f50a6e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +- 0.0.7 + * Remove forced execution with renderers - 0.0.6 * Pass chain spec instead of chain str to output renderers - 0.0.5 diff --git a/eth_monitor/runnable/sync.py b/eth_monitor/runnable/sync.py index b433ef1..099a8fd 100644 --- a/eth_monitor/runnable/sync.py +++ b/eth_monitor/runnable/sync.py @@ -56,8 +56,8 @@ argparser.add_argument('--include-default', dest='include_default', action='stor argparser.add_argument('--store-tx-data', dest='store_tx_data', action='store_true', help='Include all transaction data objects by default') argparser.add_argument('--store-block-data', dest='store_block_data', action='store_true', help='Include all block data objects by default') argparser.add_argument('--excludes-file', type=str, dest='excludes_file', help='Load exclude rules from file') -argparser.add_argument('--renderer', type=str, action='append', help='Python modules to dynamically load for rendering of transaction output') -argparser.add_argument('-f', '--filter', type=str, action='append', help='Add python module filter path') +argparser.add_argument('--renderer', type=str, action='append', default=[], help='Python modules to dynamically load for rendering of transaction output') +argparser.add_argument('--filter', type=str, action='append', help='Add python module filter path') argparser.add_argument('--cache-dir', dest='cache_dir', type=str, help='Directory to store tx data') argparser.add_argument('--single', action='store_true', help='Execute a single sync, regardless of previous states') argparser.add_argument('-v', action='store_true', help='Be verbose') diff --git a/man/eth-monitor.head.groff b/man/eth-monitor.head.groff new file mode 100644 index 0000000..014ec4c --- /dev/null +++ b/man/eth-monitor.head.groff @@ -0,0 +1,28 @@ +.TH eth-monitor 1 + +.SH NAME +eth-monitor \- Cache, index and monitor transactions with an EVM node rpc + +.SH SYNOPSIS +.P +\fBeth-monitor\fP [ --skip-history ] [ --single ] [ p \fIeth_provider\fP ] [ --includes-file \fIfile\fP ] +.P +\fBeth-monitor\fP [ --skip-history ] [ --single ] [ p \fIeth_provider\fP ] [ --excludes-file \fIfile\fP ] [ --include-default ] + + +.SH DESCRIPTION +.P +Using an EVM RPC endpoint, the \fBeth-monitor\fP tool will retrieve blocks within a given range and provides arbitrary processing of each transaction. Sync behavior is controlled using the \fB--offset\fP, \fB--until\fP and \fB--head\fP options. \fBSee EXAMPLES\fP on sync example usage. +.P +Processing is done by python modules implementing a filter interface, specified by the \fB--filter\fP option. See \fBinfo eth-monitor\fP for information on how to write filters. +.P +Each chain spec persists its own sync state. E.g. if a historical sync between blocks 100 and 200 was executed against chain \fIevm:foo:42:bar\fP and halted at block 150, then next execution will resume at this block height. The state of which filters were executed for the last transaction processed is also kept. See \fBSYNCING\fP below for more details. +.P +Syncs can be forced to (re)run for ranges regardless of previous state by using the \fB--single\fP option. However, there is no protection in place from preventing code filters from being executed again on the same transaction when this is done. +.P +By default, no transactions are matched, and input and output addresses to match against transactions need to be explicitly specified. This behavior can be reversed with the \fB--include-default\fP option. Addresses to match are defined using the \fB--input\fP and \fB--output\fP options, and/or by file using the \fB--includes-file\fP and \fB--excludes-file\fP options. Addresses specified multiple times will be deduplicated. +.P +Every transaction matched will cause the a copy of that transaction and its block to be stored to the cache. In some cases, it may be desirable to store all blocks and/or transactions, and only use address matches for display and/or filters. \fB--store-tx-data\fP and \fB--store-block-data\fP provides this function. + + +.SS OPTIONS diff --git a/requirements.txt b/requirements.txt index 1dc8936..3131631 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -chainlib-eth~=0.0.22 +chainlib-eth~=0.0.27 +chainlib~=0.0.23 chainsyncer~=0.1.0 -eth-erc20~=0.1.6 +eth-erc20~=0.1.10 leveldir~=0.3.0