chainlib

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

commit b340c6b0b014bad1b53d802dd855cf025d62b9b9
parent a276cc25ab5ea7bdc500ebf3874dfa9fe145db97
Author: lash <dev@holbrook.no>
Date:   Tue,  8 Aug 2023 19:08:52 +0100

Add batch limit man page entry

Diffstat:
MCHANGELOG | 4+++-
Mchainlib/cli/arg.py | 2+-
Mchainlib/cli/man.py | 7+++++++
Mchainlib/data/env/env.ini | 1+
Mman/build/chainlib-gen.1 | 32+++++++++++++++++++++++++++++++-
Msetup.cfg | 2+-
6 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,4 +1,6 @@ -- 0.4.19 +- 0.5.1 + * Add man page entry for batch requests. +- 0.5.0 * Enable JSON-RPC batch requests - 0.4.18 * Add interactive passphrase input when missing for keyfile dependent actions diff --git a/chainlib/cli/arg.py b/chainlib/cli/arg.py @@ -133,7 +133,7 @@ class Arg(BaseArg): self.add_long('seq', 'seq', typ=bool, help='Use sequential rpc ids') self.add('y', 'key_file', help='Keystore file to use for signing or address') - self.set_long('y', 'key_file') + self.set_long('y', 'key-file') self.add('z', 'key_file', typ=bool, help='No password to unlock keystore file') self.add_long('passphrase-file', 'key_file', help='Keystore file to use for signing or address') diff --git a/chainlib/cli/man.py b/chainlib/cli/man.py @@ -203,6 +203,12 @@ class DocGenerator: self.docs['rpcdialect'] = o self.envs['rpcdialect'] = 'RPC_DIALECT' + o = DocEntry('--rpc-batch-limit') + o.set_groff('Set number of RPC requests that can be set to the RPC provider as a batch request. This is made available through settings to any request builder implementing batch requests. A value of 1 means no batch will be used. A value of 0 indicates that the limit is not relevant. Any other positive value signals the maximum number of requests to be batched together.') + self.docs['rpcbatchlimit'] = o + self.envs['rpcbatchlimit'] = 'RPC_BATCH_LIMIT' + + if self.arg_flags & self.__argflag_list.NO_TARGET == 0: o = DocEntry('--height') o.set_groff('Block height at which to query state for. Does not apply to transactions.') @@ -342,6 +348,7 @@ class EnvDocGenerator: ks += [ 'RPC_PROVIDER', 'RPC_DIALECT', + 'RPC_BATCH_LIMIT', ] if self.arg_flags & self.__argflag_list.RPC_AUTH: ks += [ diff --git a/chainlib/data/env/env.ini b/chainlib/data/env/env.ini @@ -5,6 +5,7 @@ credentials = Authentication credentials to use for \fIRPC_AUTH\fP. For \fIbasic dialect = Enables translations of EVM node specific formatting and response codes. scheme = (needs content) verify = (needs content) +batch_limit = Set number of RPC requests that can be set to the RPC provider as a batch request. This is made available through settings to any request builder implementing batch requests. A value of 1 means no batch will be used. A value of 0 indicates that the limit is not relevant. Any other positive value signals the maximum number of requests to be batched together. [chain] spec = String specifying the type of chain connected to, in the format \fI<engine>:<fork>:<network_id>:<common_name>\fP. For EVM nodes the \fIengine\fP value will always be \fIevm\fP. diff --git a/man/build/chainlib-gen.1 b/man/build/chainlib-gen.1 @@ -56,8 +56,38 @@ Using the \fI-l\fP flag, chainlib-gen will list the names all supporing modules .SH Command options .P -A supporting module will implement one or more commands, and will also define a default command that will be executed if no command is specified. +A supporting module will implement one or more commands. .TP \fB-k\fP List required and optional arguments for <command> under <module>. + + +.SH KNOWN ISSUES +.P +Currently there is no way except reading module code to discover which module commands are available. + + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the Affero GNU General Public License 3.0. + + +.SH COPYRIGHT AND CONTACT + +.MT dev@holbrook.no +Louis Holbrook +.ME + +.UR https://holbrook.no +.UE https://holbrook.no + +.P +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + +.SH SOURCE CODE + +https://git.defalsify.org/chainlib diff --git a/setup.cfg b/setup.cfg @@ -3,7 +3,7 @@ name=chainlib license=AGPLv3+ author_email=dev@holbrook.no description=Generic blockchain access library and tooling -version=0.5.0 +version=0.5.1 url=https://git.defalsify.org/chainlib author=Louis Holbrook