Skip to content

Commit

Permalink
Merge pull request #1049 from HorizenOfficial/st/dump
Browse files Browse the repository at this point in the history
St/dump
  • Loading branch information
paolocappelletti authored Jul 3, 2024
2 parents a200127 + 2899527 commit b048948
Show file tree
Hide file tree
Showing 24 changed files with 296 additions and 47 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**0.13.0**
1. Enabling preimages configuration
2. [eth RPC endpoint]: added zen_dump rpc method for requesting an EVM state dump on a json file

**0.12.0**
1. Sparkz dependency updated to 2.4.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ While we keep monitoring the memory footprint of the proofs generation process,
- After the installation, just run `export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1` before starting the sidechain node, or run the sidechain node adding `LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1` at the beginning of the java command line as follows:

```
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 java -cp ./target/sidechains-sdk-simpleapp-0.12.0.jar:./target/lib/* io.horizen.examples.SimpleApp <path_to_config_file>
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 java -cp ./target/sidechains-sdk-simpleapp-0.13.0-SNAPSHOT.jar:./target/lib/* io.horizen.examples.SimpleApp <path_to_config_file>
```
- In the folder `ci` you will find the script `run_sc.sh` to automatically check and use jemalloc library while starting the sidechain node.

Expand Down
2 changes: 1 addition & 1 deletion ci/run_sc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eo pipefail

SIMPLE_APP_VERSION="${SIMPLE_APP_VERSION:-0.12.0}"
SIMPLE_APP_VERSION="${SIMPLE_APP_VERSION:-0.13.0-SNAPSHOT}"

if [ -d "$1" ] && [ -f "$2" ]; then
path_to_jemalloc="$(ldconfig -p | grep "$(arch)" | grep 'libjemalloc\.so\.1$' | tr -d ' ' | cut -d '>' -f 2)"
Expand Down
6 changes: 6 additions & 0 deletions doc/release/0.13.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ How to specify it:

enabled = "true"

### New zen_dump rpc method
This method executes a dump on a json file of the EVM state. It takes 2 input parameters:
- blockHashOrNumber: hash or height of the block where the dump needs to be executed
- fileName: fully-qualified name of the json file where the dump will be saved

It can be called only on nodes where preimages were enabled.

---
## Bug Fixes
Expand Down
10 changes: 5 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ Otherwise, to run an Example App outside the IDE:
* (Windows)
```
cd Sidechains-SDK\examples\simpleapp
java -cp ./target/sidechains-sdk-simpleapp-0.12.0.jar;./target/lib/* io.horizen.examples.SimpleApp <path_to_config_file>
java -cp ./target/sidechains-sdk-simpleapp-0.13.0-SNAPSHOT.jar;./target/lib/* io.horizen.examples.SimpleApp <path_to_config_file>
```
* (Linux)
```
cd ./Sidechains-SDK/examples/utxo/simpleapp
java -cp ./target/sidechains-sdk-simpleapp-0.12.0.jar:./target/lib/\* io.horizen.examples.SimpleApp <path_to_config_file>
java -cp ./target/sidechains-sdk-simpleapp-0.13.0-SNAPSHOT.jar:./target/lib/\* io.horizen.examples.SimpleApp <path_to_config_file>
```
**Model: Account**
* (Windows)
```
cd Sidechains-SDK\examples\evmapp
java -cp ./target/sidechains-sdk-evmapp-0.12.0.jar;./target/lib/* io.horizen.examples.EvmApp <path_to_config_file>
java -cp ./target/sidechains-sdk-evmapp-0.13.0-SNAPSHOT.jar;./target/lib/* io.horizen.examples.EvmApp <path_to_config_file>
```
* (Linux)
```
cd ./Sidechains-SDK/examples/account/evmapp
java -cp ./target/sidechains-evmapp-0.12.0.jar:./target/lib/\* io.horizen.examples.EvmApp <path_to_config_file>
java -cp ./target/sidechains-evmapp-0.13.0-SNAPSHOT.jar:./target/lib/\* io.horizen.examples.EvmApp <path_to_config_file>
```
On some Linux OSs during backward transfers certificates proofs generation an extremely large RAM consumption may happen, that will lead to the process being force killed by the OS.
Expand All @@ -74,7 +74,7 @@ While we keep monitoring the memory footprint of the proofs generation process,
- After the installation, just run `export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1` before starting the sidechain node, or run the sidechain node adding `LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1` at the beginning of the java command line as follows:
```
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 java -cp ./target/sidechains-sdk-simpleapp-0.12.0.jar:./target/lib/* io.horizen.examples.SimpleApp <path_to_config_file>
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 java -cp ./target/sidechains-sdk-simpleapp-0.13.0-SNAPSHOT.jar:./target/lib/* io.horizen.examples.SimpleApp <path_to_config_file>
```
- In the folder `ci` you will find the script `run_sc.sh` to automatically check and use jemalloc library while starting the sidechain node.
Expand Down
4 changes: 2 additions & 2 deletions examples/account/evmapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-evmapp</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<inceptionYear>2022</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
6 changes: 3 additions & 3 deletions examples/account/evmapp_sctool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-evmapp_sctool</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<inceptionYear>2022</inceptionYear>
<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand All @@ -14,13 +14,13 @@
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-scbootstrappingtools</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-evmapp</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
16 changes: 8 additions & 8 deletions examples/mc_sc_workflow_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Build SDK components by using a command (in the root of the Sidechains-SDK folde

Run Bootstrapping tool using the command depending on the sidechain model:

- account: `java -jar tools/sidechains-sdk-account_sctools/target/sidechains-sdk-account_sctools-0.12.0.jar`
- utxo: `java -jar tools/sidechains-sdk-utxo_sctools/target/sidechains-sdk-utxo_sctools-0.12.0.jar`
- account: `java -jar tools/sidechains-sdk-account_sctools/target/sidechains-sdk-account_sctools-0.13.0-SNAPSHOT.jar`
- utxo: `java -jar tools/sidechains-sdk-utxo_sctools/target/sidechains-sdk-utxo_sctools-0.13.0-SNAPSHOT.jar`

All other commands are performed as commands for Bootstrapping tool in the next format: `"command name" "parameters for command in JSON format"`.
For any help, you could use the command `help`, for the exit just print `exit`
Expand Down Expand Up @@ -507,30 +507,30 @@ Run an Example App with the `my_settings.conf`:

* For Windows:
```
java -cp ./examples/utxo/simpleapp/target/sidechains-sdk-simpleapp-0.12.0.jar;./examples/simpleapp/target/lib/* io.horizen.examples.SimpleApp ./examples/my_settings.conf
java -cp ./examples/utxo/simpleapp/target/sidechains-sdk-simpleapp-0.13.0-SNAPSHOT.jar;./examples/simpleapp/target/lib/* io.horizen.examples.SimpleApp ./examples/my_settings.conf
```
* For Linux (Glibc):
```
java -cp ./examples/utxo/simpleapp/target/sidechains-sdk-simpleapp-0.12.0.jar:./examples/simpleapp/target/lib/* io.horizen.examples.SimpleApp ./examples/my_settings.conf
java -cp ./examples/utxo/simpleapp/target/sidechains-sdk-simpleapp-0.13.0-SNAPSHOT.jar:./examples/simpleapp/target/lib/* io.horizen.examples.SimpleApp ./examples/my_settings.conf
```
* For Linux (Jemalloc):
```
LD_PRELOAD=<path to jemalloc library>/libjemalloc.so.1 java -cp ./examples/utxo/simpleapp/target/sidechains-sdk-simpleapp-0.12.0.jar:./examples/simpleapp/target/lib/* io.horizen.examples.SimpleApp ./examples/my_settings.conf
LD_PRELOAD=<path to jemalloc library>/libjemalloc.so.1 java -cp ./examples/utxo/simpleapp/target/sidechains-sdk-simpleapp-0.13.0-SNAPSHOT.jar:./examples/simpleapp/target/lib/* io.horizen.examples.SimpleApp ./examples/my_settings.conf
```

**Model: Account**

* For Windows:
```
java -cp ./examples/account/evmapp/target/sidechains-sdk-evmapp-0.12.0.jar;./examples/evmapp/target/lib/* io.horizen.examples.EvmApp ./examples/my_settings.conf
java -cp ./examples/account/evmapp/target/sidechains-sdk-evmapp-0.13.0-SNAPSHOT.jar;./examples/evmapp/target/lib/* io.horizen.examples.EvmApp ./examples/my_settings.conf
```
* For Linux (Glibc):
```
java -cp ./examples/account/evmapp/target/sidechains-sdk-evmapp-0.12.0.jar:./examples/evmapp/target/lib/* io.horizen.examples.EvmApp ./examples/my_settings.conf
java -cp ./examples/account/evmapp/target/sidechains-sdk-evmapp-0.13.0-SNAPSHOT.jar:./examples/evmapp/target/lib/* io.horizen.examples.EvmApp ./examples/my_settings.conf
```
* For Linux (Jemalloc):
```
LD_PRELOAD=<path to jemalloc library>/libjemalloc.so.1 java -cp ./examples/account/evmapp/target/sidechains-sdk-evmapp-0.12.0.jar:./examples/evmapp/target/lib/* io.horizen.examples.EvmApp ./examples/my_settings.conf
LD_PRELOAD=<path to jemalloc library>/libjemalloc.so.1 java -cp ./examples/account/evmapp/target/sidechains-sdk-evmapp-0.13.0-SNAPSHOT.jar:./examples/evmapp/target/lib/* io.horizen.examples.EvmApp ./examples/my_settings.conf
```


Expand Down
4 changes: 2 additions & 2 deletions examples/utxo/simpleapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-simpleapp</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<inceptionYear>2018</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
6 changes: 3 additions & 3 deletions examples/utxo/utxoapp_sctool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-utxoapp_sctool</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<inceptionYear>2018</inceptionYear>
<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand All @@ -14,13 +14,13 @@
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-scbootstrappingtools</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-simpleapp</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.horizen</groupId>
<artifactId>Sidechains</artifactId>
<version>0.12.0</version>
<version>0.13.0-SNAPSHOT</version>
<inceptionYear>2018</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion qa/SidechainTestFramework/scutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

WAIT_CONST = 1

SNAPSHOT_VERSION_TAG = "0.12.0"
SNAPSHOT_VERSION_TAG = "0.13.0-SNAPSHOT"

# log levels of the log4j trace system used by java applications
APP_LEVEL_OFF = "off"
Expand Down
1 change: 1 addition & 0 deletions qa/run_sc_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ testScriptsEvm=(
'sc_evm_forger_reward_address.py'
'sc_evm_native_forger_v2.py'
'sc_evm_forger_v2_register.py'
'sc_evm_dump.py'
);

testScriptsUtxo=(
Expand Down
Loading

0 comments on commit b048948

Please sign in to comment.