Skip to content

Commit 7f531cc

Browse files
committed
Moves the quick setup guide to new folder
1 parent 1477748 commit 7f531cc

File tree

2 files changed

+70
-62
lines changed

2 files changed

+70
-62
lines changed

README.md

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -21,70 +21,10 @@ This node is used by Rootstock PowPeg signatories to interact with the Bridge co
2121
## Software installation help
2222
Disclaimer: this documentation will be specific for macOS operating system.
2323

24-
### Quick Setup
25-
26-
1. Install Java OpenJDK 1.8 from the binaries (if it is not installed yet)
27-
1. You can download it from here: `https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2021-05-08-08-14/OpenJDK8U-jdk_x64_mac_hotspot_2021-05-08-08-14.tar.gz`
28-
1. `cd` to the directory where you want to download it. It could be like `cd /Library/Java/JavaVirtualMachines/`
29-
2. Download it like this: `sudo curl -o adoptopenjdk-8.tar.gz -L https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2021-05-08-08-14/OpenJDK8U-jdk_x64_mac_hotspot_2021-05-08-08-14.tar.gz`
30-
3. Unzip it like this: `sudo tar -zxvf adoptopenjdk-8.tar.gz`
31-
4. The unzipped directory could be named like this `jdk8u302-b01`. Run an `ls` command to see it.
32-
2. Add it to the `.bash_profile`.
33-
1. Open the `.bash_profile` file with `nano` like this `nano ~/.bash_profile` and add the following 2 `export` lines:
34-
2. `export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk8u302-b01/Contents/Home/bin`
35-
3. `export PATH="$JAVA_HOME/bin:$PATH"`
36-
4. Save it and run the command: `source ~/.bash_profile` and restart the terminal. After this, the `java -version` command should return info.
37-
2. Install bitcoind
38-
1. `cd` to the directory where you want to download it. It could be `/Library/Bitcoin` (if it doesn't exit, you can create it running the command `sudo mkdir /Library/Bitcoin`)
39-
2. You can download version 0.18.1 (ideal for regtest) from here: `https://bitcoincore.org/bin/bitcoin-core-0.18.1/bitcoin-0.18.1-osx64.tar.gz`
40-
3. You can download version 24.0.1 `https://bitcoincore.org/bin/bitcoin-core-24.0.1/bitcoin-24.0.1-x86_64-apple-darwin.tar.gz`
41-
4. Download it like this: `sudo curl -o bitcoind18.tar.gz -L https://bitcoincore.org/bin/bitcoin-core-0.18.1/bitcoin-0.18.1-osx64.tar.gz`
42-
5. Unzip it like this: `sudo tar -zxvf bitcoind18.tar.gz`
43-
6. Run the `ls` command to see the actual name of the unzipped directory. It should be like `bitcoin-0.18.1`
44-
7. Add the path `export PATH="$PATH:/Library/Bitcoin/bitcoin-0.18.1/bin"` to the `/.zshrc` file
45-
1. Open the `.zshrc` file with nano like this: `nano ~/.zshrc` and add the following line in it and save it: `export PATH="$PATH:/Library/Bitcoin/bitcoin-0.18.1/bin"`
46-
8. Run `source ~/.zshrc` command, close and reopen the terminal.
47-
9. Running an instance of bitcoind
48-
1. To run it in regtest mode, run this command: `bitcoind -deprecatedrpc=generate -addresstype=legacy -regtest -printtoconsole -server -rpcuser=rsk -rpcpassword=rsk -rpcport=18332 -txindex -datadir=/Library/Bitcoin/data`
49-
2. You can also put this command into an `bitcoin-regtest.sh` file, make it executable with `sudo chmod +x bitcoin-regtest.sh` and run it like `./bitcoin-regtest.sh`
50-
3. To run it in regular mode, simply run the command: `bitcoind`
51-
10. Generate some blocks
52-
1. To generate, for example, 200 regtest bitcoin blocks, run: `./btc-regtest.sh generate 200`
53-
3. Create a `powpeg-project` folder anywhere you like
54-
1. For example: `mkdir /Library/powpeg-project`
55-
4. Setup the rskj project
56-
1. `cd` to the `powpeg-project` directory: `cd /Library/powpeg-project`
57-
2. Clone it from here: `https://github.com/rsksmart/rskj`
58-
1. `git clone https://github.com/rsksmart/rskj.git`
59-
2. `cd` to the cloned `rskj` directory: `cd rskj`
60-
3. Run the `configure.sh`
61-
1. You will probably have to make it executable first with: `sudo chmod +x configure.sh`
62-
2. And run it from a terminal like this: `./configure.sh`
63-
5. Setup this project (powpeg-node: `https://github.com/rsksmart/powpeg-node`)
64-
1. `cd` to the `powpeg-project` directory: `cd /Library/powpeg-project`
65-
2. `git clone https://github.com/rsksmart/powpeg-node.git`
66-
3. `cd` to the cloned `powpeg-node` directory: `cd powpeg-node`
67-
4. Run the `configure.sh` file present in the root directory
68-
1. You will probably have to make it executable with: `sudo chmod +x configure.sh`
69-
2. And run it from a terminal like this: `./configure.sh`
70-
5. Make a copy of the `development-settings.gradle.sample` file and rename it to `DONT-COMMIT-settings.gradle`
71-
1. Remove the line `# Sample configuration to build rskj from the directory /home/user/another/dir/rskj`
72-
2. Remove the line `# Rename it to DONT-COMMIT-settings.gradle for use in your local environment`
73-
3. Replace the `'/home/user/another/dir/rskj/'` with the relative or absolute path where the `rskj` project is, for example: `/Library/powpeg-project/rskj`
74-
6. Create a `fed.conf` file and set it up
75-
1. Check the config file sample in `src/main/resources/config/fed-sample.conf`, copy it, rename it to `fed.conf` and update it as you need.
76-
7. Optionally create a `logback.xml` file for the logging
77-
1. Check the config file sample in `src/main/resources/config/logback-sample.xml`, copy it, rename it to `logback.xml` and update it as you need, adding or removing classes and their log level.
78-
8. Build the powpeg project
79-
1. Run: `./gradlew clean build`
80-
2. To build it without running the tests, run: `./gradlew clean build -x test`
81-
3. `cd` into `/Library/powpeg-project/powpeg-node/build/libs/` directory to see the version of the `federate-node-SNAPSHOT-<version>-all.jar` file, so you can run it in the following step.
82-
9. Run the project
83-
1. Resetting the rsk db (replace `<version>` with the actual version of the `.jar`): `java -cp /Library/powpeg-project/powpeg-node/build/libs/federate-node-SNAPSHOT-<version>-all.jar -Drsk.conf.file=/Library/powpeg-project/powpeg-node/src/main/resources/config/fed-sample.conf -Dlogback.configurationFile=/Library/powpeg-project/powpeg-node/logback.xml co.rsk.federate.FederateRunner --regtest --reset`
84-
2. Without resetting the rsk db (replace `<version>` with the actual version of the `.jar`): `java -cp /Library/powpeg-project/powpeg-node/build/libs/federate-node-SNAPSHOT-<version>-all.jar -Drsk.conf.file=/Library/powpeg-project/powpeg-node/src/main/resources/config/fed-sample.conf -Dlogback.configurationFile=/Library/powpeg-project/powpeg-node/logback.xml co.rsk.federate.FederateRunner --regtest`
85-
8624
### Setup Details
8725

26+
If you need a quick and easy, fool-proof way to setup the powpeg-node, you can follow the steps in the `quick_setup_samples/quick_setup_for_macos_x64.md` file.
27+
8828
#### **Java JDK 1.8**
8929

9030
Although optional we recommend to install jenv to manage different Java versions, to do that run: `brew install jenv`
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Quick Setup for macos x64
2+
3+
In case you would like to try a fool-proof setup for macos from scratch, you can try the following steps.
4+
You can also skip some of the steps if it is not applicable, for example, you don't need to install Java 1.8 if you have it already installed.
5+
6+
You can also try your own variations. But the example provided here makes it easy for anybody to setup a powpeg node from scratch in an easy way.
7+
8+
## Steps
9+
10+
1. Install Java OpenJDK 1.8 from the binaries (if it is not installed yet)
11+
1. You can download it from here: `https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2021-05-08-08-14/OpenJDK8U-jdk_x64_mac_hotspot_2021-05-08-08-14.tar.gz`
12+
1. `cd` to the directory where you want to download it. It could be like `cd /Library/Java/JavaVirtualMachines/`
13+
2. Download it like this: `sudo curl -o adoptopenjdk-8.tar.gz -L https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2021-05-08-08-14/OpenJDK8U-jdk_x64_mac_hotspot_2021-05-08-08-14.tar.gz`
14+
3. Unzip it like this: `sudo tar -zxvf adoptopenjdk-8.tar.gz`
15+
4. The unzipped directory could be named like this `jdk8u302-b01`. Run an `ls` command to see it.
16+
2. Add it to the `.bash_profile`.
17+
1. Open the `.bash_profile` file with `nano` like this `nano ~/.bash_profile` and add the following 2 `export` lines:
18+
2. `export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk8u302-b01/Contents/Home/bin`
19+
3. `export PATH="$JAVA_HOME/bin:$PATH"`
20+
4. Save it and run the command: `source ~/.bash_profile` and restart the terminal. After this, the `java -version` command should return info.
21+
2. Install bitcoind
22+
1. `cd` to the directory where you want to download it. It could be `/Library/Bitcoin` (if it doesn't exit, you can create it running the command `sudo mkdir /Library/Bitcoin`)
23+
2. You can download version 0.18.1 (ideal for regtest) from here: `https://bitcoincore.org/bin/bitcoin-core-0.18.1/bitcoin-0.18.1-osx64.tar.gz`
24+
3. You can download version 24.0.1 `https://bitcoincore.org/bin/bitcoin-core-24.0.1/bitcoin-24.0.1-x86_64-apple-darwin.tar.gz`
25+
4. Download it like this: `sudo curl -o bitcoind18.tar.gz -L https://bitcoincore.org/bin/bitcoin-core-0.18.1/bitcoin-0.18.1-osx64.tar.gz`
26+
5. Unzip it like this: `sudo tar -zxvf bitcoind18.tar.gz`
27+
6. Run the `ls` command to see the actual name of the unzipped directory. It should be like `bitcoin-0.18.1`
28+
7. Add the path `export PATH="$PATH:/Library/Bitcoin/bitcoin-0.18.1/bin"` to the `/.zshrc` file
29+
1. Open the `.zshrc` file with nano like this: `nano ~/.zshrc` and add the following line in it and save it: `export PATH="$PATH:/Library/Bitcoin/bitcoin-0.18.1/bin"`
30+
8. Run `source ~/.zshrc` command, close and reopen the terminal.
31+
9. Running an instance of bitcoind
32+
1. To run it in regtest mode, run this command: `bitcoind -deprecatedrpc=generate -addresstype=legacy -regtest -printtoconsole -server -rpcuser=rsk -rpcpassword=rsk -rpcport=18332 -txindex -datadir=/Library/Bitcoin/data`
33+
2. You can also put this command into an `bitcoin-regtest.sh` file, make it executable with `sudo chmod +x bitcoin-regtest.sh` and run it like `./bitcoin-regtest.sh`
34+
3. To run it in regular mode, simply run the command: `bitcoind`
35+
10. Generate some blocks
36+
1. To generate, for example, 200 regtest bitcoin blocks, run: `./btc-regtest.sh generate 200`
37+
3. Create a `powpeg-project` folder anywhere you like
38+
1. For example: `mkdir /Library/powpeg-project`
39+
4. Setup the rskj project
40+
1. `cd` to the `powpeg-project` directory: `cd /Library/powpeg-project`
41+
2. Clone it from here: `https://github.com/rsksmart/rskj`
42+
1. `git clone https://github.com/rsksmart/rskj.git`
43+
2. `cd` to the cloned `rskj` directory: `cd rskj`
44+
3. Run the `configure.sh`
45+
1. You will probably have to make it executable first with: `sudo chmod +x configure.sh`
46+
2. And run it from a terminal like this: `./configure.sh`
47+
5. Setup this project (powpeg-node: `https://github.com/rsksmart/powpeg-node`)
48+
1. `cd` to the `powpeg-project` directory: `cd /Library/powpeg-project`
49+
2. `git clone https://github.com/rsksmart/powpeg-node.git`
50+
3. `cd` to the cloned `powpeg-node` directory: `cd powpeg-node`
51+
4. Run the `configure.sh` file present in the root directory
52+
1. You will probably have to make it executable with: `sudo chmod +x configure.sh`
53+
2. And run it from a terminal like this: `./configure.sh`
54+
5. Make a copy of the `development-settings.gradle.sample` file and rename it to `DONT-COMMIT-settings.gradle`
55+
1. Remove the line `# Sample configuration to build rskj from the directory /home/user/another/dir/rskj`
56+
2. Remove the line `# Rename it to DONT-COMMIT-settings.gradle for use in your local environment`
57+
3. Replace the `'/home/user/another/dir/rskj/'` with the relative or absolute path where the `rskj` project is, for example: `/Library/powpeg-project/rskj`
58+
6. Create a `fed.conf` file and set it up
59+
1. Check the config file sample in `src/main/resources/config/fed-sample.conf`, copy it, rename it to `fed.conf` and update it as you need.
60+
7. Optionally create a `logback.xml` file for the logging
61+
1. Check the config file sample in `src/main/resources/config/logback-sample.xml`, copy it, rename it to `logback.xml` and update it as you need, adding or removing classes and their log level.
62+
8. Build the powpeg project
63+
1. Run: `./gradlew clean build`
64+
2. To build it without running the tests, run: `./gradlew clean build -x test`
65+
3. `cd` into `/Library/powpeg-project/powpeg-node/build/libs/` directory to see the version of the `federate-node-SNAPSHOT-<version>-all.jar` file, so you can run it in the following step.
66+
9. Run the project
67+
1. Resetting the rsk db (replace `<version>` with the actual version of the `.jar`): `java -cp /Library/powpeg-project/powpeg-node/build/libs/federate-node-SNAPSHOT-<version>-all.jar -Drsk.conf.file=/Library/powpeg-project/powpeg-node/src/main/resources/config/fed-sample.conf -Dlogback.configurationFile=/Library/powpeg-project/powpeg-node/logback.xml co.rsk.federate.FederateRunner --regtest --reset`
68+
2. Without resetting the rsk db (replace `<version>` with the actual version of the `.jar`): `java -cp /Library/powpeg-project/powpeg-node/build/libs/federate-node-SNAPSHOT-<version>-all.jar -Drsk.conf.file=/Library/powpeg-project/powpeg-node/src/main/resources/config/fed-sample.conf -Dlogback.configurationFile=/Library/powpeg-project/powpeg-node/logback.xml co.rsk.federate.FederateRunner --regtest`

0 commit comments

Comments
 (0)