From 8ebbcfe6ba191e03ea8a4f2fcc4829c098cbac03 Mon Sep 17 00:00:00 2001 From: Nazaret Garcia Date: Wed, 6 Nov 2024 11:41:24 -0300 Subject: [PATCH 1/2] Updating java version --- .../04-setup/02-installation/docker.md | 2 +- .../04-setup/02-installation/java.md | 12 ++++++------ .../04-setup/02-installation/ubuntu.md | 10 +++++----- .../04-setup/04-node-runner/linux.md | 8 ++++++-- .../04-setup/04-node-runner/macos.md | 6 +++--- .../04-setup/04-node-runner/windows.md | 2 +- .../03-node-operators/04-setup/reproducible-build.md | 5 +++++ 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/docs/03-node-operators/04-setup/02-installation/docker.md b/docs/03-node-operators/04-setup/02-installation/docker.md index 7acf2e19..daf35d74 100644 --- a/docs/03-node-operators/04-setup/02-installation/docker.md +++ b/docs/03-node-operators/04-setup/02-installation/docker.md @@ -29,7 +29,7 @@ If you already have docker installed. See how to [Install the RSKj node using Do :::tip[For Mac M1 / M2 (Apple Chips) using x86 based software] - Ensure you have `Rosetta` installed. This is typically pre-installed on recent macOS versions. -- Download an x86 JDK build, such as [Azul Zulu 11 (x86)](https://www.azul.com/downloads/?version=java-11-lts&os=macos&package=jdk), to ensure compatibility with x86 based software. +- Download an x86 JDK build, such as [Azul Zulu 17 (x86)](https://www.azul.com/downloads/?version=java-17-lts&os=macos&package=jdk#zulu), to ensure compatibility with x86 based software. ::: diff --git a/docs/03-node-operators/04-setup/02-installation/java.md b/docs/03-node-operators/04-setup/02-installation/java.md index a6ac5bc2..aeaabd34 100644 --- a/docs/03-node-operators/04-setup/02-installation/java.md +++ b/docs/03-node-operators/04-setup/02-installation/java.md @@ -9,12 +9,12 @@ description: "Install RSKj using Java." To setup a Rootstock node using Java, you need to: - Ensure your system meets the [minimum requirements](/node-operators/setup/requirements/) for installing the Rootstock node. -- Install [Java 8 JDK](https://www.java.com/download/). +- Install [Java 17 JDK](https://www.java.com/download/). :::tip[For Mac M1 / M2 (Apple Chips) using x86 based software] - Ensure you have `Rosetta` installed. This is typically pre-installed on recent macOS versions. -- Download an x86 JDK build, such as [Azul Zulu 11 (x86)](https://www.azul.com/downloads/?version=java-11-lts&os=macos&package=jdk), to ensure compatibility with x86 based software. +- Download an x86 JDK build, such as [Azul Zulu 17 (x86)](https://www.azul.com/downloads/?version=java-17-lts&os=macos&package=jdk#zulu), to ensure compatibility with x86 based software. ::: @@ -35,7 +35,7 @@ cd ~/rskj-node-jar ``` 3. **Move the JAR**: Move or copy the just downloaded jar file to your directory. ```jsx -mv ~/Downloads/rskj-core-6.3.1-ARROWHEAD-all.jar SHA256SUMS.asc /Users/{user}/rskj-node-jar/ +mv ~/Downloads/rskj-core-6.4.0-ARROWHEAD-all.jar SHA256SUMS.asc /Users/{user}/rskj-node-jar/ ``` ### Configuration @@ -63,7 +63,7 @@ mv ~/Downloads/rskj-core-6.3.1-ARROWHEAD-all.jar SHA256SUMS.asc /Users/{user}/rs :::tip[Tip] -Replace `` with the actual path to your JAR file. For example, `C:/RskjCode/rskj-core-6.3.1-ARROWHEAD-all.jar`. +Replace `` with the actual path to your JAR file. For example, `C:/RskjCode/rskj-core-6.4.0-ARROWHEAD-all.jar`. ::: ## Using Import Sync @@ -130,7 +130,7 @@ After starting the node, if there's no output, this means it's running correctly Output: ```shell -{"jsonrpc":"2.0","id":67,"result":"RskJ/6.3.1/Mac OS X/Java1.8/ARROWHEAD-202f1c5"} +{"jsonrpc":"2.0","id":67,"result":"RskJ/6.4.0/Mac OS X/Java17/ARROWHEAD-..."} ``` 2. To check the block number: @@ -176,5 +176,5 @@ To change networks on the RSKj node, use the following commands: ``` :::tip[Tip] -Replace `` with the actual path to your jar file. For example: `C:/RskjCode/rskj-core-6.3.1-ARROWHEAD-all.jar`. +Replace `` with the actual path to your jar file. For example: `C:/RskjCode/rskj-core-6.4.0-ARROWHEAD-all.jar`. ::: \ No newline at end of file diff --git a/docs/03-node-operators/04-setup/02-installation/ubuntu.md b/docs/03-node-operators/04-setup/02-installation/ubuntu.md index f19b59d4..e9581828 100644 --- a/docs/03-node-operators/04-setup/02-installation/ubuntu.md +++ b/docs/03-node-operators/04-setup/02-installation/ubuntu.md @@ -39,16 +39,16 @@ Choose `mainnet` and press `Enter` to continue ## Install via Direct Downloads -You can also download the RSKj Ubuntu Package for the latest RSKj release `ARROWHEAD 6.0.0` and install it with the `dpkg` command. Follow this [download link](https://launchpad.net/~rsksmart/+archive/ubuntu/rskj/+packages) to download the matching package for your ubuntu system. +You can also download the RSKj Ubuntu Package for the latest RSKj release `ARROWHEAD 6.4.0` and install it with the `dpkg` command. Follow this [download link](https://launchpad.net/~rsksmart/+archive/ubuntu/rskj/+packages) to download the matching package for your ubuntu system. ```shell -# first install openjdk-8-jre or oracle-java8-installer -sudo apt-get install openjdk-8-jre +# first install openjdk-17-jre or oracle-java17-installer +sudo apt-get install openjdk-17-jre -# download the RSKj pacakge and find the file rskj_2.0.1~yourUbuntuVersionName_amd64.deb +# download the RSKj package and find the file rskj-6.4.0~UBUNTU_VERSION_NAME_amd64.deb # run this command in the same directory as the deb file above -dpkg -i rskj_2.0.1~yourUbuntuVersionName_amd64.deb +dpkg -i rskj-6.4.0~UBUNTU_VERSION_NAME_amd64.deb ``` We recommend that you check that the SHA256 hash of the downloaded package file matches, prior to installation: diff --git a/docs/03-node-operators/04-setup/04-node-runner/linux.md b/docs/03-node-operators/04-setup/04-node-runner/linux.md index c4e30647..dd206796 100644 --- a/docs/03-node-operators/04-setup/04-node-runner/linux.md +++ b/docs/03-node-operators/04-setup/04-node-runner/linux.md @@ -15,7 +15,7 @@ First of all, you will need to install: |Dependency | Details| |------------- |-------------| |[Git for Linux](https://git-scm.com/download/linux)| Download this Git command line tool| -|[Java 8 JDK](http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html) | Follow the steps to install Java. To check if installation went correctly, check the version with command: `java-version`. Then, as admin, modify `/etc/enviroment` adding `JAVA_HOME="/usr/lib/jvm/java-8-oracle"`| +|[Java 17 JDK](https://docs.oracle.com/en/java/javase/17/install/installation-jdk-linux-platforms.html) | Follow the steps to install Java. To check if installation went correctly, check the version with command: `java-version`. Then, as admin, modify `/etc/enviroment` adding the correct `JAVA_HOME`| Recommended IDEs: - [IntelliJ IDEA Community](https://www.jetbrains.com/idea/download/#section=linux) @@ -30,7 +30,7 @@ Run these commands in the terminal: ```shell git clone --recursive https://github.com/rsksmart/rskj.git cd rskj -git checkout tags/ARROWHEAD-6.0.0 -b ARROWHEAD-6.0.0 +git checkout tags/ARROWHEAD-6.4.0 -b ARROWHEAD-6.4.0 ``` *Note:* It is better to download the code into a short path. @@ -88,6 +88,10 @@ Then set the options as shown below: - Use classpath of module: `rskj-core_main` - JRE need to be set as: `Default (1.8 - SDK of 'rsk-core_main' module)` +**Important** + +Starting with v6.4.0, the minimum supported Java LTS version is Java 17. Previous Java versions will no longer be supported. + #### Running the node We are ready to run the node using IDEA, just press the *Start* (green arrow) button at the right of the configuration just created. diff --git a/docs/03-node-operators/04-setup/04-node-runner/macos.md b/docs/03-node-operators/04-setup/04-node-runner/macos.md index 78fa7d52..9c72cd9b 100644 --- a/docs/03-node-operators/04-setup/04-node-runner/macos.md +++ b/docs/03-node-operators/04-setup/04-node-runner/macos.md @@ -15,7 +15,7 @@ First of all, you will need to install: |Dependency | Details| |------------- |-------------| |[Git for Mac](https://git-scm.com/download/mac)| Download this Git command line tool| -|[Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) | Follow the steps to install Java. To check if installation went correctly, check the version with command: `java -version`.| +|[Java 17 JDK](https://docs.oracle.com/en/java/javase/17/install/installation-jdk-linux-platforms.html) | Follow the steps to install Java. To check if installation went correctly, check the version with command: `java -version`.| Recommended IDEs: - [IntelliJ IDEA Community](https://www.jetbrains.com/idea/download/#section=linux) @@ -42,7 +42,7 @@ Run these commands on Git command line: ```shell git clone --recursive https://github.com/rsksmart/rskj.git cd rskj -git checkout tags/ARROWHEAD-6.0.0 -b ARROWHEAD-6.0.0 +git checkout tags/ARROWHEAD-6.4.0 -b ARROWHEAD-6.4.0 ``` *Note:* It is better to download the code into a short path. @@ -90,7 +90,7 @@ Then set the options as shown below: - Main Class: `co.rsk.Start` - Working directory: `/path-to-code/rskJ` - Use classpath of module: `rskj-core_main` -- JRE need to be set as: `Default (1.8 - SDK of 'rsk-core_main' module)` +- JRE need to be set as: `Default (17 - SDK of 'rsk-core_main' module)` #### Running the node diff --git a/docs/03-node-operators/04-setup/04-node-runner/windows.md b/docs/03-node-operators/04-setup/04-node-runner/windows.md index 4dcf7f8d..034b4906 100644 --- a/docs/03-node-operators/04-setup/04-node-runner/windows.md +++ b/docs/03-node-operators/04-setup/04-node-runner/windows.md @@ -36,7 +36,7 @@ Then set the options as shown below: - Main Class: `co.rsk.Start` - Working directory: `/path/to/code/rskJ` - Use classpath of module: `rskj-core_main` -- JRE need to be set as: `Default (1.8 - SDK of 'rsk-core_main' module)` +- JRE need to be set as: `Default (17 - SDK of 'rsk-core_main' module)` :::info[Info] - If it isn't configured the default JDK, you have to set it in: *File -> Project Structure*. diff --git a/docs/03-node-operators/04-setup/reproducible-build.md b/docs/03-node-operators/04-setup/reproducible-build.md index 40754dc0..9be74f09 100644 --- a/docs/03-node-operators/04-setup/reproducible-build.md +++ b/docs/03-node-operators/04-setup/reproducible-build.md @@ -12,6 +12,11 @@ This is a deterministic build process used to build Rootstock node JAR file. It It's highly recommended to follow the steps by yourself to avoid contamination of the process. +**Important** + +Starting with v6.4.0, the minimum supported Java LTS version is Java 17. Previous Java versions will no longer be supported. The following example is showing instructions +for v6.3.1, and thus uses jdk 8, this must be replaced by jdk 17 for v6.4.0 and up. + ## Install Docker Depending on your OS, you can install Docker following the official Docker guide: From 72e4660b159b84c5a202e4d2b498f2d8cca76a69 Mon Sep 17 00:00:00 2001 From: Owanate Amachree Date: Wed, 6 Nov 2024 17:42:54 +0200 Subject: [PATCH 2/2] Add sha256 checksum results and minor updates --- .../04-setup/02-installation/java.md | 14 +++++-- .../04-setup/04-node-runner/linux.md | 11 ++++-- .../04-setup/reproducible-build.md | 37 +++++++++++-------- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/docs/03-node-operators/04-setup/02-installation/java.md b/docs/03-node-operators/04-setup/02-installation/java.md index aeaabd34..6d4373dc 100644 --- a/docs/03-node-operators/04-setup/02-installation/java.md +++ b/docs/03-node-operators/04-setup/02-installation/java.md @@ -11,6 +11,12 @@ To setup a Rootstock node using Java, you need to: - Ensure your system meets the [minimum requirements](/node-operators/setup/requirements/) for installing the Rootstock node. - Install [Java 17 JDK](https://www.java.com/download/). +:::warning[Important] + +Starting with v6.4.0, the minimum supported Java LTS version is Java 17. Previous Java versions will no longer be supported. + +::: + :::tip[For Mac M1 / M2 (Apple Chips) using x86 based software] - Ensure you have `Rosetta` installed. This is typically pre-installed on recent macOS versions. @@ -38,13 +44,13 @@ cd ~/rskj-node-jar mv ~/Downloads/rskj-core-6.4.0-ARROWHEAD-all.jar SHA256SUMS.asc /Users/{user}/rskj-node-jar/ ``` -### Configuration + ### Run the Node @@ -130,7 +136,7 @@ After starting the node, if there's no output, this means it's running correctly Output: ```shell -{"jsonrpc":"2.0","id":67,"result":"RskJ/6.4.0/Mac OS X/Java17/ARROWHEAD-..."} +{"jsonrpc":"2.0","id":67,"result":"RskJ/6.4.0/Mac OS X/Java21/ARROWHEAD-e016b25"} ``` 2. To check the block number: @@ -150,7 +156,7 @@ Output: Output: ```jsx -{"jsonrpc":"2.0","id":1,"result":"0x0"} +{"jsonrpc":"2.0","id":1,"result":"0x3710"} ``` :::success[Success] diff --git a/docs/03-node-operators/04-setup/04-node-runner/linux.md b/docs/03-node-operators/04-setup/04-node-runner/linux.md index dd206796..1508dc9c 100644 --- a/docs/03-node-operators/04-setup/04-node-runner/linux.md +++ b/docs/03-node-operators/04-setup/04-node-runner/linux.md @@ -21,6 +21,13 @@ Recommended IDEs: - [IntelliJ IDEA Community](https://www.jetbrains.com/idea/download/#section=linux) - [Visual Studio Code](https://code.visualstudio.com/) + +:::warning[Important] + +Starting with v6.4.0, the minimum supported Java LTS version is Java 17. Previous Java versions will no longer be supported. + +::: + ## Get the source code Using the installed command-line tool Git, you need to retrieve (or clone) the RSKj Github source code from [here](https://github.com/rsksmart/rskj). @@ -88,10 +95,6 @@ Then set the options as shown below: - Use classpath of module: `rskj-core_main` - JRE need to be set as: `Default (1.8 - SDK of 'rsk-core_main' module)` -**Important** - -Starting with v6.4.0, the minimum supported Java LTS version is Java 17. Previous Java versions will no longer be supported. - #### Running the node We are ready to run the node using IDEA, just press the *Start* (green arrow) button at the right of the configuration just created. diff --git a/docs/03-node-operators/04-setup/reproducible-build.md b/docs/03-node-operators/04-setup/reproducible-build.md index 9be74f09..e67dd169 100644 --- a/docs/03-node-operators/04-setup/reproducible-build.md +++ b/docs/03-node-operators/04-setup/reproducible-build.md @@ -12,10 +12,11 @@ This is a deterministic build process used to build Rootstock node JAR file. It It's highly recommended to follow the steps by yourself to avoid contamination of the process. -**Important** +:::warning[Important] -Starting with v6.4.0, the minimum supported Java LTS version is Java 17. Previous Java versions will no longer be supported. The following example is showing instructions -for v6.3.1, and thus uses jdk 8, this must be replaced by jdk 17 for v6.4.0 and up. +Starting with v6.4.0, the minimum supported Java LTS version is Java 17. Previous Java versions will no longer be supported. The following example for Linux OS is showing instructions for v6.3.1, and thus uses jdk 8, this must be replaced by jdk 17 for v6.4.0 and up. + +::: ## Install Docker @@ -49,9 +50,9 @@ Create a ```Dockerfile``` to setup the build environment. apt-get clean gpg --keyserver https://secchannel.rsk.co/release.asc --recv-keys 1A92D8942171AFA951A857365DECF4415E3B8FA4 gpg --finger 1A92D8942171AFA951A857365DECF4415E3B8FA4 - git clone --single-branch --depth 1 --branch ARROWHEAD-6.3.1 https://github.com/rsksmart/rskj.git /code/rskj + git clone --single-branch --depth 1 --branch ARROWHEAD-6.4.0 https://github.com/rsksmart/rskj.git /code/rskj git clone https://github.com/rsksmart/reproducible-builds - CP /Users/{$USER}/reproducible-builds/rskj/6.3.1-arrowhead/Dockerfile /Users/{$USER}/code/rskj + CP /Users/{$USER}/reproducible-builds/rskj/6.4.0-arrowhead/Dockerfile /Users/{$USER}/code/rskj WORKDIR /code/rskj gpg --verify SHA256SUMS.asc sha256sum --check SHA256SUMS.asc @@ -68,9 +69,9 @@ Create a ```Dockerfile``` to setup the build environment. brew cleanup gpg --keyserver https://secchannel.rsk.co/release.asc --recv-keys 1A92D8942171AFA951A857365DECF4415E3B8FA4 gpg --finger 1A92D8942171AFA951A857365DECF4415E3B8FA4 - git clone --single-branch --depth 1 --branch ARROWHEAD-6.3.1 https://github.com/rsksmart/rskj.git ./code/rskj + git clone --single-branch --depth 1 --branch ARROWHEAD-6.4.0 https://github.com/rsksmart/rskj.git ./code/rskj git clone https://github.com/rsksmart/reproducible-builds - CP /Users/{$USER}/reproducible-builds/rskj/6.3.1-arrowhead/Dockerfile /Users/{$USER}/code/rskj + CP /Users/{$USER}/reproducible-builds/rskj/6.4.0-arrowhead/Dockerfile /Users/{$USER}/code/rskj cd /code/rskj gpg --verify SHA256SUMS.asc sha256sum --check SHA256SUMS.asc @@ -90,8 +91,12 @@ BUILD SUCCESSFUL in 55s 14 actionable tasks: 13 executed, 1 up-to-date ``` +:::tip[command not found: sha256sum] + If you get the error: zsh: command not found: sha256sum -> Run the command `brew install coreutils` + +Run the command `brew install coreutils` +::: If you are not familiar with Docker or the ```Dockerfile``` format: what this does is use the Ubuntu 16.04 base image and install ```git```, ```curl```, ```gnupg-curl``` and ```openjdk-8-jdk```, required for building the Rootstock node. @@ -101,12 +106,12 @@ If you are not familiar with Docker or the ```Dockerfile``` format: what this do To create a reproducible build, run the command below in the same directory: ```bash -docker build -t rskj/6.3.1-arrowhead . +docker build -t rskj/6.4.0-arrowhead . ``` :::danger[Error] -if you run into any problems, ensure you're running the commands on the right folder and also ensure docker daemon is running is updated to the recent version. +if you run into any problems, ensure you're running the commands on the right folder and also ensure docker daemon is running is updated to the recent version. See how to [Setup node on Docker](/node-operators/setup/installation/docker/) ::: @@ -122,7 +127,7 @@ This may take several minutes to complete. What is done is: The last step of the build prints the `sha256sum` of the files, to obtain `SHA-256` checksums, run the following command in the same directory as shown above: ```bash -docker run --rm rskj/6.3.1-arrowhead sh -c 'sha256sum * | grep -v javadoc.jar' +docker run --rm rskj/6.4.0-arrowhead sh -c 'sha256sum * | grep -v javadoc.jar' ``` ## Check Results @@ -132,11 +137,11 @@ After running the build process, a JAR file will be created in ```/rskj/rskj-cor You can check the SHA256 sum of the result file and compare it to the one published by Rootstock for that version. ```bash -27f088e5c7535974203bc77711a1e9bbaa258cd7e5d69cd368d8ca5529b38115 rskj-core-6.3.1-ARROWHEAD-all.jar -101e35cbaef4c3997432e561417f208f93e5121c52be506bcf2bf22357855bb8 rskj-core-6.3.1-ARROWHEAD-sources.jar -9e29606d4bd71dd0458ec3eaa61ab4003d6aecad4bf5a5a40cc32d8d6535de75 rskj-core-6.3.1-ARROWHEAD.jar -bb31e2e2b14f9a15f6c7ca2595a7817860334f38f5d7c6e146306275834b7564 rskj-core-6.3.1-ARROWHEAD.module -ad539153c8bb8d09307c4a77c9a8af062531241f6a5155c2cd21f0892da27b18 rskj-core-6.3.1-ARROWHEAD.pom +269c6416759ff8979e6bc6a6b1ae96ab95705f1c397df06b160a9f2070a373ce rskj-core-6.4.0-ARROWHEAD-all.jar +cb4ecbcf4654d97177389f5505764e3cc9ef5b5f87f7aca2956151c71416d315 rskj-core-6.4.0-ARROWHEAD-sources.jar +bbc0fc1bb7e865c9e11eb78317db32592c9b7dfd8a6818890729af5827a66237 rskj-core-6.4.0-ARROWHEAD.jar +fabf8af48c167d42d290e9fa44f80b76b96cd403b56c4c87f8df23fd0ea3c9f0 rskj-core-6.4.0-ARROWHEAD.module +6dbc8153d510d4e910759e2e76cf40f9c0635185f66aa612dac4b2c8a60d0c63 rskj-core-6.4.0-ARROWHEAD.pom ``` For SHA256 sum of older versions check the [releases page](https://github.com/rsksmart/rskj/releases).