mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-29 05:01:23 +00:00
Merge pull request #264 from crowetic/master
Merge revert-to-5.0.2 branch, which is a hard-reset back to 5.0.2 rel…
This commit is contained in:
2
.github/workflows/pr-testing.yml
vendored
2
.github/workflows/pr-testing.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: PR testing
|
name: PR testing
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
BIN
lib/org/ciyam/AT/1.3.7/AT-1.3.7.jar
Normal file
BIN
lib/org/ciyam/AT/1.3.7/AT-1.3.7.jar
Normal file
Binary file not shown.
9
lib/org/ciyam/AT/1.3.7/AT-1.3.7.pom
Normal file
9
lib/org/ciyam/AT/1.3.7/AT-1.3.7.pom
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.ciyam</groupId>
|
||||||
|
<artifactId>AT</artifactId>
|
||||||
|
<version>1.3.7</version>
|
||||||
|
<description>POM was created from install:install-file</description>
|
||||||
|
</project>
|
BIN
lib/org/ciyam/AT/1.3.8/AT-1.3.8.jar
Normal file
BIN
lib/org/ciyam/AT/1.3.8/AT-1.3.8.jar
Normal file
Binary file not shown.
9
lib/org/ciyam/AT/1.3.8/AT-1.3.8.pom
Normal file
9
lib/org/ciyam/AT/1.3.8/AT-1.3.8.pom
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.ciyam</groupId>
|
||||||
|
<artifactId>AT</artifactId>
|
||||||
|
<version>1.3.8</version>
|
||||||
|
<description>POM was created from install:install-file</description>
|
||||||
|
</project>
|
BIN
lib/org/ciyam/AT/1.4.0/AT-1.4.0.jar
Normal file
BIN
lib/org/ciyam/AT/1.4.0/AT-1.4.0.jar
Normal file
Binary file not shown.
9
lib/org/ciyam/AT/1.4.0/AT-1.4.0.pom
Normal file
9
lib/org/ciyam/AT/1.4.0/AT-1.4.0.pom
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.ciyam</groupId>
|
||||||
|
<artifactId>AT</artifactId>
|
||||||
|
<version>1.4.0</version>
|
||||||
|
<description>POM was created from install:install-file</description>
|
||||||
|
</project>
|
BIN
lib/org/ciyam/AT/1.4.1/AT-1.4.1.jar
Normal file
BIN
lib/org/ciyam/AT/1.4.1/AT-1.4.1.jar
Normal file
Binary file not shown.
123
lib/org/ciyam/AT/1.4.1/AT-1.4.1.pom
Normal file
123
lib/org/ciyam/AT/1.4.1/AT-1.4.1.pom
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.ciyam</groupId>
|
||||||
|
<artifactId>AT</artifactId>
|
||||||
|
<version>1.4.1</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<skipTests>false</skipTests>
|
||||||
|
<bouncycastle.version>1.69</bouncycastle.version>
|
||||||
|
<junit.version>4.13.2</junit.version>
|
||||||
|
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||||
|
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||||
|
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
|
||||||
|
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
|
||||||
|
<maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
|
<testSourceDirectory>src/test/java</testSourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<source>11</source>
|
||||||
|
<target>11</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>${skipTests}</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>${maven-source-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadoc</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>${maven-jar-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>test-jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>${maven-source-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>${maven-jar-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
|
<version>${bouncycastle.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
BIN
lib/org/ciyam/AT/1.4.2/AT-1.4.2.jar
Normal file
BIN
lib/org/ciyam/AT/1.4.2/AT-1.4.2.jar
Normal file
Binary file not shown.
123
lib/org/ciyam/AT/1.4.2/AT-1.4.2.pom
Normal file
123
lib/org/ciyam/AT/1.4.2/AT-1.4.2.pom
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.ciyam</groupId>
|
||||||
|
<artifactId>AT</artifactId>
|
||||||
|
<version>1.4.2</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<skipTests>false</skipTests>
|
||||||
|
<bouncycastle.version>1.70</bouncycastle.version>
|
||||||
|
<junit.version>4.13.2</junit.version>
|
||||||
|
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
|
||||||
|
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
|
||||||
|
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
|
||||||
|
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
|
||||||
|
<maven-jar-plugin.version>3.4.1</maven-jar-plugin.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
|
<testSourceDirectory>src/test/java</testSourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<source>11</source>
|
||||||
|
<target>11</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>${skipTests}</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>${maven-source-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadoc</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>${maven-jar-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>test-jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>${maven-source-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>${maven-jar-plugin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
|
<version>${bouncycastle.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
16
lib/org/ciyam/AT/maven-metadata-local.xml
Normal file
16
lib/org/ciyam/AT/maven-metadata-local.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata>
|
||||||
|
<groupId>org.ciyam</groupId>
|
||||||
|
<artifactId>AT</artifactId>
|
||||||
|
<versioning>
|
||||||
|
<release>1.4.2</release>
|
||||||
|
<versions>
|
||||||
|
<version>1.3.7</version>
|
||||||
|
<version>1.3.8</version>
|
||||||
|
<version>1.4.0</version>
|
||||||
|
<version>1.4.1</version>
|
||||||
|
<version>1.4.2</version>
|
||||||
|
</versions>
|
||||||
|
<lastUpdated>20240426084210</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
30
pom.xml
30
pom.xml
@@ -3,19 +3,18 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.qortal</groupId>
|
<groupId>org.qortal</groupId>
|
||||||
<artifactId>qortal</artifactId>
|
<artifactId>qortal</artifactId>
|
||||||
<version>5.1.0</version> <!-- Version must be <X.Y.Z> -->
|
<version>5.0.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<skipJUnitTests>true</skipJUnitTests>
|
<skipTests>true</skipTests>
|
||||||
|
|
||||||
<altcoinj.version>d7cf6ac</altcoinj.version> <!-- BC v16 / Updated Abstract Classes / alertSigningKey -->
|
<altcoinj.version>7dc8c6f</altcoinj.version>
|
||||||
<bitcoinj.version>0.16.3</bitcoinj.version>
|
<bitcoinj.version>0.15.10</bitcoinj.version>
|
||||||
<bouncycastle.version>1.73</bouncycastle.version>
|
<bouncycastle.version>1.70</bouncycastle.version>
|
||||||
<build.timestamp>${maven.build.timestamp}</build.timestamp>
|
<build.timestamp>${maven.build.timestamp}</build.timestamp>
|
||||||
<ciyam-at.version>1b731d1</ciyam-at.version> <!-- This is the hash for v1.4.3 -->
|
<ciyam-at.version>1.4.2</ciyam-at.version>
|
||||||
<commons-net.version>3.8.0</commons-net.version>
|
<commons-net.version>3.8.0</commons-net.version>
|
||||||
<!-- <commons-net.version>3.9.0</commons-net.version> v5.2.0 coming soon -->
|
|
||||||
<commons-text.version>1.12.0</commons-text.version>
|
<commons-text.version>1.12.0</commons-text.version>
|
||||||
<commons-io.version>2.18.0</commons-io.version>
|
<commons-io.version>2.18.0</commons-io.version>
|
||||||
<commons-compress.version>1.27.1</commons-compress.version>
|
<commons-compress.version>1.27.1</commons-compress.version>
|
||||||
@@ -24,7 +23,6 @@
|
|||||||
<extendedset.version>0.12.3</extendedset.version>
|
<extendedset.version>0.12.3</extendedset.version>
|
||||||
<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
|
<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
|
||||||
<grpc.version>1.68.1</grpc.version>
|
<grpc.version>1.68.1</grpc.version>
|
||||||
<!-- <grpc.version>1.68.3</grpc.version> v5.2.0 coming soon -->
|
|
||||||
<guava.version>33.3.1-jre</guava.version>
|
<guava.version>33.3.1-jre</guava.version>
|
||||||
<hamcrest-library.version>2.2</hamcrest-library.version>
|
<hamcrest-library.version>2.2</hamcrest-library.version>
|
||||||
<homoglyph.version>1.2.1</homoglyph.version>
|
<homoglyph.version>1.2.1</homoglyph.version>
|
||||||
@@ -35,7 +33,6 @@
|
|||||||
<jaxb-runtime.version>2.3.9</jaxb-runtime.version>
|
<jaxb-runtime.version>2.3.9</jaxb-runtime.version>
|
||||||
<jersey.version>2.42</jersey.version>
|
<jersey.version>2.42</jersey.version>
|
||||||
<jetty.version>9.4.56.v20240826</jetty.version>
|
<jetty.version>9.4.56.v20240826</jetty.version>
|
||||||
<!-- <jetty.version>9.4.57.v20241219</jetty.version> v5.2.0 Coming Soon -->
|
|
||||||
<json-simple.version>1.1.1</json-simple.version>
|
<json-simple.version>1.1.1</json-simple.version>
|
||||||
<json.version>20240303</json.version>
|
<json.version>20240303</json.version>
|
||||||
<jsoup.version>1.18.1</jsoup.version>
|
<jsoup.version>1.18.1</jsoup.version>
|
||||||
@@ -54,14 +51,10 @@
|
|||||||
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
|
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
|
||||||
<maven-install-plugin.version>3.1.3</maven-install-plugin.version>
|
<maven-install-plugin.version>3.1.3</maven-install-plugin.version>
|
||||||
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
|
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
|
||||||
<!-- <maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version> v5.2.0 Coming Soon -->
|
|
||||||
<protobuf.version>3.25.3</protobuf.version>
|
<protobuf.version>3.25.3</protobuf.version>
|
||||||
<!-- <protobuf.version>3.25.7</protobuf.version> v 5.1 -->
|
|
||||||
<replacer.version>1.5.3</replacer.version>
|
<replacer.version>1.5.3</replacer.version>
|
||||||
<simplemagic.version>1.17</simplemagic.version>
|
<simplemagic.version>1.17</simplemagic.version>
|
||||||
<slf4j.version>1.7.36</slf4j.version>
|
<slf4j.version>1.7.36</slf4j.version>
|
||||||
<!-- <swagger-api.version>2.2.30</swagger-api.version> need code upgrade Future Release -->
|
|
||||||
<!-- <swagger-api.version>2.1.13</swagger-api.version> need code upgrade Future Release -->
|
|
||||||
<swagger-api.version>2.0.10</swagger-api.version>
|
<swagger-api.version>2.0.10</swagger-api.version>
|
||||||
<swagger-ui.version>5.18.2</swagger-ui.version>
|
<swagger-ui.version>5.18.2</swagger-ui.version>
|
||||||
<upnp.version>1.2</upnp.version>
|
<upnp.version>1.2</upnp.version>
|
||||||
@@ -297,8 +290,6 @@
|
|||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>${maven-jar-plugin.version}</version>
|
<version>${maven-jar-plugin.version}</version>
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
@@ -312,8 +303,6 @@
|
|||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Copy modified hsqldb.jar to install / modified MANIFEST.MF-->
|
<!-- Copy modified hsqldb.jar to install / modified MANIFEST.MF-->
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -388,7 +377,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Removed, now use Maven reproducible by default v4.0, IntelliJ v2025.1 and later -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.github.zlika</groupId>
|
<groupId>io.github.zlika</groupId>
|
||||||
<artifactId>reproducible-build-maven-plugin</artifactId>
|
<artifactId>reproducible-build-maven-plugin</artifactId>
|
||||||
@@ -411,7 +399,7 @@
|
|||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skipTests>${skipJUnitTests}</skipTests>
|
<skipTests>${skipTests}</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
@@ -495,7 +483,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- CIYAM AT (automated transactions) -->
|
<!-- CIYAM AT (automated transactions) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.iceburst</groupId>
|
<groupId>org.ciyam</groupId>
|
||||||
<artifactId>AT</artifactId>
|
<artifactId>AT</artifactId>
|
||||||
<version>${ciyam-at.version}</version>
|
<version>${ciyam-at.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -513,7 +501,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- For Litecoin, etc. support, requires bitcoinj -->
|
<!-- For Litecoin, etc. support, requires bitcoinj -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.iceburst</groupId>
|
<groupId>com.github.qortal</groupId>
|
||||||
<artifactId>altcoinj</artifactId>
|
<artifactId>altcoinj</artifactId>
|
||||||
<version>${altcoinj.version}</version>
|
<version>${altcoinj.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@@ -1,41 +1,17 @@
|
|||||||
package org.qortal.account;
|
package org.qortal.account;
|
||||||
|
|
||||||
import org.bouncycastle.crypto.generators.Ed25519KeyPairGenerator;
|
|
||||||
import org.bouncycastle.crypto.params.Ed25519KeyGenerationParameters;
|
|
||||||
import org.bouncycastle.crypto.params.Ed25519PublicKeyParameters;
|
import org.bouncycastle.crypto.params.Ed25519PublicKeyParameters;
|
||||||
import org.qortal.crypto.Crypto;
|
import org.qortal.crypto.Crypto;
|
||||||
import org.qortal.data.account.AccountData;
|
import org.qortal.data.account.AccountData;
|
||||||
import org.qortal.repository.Repository;
|
import org.qortal.repository.Repository;
|
||||||
|
|
||||||
import java.security.SecureRandom;
|
|
||||||
|
|
||||||
public class PublicKeyAccount extends Account {
|
public class PublicKeyAccount extends Account {
|
||||||
|
|
||||||
protected final byte[] publicKey;
|
protected final byte[] publicKey;
|
||||||
protected final Ed25519PublicKeyParameters edPublicKeyParams;
|
protected final Ed25519PublicKeyParameters edPublicKeyParams;
|
||||||
|
|
||||||
/** <p>Constructor for generating a PublicKeyAccount</p>
|
|
||||||
*
|
|
||||||
* @param repository Block Chain
|
|
||||||
* @param publicKey 32 byte Public Key
|
|
||||||
* @since v4.7.3
|
|
||||||
*/
|
|
||||||
public PublicKeyAccount(Repository repository, byte[] publicKey) {
|
public PublicKeyAccount(Repository repository, byte[] publicKey) {
|
||||||
super(repository, Crypto.toAddress(publicKey));
|
this(repository, new Ed25519PublicKeyParameters(publicKey, 0));
|
||||||
|
|
||||||
Ed25519PublicKeyParameters t = null;
|
|
||||||
try {
|
|
||||||
t = new Ed25519PublicKeyParameters(publicKey, 0);
|
|
||||||
} catch (Exception e) {
|
|
||||||
var gen = new Ed25519KeyPairGenerator();
|
|
||||||
gen.init(new Ed25519KeyGenerationParameters(new SecureRandom()));
|
|
||||||
var keyPair = gen.generateKeyPair();
|
|
||||||
t = (Ed25519PublicKeyParameters) keyPair.getPublic();
|
|
||||||
} finally {
|
|
||||||
this.edPublicKeyParams = t;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.publicKey = publicKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected PublicKeyAccount(Repository repository, Ed25519PublicKeyParameters edPublicKeyParams) {
|
protected PublicKeyAccount(Repository repository, Ed25519PublicKeyParameters edPublicKeyParams) {
|
||||||
|
@@ -8,8 +8,6 @@ import org.bitcoinj.core.*;
|
|||||||
import org.bitcoinj.crypto.ChildNumber;
|
import org.bitcoinj.crypto.ChildNumber;
|
||||||
import org.bitcoinj.crypto.DeterministicHierarchy;
|
import org.bitcoinj.crypto.DeterministicHierarchy;
|
||||||
import org.bitcoinj.crypto.DeterministicKey;
|
import org.bitcoinj.crypto.DeterministicKey;
|
||||||
import org.bitcoinj.crypto.HDPath;
|
|
||||||
import org.bitcoinj.params.AbstractBitcoinNetParams;
|
|
||||||
import org.bitcoinj.script.Script.ScriptType;
|
import org.bitcoinj.script.Script.ScriptType;
|
||||||
import org.bitcoinj.script.ScriptBuilder;
|
import org.bitcoinj.script.ScriptBuilder;
|
||||||
import org.bitcoinj.wallet.DeterministicKeyChain;
|
import org.bitcoinj.wallet.DeterministicKeyChain;
|
||||||
@@ -27,7 +25,7 @@ import java.util.*;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/** Bitcoin-like (Bitcoin, Litecoin, etc.) support */
|
/** Bitcoin-like (Bitcoin, Litecoin, etc.) support */
|
||||||
public abstract class Bitcoiny extends AbstractBitcoinNetParams implements ForeignBlockchain {
|
public abstract class Bitcoiny implements ForeignBlockchain {
|
||||||
|
|
||||||
protected static final Logger LOGGER = LogManager.getLogger(Bitcoiny.class);
|
protected static final Logger LOGGER = LogManager.getLogger(Bitcoiny.class);
|
||||||
|
|
||||||
@@ -67,7 +65,6 @@ public abstract class Bitcoiny extends AbstractBitcoinNetParams implements Forei
|
|||||||
// Constructors and instance
|
// Constructors and instance
|
||||||
|
|
||||||
protected Bitcoiny(BitcoinyBlockchainProvider blockchainProvider, Context bitcoinjContext, String currencyCode, Coin feePerKb) {
|
protected Bitcoiny(BitcoinyBlockchainProvider blockchainProvider, Context bitcoinjContext, String currencyCode, Coin feePerKb) {
|
||||||
this.genesisBlock = this.getGenesisBlock();
|
|
||||||
this.blockchainProvider = blockchainProvider;
|
this.blockchainProvider = blockchainProvider;
|
||||||
this.bitcoinjContext = bitcoinjContext;
|
this.bitcoinjContext = bitcoinjContext;
|
||||||
this.currencyCode = currencyCode;
|
this.currencyCode = currencyCode;
|
||||||
@@ -77,15 +74,6 @@ public abstract class Bitcoiny extends AbstractBitcoinNetParams implements Forei
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Getters & setters
|
// Getters & setters
|
||||||
@Override
|
|
||||||
public String getPaymentProtocolId() {
|
|
||||||
return this.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Block getGenesisBlock() {
|
|
||||||
return this.genesisBlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BitcoinyBlockchainProvider getBlockchainProvider() {
|
public BitcoinyBlockchainProvider getBlockchainProvider() {
|
||||||
return this.blockchainProvider;
|
return this.blockchainProvider;
|
||||||
@@ -602,27 +590,15 @@ public abstract class Bitcoiny extends AbstractBitcoinNetParams implements Forei
|
|||||||
|
|
||||||
return new AddressInfo(
|
return new AddressInfo(
|
||||||
address.toString(),
|
address.toString(),
|
||||||
toIntegerList( key.getPath() ),
|
toIntegerList( key.getPath()),
|
||||||
summingUnspentOutputs(address.toString()),
|
summingUnspentOutputs(address.toString()),
|
||||||
key.getPathAsString(),
|
key.getPathAsString(),
|
||||||
transactionCount,
|
transactionCount,
|
||||||
candidates.contains(address.toString()));
|
candidates.contains(address.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>Convert BitcoinJ native type to List of Integers, BitcoinJ v16 compatible
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @param path path to deterministic key
|
|
||||||
* @return Array of Ints representing the keys position in the tree
|
|
||||||
* @since v4.7.2
|
|
||||||
*/
|
|
||||||
private static List<Integer> toIntegerList(HDPath path) {
|
|
||||||
return path.stream().map(ChildNumber::num).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
// BitcoinJ v15 compatible
|
|
||||||
private static List<Integer> toIntegerList(ImmutableList<ChildNumber> path) {
|
private static List<Integer> toIntegerList(ImmutableList<ChildNumber> path) {
|
||||||
|
|
||||||
return path.stream().map(ChildNumber::num).collect(Collectors.toList());
|
return path.stream().map(ChildNumber::num).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
package org.qortal.crosschain;
|
package org.qortal.crosschain;
|
||||||
|
|
||||||
import org.bitcoinj.core.Block;
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
import org.bitcoinj.core.Context;
|
import org.bitcoinj.core.Context;
|
||||||
import org.bitcoinj.core.NetworkParameters;
|
import org.bitcoinj.core.NetworkParameters;
|
||||||
@@ -149,16 +148,4 @@ public class BitcoinyTBD extends Bitcoiny {
|
|||||||
|
|
||||||
this.netTBD.setFeeRequired( fee );
|
this.netTBD.setFeeRequired( fee );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPaymentProtocolId() {
|
|
||||||
return params.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Block getGenesisBlock() {
|
|
||||||
if(genesisBlock == null)
|
|
||||||
genesisBlock = params.getGenesisBlock();
|
|
||||||
return this.genesisBlock;
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -98,10 +98,9 @@ public class DeterminedNetworkParams extends NetworkParameters implements Altcoi
|
|||||||
|
|
||||||
LOGGER.info( "Creating Genesis Block ...");
|
LOGGER.info( "Creating Genesis Block ...");
|
||||||
|
|
||||||
// BitcoinJ v16 has a new native method for this
|
|
||||||
//this.genesisBlock = CoinParamsUtil.createGenesisBlockFromRequest(this, request);
|
//this.genesisBlock = CoinParamsUtil.createGenesisBlockFromRequest(this, request);
|
||||||
|
|
||||||
// LOGGER.info("Created Genesis Block: genesisBlock = " + genesisBlock );
|
LOGGER.info("Created Genesis Block: genesisBlock = " + genesisBlock );
|
||||||
|
|
||||||
// this is 100 for each coin from what I can tell
|
// this is 100 for each coin from what I can tell
|
||||||
this.spendableCoinbaseDepth = 100;
|
this.spendableCoinbaseDepth = 100;
|
||||||
@@ -114,9 +113,8 @@ public class DeterminedNetworkParams extends NetworkParameters implements Altcoi
|
|||||||
//
|
//
|
||||||
// LOGGER.info("request = " + request);
|
// LOGGER.info("request = " + request);
|
||||||
//
|
//
|
||||||
// checkState(genesisHash.equals(request.getExpectedGenesisHash()))
|
// checkState(genesisHash.equals(request.getExpectedGenesisHash()));
|
||||||
// alertSigningKey is removed in v16
|
this.alertSigningKey = Hex.decode(request.getPubKey());
|
||||||
// this.alertSigningKey = Hex.decode(request.getPubKey());
|
|
||||||
|
|
||||||
this.majorityEnforceBlockUpgrade = request.getMajorityEnforceBlockUpgrade();
|
this.majorityEnforceBlockUpgrade = request.getMajorityEnforceBlockUpgrade();
|
||||||
this.majorityRejectBlockOutdated = request.getMajorityRejectBlockOutdated();
|
this.majorityRejectBlockOutdated = request.getMajorityRejectBlockOutdated();
|
||||||
@@ -223,12 +221,6 @@ public class DeterminedNetworkParams extends NetworkParameters implements Altcoi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Block getGenesisBlock() {
|
|
||||||
//ToDo: Finish
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the difficulty target expected for the next block. This includes all
|
* Get the difficulty target expected for the next block. This includes all
|
||||||
* the weird cases for Litecoin such as testnet blocks which can be maximum
|
* the weird cases for Litecoin such as testnet blocks which can be maximum
|
||||||
|
@@ -184,11 +184,6 @@ public class LegacyZcashAddress extends Address {
|
|||||||
return p2sh ? ScriptType.P2SH : ScriptType.P2PKH;
|
return p2sh ? ScriptType.P2SH : ScriptType.P2PKH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compareTo(Address address) {
|
|
||||||
return this.toString().compareTo(address.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an address, examines the version byte and attempts to find a matching NetworkParameters. If you aren't sure
|
* Given an address, examines the version byte and attempts to find a matching NetworkParameters. If you aren't sure
|
||||||
* which network the address is intended for (eg, it was provided by a user), you can use this to decide if it is
|
* which network the address is intended for (eg, it was provided by a user), you can use this to decide if it is
|
||||||
|
@@ -212,9 +212,7 @@ public class BootstrapTests extends Common {
|
|||||||
@Test
|
@Test
|
||||||
public void testBootstrapHosts() throws IOException {
|
public void testBootstrapHosts() throws IOException {
|
||||||
String[] bootstrapHosts = Settings.getInstance().getBootstrapHosts();
|
String[] bootstrapHosts = Settings.getInstance().getBootstrapHosts();
|
||||||
String[] bootstrapTypes = { "archive" }; // , "toponly", "full"
|
String[] bootstrapTypes = { "archive" }; // , "toponly"
|
||||||
boolean invalidFile = false;
|
|
||||||
boolean invalidDate = false;
|
|
||||||
|
|
||||||
for (String host : bootstrapHosts) {
|
for (String host : bootstrapHosts) {
|
||||||
for (String type : bootstrapTypes) {
|
for (String type : bootstrapTypes) {
|
||||||
@@ -232,20 +230,14 @@ public class BootstrapTests extends Common {
|
|||||||
|
|
||||||
// Ensure the bootstrap exists and has a size greated than 100MiB
|
// Ensure the bootstrap exists and has a size greated than 100MiB
|
||||||
System.out.println(String.format("%s %s size is %d bytes", host, type, fileSize));
|
System.out.println(String.format("%s %s size is %d bytes", host, type, fileSize));
|
||||||
if(fileSize < 100*1024*1024L)
|
assertTrue("Bootstrap size must be at least 100MiB", fileSize > 100*1024*1024L);
|
||||||
invalidFile = true;
|
|
||||||
//assertTrue("Bootstrap size must be at least 100MiB", fileSize > 100*1024*1024L);
|
|
||||||
|
|
||||||
// Ensure the bootstrap has been published recently (in the last 3 days)
|
// Ensure the bootstrap has been published recently (in the last 3 days)
|
||||||
long minimumLastMofifiedTimestamp = NTP.getTime() - (3 * 24 * 60 * 60 * 1000L);
|
long minimumLastMofifiedTimestamp = NTP.getTime() - (3 * 24 * 60 * 60 * 1000L);
|
||||||
System.out.println(String.format("%s %s last modified timestamp is %d", host, type, lastModified));
|
System.out.println(String.format("%s %s last modified timestamp is %d", host, type, lastModified));
|
||||||
if(lastModified < minimumLastMofifiedTimestamp)
|
assertTrue("Bootstrap last modified date must be in the last 3 days", lastModified > minimumLastMofifiedTimestamp);
|
||||||
invalidDate = true;
|
|
||||||
//assertTrue("Bootstrap last modified date must be in the last 3 days", lastModified > minimumLastMofifiedTimestamp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertFalse("File size must be at least 100MiB", invalidFile);
|
|
||||||
assertFalse("Bootstrap last modified date must be in the last 3 days",invalidDate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteBootstraps() throws IOException {
|
private void deleteBootstraps() throws IOException {
|
||||||
|
@@ -304,7 +304,7 @@ public class CryptoTests extends Common {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAESFileEncryption() throws NoSuchAlgorithmException, IOException, IllegalBlockSizeException,
|
public void testAESFileEncryption() throws NoSuchAlgorithmException, IOException, IllegalBlockSizeException,
|
||||||
InvalidKeyException, BadPaddingException, InvalidAlgorithmParameterException, NoSuchPaddingException, InterruptedException {
|
InvalidKeyException, BadPaddingException, InvalidAlgorithmParameterException, NoSuchPaddingException {
|
||||||
|
|
||||||
// Create temporary directory and file paths
|
// Create temporary directory and file paths
|
||||||
java.nio.file.Path tempDir = Files.createTempDirectory("qortal-tests");
|
java.nio.file.Path tempDir = Files.createTempDirectory("qortal-tests");
|
||||||
@@ -320,7 +320,6 @@ public class CryptoTests extends Common {
|
|||||||
// Write it to the input file
|
// Write it to the input file
|
||||||
FileOutputStream outputStream = new FileOutputStream(inputFilePath);
|
FileOutputStream outputStream = new FileOutputStream(inputFilePath);
|
||||||
outputStream.write(randomBytes);
|
outputStream.write(randomBytes);
|
||||||
outputStream.close();
|
|
||||||
|
|
||||||
// Make sure only the input file exists
|
// Make sure only the input file exists
|
||||||
assertTrue(Files.exists(Paths.get(inputFilePath)));
|
assertTrue(Files.exists(Paths.get(inputFilePath)));
|
||||||
|
@@ -1,22 +1,15 @@
|
|||||||
package org.qortal.test;
|
package org.qortal.test;
|
||||||
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.qortal.gui.SplashFrame;
|
import org.qortal.gui.SplashFrame;
|
||||||
import org.qortal.gui.SysTray;
|
import org.qortal.gui.SysTray;
|
||||||
import org.qortal.repository.DataException;
|
|
||||||
import org.qortal.test.common.Common;
|
|
||||||
|
|
||||||
import java.awt.TrayIcon.MessageType;
|
import java.awt.TrayIcon.MessageType;
|
||||||
|
|
||||||
|
@Ignore
|
||||||
public class GuiTests {
|
public class GuiTests {
|
||||||
|
|
||||||
@Before
|
|
||||||
public void beforeTest() throws DataException {
|
|
||||||
Common.useDefaultSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSplashFrame() throws InterruptedException {
|
public void testSplashFrame() throws InterruptedException {
|
||||||
SplashFrame splashFrame = SplashFrame.getInstance();
|
SplashFrame splashFrame = SplashFrame.getInstance();
|
||||||
|
@@ -10,7 +10,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
@Ignore (value="Tests Work Fine - VERY Long Run time (1hr+)")
|
@Ignore
|
||||||
public class MemoryPoWTests {
|
public class MemoryPoWTests {
|
||||||
|
|
||||||
private static final int workBufferLength = 8 * 1024 * 1024;
|
private static final int workBufferLength = 8 * 1024 * 1024;
|
||||||
@@ -26,16 +26,16 @@ public class MemoryPoWTests {
|
|||||||
|
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
|
|
||||||
Integer nonce = MemoryPoW.compute2(data, workBufferLength, difficulty);
|
int nonce = MemoryPoW.compute2(data, workBufferLength, difficulty);
|
||||||
|
|
||||||
long finishTime = System.currentTimeMillis();
|
long finishTime = System.currentTimeMillis();
|
||||||
|
|
||||||
assertNotNull(nonce);
|
assertNotNull(nonce);
|
||||||
|
|
||||||
System.out.printf("Memory-hard PoW (buffer size: %dKB, leading zeros: %d) took %dms, nonce: %d%n", workBufferLength / 1024,
|
System.out.println(String.format("Memory-hard PoW (buffer size: %dKB, leading zeros: %d) took %dms, nonce: %d", workBufferLength / 1024,
|
||||||
difficulty,
|
difficulty,
|
||||||
finishTime - startTime,
|
finishTime - startTime,
|
||||||
nonce);
|
nonce));
|
||||||
|
|
||||||
assertTrue(MemoryPoW.verify2(data, workBufferLength, difficulty, nonce));
|
assertTrue(MemoryPoW.verify2(data, workBufferLength, difficulty, nonce));
|
||||||
}
|
}
|
||||||
@@ -73,12 +73,12 @@ public class MemoryPoWTests {
|
|||||||
|
|
||||||
double stddev = (double) Math.sqrt( (sampleSize * timesS2 - timesS1 * timesS1) / stddevDivisor );
|
double stddev = (double) Math.sqrt( (sampleSize * timesS2 - timesS1 * timesS1) / stddevDivisor );
|
||||||
|
|
||||||
System.out.printf("Difficulty: %d, %d timings, mean: %d ms, stddev: %.2f ms, max nonce: %d%n",
|
System.out.println(String.format("Difficulty: %d, %d timings, mean: %d ms, stddev: %.2f ms, max nonce: %d",
|
||||||
difficulty,
|
difficulty,
|
||||||
sampleSize,
|
sampleSize,
|
||||||
timesS1 / sampleSize,
|
timesS1 / sampleSize,
|
||||||
stddev,
|
stddev,
|
||||||
maxNonce);
|
maxNonce));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ public class MemoryPoWTests {
|
|||||||
expectedNonce = 11032;
|
expectedNonce = 11032;
|
||||||
nonce = MemoryPoW.compute2(data, workBufferLength, difficulty);
|
nonce = MemoryPoW.compute2(data, workBufferLength, difficulty);
|
||||||
|
|
||||||
System.out.printf("Difficulty %d, nonce: %d%n", difficulty, nonce);
|
System.out.println(String.format("Difficulty %d, nonce: %d", difficulty, nonce));
|
||||||
assertEquals(expectedNonce, nonce);
|
assertEquals(expectedNonce, nonce);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
82
src/test/java/org/qortal/test/PenaltyFixTests.java
Normal file
82
src/test/java/org/qortal/test/PenaltyFixTests.java
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
package org.qortal.test;
|
||||||
|
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.qortal.account.Account;
|
||||||
|
import org.qortal.account.PrivateKeyAccount;
|
||||||
|
import org.qortal.block.Block;
|
||||||
|
import org.qortal.controller.BlockMinter;
|
||||||
|
import org.qortal.data.transaction.PaymentTransactionData;
|
||||||
|
import org.qortal.data.transaction.TransactionData;
|
||||||
|
import org.qortal.repository.DataException;
|
||||||
|
import org.qortal.repository.Repository;
|
||||||
|
import org.qortal.repository.RepositoryManager;
|
||||||
|
import org.qortal.settings.Settings;
|
||||||
|
import org.qortal.test.common.BlockUtils;
|
||||||
|
import org.qortal.test.common.Common;
|
||||||
|
import org.qortal.test.common.TransactionUtils;
|
||||||
|
import org.qortal.test.common.transaction.TestTransaction;
|
||||||
|
import org.qortal.utils.NTP;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
public class PenaltyFixTests extends Common {
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void beforeTest() throws DataException {
|
||||||
|
Common.useSettings("test-settings-v2-penalty-fix.json");
|
||||||
|
NTP.setFixedOffset(Settings.getInstance().getTestNtpOffset());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSingleSponsor() throws DataException {
|
||||||
|
try (final Repository repository = RepositoryManager.getRepository()) {
|
||||||
|
|
||||||
|
// Alice self share online, and will be used to mint the blocks
|
||||||
|
PrivateKeyAccount aliceSelfShare = Common.getTestAccount(repository, "alice-reward-share");
|
||||||
|
List<PrivateKeyAccount> onlineAccounts = new ArrayList<>();
|
||||||
|
onlineAccounts.add(aliceSelfShare);
|
||||||
|
|
||||||
|
PrivateKeyAccount bobAccount = Common.getTestAccount(repository, "bob");
|
||||||
|
|
||||||
|
// Test account from real penalty data (pen-revert.json)
|
||||||
|
Account penaltyAccount = new Account(repository, "QLcAQpko5egwNjifueCAeAsT8CAj2Sr5qJ");
|
||||||
|
|
||||||
|
// Bob sends a payment to the penalty account, so that it gets a row in the Accounts table
|
||||||
|
TransactionData paymentData = new PaymentTransactionData(TestTransaction.generateBase(bobAccount), penaltyAccount.getAddress(), 1);
|
||||||
|
TransactionUtils.signAndImportValid(repository, paymentData, bobAccount); // updates paymentData's signature
|
||||||
|
|
||||||
|
// Mint blocks up to height 4
|
||||||
|
Block block = null;
|
||||||
|
for (int i = 2; i <= 4; i++)
|
||||||
|
block = BlockMinter.mintTestingBlock(repository, onlineAccounts.toArray(new PrivateKeyAccount[0]));
|
||||||
|
|
||||||
|
assertEquals(4, (int)block.getBlockData().getHeight());
|
||||||
|
|
||||||
|
// Check blocks minted penalty of penalty account
|
||||||
|
assertEquals(0, (int) penaltyAccount.getBlocksMintedPenalty());
|
||||||
|
|
||||||
|
// Penalty revert code runs at block 5
|
||||||
|
block = BlockMinter.mintTestingBlock(repository, onlineAccounts.toArray(new PrivateKeyAccount[0]));
|
||||||
|
assertEquals(5, (int)block.getBlockData().getHeight());
|
||||||
|
|
||||||
|
// +5000000 blocks minted penalty should be applied
|
||||||
|
assertEquals(5000000, (int) penaltyAccount.getBlocksMintedPenalty());
|
||||||
|
|
||||||
|
// Orphan the last block, to simulate a re-org
|
||||||
|
BlockUtils.orphanLastBlock(repository);
|
||||||
|
|
||||||
|
assertEquals(0, (int) penaltyAccount.getBlocksMintedPenalty());
|
||||||
|
|
||||||
|
// Penalty revert code runs again
|
||||||
|
block = BlockMinter.mintTestingBlock(repository, onlineAccounts.toArray(new PrivateKeyAccount[0]));
|
||||||
|
assertEquals(5, (int)block.getBlockData().getHeight());
|
||||||
|
|
||||||
|
// Penalty should still be 5000000, rather than doubled up to 10000000
|
||||||
|
assertEquals(5000000, (int) penaltyAccount.getBlocksMintedPenalty());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,8 +1,9 @@
|
|||||||
package org.qortal.test.crosschain;
|
package org.qortal.test.crosschain;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bitcoinj.core.NetworkParameters;
|
import org.bitcoinj.core.NetworkParameters;
|
||||||
|
import org.bitcoinj.crypto.ChildNumber;
|
||||||
import org.bitcoinj.crypto.DeterministicKey;
|
import org.bitcoinj.crypto.DeterministicKey;
|
||||||
import org.bitcoinj.crypto.HDPath;
|
|
||||||
import org.bitcoinj.script.Script;
|
import org.bitcoinj.script.Script;
|
||||||
import org.bitcoinj.wallet.DeterministicKeyChain;
|
import org.bitcoinj.wallet.DeterministicKeyChain;
|
||||||
import org.bitcoinj.wallet.DeterministicSeed;
|
import org.bitcoinj.wallet.DeterministicSeed;
|
||||||
@@ -32,7 +33,7 @@ public class BitcoinyTestsUtils {
|
|||||||
final Wallet wallet = Wallet.createDeterministic(networkParameters, Script.ScriptType.P2PKH);
|
final Wallet wallet = Wallet.createDeterministic(networkParameters, Script.ScriptType.P2PKH);
|
||||||
final DeterministicSeed seed = wallet.getKeyChainSeed();
|
final DeterministicSeed seed = wallet.getKeyChainSeed();
|
||||||
final DeterministicKeyChain keyChain = DeterministicKeyChain.builder().seed(seed).build();
|
final DeterministicKeyChain keyChain = DeterministicKeyChain.builder().seed(seed).build();
|
||||||
final HDPath path = keyChain.getAccountPath();
|
final ImmutableList<ChildNumber> path = keyChain.getAccountPath();
|
||||||
final DeterministicKey parent = keyChain.getKeyByPath(path, true);
|
final DeterministicKey parent = keyChain.getKeyByPath(path, true);
|
||||||
final String rootKey = parent.serializePrivB58(networkParameters);
|
final String rootKey = parent.serializePrivB58(networkParameters);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user