commit 3b350075232cef2ced821d11e8613dafa2f2b9fa
parent 34598c9969484b27233b25d1c2301749c4499ca4
Author: lash <dev@holbrook.no>
Date: Sat, 12 Nov 2022 14:35:01 +0000
Repurpose as doc repo
Diffstat:
5 files changed, 159 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -0,0 +1,18 @@
+SOURCES = $(realpath sources.txt)
+
+all: html txt
+
+html: prep
+ makeinfo --html --no-split start.texi -o build/out/index.html
+
+txt: prep
+ makeinfo --plaintext start.texi -o build/out
+
+prep:
+ mkdir -p build/out
+ #perl setup.pl $(SOURCES) build
+
+.PHONY: clean
+
+clean:
+ rm -rf build/*
diff --git a/README.md b/README.md
@@ -0,0 +1,62 @@
+## Documentation for chaintool
+
+Chaintool is still very much a work-in-progress, and so to with its documentation.
+
+So far, documentation efforts have been made in three areas, in order of most maintained first:
+
+
+### Code dependency diagram
+
+The dependency graph is only available in as an unformatted **graphviz** document located at `$REPO_ROOT/deps.dot`.
+
+Last time the author remembered to render it, it looked like this:
+
+![](https://g33k.holbrook.no/ee551bd9c81a0394449b1396a451ba37b5fdff77126ec3ed4cd0d1c4a4151be2)
+
+It is defined in terms of three layers:
+
+* The lower layer (grey) consists of libraries that were developed within the context of `chaintool`, but have a higher generic scope.
+* The upper layer is all libraries that are considered part of the `chaintool` suite.
+* The higher layer (green) are tools and daemons building on the `chaintool` suite libraries.
+
+
+### Man pages
+
+The `chainlib` module provides the script `chainlib-man.py` which provides an inheritance approach to generate man pages for CLI tools that build on the library.
+
+An immediate example can be found in the `chainlib-eth` repository, where the directory `$REPO_ROOT/man` demonstrates how to add hooks for overriding both section contents and argument options for individual tools.
+
+Invoking `make man` in the `chainlib-eth` and `eth-monitor` repositories will trigger a build of man pages for all the CLI tools provided.
+
+What override behavior is currently available should be straightforward to glean from reading the `$CHAINLIB_REPO_ROOT/scripts/chainlib-man.py` script.
+
+
+### Descriptive documentation
+
+Some initial work for high-level documentation exists in the chainlib repository, specifically in `$REPO_ROOT/doc/texinfo`.
+
+The documentation can be generated by running `make` in the `$REPO_ROOT` of **this** repository. The HTML version of the documentation will be output as a single file to `$REPO_ROOT/build/out/index.html`
+
+
+### Docstrings
+
+Not much to add here. Ye generic sphinx-doc invocation should do the trick.
+
+
+## High-level implementations
+
+To compensate somewhat for the lack of exhaustive documentation, actual implementations using the library may help light the way somewhat.
+
+The known implementations that have some minimum level of maturity are listed below.
+
+
+### High-level libraries
+
+* **eth-erc20** - an implementation of the ERC20 token, which also includes an example token contract that lets authorized addresses arbitrarily mint tokens at any time.
+* **eth-erc721** - an implementation of the ERC721 "NFT" token, which also includes an example token contract that creates achievment badges for developed contributions.
+
+
+### High-level tools
+
+* **eth-monitor** - which provides visualization and arbitrary code execution for mined transactions
+* **chaind-eth** - a full-duplex transaction queueing tool for ethereum
diff --git a/deps.dot b/deps.dot
@@ -0,0 +1,52 @@
+digraph {
+ confini [ label="lo/confini", style="filled"; fillcolor="#cccccc" ];
+ hexathon [ label="lo/hexathon", style="filled"; fillcolor="#cccccc" ];
+ potaahto [ label="lo/potaahto", style="filled"; fillcolor="#cccccc" ];
+ leveldir [ label="lo/leveldir", style="filled"; fillcolor="#cccccc" ];
+ shep [ label="lo/shep", style="filled"; fillcolor="#cccccc" ];
+
+ chainlib [ label="chainlib" ];
+ chainlib_eth [ label="chainlib-eth" ];
+ funga [ label="funga" ];
+ funga_eth [ label="funga-eth" ];
+ eth_cache [ label="eth-cache" ];
+ chainsyncer [ label="chainsyncer" ];
+ chainqueue [ label="chainqueue" ];
+
+ chaind [ label="hi/chaind", style="filled", fillcolor="#aaffaa" ];
+ chaind_eth [ label="hi/chaind-eth", style="filled", fillcolor="#aaffaa" ];
+
+ eth_monitor [ label="eth-monitor", style="filled", fillcolor="#aaffaa" ];
+
+ eth_erc20 [ label="tool/eth-erc20", style="filled", fillcolor="#aaffaa" ];
+ eth_erc721 [ label="tool/eth-erc721", style="filled", fillcolor="#aaffaa" ];
+
+ confini -> chainlib
+ hexathon -> chainlib
+ potaahto -> chainlib
+ chainlib -> chainlib_eth
+
+ hexathon -> funga
+ funga -> funga_eth
+
+ hexathon -> leveldir -> eth_cache
+
+ eth_cache -> chainsyncer
+ shep -> chainsyncer
+ shep -> chainqueue
+
+ chainsyncer -> chaind
+ chainqueue -> chaind
+ chaind -> chaind_eth
+
+ chainsyncer -> eth_monitor
+
+ chainlib_eth -> eth_erc20
+ chainlib_eth -> eth_erc721
+
+ funga -> chainlib
+ funga_eth -> chainlib_eth
+
+ chainlib_eth -> eth_monitor
+ chainlib_eth -> chaind_eth
+}
diff --git a/syncer/basic.py b/examples/syncer/basic.py
diff --git a/start.texi b/start.texi
@@ -0,0 +1,27 @@
+\input texinfo
+@settitle chaintool
+
+@copying
+Released 2020-2022 under GPL3
+@end copying
+
+@titlepage
+@title chaintool
+@author Louis Holbrook
+
+@end titlepage
+
+@c
+@contents
+
+@ifnottex
+@node Top
+@top Introduction
+@end ifnottex
+@menu
+* top-overview ::
+* chainlib ::
+* cic-internal-integration ::
+@end menu
+
+@include /home/lash/src/contrib/grassrootseconomics/cic-dev-docs/build/chainlib.texi