Skip to content

Commit

Permalink
Merge pull request #33 from HorizenOfficial/development
Browse files Browse the repository at this point in the history
0.1.0 to master
  • Loading branch information
paolocappelletti authored Jun 26, 2023
2 parents 60bd143 + 8b82836 commit 5e21316
Show file tree
Hide file tree
Showing 43 changed files with 1,728 additions and 387 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pom.xml.versionsBackup
.idea/
target/
*.iml
16 changes: 13 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,24 @@ git:

env:
global:
- DOCKER_IMAGE_NAME=evmapp
- PROD_RELEASE_BRANCH=main
- DEV_RELEASE_BRANCH=development

before_script: source ci/setup_env.sh
before_script:
- source ci/setup_env.sh
- ci/travis_keep_alive.sh

jobs:
include:
- name: "Evmapp Docker Image Build"
- stage: Java project
name: "Build and test java project(s)"
script: ci/script.sh tests
env: DOCKER_ORG='zencash' IMAGE_NAME='sc-ci-base' IMAGE_TAG='bionic_jdk-11_latest' TESTS='000'

- stage: Docker packaging
name: Build and publish EON docker image
script: ci/docker.sh
if: tag IS present
env:
- EVMAPP_DOCKER_IMAGE_NAME='evmapp'
- BOOTSTRAPTOOL_DOCKER_IMAGE_NAME='evmapp-bootstraptool'
19 changes: 4 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
# Changelog

## 0.1.0-SNAPSHOT6
* SDK dependency updated to version 0.7.0-SNAPSHOT6

## 0.1.0-SNAPSHOT4
* SDK dependency updated to version 0.7.0-SNAPSHOT4

## 0.1.0-SNAPSHOT3
* SDK dependency updated to version 0.7.0-SNAPSHOT3

## 0.1.0-SNAPSHOT2
* SDK dependency updated to version 0.7.0-SNAPSHOT2

## 0.1.0-SNAPSHOT1
## 0.1.0
Initial version of the EON application.
* Based on top of [Sidechains-SDK](https://github.com/HorizenOfficial/Sidechains-SDK) version 0.7.0-SNAPSHOT
* With EVM support
* Based on top of [Sidechains-SDK](https://github.com/HorizenOfficial/Sidechains-SDK) version 0.7.0
* EVM support
* Fee parameters set to 10 million gas fee per block, 20 gwei of minimum baseFee
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,24 @@ EON node is available on Linux and Windows (64bit).
### Documentation

More information of how to connect wallets, write smart contracts and interact with EON is available [here]( https://eon.horizen.io/docs/).

### Project structure
- node: <br>
the module contains everything you need to run an EON node;

- bootstraptool: <br>
the module contains the tools you need in order to register and create the configuration file for the EON sidechain.<br>
Usage:<br>
- obtain the jar by running <b>mvn package [-Ppregobi] [-Pgobi]</b> <br>
NOTE: The -Ppregobi OR -Pgobi suffix is needed ONLY to build a bootstrapping tool for Pregobi/Gobi testnet network.
They differentiate from the default one for not applying the fee fork parameters (GasBLock limit 10ML, basefee 20 gwei) from
the genesys block.
- launch the bootstrapping tool by running: <b>java -jar < jarname ></b>
- There is more convenient way of using the bootstrap tool using a docker container. The bootstrap tool docker image
is built and published to `zencash/evmapp-bootstraptool:[:tag]`.
A helper script is provided in ci/devtools: [evmapp-bootstraptool](ci/devtools/bootstrap_tool.sh). This script can
be run in this way: `./ci/devtools/bootstrap_tool.sh help` and can be used to generate the required keys for forger
nodes and for signer nodes.



38 changes: 38 additions & 0 deletions bootstraptool/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
189 changes: 189 additions & 0 deletions bootstraptool/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.horizen</groupId>
<artifactId>bootstraptool</artifactId>
<version>0.1.0</version>
<inceptionYear>2023</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.plugin>3.8.1</maven.compiler.plugin>
<maven.dependency.plugin>3.1.1</maven.dependency.plugin>
</properties>
<dependencies>
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-scbootstrappingtools</artifactId>
<version>0.7.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-account_sctools</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>io.horizen</groupId>
<artifactId>eon</artifactId>
<version>0.1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>softmotions_repository</id>
<name>Softmotions Public Repository</name>
<url>https://repo.softmotions.com/repository/softmotions-public</url>
</repository>
<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>io.horizen.bootstraptool.EonBootstrappingTool</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeScope>compile</includeScope>
<useBaseVersion>false</useBaseVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>pregobi</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>io.horizen.bootstraptool.EonBootstrappingToolPregobi</mainClass>
</manifest>
</archive>
<finalName>${project.artifactId}-${project.version}-pregobi</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeScope>compile</includeScope>
<useBaseVersion>false</useBaseVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>gobi</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>io.horizen.bootstraptool.EonBootstrappingToolGobi</mainClass>
</manifest>
</archive>
<finalName>${project.artifactId}-${project.version}-gobi</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeScope>compile</includeScope>
<useBaseVersion>false</useBaseVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>



</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package io.horizen.bootstraptool;

import io.horizen.AbstractScBootstrappingTool;
import io.horizen.ScBootstrappingToolCommandProcessor;
import io.horizen.eon.ApplicationConstants;
import io.horizen.tools.utils.ConsolePrinter;

import java.util.Optional;

/**
* Default EON Boostrapping tool entry point.
* To be used for any new mainnet testnet or regtest enviroment.
* Will apply fee fork parameters (Gas Limit 10ML, baseFee 20gwei) from block 0 (genesis)
*/
public class EonBootstrappingTool extends AbstractScBootstrappingTool {

public EonBootstrappingTool() {
super(new ConsolePrinter());
}

public static void main(String[] args) {
EonBootstrappingTool bootstrap = new EonBootstrappingTool();
bootstrap.startCommandTool(args);
}

@Override
public void startCommandTool(String[] args) {
System.out.println("Starting EON bootstrapping tool " + printVersion());
super.startCommandTool(args);
}

@Override
protected ScBootstrappingToolCommandProcessor getBootstrappingToolCommandProcessor() {
return new ScBootstrappingToolCommandProcessor(printer, new EonModel(sidechainId()));
}

protected Optional<String> sidechainId(){
return Optional.empty();
}

private String printVersion(){
if (sidechainId().isPresent()){
switch (sidechainId().get()){
case ApplicationConstants.PREGOBI_SIDECHAINID:
return "PREGOBI version";
case ApplicationConstants.GOBI_SIDECHAINID:
return "GOBI version";
default:
return "";
}
}else{
return "";
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package io.horizen.bootstraptool;

import io.horizen.eon.ApplicationConstants;

import java.util.Optional;

/**
* Alternative bootstrapping tool entry point, to be used only for GOBI testnet
* Will apply fee fork parameters (Gas Limit 10ML, baseFee 20gwei) only from GOBI consensus epoch set on EonForkConfigurator
*/
public final class EonBootstrappingToolGobi extends EonBootstrappingTool {

public static void main(String[] args) {
EonBootstrappingToolGobi bootstrap = new EonBootstrappingToolGobi();
bootstrap.startCommandTool(args);
}

@Override
protected Optional<String> sidechainId() {
return Optional.of(ApplicationConstants.GOBI_SIDECHAINID);
}
}
Loading

0 comments on commit 5e21316

Please sign in to comment.