Skip to content

Commit 50752f5

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop
2 parents 9b3be3f + c2d0d01 commit 50752f5

426 files changed

Lines changed: 23200 additions & 10068 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ shareddata.*
3131

3232
# protobuf generated classes
3333
src/main/gen
34-
3534
src/main/java/org/tron/core/bftconsensus
3635
src/test/java/org/tron/consensus2
3736
src/main/java/META-INF/

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ If you want to contribute codes to java-tron, please follow the following steps:
103103
104104
Submit a pull request (PR) from your repository to `tronprotocol/java-tron`.
105105
Please be sure to click on the link in the red box shown below. Select the base branch for tronprotocol and the compare branch for your personal fork repository.
106-
![](https://codimd.s3.shivering-isles.com/demo/uploads/e24435ab42e4287d9369a2136.png)
106+
![image](https://raw.githubusercontent.com/tronprotocol/documentation-en/master/images/javatron_pr.png)
107107
108108
109109
110110
## Code Review Guidelines
111-
The only way to get code into java-tron is to send a pull request. Those pull requests need to be reviewed by someone. there a guide that explains our expectations around PRs for both authors and reviewers.
111+
The only way to get code into java-tron is to send a pull request. Those pull requests need to be reviewed by someone. The following guide explains our expectations around PRs for both authors and reviewers.
112112
113113
### Terminology
114114
- The author of a pull request is the entity who wrote the diff and submitted it to GitHub.
@@ -186,10 +186,10 @@ Message body use the imperative, present tense: "change" not "changed" nor "chan
186186
187187
Here is an example:
188188
```
189-
feat(block): optimize product block
189+
feat(block): optimize the block-producing logic
190190

191-
1. optimize the block production threads
192-
2. improve transaction entry speed
191+
1. increase the priority that block producing thread acquires synchronization lock
192+
2. add the interruption exception handling in block-producing thread
193193

194194
Closes #1234
195195
```

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ $ ./gradlew clean build -x test
8181
# Running java-tron
8282
Running java-tron requires `Oracle JDK 1.8` to be installed, other JDK versions are not supported yet. Make sure you operate on `Linux` and `MacOS` operating systems.
8383

84-
Get the mainnet configurate 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).
84+
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).
8585
## Hardware Requirements
8686
Minimum:
8787
* CPU with 8 cores
8888
* 16GB RAM
89-
* 1TB free storage space to sync the Mainnet
89+
* 2TB free storage space to sync the Mainnet
9090

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

9797

@@ -174,14 +174,11 @@ Thank you for considering to help out with the source code! If you'd like to con
174174
* [Wallet-cli](https://github.com/tronprotocol/wallet-cli) TRON network wallet using command line.
175175
* [TIP](https://github.com/tronprotocol/tips) TRON Improvement Proposal (TIP) describes standards for the TRON network.
176176
* [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.
177-
177+
# Integrity Check
178+
* After January 3, 2023, releases are signed the gpg key:
179+
```
180+
pub: 1254 F859 D2B1 BD9F 66E7 107D F859 BCB4 4A28 290B
181+
uid: build@tron.network
182+
```
178183
# License
179184
java-tron is released under the [LGPLv3 license](https://github.com/tronprotocol/java-tron/blob/master/LICENSE).
180-
181-
182-
183-
The minimum hardware requirements are `CPU with 8 cores`,`16GB RAM` and `1TB free storage space` to sync the Mainnet, the recommended hardware requirements:
184-
* CPU with 16+ cores(32+ cores for a super representative)
185-
* 32+ GB RAM(64+ GB for a super representative)
186-
* High Performance SSD with at least 1.5TB free space
187-
* 100+ MB/s download Internet service

Tron protobuf protocol document.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,13 @@ Transaction and transaction-related messages.
620620
ClearABIContract = 48;
621621
UpdateBrokerageContract = 49;
622622
ShieldedTransferContract = 51;
623+
MarketSellAssetContract = 52;
624+
MarketCancelOrderContract = 53;
625+
FreezeBalanceV2Contract = 54;
626+
UnfreezeBalanceV2Contract = 55;
627+
WithdrawExpireUnfreezeContract = 56;
628+
DelegateResourceContract = 57;
629+
UnDelegateResourceContract = 58;
623630
}
624631
ContractType type = 1;
625632
google.protobuf.Any parameter = 2;
@@ -873,6 +880,13 @@ Contract and contract-related messages.
873880
ClearABIContract = 48;
874881
UpdateBrokerageContract = 49;
875882
ShieldedTransferContract = 51;
883+
MarketSellAssetContract = 52;
884+
MarketCancelOrderContract = 53;
885+
FreezeBalanceV2Contract = 54;
886+
UnfreezeBalanceV2Contract = 55;
887+
WithdrawExpireUnfreezeContract = 56;
888+
DelegateResourceContract = 57;
889+
UnDelegateResourceContract = 58;
876890
}
877891
ContractType type = 1;
878892
google.protobuf.Any parameter = 2;
@@ -2019,7 +2033,7 @@ message `SmartContract` has mutiple attributes and nested message `ABI`
20192033
TOO_MANY_PEERS = 0x04;
20202034
DUPLICATE_PEER = 0x05;
20212035
INCOMPATIBLE_PROTOCOL = 0x06;
2022-
NULL_IDENTITY = 0x07;
2036+
RANDOM_ELIMINATION = 0x07;
20232037
PEER_QUITING = 0x08;
20242038
UNEXPECTED_IDENTITY = 0x09;
20252039
LOCAL_IDENTITY = 0x0A;

actuator/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ dependencies {
2020

2121
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
2222
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
23-
compile 'com.github.tronprotocol:zksnark-java-sdk:master-SNAPSHOT'
2423
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
2524
compile 'org.reflections:reflections:0.9.11'
2625
}

actuator/src/main/java/org/tron/core/actuator/ClearABIContractActuator.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.tron.core.actuator;
22

3+
import static org.tron.core.actuator.ActuatorConstant.NOT_EXIST_STR;
4+
35
import com.google.protobuf.ByteString;
46
import com.google.protobuf.InvalidProtocolBufferException;
57
import java.util.Arrays;
@@ -16,13 +18,10 @@
1618
import org.tron.core.store.AbiStore;
1719
import org.tron.core.store.AccountStore;
1820
import org.tron.core.store.ContractStore;
19-
import org.tron.core.vm.config.VMConfig;
2021
import org.tron.protos.Protocol.Transaction.Contract.ContractType;
2122
import org.tron.protos.Protocol.Transaction.Result.code;
22-
import org.tron.protos.contract.SmartContractOuterClass.SmartContract.ABI;
2323
import org.tron.protos.contract.SmartContractOuterClass.ClearABIContract;
24-
25-
import static org.tron.core.actuator.ActuatorConstant.NOT_EXIST_STR;
24+
import org.tron.protos.contract.SmartContractOuterClass.SmartContract.ABI;
2625

2726
@Slf4j(topic = "actuator")
2827
public class ClearABIContractActuator extends AbstractActuator {
@@ -57,17 +56,16 @@ public boolean execute(Object result) throws ContractExeException {
5756

5857
@Override
5958
public boolean validate() throws ContractValidateException {
60-
if (!VMConfig.allowTvmConstantinople()) {
61-
throw new ContractValidateException(
62-
"contract type error,unexpected type [ClearABIContract]");
63-
}
64-
6559
if (this.any == null) {
6660
throw new ContractValidateException(ActuatorConstant.CONTRACT_NOT_EXIST);
6761
}
6862
if (chainBaseManager == null) {
6963
throw new ContractValidateException("No account store or contract store!");
7064
}
65+
if (chainBaseManager.getDynamicPropertiesStore().getAllowTvmConstantinople() == 0) {
66+
throw new ContractValidateException(
67+
"contract type error,unexpected type [ClearABIContract]");
68+
}
7169
AccountStore accountStore = chainBaseManager.getAccountStore();
7270
ContractStore contractStore = chainBaseManager.getContractStore();
7371
if (!this.any.is(ClearABIContract.class)) {

0 commit comments

Comments
 (0)