Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK17 #30

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
baddd8f
feat(api): exit when the API services failed to start
halibobo1205 May 13, 2024
ab9190a
feat(toolkit/lite): optimize DbLite tool for database pruning
halibobo1205 Jun 21, 2024
d2300f7
feat(metric): add interceptors to monitor gRPC using Prometheus
halibobo1205 Jun 6, 2024
7a56dd7
feat(build): enable dependency checksum sha256 verification
halibobo1205 Jul 8, 2024
7deb8c0
test(merkle): ignore testConcurrent to make CI more stable
halibobo1205 Jul 1, 2024
6589e9a
feat(fast-sync): skip common check when generatedByMyself
halibobo1205 Jul 11, 2024
2e3ec04
feat(db/rocksdb): update rocksdbjni to 7.7.3
halibobo1205 Jun 3, 2024
6f3b690
feat(db/leveldb): update leveldbjni to 1.18.3
halibobo1205 Jul 11, 2024
a597a3f
feat(leveldb): add bloom filter .
halibobo1205 Jun 12, 2024
a66a028
feat(gradle): update verification-metadata.xml
halibobo1205 Jul 11, 2024
5185d69
feat(math): add math pow output
halibobo1205 Jul 11, 2024
d2f89c0
feat(zcash): add zcash output
halibobo1205 Jul 12, 2024
174cb35
feat(block): init GlobalContext in pushBlock
halibobo1205 Jul 12, 2024
49268fe
feat(block): add block state_root
halibobo1205 Jul 13, 2024
653a259
feat(math): add log for different ret
halibobo1205 Jul 15, 2024
1735536
feat(math): add pow data for x87 ret
halibobo1205 Jul 15, 2024
ec42466
log(config): add config load.
halibobo1205 May 24, 2024
5f113c4
feat(db): close transactionHistory for default
halibobo1205 Jul 16, 2024
0be66bb
feat(log): disable log for getMerkleTreeKey
halibobo1205 Jul 16, 2024
cb47998
feat(test): fix transaction receipt
halibobo1205 Jul 16, 2024
7fd01b4
feat(log): fix math log output
halibobo1205 Jul 17, 2024
e397622
feat(math): add pow data for 3922437 and 3923214
halibobo1205 Jul 17, 2024
3458060
feat(GlobalContext): fix block num
halibobo1205 Jul 17, 2024
b6a125d
feat(log): log state root
halibobo1205 Jul 17, 2024
4337a18
fix(state-db): fix state root by sort list
halibobo1205 Jul 17, 2024
dab0ac3
feat(auto-stop): add auto-stop for solidityNode
halibobo1205 Jul 22, 2024
96a8e04
feat(jvm): since jdk 14, the NullPointerExceptions message is not empty
halibobo1205 Jul 16, 2024
7e7fd9d
feat(jdk17): update plugins and dependencies
halibobo1205 Jul 16, 2024
414b6d0
feat(state-db): add state root check
halibobo1205 Jul 17, 2024
c58b008
feat(log): replace DelayingShutdownHook by DefaultShutdownHook.
halibobo1205 Jul 18, 2024
e47289f
feat(log): remove not referenced Appender named CONSOLE
halibobo1205 Jul 18, 2024
9e99a0e
fix(state-root): make state-root checking before checkpoint is written
halibobo1205 Jul 19, 2024
e1363e9
feat(state-root): add corrupted checkpoint db
halibobo1205 Jul 22, 2024
56dbf9f
feat(toolkit): add checkpoint compare
halibobo1205 Jul 22, 2024
f40d21e
feat(toolkit): add db query
halibobo1205 Jul 23, 2024
2c9cd50
feat(gradle/plugin): update checkstyle 10.14.2 to support JDK17
halibobo1205 Jul 23, 2024
021fced
feat(tools): update query
halibobo1205 Jul 23, 2024
8dc93b6
feat(tools): fix cannot find type for Any url when using JSONFormat.p…
halibobo1205 Jul 23, 2024
e23e18e
feat(math): add data for x86 jdk17 on 4143944
halibobo1205 Jul 23, 2024
f5f2a47
feat(math): use StrictMath.pow
halibobo1205 Jul 23, 2024
be9fadb
feat(build): add java toolchain for jdk17
halibobo1205 Jul 23, 2024
fda215f
feat(state-db): make compatible for daily builds
halibobo1205 Jul 24, 2024
ca98680
feat(jvm): update jvm for jdk17
halibobo1205 Jul 24, 2024
6eca886
feat(jdk): remove deprecated code
halibobo1205 Jul 24, 2024
750f480
feat(gradle): apply jdeprscan and jdeps to all subprojects
halibobo1205 Jul 24, 2024
23e4526
feat(state-root): add log for write state root
halibobo1205 Jul 25, 2024
45a7ec6
feat(jdk17): use java.specification.version for web3ClientVersion
halibobo1205 Jul 25, 2024
4156260
feat(dependencies): update dependencies for conflict
halibobo1205 Jul 25, 2024
08874c7
feat(gradle): update jdeps jdeprscan settings
halibobo1205 Jul 26, 2024
7df348d
feat(test): remove unused code
halibobo1205 Jul 26, 2024
dffbde8
feat(db): revert close transactionHistory for default
halibobo1205 Jul 26, 2024
ca26338
feat(test): opt test
halibobo1205 Jul 26, 2024
8c6319e
feat(gradle): add settings for jdepsReport and jdeprscanReport in sub…
halibobo1205 Jul 26, 2024
98e0ad0
feat(state-root): add check.root.disable
halibobo1205 Jul 29, 2024
d2b779a
feat(proto): remove empty proto
halibobo1205 Jul 30, 2024
1ed95aa
feat(jar): add javax.*.jar
halibobo1205 Jul 31, 2024
7710d37
feat(build): speed up build
halibobo1205 Jul 31, 2024
f4b105a
feat(api): reactor http service
halibobo1205 Aug 2, 2024
a5a078a
feat(tools): add block-scan
halibobo1205 Aug 8, 2024
a1ae5a2
feat(checkstyle): update DTDs URLs
halibobo1205 Aug 19, 2024
d3c268a
feat(dependencies): update dependencies
halibobo1205 Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions actuator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("org.kordamp.gradle.jdeps")
id("org.kordamp.gradle.jdeprscan")
}
description = "actuator – a series of transactions for blockchain."

dependencies {
Expand All @@ -6,6 +10,19 @@ dependencies {
api project(":crypto")
}

jdepsReport {
sourceSets = ['main', 'test']
configurations = ['testRuntimeClasspath']
consoleOutput = false
}

jdeprscanReport {
sourceSets = ['main', 'test']
configurations = ['testRuntimeClasspath']
forRemoval = true
release = JavaVersion.VERSION_17.getMajorVersion()
}

test {

testLogging {
Expand Down
5 changes: 4 additions & 1 deletion actuator/src/main/java/org/tron/core/vm/VM.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ public static void play(Program program, JumpTable jumpTable) {
} catch (JVMStackOverFlowException | OutOfTimeException e) {
throw e;
} catch (RuntimeException e) {
if (StringUtils.isEmpty(e.getMessage())) {
// https://openjdk.org/jeps/358
// https://bugs.openjdk.org/browse/JDK-8220715
// since jdk 14, the NullPointerExceptions message is not empty
if (e instanceof NullPointerException || StringUtils.isEmpty(e.getMessage())) {
logger.warn("Unknown Exception occurred, tx id: {}",
Hex.toHexString(program.getRootTransactionId()), e);
program.setRuntimeFailure(new RuntimeException("Unknown Exception"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return new Integer(Boolean.valueOf(byTestingSuite).hashCode()
return Integer.valueOf(Boolean.valueOf(byTestingSuite).hashCode()
+ Boolean.valueOf(byTransaction).hashCode()
+ address.hashCode()
+ balance.hashCode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public boolean equals(Object obj) {

@Override
public int hashCode() {
return new Integer(type).hashCode();
return Integer.valueOf(type).hashCode();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ public boolean equals(Object obj) {

@Override
public int hashCode() {
return new Integer(type.hashCode() + Objects.hashCode(value)).hashCode();
return Integer.valueOf(type.hashCode() + Objects.hashCode(value)).hashCode();
}
}
74 changes: 57 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
plugins {
id("org.kordamp.gradle.jdeps") version "0.20.0" apply false
id("org.kordamp.gradle.jdeprscan") version "0.11.0" apply false
}

allprojects {
version = "1.0.0"
apply plugin: "java-library"
}

if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
throw new GradleException("Java 17 or later is required to build Java-tron.\n" +
" Detected version ${JavaVersion.current()}")
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.ADOPTIUM
}
}

subprojects {
apply plugin: "jacoco"
apply plugin: "maven-publish"

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

jacoco {
toolVersion = "0.8.10"
}
buildscript {
repositories {
mavenCentral()
Expand All @@ -36,47 +56,67 @@ subprojects {
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
implementation group: 'com.google.guava', name: 'guava', version: '30.1-jre'
implementation "com.google.code.findbugs:jsr305:3.0.0"
implementation group: 'org.springframework', name: 'spring-context', version: '5.3.18'
implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.18'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.6'
implementation group: 'com.google.guava', name: 'guava', version: '33.2.1-jre'
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation group: 'org.springframework', name: 'spring-context', version: '5.3.37'
implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.37'
implementation "org.apache.commons:commons-lang3:3.4"
implementation group: 'org.apache.commons', name: 'commons-math', version: '2.2'
implementation "org.apache.commons:commons-collections4:4.1"
implementation group: 'joda-time', name: 'joda-time', version: '2.3'
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'

compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testCompileOnly 'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
testCompileOnly 'org.projectlombok:lombok:1.18.34'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'

// https://www.oracle.com/java/technologies/javase/11-relnote-issues.html#JDK-8190378
implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
implementation group: 'javax.jws', name: 'javax.jws-api', version: '1.1'
implementation group: 'javax.activation', name: 'activation', version: '1.1.1'
implementation group: 'javax.resource', name: 'javax.resource-api', version: '1.7.1'
implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
implementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1.1'
implementation group: 'javax.ejb', name: 'ejb-api', version: '3.0'
implementation group: 'javax.enterprise.concurrent', name: 'javax.enterprise.concurrent-api', version: '1.1'
implementation group: 'javax.money', name: 'money-api', version: '1.1'
implementation group: 'javax.enterprise', name: 'cdi-api', version: '1.2'
implementation group: 'javax.portlet', name: 'portlet-api', version: '3.0.1'
implementation group: 'javax.xml.ws', name: 'jaxws-api', version: '2.3.1'
implementation group: 'javax.xml.rpc', name: 'javax.xml.rpc-api', version: '1.1.2'
annotationProcessor group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
annotationProcessor group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'


testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation "org.mockito:mockito-core:2.13.0"
testImplementation "org.mockito:mockito-core:5.8.0"
}

task sourcesJar(type: Jar, dependsOn: classes) {
tasks.register('sourcesJar', Jar) {
dependsOn classes
classifier = "sources"
from sourceSets.main.allSource
duplicatesStrategy = DuplicatesStrategy.INCLUDE // allow duplicates
}


tasks.withType(AbstractArchiveTask) {
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
duplicatesStrategy = DuplicatesStrategy.INCLUDE // allow duplicates
}

configurations.all {
configurations.configureEach {
resolutionStrategy {
force group: 'com.google.guava', name: 'guava', version: '30.1-jre'
force group: 'com.google.guava', name: 'guava', version: '33.2.1-jre'
}
}
}

task copyToParent(type: Copy) {
tasks.register('copyToParent', Copy) {
into "$buildDir/libs"
subprojects {
from tasks.withType(Jar)
Expand Down
21 changes: 16 additions & 5 deletions chainbase/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
plugins {
id("org.kordamp.gradle.jdeps")
id("org.kordamp.gradle.jdeprscan")
}
description = "chainbase – a decentralized database for blockchain."

// Dependency versions
// ---------------------------------------
def jacocoVersion = "0.8.0"
def jansiVersion = "1.16"
// --------------------------------------

Expand All @@ -15,6 +18,18 @@ dependencies {
api 'org.reflections:reflections:0.9.11'
}

jdepsReport {
sourceSets = ['main', 'test']
configurations = ['testRuntimeClasspath']
consoleOutput = false
}

jdeprscanReport {
sourceSets = ['main', 'test']
configurations = ['testRuntimeClasspath']
forRemoval = true
release = JavaVersion.VERSION_17.getMajorVersion()
}

test {

Expand All @@ -41,10 +56,6 @@ test {
}
}

jacoco {
toolVersion = jacocoVersion // See http://www.eclemma.org/jacoco/.
}

jacocoTestReport {
reports {
xml.enabled = true
Expand Down
Loading
Loading