diff --git a/.gitignore b/.gitignore index ed16b26..ceca99e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ working/ build/ dist/ *.egg-info/ +certs/ +results/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f5b2a37 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "miscellaneous"] + path = miscellaneous + url = https://github.com/symbol/miscellaneous.git diff --git a/README.md b/README.md index a650e0c..a2702bd 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,25 @@ For pull to work, certificates must be placed in puller/certs/ To produce certificates follow the instructions for generating keys and certs in the [symbol node guide](https://docs.symbolplatform.com/guides/network/running-a-symbol-node-manually.html). ```sh -git clone https://github.com/symbol/miscellaneous.git +# install miscellaneous dependencies +git submodule update --init +cd ./miscellaneous && python -m pip install -r requirements.txt && cd .. -cd puller -PYTHONPATH=../miscellaneous ./pull.sh -cd .. +# generate certificates and run puller +cd ./puller \ + && mkdir -p certs \ + && cd certs \ + && curl -O https://docs.symbolplatform.com/_static/bash/cert-generate.sh && chmod +x cert-generate.sh -python -m webapp.app --resources ./resources +## save an arbitrary mainnet privatekey and generate certificates +echo 393C4BB001D6236FDB41F2D2E5DC3CEF5B939A83730F0AB7127935F2DDA24704 >> private.main.txt \ + && ./cert-generate.sh && cd .. + +mkdir -p results && PYTHONPATH=../miscellaneous && ./pull.sh ./results 10 && cd .. + +# install nodewatch dependencies & run the nodewatch app +python -m pip install -r requirements.txt + +echo RESOURCES_PATH=\'./puller/results/\' > ./nodewatch/config.py +NODEWATCH_SETTINGS=config.py && FLASK_APP=nodewatch && flask run ``` diff --git a/miscellaneous b/miscellaneous new file mode 160000 index 0000000..63d99c2 --- /dev/null +++ b/miscellaneous @@ -0,0 +1 @@ +Subproject commit 63d99c2dd15f1d07d20e2443da09c6472246c792 diff --git a/puller/pull.sh b/puller/pull.sh index 2cd5b3e..1e5a946 100755 --- a/puller/pull.sh +++ b/puller/pull.sh @@ -7,7 +7,7 @@ echo "[$(date)] crawling Symbol network" python3 -m network.nodes \ --resources ./networks/symbol.yaml \ --thread-count 64 \ - --certs ./cert \ + --certs ./certs \ --output "$1/symbol_nodes.json" \ --timeout "$2"