From e865b77766af1093fdf410b621f4692b100296d1 Mon Sep 17 00:00:00 2001 From: plebhash Date: Fri, 5 Apr 2024 19:37:32 -0300 Subject: [PATCH 1/5] fix nproc --- src/getting-started.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/getting-started.md b/src/getting-started.md index ca1253e..b478f23 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -82,13 +82,15 @@ git clone https://github.com/Sjors/bitcoin.git cd bitcoin git checkout sv2 ``` -Next, compile the template provider: +Next, compile the template provider. You can accelerate the process by using multiple cores. ```bash make clean -./autogen.sh && ./configure -make -j 10 +./autogen.sh && ./configure +nproc # find out how many cores are available on your CPU +make -j # replace the result of nproc here ``` + Edit the `bitcoin.conf` file by adding: ```bash testnet=1 @@ -206,4 +208,4 @@ In case a public key is required, as explained in the config files, you can star ## Community support -If you get any issue during testing phase, feel free to [join our community Discord](https://discord.gg/fsEW23wFYs) to get community support or file a [bug report on GitHub](https://github.com/stratum-mining/stratum/issues/new). \ No newline at end of file +If you get any issue during testing phase, feel free to [join our community Discord](https://discord.gg/fsEW23wFYs) to get community support or file a [bug report on GitHub](https://github.com/stratum-mining/stratum/issues/new). From c406f7a85937f2bf74dfba9d02a38bcd6c0c1a42 Mon Sep 17 00:00:00 2001 From: plebhash Date: Mon, 8 Apr 2024 15:52:55 -0300 Subject: [PATCH 2/5] automate nproc --- src/getting-started.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/getting-started.md b/src/getting-started.md index b478f23..f3a90b3 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -87,8 +87,9 @@ Next, compile the template provider. You can accelerate the process by using mul ```bash make clean ./autogen.sh && ./configure -nproc # find out how many cores are available on your CPU -make -j # replace the result of nproc here +make -j "$(nproc)" # on linux +# or +make -j "$(sysctl -n hw.physicalcpu)" # on macOS ``` Edit the `bitcoin.conf` file by adding: From fd0ef435f6cd4a34719c30977fae53991b33e3c2 Mon Sep 17 00:00:00 2001 From: plebhash <147345153+plebhash@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:10:33 -0300 Subject: [PATCH 3/5] Update src/getting-started.md --- src/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/getting-started.md b/src/getting-started.md index f3a90b3..572411a 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -82,7 +82,7 @@ git clone https://github.com/Sjors/bitcoin.git cd bitcoin git checkout sv2 ``` -Next, compile the template provider. You can accelerate the process by using multiple cores. +Next, compile the template provider. You can accelerate the process by using multiple cores with the `-j` option. ```bash make clean From 6aa84bb6bcf1c547a3b361ab8011f069f9f6c412 Mon Sep 17 00:00:00 2001 From: plebhash <147345153+plebhash@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:10:33 -0300 Subject: [PATCH 4/5] Update src/getting-started.md --- src/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/getting-started.md b/src/getting-started.md index 572411a..60b52a9 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -102,7 +102,7 @@ rpcpassword=password Run the Template provider: ```bash -./src/bitcoind -sv2 -sv2port=8442 -debug=sv2 +./bitcoin-sv2-tp-0.1.2/bin/bitcoind -sv2 -sv2port=8442 -debug=sv2 ``` Optional paremeters: From 1048ebe1f7b66ba0b524862ba909985ad5b65a13 Mon Sep 17 00:00:00 2001 From: plebhash Date: Mon, 15 Apr 2024 14:05:44 -0300 Subject: [PATCH 5/5] download Sjors release --- src/getting-started.md | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/getting-started.md b/src/getting-started.md index 60b52a9..6eb90d1 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -75,22 +75,7 @@ Depending on mining device you do run, you may have to adjust `tproxy-config-loc #### Run Template Provider -Clone template provider repository: - -```bash -git clone https://github.com/Sjors/bitcoin.git -cd bitcoin -git checkout sv2 -``` -Next, compile the template provider. You can accelerate the process by using multiple cores with the `-j` option. - -```bash -make clean -./autogen.sh && ./configure -make -j "$(nproc)" # on linux -# or -make -j "$(sysctl -n hw.physicalcpu)" # on macOS -``` +Download a release from Sjors' fork of Bitcoin Core from https://github.com/Sjors/bitcoin/releases Edit the `bitcoin.conf` file by adding: ```bash @@ -114,7 +99,7 @@ There are optional parameters which can be used to better manage the Template Pr For example: ```bash -./src/bitcoind -sv2 -sv2port=8442 -sv2interval=20 -sv2feedelta=1000 -debug=sv2 -loglevel=sv2:trace +./bitcoin-sv2-tp-0.1.2/bin/bitcoind -sv2 -sv2port=8442 -sv2interval=20 -sv2feedelta=1000 -debug=sv2 -loglevel=sv2:trace ``` This way new templates are constructed every 20 seconds (taking the most profitable txs from the mempool) and they are sent downstream if new fees collected are more than 1000 sats.