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

Release v4.7.4 #14

Merged
merged 76 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
47099a2
test(net): add unit test for peer connection
xxo1shine Sep 14, 2023
de23b55
Merge pull request #5498 from tronprotocol/release_v4.7.3
halibobo1205 Sep 15, 2023
ba20e25
Merge pull request #5494 from ss3344520/unit-test
xxo1shine Sep 27, 2023
942981f
Merge pull request #5556 from tronprotocol/master
forfreeday Oct 25, 2023
1ec48e1
feat(test): add unit tests of framework module (#5534)
lurais Oct 26, 2023
8de354f
fix(event):synchronization of sending to zeromq (#5536)
paladim Oct 26, 2023
df52667
feat(script): remove useless scripts (#5580)
forfreeday Nov 13, 2023
4557c72
modify default dns tree (#5585)
317787106 Nov 21, 2023
2d64668
feat(grpc): add reflection service (#5583)
tomatoishealthy Nov 23, 2023
be07f5c
dependency(jetty): upgrade for security (#5571)
halibobo1205 Nov 24, 2023
a66316c
feat(test): add jetty test for CVE-2023-40167 (#5600)
lurais Nov 29, 2023
3f3ffe9
docs(protobuf): change transaction data structure description (#5602)
forfreeday Dec 8, 2023
5815337
fix(docs/readme): minor grammar fixes to the README file (#5606)
zbraiterman Dec 13, 2023
30abf6c
feat(checkStyle): use https for dtd links (#5623)
lurais Dec 19, 2023
a75148c
docs(README): update the description of signature verification
forfreeday Dec 21, 2023
2ab7a3a
docs(README): remove redundant descriptions
forfreeday Dec 21, 2023
e7454f1
Merge pull request #5632 from forfreeday/docs/update_edundant_descrip…
forfreeday Dec 25, 2023
ce0e0c6
Merge pull request #5631 from forfreeday/docs/update_READMME
forfreeday Dec 25, 2023
20fc9b9
feat(dependency): refactor gradle dependencies (#5625)
tomatoishealthy Dec 27, 2023
acfaac8
feat(net):fix a concurrency issue for toString in BlockCapsule (#5594)
317787106 Dec 27, 2023
565aef5
feat(api): print more details for unexpected error (#5601)
halibobo1205 Dec 27, 2023
a76e177
test(plugins/dbLite): add test for merge function (#5603)
halibobo1205 Dec 27, 2023
c4d7635
feat(log/api): separate unexpected and expected logs (#5624)
halibobo1205 Dec 27, 2023
989115a
feat(net): add codeVersion for HelloMessage (#5584)
317787106 Dec 27, 2023
0d48db4
feat(net): stop broadcasting transactions when the block cannot be so…
xxo1shine Dec 28, 2023
a0f431c
feat(net): delete config item node.discovery.bind.ip (#5597)
317787106 Dec 29, 2023
79e978e
feat(net): stop broadcasting transactions when the block cannot be so…
xxo1shine Dec 28, 2023
bf8de17
Merge branch 'develop' of github.com:tronprotocol/java-tron into ww
xxo1shine Jan 2, 2024
d518512
feat(LiteFullNode): remove LiteFullNodeTool
forfreeday Jan 2, 2024
1e2986a
Merge pull request #5643 from ss3344520/block_unsolid_solution
xxo1shine Jan 3, 2024
c109b22
feat(LiteFullNode): fix deleting titles
forfreeday Jan 4, 2024
db9f3be
feat(lite): optimize DbLite tool (#5647)
lurais Jan 5, 2024
52b3327
feat(db): optimize old rewards withdrawal (#5406)
halibobo1205 Jan 5, 2024
9fedb87
Merge branch 'feature/remove_lite_fullnode' into feature/add_testcase
forfreeday Jan 5, 2024
62d780d
test(case): add test case
forfreeday Jan 5, 2024
ae1865e
test(case): fix import order
forfreeday Jan 5, 2024
f04616a
test(case): add case
forfreeday Jan 6, 2024
8107586
test(case): add ZKProofStoreTest case
forfreeday Jan 7, 2024
8721f80
test(case): add servlet case
forfreeday Jan 8, 2024
05e3f55
test(case): add some cases
forfreeday Jan 9, 2024
bc701de
test(case): add db test cases
forfreeday Jan 10, 2024
f9bab7a
feat(log): catch ContractExeException in createShieldedContractParame…
317787106 Jan 11, 2024
32f210d
test(case): add transaction test cases
forfreeday Jan 11, 2024
5e7a405
Merge master into release_v4.7.4 branch (#5669)
lurais Jan 12, 2024
32e1e15
feat(db): optimize calculation services for reward when the node star…
halibobo1205 Jan 15, 2024
46454a2
feat(log):verify columns of hellomessage to avoid too long log (#5667)
317787106 Jan 15, 2024
1225ace
test(case): optimize case
forfreeday Jan 15, 2024
4bb4922
Merge pull request #5650 from forfreeday/feature/add_testcase
forfreeday Jan 16, 2024
ce04da4
feat(proposal): prevent re-submission after `ALLOW_OLD_REWARD_OPT` is…
halibobo1205 Jan 18, 2024
f02d6bf
test(case): remove useless code (#5679)
forfreeday Jan 18, 2024
24da384
feat(version): update version
forfreeday Jan 22, 2024
b08f46f
Merge pull request #5686 from forfreeday/feature/update_474version
forfreeday Jan 22, 2024
b5c6cbd
feat(log):optimize fork block version log (#5687)
lurais Jan 22, 2024
245ddfb
fix(dependency): mock jar version upgrade (#5689)
tomatoishealthy Jan 22, 2024
f0a46ff
fix(api): fix the bug of determine if triggerConstantContract succeed…
317787106 Jan 23, 2024
8960a6b
feat(version):update libp2p version to 2.2.0 (#5692)
317787106 Jan 23, 2024
931de44
feat(dependency):update libp2p version to test-v2.2.2
xxo1shine Jan 24, 2024
7489552
Merge pull request #5693 from ss3344520/update_libp2p_version
xxo1shine Jan 24, 2024
9911b05
feat(dependency): update libp2p version to 2.2.1
xxo1shine Jan 25, 2024
85bf0c3
Merge pull request #5694 from ss3344520/libp2p_version_update
xxo1shine Jan 25, 2024
baddd4f
feat(log): remove unused log for getnodeinfo api (#5697)
halibobo1205 Jan 25, 2024
cbf2417
fix the bug of concurrent usage of toString in TransactionCapsule (#5…
317787106 Jan 26, 2024
976d6f7
fix(pbft): fix concurrent access issue of srPbftMessage (#5703)
jwrct Jan 26, 2024
5acf3ef
feat(dependency): update libp2p version to test-v2.2.3
jwrct Jan 27, 2024
fd852c7
Merge pull request #5708 from jwrct/op_active_connect
Vikingzzu Jan 28, 2024
a578e85
feat(api): adjust API services to start first at startup (#5711)
halibobo1205 Jan 29, 2024
dcf1103
Revert "feat(dependency): update libp2p version to test-v2.2.3" (#5712)
jwrct Jan 29, 2024
96afa15
fix(conf): fix the config location of the RPC reflection servive (#5739)
tomatoishealthy Mar 4, 2024
fa46c4f
feat(*): optimize old rewards withdrawal (#5742)
halibobo1205 Mar 6, 2024
074e0d6
hotfix(net):throw exception if scalingFactor <=0 (#5746)
317787106 Mar 6, 2024
eaf2c34
feat(toolkit): show db root error to console (#5748)
halibobo1205 Mar 7, 2024
74c42e3
feat(conf):delete all bind.ip (#5750)
317787106 Mar 11, 2024
45a2af0
feat(param): modify the default value of maxUnsolidifiedBlocks (#5751)
xxo1shine Mar 11, 2024
3b5ed16
feat(net): optimize block processing logic (#5754)
fyyhtx Mar 11, 2024
038950d
Merge remote-tracking branch 'upstream/master' into release_v4.7.4
halibobo1205 Mar 15, 2024
9532bc0
remove unused test
halibobo1205 Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 81 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
Java implementation of the <a href="https://tron.network">Tron Protocol</a>
</h4>


<p align="center">
<a href="https://gitter.im/tronprotocol/allcoredev">
<img src="https://camo.githubusercontent.com/da2edb525cde1455a622c58c0effc3a90b9a181c/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667">
Expand Down Expand Up @@ -42,6 +41,7 @@
</p>

## Table of Contents

- [What’s TRON?](#whats-tron)
- [Building the Source Code](#building-the-source)
- [Running java-tron](#running-java-tron)
Expand All @@ -55,94 +55,109 @@

TRON is a project dedicated to building the infrastructure for a truly decentralized Internet.

* Tron Protocol, one of the largest blockchain-based operating systems in the world, offers scalable, high-availability and high-throughput support that underlies all the decentralized applications in the TRON ecosystem.
- Tron Protocol, one of the largest blockchain-based operating systems in the world, offers scalable, high-availability and high-throughput support that underlies all the decentralized applications in the TRON ecosystem.

* Tron Virtual Machine (TVM) allows anyone to develop decentralized applications (DAPPs) for themselves or their communities with smart contracts thereby making decentralized crowdfunding and token issuance easier than ever.
- Tron Virtual Machine (TVM) allows anyone to develop decentralized applications (DAPPs) for themselves or their communities with smart contracts thereby making decentralized crowdfunding and token issuance easier than ever.

TRON enables large-scale development and engagement. With over 2000 transactions per second (TPS), high concurrency, low latency, and massive data transmission. It is ideal for building decentralized entertainment applications. Free features and incentive systems allow developers to create premium app experiences for users.

# Building the source

Building java-tron requires `git` and 64-bit version of `Oracle JDK 1.8` to be installed, other JDK versions are not supported yet. Make sure you operate on `Linux` and `MacOS` operating systems.

Clone the repo and switch to the `master` branch

```bash
$ git clone https://github.com/tronprotocol/java-tron.git
$ cd java-tron
$ git checkout -t origin/master
```
```bash
$ git clone https://github.com/tronprotocol/java-tron.git
$ cd java-tron
$ git checkout -t origin/master
```

then run the following command to build java-tron, the `FullNode.jar` file can be found in `java-tron/build/libs/` after build successful.

```bash
$ ./gradlew clean build -x test
```


# Running java-tron

Running java-tron requires 64-bit version of `Oracle JDK 1.8` to be installed, other JDK versions are not supported yet. Make sure you operate on `Linux` and `MacOS` operating systems.

Get the mainnet configuration file: [main_net_config.conf](https://github.com/tronprotocol/tron-deployment/blob/master/main_net_config.conf), other network configuration files can be find [here](https://github.com/tronprotocol/tron-deployment).
Get the mainnet configuration file: [main_net_config.conf](https://github.com/tronprotocol/tron-deployment/blob/master/main_net_config.conf), other network configuration files can be found [here](https://github.com/tronprotocol/tron-deployment).

## Hardware Requirements

Minimum:
* CPU with 8 cores
* 16GB RAM
* 2TB free storage space to sync the Mainnet

- CPU with 8 cores
- 16GB RAM
- 2TB free storage space to sync the Mainnet

Recommended:
* CPU with 16+ cores(32+ cores for a super representative)
* 32GB+ RAM(64GB+ for a super representative)
* High Performance SSD with at least 2.5TB free space
* 100+ MB/s download Internet service

- CPU with 16+ cores(32+ cores for a super representative)
- 32GB+ RAM(64GB+ for a super representative)
- High Performance SSD with at least 2.5TB free space
- 100+ MB/s download Internet service

## Running a full node for mainnet
Full node has full historical data, it is the entry point into the TRON network , it can be used by other processes as a gateway into the TRON network via HTTP and GRPC endpoints. You can interact with the TRON network through full node:transfer assets, deploy contracts, interact with contracts and so on. `-c ` parameter specifies a configuration file to run a full node:
```bash
$ nohup java -Xms9G -Xmx9G -XX:ReservedCodeCacheSize=256m \
-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \
-XX:MaxDirectMemorySize=1G -XX:+PrintGCDetails \
-XX:+PrintGCDateStamps -Xloggc:gc.log \
-XX:+UseConcMarkSweepGC -XX:NewRatio=2 \
-XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 \
-jar FullNode.jar -c main_net_config.conf >> start.log 2>&1 &
```

Full node has full historical data, it is the entry point into the TRON network , it can be used by other processes as a gateway into the TRON network via HTTP and GRPC endpoints. You can interact with the TRON network through full node:transfer assets, deploy contracts, interact with contracts and so on. `-c` parameter specifies a configuration file to run a full node:

```bash
$ nohup java -Xms9G -Xmx9G -XX:ReservedCodeCacheSize=256m \
-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \
-XX:MaxDirectMemorySize=1G -XX:+PrintGCDetails \
-XX:+PrintGCDateStamps -Xloggc:gc.log \
-XX:+UseConcMarkSweepGC -XX:NewRatio=2 \
-XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 \
-jar FullNode.jar -c main_net_config.conf >> start.log 2>&1 &
```

## Running a super representative node for mainnet
Adding the `--witness` parameter to the startup command, full node will run as a super representative node. The super representative node supports all the functions of the full node and also supports block production. Before running, make sure you have a super representative account and get votes from others,once the number of obtained votes ranks in the top 27, your super representative node will participate in block production.

Fill in the private key of super representative address into the `localwitness` list in the `main_net_config.conf`, here is an example:
```
localwitness = [
650950B193DDDDB35B6E48912DD28F7AB0E7140C1BFDEFD493348F02295BD812
]
```
Adding the `--witness` parameter to the startup command, full node will run as a super representative node. The super representative node supports all the functions of the full node and also supports block production. Before running, make sure you have a super representative account and get votes from others. Once the number of obtained votes ranks in the top 27, your super representative node will participate in block production.

Fill in the private key of super representative address into the `localwitness` list in the `main_net_config.conf`. Here is an example:

```
localwitness = [
<your_private_key>
]
```

then run the following command to start the node:
```bash
$ nohup java -Xms9G -Xmx9G -XX:ReservedCodeCacheSize=256m \
-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \
-XX:MaxDirectMemorySize=1G -XX:+PrintGCDetails \
-XX:+PrintGCDateStamps -Xloggc:gc.log \
-XX:+UseConcMarkSweepGC -XX:NewRatio=2 \
-XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 \
-jar FullNode.jar --witness -c main_net_config.conf >> start.log 2>&1 &
```

```bash
$ nohup java -Xms9G -Xmx9G -XX:ReservedCodeCacheSize=256m \
-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \
-XX:MaxDirectMemorySize=1G -XX:+PrintGCDetails \
-XX:+PrintGCDateStamps -Xloggc:gc.log \
-XX:+UseConcMarkSweepGC -XX:NewRatio=2 \
-XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 \
-jar FullNode.jar --witness -c main_net_config.conf >> start.log 2>&1 &
```

## Quick Start Tool
An easier way to build and run java-tron is to use `start.sh`, `start.sh` is a quick start script written in shell language, you can use it to build and run java-tron quickly and easily.

An easier way to build and run java-tron is to use `start.sh`. `start.sh` is a quick start script written in the Shell language. You can use it to build and run java-tron quickly and easily.

Here are some common use cases of the scripting tool
* Use `start.sh` to start a full node with the downloaded `FullNode.jar`
* Use `start.sh` to download the latest `FullNode.jar` and start a full node.
* Use `start.sh` to download the latest source code and compile a `FullNode.jar` and then start a full node.

- Use `start.sh` to start a full node with the downloaded `FullNode.jar`
- Use `start.sh` to download the latest `FullNode.jar` and start a full node.
- Use `start.sh` to download the latest source code and compile a `FullNode.jar` and then start a full node.

For more details, please refer to the tool [guide](./shell.md).

## Run inside Docker container

One of the quickest ways to get `java-tron` up and running on your machine is by using Docker:

```shell
$ docker run -d --name="java-tron" \
-v /your_path/output-directory:/java-tron/output-directory \
Expand All @@ -155,29 +170,35 @@ $ docker run -d --name="java-tron" \
This will mount the `output-directory` and `logs` directories on the host, the docker.sh tool can also be used to simplify the use of docker, see more [here](docker/docker.md).

# Community

[Tron Developers & SRs](https://discord.gg/hqKvyAM) is Tron's official Discord channel. Feel free to join this channel if you have any questions.

[Core Devs Community](https://t.me/troncoredevscommunity) is the Telegram channel for java-tron community developers. If you want to contribute to java-tron, please join this channel.

[tronprotocol/allcoredev](https://gitter.im/tronprotocol/allcoredev) is the official Gitter channel for developers.

# Contribution
Thank you for considering to help out with the source code! If you'd like to contribute to java-tron, please see the [Contribution Guide](./CONTRIBUTING.md) for more details.

Thank you for considering to help out with the source code! If you'd like to contribute to java-tron, please see the [Contribution Guide](./CONTRIBUTING.md) for more details.

# Resources
* [Medium](https://medium.com/@coredevs) java-tron's official technical articles are published there.
* [Documentation](https://tronprotocol.github.io/documentation-en/introduction/) java-tron's official technical documentation website.
* [Test network](http://nileex.io/) A stable test network of TRON contributed by TRON community.
* [Tronscan](https://tronscan.org/#/) TRON network blockchain browser.
* [Wallet-cli](https://github.com/tronprotocol/wallet-cli) TRON network wallet using command line.
* [TIP](https://github.com/tronprotocol/tips) TRON Improvement Proposal (TIP) describes standards for the TRON network.
* [TP](https://github.com/tronprotocol/tips/tree/master/tp) TRON Protocol (TP) describes standards already implemented in TRON network but not published as a TIP.

- [Medium](https://medium.com/@coredevs) java-tron's official technical articles are published there.
- [Documentation](https://tronprotocol.github.io/documentation-en/introduction/) java-tron's official technical documentation website.
- [Test network](http://nileex.io/) A stable test network of TRON contributed by TRON community.
- [Tronscan](https://tronscan.org/#/) TRON network blockchain browser.
- [Wallet-cli](https://github.com/tronprotocol/wallet-cli) TRON network wallet using command line.
- [TIP](https://github.com/tronprotocol/tips) TRON Improvement Proposal (TIP) describes standards for the TRON network.
- [TP](https://github.com/tronprotocol/tips/tree/master/tp) TRON Protocol (TP) describes standards already implemented in TRON network but not published as a TIP.

# Integrity Check
* After January 3, 2023, releases are signed the gpg key:

- After January 3, 2023, the release files will be signed using a GPG key pair, and the correctness of the signature will be verified using the following public key:
```
pub: 1254 F859 D2B1 BD9F 66E7 107D F859 BCB4 4A28 290B
uid: [email protected]
```

# License

java-tron is released under the [LGPLv3 license](https://github.com/tronprotocol/java-tron/blob/master/LICENSE).
16 changes: 8 additions & 8 deletions Tron protobuf protocol document.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,11 @@ Transaction and transaction-related messages.

message `raw`

`ref_block_bytes`: Deprecated.
`ref_block_bytes`: intercepted part of the now block bytes in transaction head.

`ref_block_num`: now block number in transaction head.
`ref_block_num`: Deprecated.

`ref_block_hash`: now block hash in transaction head.
`ref_block_hash`:intercepted part of the now block hash in transaction head..

`expiration`: the expiration time in transaction head.

Expand All @@ -565,15 +565,15 @@ Transaction and transaction-related messages.
```java
message raw {
bytes ref_block_bytes = 1;
int64 ref_block_num = 3;
int64 ref_block_num = 3;
bytes ref_block_hash = 4;
int64 expiration = 8;
int64 expiration = 8;
repeated authority auths = 9;
bytes data = 10;
bytes data = 10;
repeated Contract contract = 11;
bytes scripts = 12;
bytes scripts = 12;
int64 timestamp = 14;
int64 fee_limit = 18;
int64 fee_limit = 18;
}
```

Expand Down
16 changes: 0 additions & 16 deletions actuator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
description = "actuator – a series of transactions for blockchain."

// Dependency versions
// ---------------------------------------

def junitVersion = "4.13.2"
def mockitoVersion = "2.1.0"
def testNgVersion = "6.11"
def slf4jVersion = "1.7.25"
// --------------------------------------

dependencies {
compile project(":chainbase")
compile project(":protocol")
compile project(":crypto")
testImplementation "junit:junit:$junitVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"

compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
compile 'org.reflections:reflections:0.9.11'
}

test {
Expand Down
23 changes: 22 additions & 1 deletion actuator/src/main/java/org/tron/core/utils/ProposalUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,26 @@ public static void validator(DynamicPropertiesStore dynamicPropertiesStore,
}
break;
}
case ALLOW_OLD_REWARD_OPT: {
if (!forkController.pass(ForkBlockVersionEnum.VERSION_4_7_4)) {
throw new ContractValidateException(
"Bad chain parameter id [ALLOW_OLD_REWARD_OPT]");
}
if (dynamicPropertiesStore.allowOldRewardOpt()) {
throw new ContractValidateException(
"[ALLOW_OLD_REWARD_OPT] has been valid, no need to propose again");
}
if (value != 1) {
throw new ContractValidateException(
"This value[ALLOW_OLD_REWARD_OPT] is only allowed to be 1");
}
if (!dynamicPropertiesStore.useNewRewardAlgorithm()) {
throw new ContractValidateException(
"[ALLOW_NEW_REWARD] or [ALLOW_TVM_VOTE] proposal must be approved "
+ "before [ALLOW_OLD_REWARD_OPT] can be proposed");
}
break;
}
default:
break;
}
Expand Down Expand Up @@ -803,7 +823,8 @@ public enum ProposalType { // current value, value range
DYNAMIC_ENERGY_MAX_FACTOR(75), // 0, [0, 100_000]
ALLOW_TVM_SHANGHAI(76), // 0, 1
ALLOW_CANCEL_ALL_UNFREEZE_V2(77), // 0, 1
MAX_DELEGATE_LOCK_PERIOD(78); // (86400, 10512000]
MAX_DELEGATE_LOCK_PERIOD(78), // (86400, 10512000]
ALLOW_OLD_REWARD_OPT(79); // 0, 1

private long code;

Expand Down
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ subprojects {
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
compile "org.slf4j:jcl-over-slf4j:1.7.25"
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
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'
compile group: 'com.google.guava', name: 'guava', version: '30.1-jre'
compile "com.google.code.findbugs:jsr305:3.0.0"
compile group: 'org.springframework', name: 'spring-context', version: '5.3.18'
Expand All @@ -52,7 +47,15 @@ subprojects {
compile group: 'org.apache.commons', name: 'commons-math', version: '2.2'
compile "org.apache.commons:commons-collections4:4.1"
compile group: 'joda-time', name: 'joda-time', version: '2.3'
compile 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'

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

task sourcesJar(type: Jar, dependsOn: classes) {
Expand Down
34 changes: 2 additions & 32 deletions chainbase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,16 @@ description = "chainbase – a decentralized database for blockchain."

// Dependency versions
// ---------------------------------------

def junitVersion = "4.13.2"
def mockitoVersion = "2.1.0"
def testNgVersion = "6.11"
def jacocoVersion = "0.8.0"
def leveldbVersion = "1.8"
def jansiVersion = "1.16"
// --------------------------------------

static def isWindows() {
return org.gradle.internal.os.OperatingSystem.current().isWindows()
}

if (isWindows()) {
ext {
leveldbGroup = "org.ethereum"
leveldbName = "leveldbjni-all"
leveldbVersion = "1.18.3"
}
} else {
ext {
leveldbGroup = "org.fusesource.leveldbjni"
leveldbName = "leveldbjni-all"
leveldbVersion = "1.8"
}
}

dependencies {
testImplementation "junit:junit:$junitVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"

compile group: leveldbGroup, name: leveldbName, version: leveldbVersion
compile "org.fusesource.jansi:jansi:$jansiVersion"
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.5'
compile project(":protocol")
compile project(":common")
compile project(":crypto")
compile "org.fusesource.jansi:jansi:$jansiVersion"
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
compile 'org.reflections:reflections:0.9.11'
}

Expand Down
Loading
Loading