From 7fb36e8848132abeac5a9562898897f0561a548d Mon Sep 17 00:00:00 2001 From: plowsof <77655812+plowsof@users.noreply.github.com> Date: Fri, 11 Mar 2022 06:35:55 +0000 Subject: [PATCH] Update README.md --- CashFusion-Descendant-Analysis/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CashFusion-Descendant-Analysis/README.md b/CashFusion-Descendant-Analysis/README.md index 731f725..ffe51cc 100644 --- a/CashFusion-Descendant-Analysis/README.md +++ b/CashFusion-Descendant-Analysis/README.md @@ -11,9 +11,11 @@ Be advised that the analysis takes several weeks of computing time, upwards of 5 The main analysis is done with the R statistical programming language. R itself can be downloaded [here](https://cloud.r-project.org/). [RStudio](https://www.rstudio.com/products/rstudio/download/#download) is a good IDE for R. Install the necessary R packages with: ```R -install.packages(c("rbch","data.table","future.apply","RSQLite","DBI","igraph","stringr")) +install.packages(c("rbch","data.table","future.apply","RSQLite","DBI","igraph","stringr","curl")) ``` +Linux users may have difficulties installing the required packages due to external dependencies (as they must be compiled from source). Ubuntu users will require ```build-essential```, ```libcurl4-openssl-dev``` and ```libgmp3-dev```. Please raise an issue here if you encounter any further issues. + You must have a Bitcoin Cash (BCH) full node synced with the transaction index enabled with the `-txindex` flag. As of now, the analysis has been tested with the [Bitcoin Unlimited](https://www.bitcoinunlimited.info/) node implementation. It is best to run the following script files successively in separate R sessions for better RAM management. @@ -28,9 +30,18 @@ In the R script file you must set `bitcoin.conf.file` to the filepath of your bi testnet=0 rpcuser= rpcpassword= +rpcport=8332 +txindex=1 +rpcallowip=0.0.0.0/0 +rpcbind=localhost +server=1 ``` -Input \ and \ of your choice. +Input \ and \ of your choice. Perform a quick sanity check to ensure you can access your node via JSON-RPC. The following should return data, and not refuse your connection: (user being the value of rpcuser / pass the value of rpcpass) + +``` +curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://user:pass@localhost:8332/ +``` The script spawns multiple R process threads to accelerate queries to `bitcoind` and will take several hours to execute. In the specified data directory, a set of files named `tx_graph_height_BEGIN _to_END.rds` will be created.