Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
702 commits
Select commit Hold shift + click to select a range
8c1721c
add inheritanceTest
taihaofu Aug 14, 2018
1d13523
set cpu fee and storage fee.
CodeNinjaEvan Aug 14, 2018
6c6dc56
Merge branch 'develop' into update_solidity_not_need_del_store
Yrp Aug 14, 2018
c71a547
set net bill.
CodeNinjaEvan Aug 14, 2018
7f5f09f
set cpu fee and storage fee.
CodeNinjaEvan Aug 14, 2018
4c43e99
set net bill.
CodeNinjaEvan Aug 14, 2018
53e067f
Merge remote-tracking branch 'origin/fix_spend_calc' into fix_spend_calc
CodeNinjaEvan Aug 14, 2018
126a37f
add fee to transactioninfo.
CodeNinjaEvan Aug 14, 2018
709bd99
add internalTransactionComplexTest
taihaofu Aug 14, 2018
d1f312c
Merge pull request #1302 from tronprotocol/fix_spend_calc
huzhenyuan Aug 14, 2018
21bde3c
improve fork logic
Yrp Aug 14, 2018
9b425d2
Add and modify TVM test case
Aug 14, 2018
d260249
remove useless code and fix zero divide.
CodeNinjaEvan Aug 14, 2018
6c47c85
Merge pull request #1304 from tronprotocol/add_TVM_test_case
wangzichichi Aug 14, 2018
1af6c16
Merge pull request #1303 from tronprotocol/fix_spend_calc
tjchern Aug 14, 2018
40a0a01
add the full pool disconnect
lvs007 Aug 14, 2018
aafe512
modify the param
lvs007 Aug 14, 2018
48e4449
add call test
taihaofu Aug 14, 2018
a203c06
add debug log
Yrp Aug 15, 2018
8c9d235
add debug log
Yrp Aug 15, 2018
8eabb88
:loud_sound:add debug log
Yrp Aug 15, 2018
a8a6c47
if peer connect set the disconnect is false
lvs007 Aug 15, 2018
7247494
:loud_sound:add debug log
Yrp Aug 15, 2018
e306e5e
:loud_sound:add debug log
Yrp Aug 15, 2018
ab2ca9a
add origin usage in receipt.
CodeNinjaEvan Aug 15, 2018
5750bab
add origin usage in receipt.
CodeNinjaEvan Aug 15, 2018
fc7a53e
:loud_sound:add debug log
Yrp Aug 15, 2018
8a46fa8
:loud_sound:add debug log
Yrp Aug 15, 2018
976ee4e
:loud_sound:add debug log
Yrp Aug 15, 2018
5b4b164
:loud_sound:add debug log
Yrp Aug 15, 2018
01de1ac
:loud_sound:add debug log
Yrp Aug 15, 2018
2387c35
modify the gas out message
tjchern Aug 15, 2018
b787571
Add gettransactioninfobyid on fullnode test case
Aug 15, 2018
456ff96
Merge pull request #1305 from tronprotocol/add_receiipt_origin
huzhenyuan Aug 15, 2018
4fbebbe
Merge pull request #1306 from tronprotocol/add_TVM_test_case
pangpangfeng Aug 15, 2018
b5c8104
1. modify the function isconstant
tjchern Aug 15, 2018
f66c0f9
Merge remote-tracking branch 'origin/develop' into develop
tjchern Aug 15, 2018
48449c0
not disconnect the trust peer
lvs007 Aug 15, 2018
404033d
Merge pull request #1307 from tronprotocol/add_function_in_contract_op
tjchern Aug 15, 2018
6c53415
add more test cases to internal transactioin call test
taihaofu Aug 15, 2018
f1efe44
mdf trx msg statistics
xxo1shine Aug 15, 2018
e88da4e
Merge pull request #1308 from tronprotocol/add_tvm_unit_test
huzhenyuan Aug 15, 2018
7574810
mdf onHandleSyncBlockChainMessage
xxo1shine Aug 15, 2018
8ea40b2
clean code
Aug 15, 2018
5bf5501
before fork, not deal with any transaction
Yrp Aug 15, 2018
5e870f6
Merge pull request #1309 from tronprotocol/clean_code
taihaofu Aug 15, 2018
87f880d
Merge commit '5750babd869d637a4b0ecba362a1dc2861863af8' into develop
tjchern Aug 15, 2018
54ba471
add vm trace to trace stack, memory, storage info for each step
taihaofu Aug 16, 2018
092d210
mdf for Compile“
xxo1shine Aug 16, 2018
e56fbd9
Merge pull request #1285 from tronprotocol/p2p_tmsg
wubin12 Aug 16, 2018
65248f8
resolve sonar complains and some ut refine
taihaofu Aug 16, 2018
ab8cadd
Update SystemProperties.java
huzhenyuan Aug 16, 2018
3dad719
Merge pull request #1310 from tronprotocol/add_vm_trace
huzhenyuan Aug 16, 2018
004c6e6
add transactionTraceTest.
CodeNinjaEvan Aug 16, 2018
58e73c1
modify the ping score
lvs007 Aug 16, 2018
0e6257c
1. move repush thread to manager.java, so fullnode and witness both c…
tjchern Aug 16, 2018
28c2850
Merge remote-tracking branch 'origin/develop' into develop
tjchern Aug 16, 2018
907211f
remove code
lvs007 Aug 16, 2018
96c33e8
Merge branch 'develop' into score-system-liang
lvs007 Aug 16, 2018
2182d82
remove code
lvs007 Aug 16, 2018
2f97199
fix test
lvs007 Aug 16, 2018
380b640
add vm switch
ithinker1991 Aug 16, 2018
d4acdf2
add transactionTraceTest.
CodeNinjaEvan Aug 16, 2018
388bf65
fix CpuUsed increase with CpuLimit.
CodeNinjaEvan Aug 16, 2018
8315a9d
Merge pull request #1311 from tronprotocol/fix_cpu_usage
huzhenyuan Aug 17, 2018
adb7358
fix bug
ithinker1991 Aug 17, 2018
3a8665c
Merge pull request #1284 from tronprotocol/score-system-liang
wubin12 Aug 17, 2018
0522a92
add err log
ithinker1991 Aug 17, 2018
0f258ab
add TODO for vm switch
ithinker1991 Aug 17, 2018
9824707
Add trigger contract test case
Aug 17, 2018
aad1a67
Add trigger contract test case
Aug 17, 2018
cc61567
fix unit test
ithinker1991 Aug 17, 2018
ab778f8
Merge pull request #1315 from tronprotocol/Add_trigger_kittyCore_test…
pangpangfeng Aug 17, 2018
42841b5
Merge pull request #1314 from tronprotocol/vm_switch
huzhenyuan Aug 17, 2018
be6c46f
fix storage Delta set.
CodeNinjaEvan Aug 17, 2018
0670459
Merge pull request #1312 from tronprotocol/add_test
huzhenyuan Aug 17, 2018
f5a24e6
delete useless vm-storage data on disk
ithinker1991 Aug 18, 2018
edf94a9
Merge pull request #1301 from tronprotocol/update_solidity_not_need_d…
sasaxie Aug 20, 2018
8f6e41a
Merge pull request #1317 from tronprotocol/move_repush_to_manager
huzhenyuan Aug 20, 2018
827706b
Remove trigger TVM in build.gradle
Aug 20, 2018
556635c
modify the log save time
lvs007 Aug 20, 2018
5157baa
Merge pull request #1318 from tronprotocol/Add_trigger_kittyCore_test…
pangpangfeng Aug 20, 2018
3899758
Merge pull request #1319 from tronprotocol/modify-log-save-time
wubin12 Aug 20, 2018
eac0fbb
add the disconnet controller
lvs007 Aug 20, 2018
20cd991
1. resolve leveldb could not create radom file On windows;2. log tar.…
Yrp Aug 20, 2018
48e414f
Merge pull request #1320 from tronprotocol/modify-log-save-time
wubin12 Aug 20, 2018
478c8a7
change cpu to energy
nanfengpo Aug 20, 2018
e12ae6e
Merge commit '478c8a7cbfacbd60d347b528bb14eaa2e317d557' into feature/…
nanfengpo Aug 20, 2018
eb320b7
feature/change cpu to energy
nanfengpo Aug 20, 2018
00ea423
feature/change cpu to energy
nanfengpo Aug 20, 2018
b30936c
feature/change cpu to energy
nanfengpo Aug 20, 2018
a5fef43
minor change
nanfengpo Aug 20, 2018
adf0d28
change cpu to energy in test file
nanfengpo Aug 20, 2018
f2b99ea
reject buy or sell storage contract
nanfengpo Aug 20, 2018
f7cc1a5
minor change
nanfengpo Aug 20, 2018
2bfe2fe
add proposal option for removing the power of the gr.
sean-liu55 Aug 20, 2018
4b35490
remove storage
CodeNinjaEvan Aug 20, 2018
6ed66dc
revert some energy to cpu
nanfengpo Aug 20, 2018
7ffa207
Merge pull request #1322 from tronprotocol/feature/energy
CodeNinjaEvan Aug 20, 2018
bc21bed
Merge pull request #1323 from tronprotocol/feature/rm_gr_power
nanfengpo Aug 20, 2018
1242e02
add TransferAsset Native function
taihaofu Aug 21, 2018
4892b89
add test
tjchern Aug 20, 2018
f2784e5
change storage gas
tjchern Aug 20, 2018
402e26e
remove storage
CodeNinjaEvan Aug 20, 2018
ea4f4da
remove storage
CodeNinjaEvan Aug 20, 2018
0c38351
change cpu to energy in test file
nanfengpo Aug 20, 2018
c413b4e
add energy and energy test.
CodeNinjaEvan Aug 20, 2018
4514665
change getAccountLeftEnergyInUsFromFreeze.
CodeNinjaEvan Aug 21, 2018
ad8cf89
feature: add exchange message, contract and api
nanfengpo Aug 21, 2018
e70299a
Merge branch 'master' of https://github.com/tronprotocol/protocol
nanfengpo Aug 21, 2018
67a550f
Merge commit 'e70299a71788d431e10080510709852fffe0844b' into feature/…
nanfengpo Aug 21, 2018
fc636ce
mdf: change exchange quant to balance
nanfengpo Aug 21, 2018
1e17508
feature: add ExchangeUtil module
nanfengpo Aug 21, 2018
9f0d26a
Merge commit 'fc636ced8544818abf15938f495f9590d62b8029' into feature/…
nanfengpo Aug 21, 2018
0934611
feature: add transaction func in ExchangeCapsule:
nanfengpo Aug 21, 2018
5727897
minor change
nanfengpo Aug 21, 2018
7f72fff
refine transfer asset
taihaofu Aug 21, 2018
faeab78
add ownerAddress in exchange contracts
nanfengpo Aug 21, 2018
40e4977
feature: add ExchangeCreateActuator module; add ExchangeCreateFee
nanfengpo Aug 21, 2018
116daed
Merge commit 'faeab781d1b1919d0cbe8dac4e8d9ff55bedce0a' into feature/…
nanfengpo Aug 21, 2018
424e6c4
Merge branch 'develop' into change_storage_fee
tjchern Aug 21, 2018
fa0dda8
add Thread.currentThread().interrupt()
tjchern Aug 21, 2018
efe1889
feature: add ExchangeInjectActuator module
nanfengpo Aug 21, 2018
761345d
delete key
ithinker1991 Aug 21, 2018
b8340f5
change visibility.
CodeNinjaEvan Aug 21, 2018
bb4479f
add getTransferAssetAmount by userAddress and token name method
taihaofu Aug 21, 2018
f84de47
Polish
ithinker1991 Aug 21, 2018
a62b9e7
Merge pull request #1324 from tronprotocol/change_storage_fee_2
huzhenyuan Aug 21, 2018
f401ae0
feature: add ExchangeWithdrawActuator module
nanfengpo Aug 21, 2018
ce84cec
Update Storage.java
huzhenyuan Aug 21, 2018
a65eccf
Merge branch 'develop' into storage_delete
huzhenyuan Aug 21, 2018
394e784
Update Storage.java
huzhenyuan Aug 21, 2018
0c9facb
Merge pull request #1327 from tronprotocol/storage_delete
huzhenyuan Aug 21, 2018
c057221
Merge pull request #1326 from tronprotocol/add_more_precompiled_method
huzhenyuan Aug 21, 2018
0f475d5
set name for getEnergyForData
Aug 21, 2018
46c6574
feature: add ExchangeTransactionActuator module
nanfengpo Aug 21, 2018
df1b841
feature: add Exchange contract type in Transaction message
nanfengpo Aug 21, 2018
785351b
Merge commit 'df1b8419a80287679d454fe07a880de0617c89ff' into feature/…
nanfengpo Aug 21, 2018
ed82049
feature: add Exchange Actuators in ActuatorFactory
nanfengpo Aug 21, 2018
7a4ff92
Merge pull request #1328 from tronprotocol/rename_gas_energy
taihaofu Aug 21, 2018
2d46a4d
feature: add Exchange rpc api
nanfengpo Aug 21, 2018
afb118e
fix revert all gas will spend all gas bug
taihaofu Aug 21, 2018
793bc4f
Merge pull request #1329 from tronprotocol/fix_useAllGas_bug_for_revert
huzhenyuan Aug 21, 2018
ab6b22b
Stest remove storage and add the failed test case retry function
Aug 21, 2018
06ce5e7
Stest remove storage and add the failed test case retry function
Aug 21, 2018
fcc8f90
feature: add exchange search rpc api
nanfengpo Aug 21, 2018
b433a9c
Merge branch 'develop' into stest_remove_storage
Aug 21, 2018
3da0235
Add stest case failed retry function and remove stest storgage test case
Aug 21, 2018
aa31aa2
fix overflow
sean-liu55 Aug 21, 2018
9e7a03d
add verification whether the exchange has been closed.
sean-liu55 Aug 21, 2018
bb1c910
create block bug
shydesky Aug 21, 2018
8c9b56d
Modify boundary conditions.
sean-liu55 Aug 21, 2018
eb551bb
Remove duplicate operations
sean-liu55 Aug 21, 2018
75e25bc
Merge pull request #1331 from tronprotocol/shy_bugfix
lvs007 Aug 21, 2018
1e94087
Add a test relied on the TVM runtime with bytecodes
hyunjunekim Aug 19, 2018
63dbd09
Merge pull request #1330 from tronprotocol/stest_remove_storage
pangpangfeng Aug 22, 2018
d389ded
fix bug
tjchern Aug 22, 2018
1b4537c
Merge remote-tracking branch 'origin/develop' into change_storage_fee_2
tjchern Aug 22, 2018
0525daf
Stest add energy in txid and test user percent test case
Aug 22, 2018
6dfa02f
change energytotal to energyusagetotal.
CodeNinjaEvan Aug 22, 2018
40599e9
change energytotal to energyusagetotal.
CodeNinjaEvan Aug 22, 2018
7ed14d8
fix bug
tjchern Aug 22, 2018
f666b6d
change energytotal to energyusagetotal.
CodeNinjaEvan Aug 22, 2018
e910b1e
Merge commit 'df1b8419a80287679d454fe07a880de0617c89ff' into change_name
CodeNinjaEvan Aug 22, 2018
5db6d52
Merge commit 'df1b8419a80287679d454fe07a880de0617c89ff' into change_name
CodeNinjaEvan Aug 22, 2018
36d73db
Update Runtime.java
CodeNinjaEvan Aug 22, 2018
00ad042
Merge pull request #1334 from tronprotocol/change_name
huzhenyuan Aug 22, 2018
143a6f3
fix bug
tjchern Aug 22, 2018
0b85c39
fix bug
tjchern Aug 22, 2018
07f5b4c
Merge branch 'fix_bill_and_add_energy_test' of https://github.com/tro…
CodeNinjaEvan Aug 22, 2018
c5b1216
Merge branch 'develop' into fix_bill_and_add_energy_test
CodeNinjaEvan Aug 22, 2018
b6fdcf8
Merge pull request #1333 from tronprotocol/stest_remove_storage
pangpangfeng Aug 22, 2018
7121230
fix bugs.
CodeNinjaEvan Aug 22, 2018
fcb4f09
modify log
lvs007 Aug 22, 2018
9230ba7
Merge branch 'develop' into feature/exchange
nanfengpo Aug 22, 2018
42f4a33
fix bugs.
CodeNinjaEvan Aug 22, 2018
cef875f
Merge commit '5db6d52d4a5e249513e3f05a01010ffdfd54ead0' into fix_bill…
tjchern Aug 22, 2018
0d13ced
Merge remote-tracking branch 'remotes/origin/develop' into fix_bill_a…
tjchern Aug 22, 2018
a2937f5
Stest add energy in txid and test user percent test case
Aug 22, 2018
0e5d75b
fix bug
tjchern Aug 22, 2018
40e426f
fix bugs.
CodeNinjaEvan Aug 22, 2018
c538d88
fix bugs.
CodeNinjaEvan Aug 22, 2018
bc6d6b6
fix bugs.
CodeNinjaEvan Aug 22, 2018
9aa8a39
Merge remote-tracking branch 'origin/develop' into fix_bill_and_add_e…
CodeNinjaEvan Aug 22, 2018
ba3eb02
fix bugs.
CodeNinjaEvan Aug 22, 2018
d608d99
Merge remote-tracking branch 'origin/fix_bill_and_add_energy_test' in…
tjchern Aug 22, 2018
3741eca
fix conflict
tjchern Aug 22, 2018
150225f
Merge pull request #1332 from tronprotocol/fix_bill_and_add_energy_test
huzhenyuan Aug 22, 2018
a8a79af
test: add ExchangeProcessor unittest
nanfengpo Aug 22, 2018
f8cb06b
add EnergyFee
sean-liu55 Aug 22, 2018
5ecc88f
Merge pull request #1335 from tronprotocol/feature/energy_fee
nanfengpo Aug 22, 2018
8fad5d7
add test when send/transfer
tjchern Aug 22, 2018
e31ff08
Merge remote-tracking branch 'origin/develop' into fix_bill_and_add_e…
tjchern Aug 22, 2018
f88fe78
feature: add exchange balance limit
nanfengpo Aug 22, 2018
9c60f51
fix unit test
sean-liu55 Aug 22, 2018
e4991d3
from Constant.SUN_PER_ENERGY to getDynamicPropertiesStore().
tjchern Aug 22, 2018
e505a24
fix unit test
sean-liu55 Aug 22, 2018
892af5f
Merge pull request #1336 from tronprotocol/feature/energy_fee
nanfengpo Aug 22, 2018
02fd687
fix test
tjchern Aug 22, 2018
232bbe3
fix conflict
tjchern Aug 22, 2018
2e150a4
remove the tron message data valid
lvs007 Aug 22, 2018
11dc48c
modify log
lvs007 Aug 22, 2018
502cc78
modify name
lvs007 Aug 22, 2018
5302793
Merge pull request #1337 from tronprotocol/add_dynamic_sun_per_energy
huzhenyuan Aug 22, 2018
99823e2
test: add ExchangeCapsuleTest
nanfengpo Aug 22, 2018
dae4f42
fix merge conflict
nanfengpo Aug 22, 2018
5cf4d3a
guarantee CREATE instruction generate different address
taihaofu Aug 22, 2018
e04726d
resolve sonar complain
taihaofu Aug 22, 2018
b5d55aa
revert SystemProperties
taihaofu Aug 22, 2018
ea4596a
remove useless code, and stopRepushThread on shutdown application
Aug 23, 2018
c25b435
add TronApplicationContext
Aug 23, 2018
c79cdc8
Update Manager.java
huzhenyuan Aug 23, 2018
c6e4c6f
Merge pull request #1344 from tronprotocol/tron_application_context
tjchern Aug 23, 2018
010492a
Merge pull request #1341 from tronprotocol/create_contract_using_diff…
huzhenyuan Aug 23, 2018
688c5ab
Merge pull request #1321 from tronprotocol/leveldb_do_not_create_sst_…
huzhenyuan Aug 23, 2018
0dd4399
remove
lvs007 Aug 23, 2018
b9491ab
fix test
lvs007 Aug 23, 2018
5616adf
Merge branch 'develop' into modify-log-save-time
lvs007 Aug 23, 2018
3265070
Merge pull request #1340 from tronprotocol/feature/exchange
huzhenyuan Aug 23, 2018
362ee3c
Merge pull request #1338 from tronprotocol/modify-log-save-time
lvs007 Aug 23, 2018
e7ff1ef
change storage key
ithinker1991 Aug 22, 2018
fc71a4a
Polish
ithinker1991 Aug 23, 2018
99560b5
throw all exception and show fail
taihaofu Aug 23, 2018
6c6335e
Merge pull request #1345 from tronprotocol/fix_runtime_error_not_thro…
huzhenyuan Aug 23, 2018
b546c2d
Polish
ithinker1991 Aug 23, 2018
e728212
add FIXME
ithinker1991 Aug 23, 2018
fcd6fec
Merge pull request #1346 from tronprotocol/storage_key_no_debug
huzhenyuan Aug 23, 2018
7750b8d
remove useless code
Aug 23, 2018
38bf3c8
add energy test
tjchern Aug 23, 2018
c48c0c6
Merge remote-tracking branch 'remotes/origin/develop' into develop
tjchern Aug 23, 2018
2788f05
remove useless code
Aug 23, 2018
4e8bc73
catch all throwable
tjchern Aug 23, 2018
33a1426
Merge pull request #1347 from tronprotocol/remove_useless_codde
tjchern Aug 23, 2018
ea13f6c
Merge remote-tracking branch 'remotes/origin/develop' into develop
tjchern Aug 23, 2018
fe3a38d
merge develop
Yrp Aug 23, 2018
95f13ab
Merge pull request #1348 from tronprotocol/catch_all_in_vm
CodeNinjaEvan Aug 23, 2018
987dae4
Merge branch 'develop' into merge_develop2master
CodeNinjaEvan Aug 23, 2018
c6af6a1
reset forkController when maintenance
Yrp Aug 23, 2018
fe33877
fix bug
tjchern Aug 23, 2018
c7455c3
Merge pull request #1351 from tronprotocol/fix_s_test
huzhenyuan Aug 23, 2018
36d8e65
Merge pull request #1316 from hyunjunekim/test
huzhenyuan Aug 23, 2018
32f9f74
Improve code readability
Yrp Aug 23, 2018
f6ad81a
Modify stest case
Aug 23, 2018
ecef6f3
cleanup old code
Rovak Aug 23, 2018
5b4f130
Merge branch 'develop' into stest_VM_detail_fee
wangzichichi Aug 23, 2018
2e1fa04
Merge pull request #1353 from tronprotocol/stest_VM_detail_fee
pangpangfeng Aug 23, 2018
3fcb5f0
Merge pull request #1354 from tronprotocol/cleanup-old-code
huzhenyuan Aug 23, 2018
1a7caf5
Merge pull request #1290 from tronprotocol/useVersionForHardFork
huzhenyuan Aug 23, 2018
b99a3ea
remove thread.
CodeNinjaEvan Aug 23, 2018
10005ac
Merge pull request #1355 from tronprotocol/getblockstore
huzhenyuan Aug 23, 2018
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ src/main/resources/META-INF/
/output_witness/
output*
nodeId.properties
Wallet
Wallet

# vm_trace
/vm_trace/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ deploy:
branch: develop




114 changes: 57 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">
<br>
<img width=20% src="https://raw.githubusercontent.com/tronprotocol/wiki/master/images/java-tron.png">
<img width=20% src="https://github.com/tronprotocol/wiki/blob/master/images/java-tron.jpg?raw=true">
<br>
java-tron
<br>
Expand Down Expand Up @@ -62,6 +62,12 @@ TRON Protocol and the Tron Virtual Machine (TVM) allow anyone to develop decentr

* JDK 1.8 (JDK 1.9+ are not supported yet)
* On Linux Ubuntu system (e.g. Ubuntu 16.04.4 LTS), ensure that the machine has [__Oracle JDK 8__](https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04), instead of having __Open JDK 8__ in the system. If you are building the source code by using __Open JDK 8__, you will get [__Build Failed__](https://github.com/tronprotocol/java-tron/issues/337) result.
* Open **UDP** ports for connection to the network
* **MINIMUM** 2 ENERGY Cores

## Build and Deploy automatically using scripts

- Please take a look at the [Tron Deployment Scripts](https://github.com/tronprotocol/TronDeployment) repository.

## Getting the code with git

Expand Down Expand Up @@ -126,7 +132,7 @@ cd java-tron

* Build in [IntelliJ IDEA](https://www.jetbrains.com/idea/) (community version is enough):

** Please run ./gradlew build once to build the protocol files **
**Please run ./gradlew build once to build the protocol files**

1. Start IntelliJ. Select `File` -> `Open`, then locate to the java-tron folder which you have git cloned to your local drive. Then click `Open` button on the right bottom.
2. Check on `Use auto-import` on the `Import Project from Gradle` dialog. Select JDK 1.8 in the `Gradle JVM` option. Then click `OK`.
Expand All @@ -142,10 +148,54 @@ https://github.com/tronprotocol/Documentation/blob/master/TRX/Solidity_and_Full_

## Running a local node and connecting to the public testnet

* Ensure that the version number is consistent with the version number of the test network. If it is not consistent, please modify the node.p2p.version in the config.conf file and delete the out-directory directory (if it exists).
* The current p2p.version is **619**
* Use the [Testnet Config](https://github.com/tronprotocol/TronDeployment/blob/master/test_net_config.conf) or use the [Tron Deployment Scripts](https://github.com/tronprotocol/TronDeployment)


### Running a Super Representative Node for mainnet

* Use the executable JAR(Recommended way)

```bash
java -jar FullNode.jar -p your private key --witness -c your config.conf(Example:/data/java-tron/config.conf)
Example:
java -jar FullNode.jar -p 650950B193DDDDB35B6E48912DD28F7AB0E7140C1BFDEFD493348F02295BD812 --witness -c /data/java-tron/config.conf

```

This is similar to running a private testnet, except that the IPs in the `config.conf` are officially declared by TRON.

<details>
<summary>Correct output</summary>

```bash

20:43:18.138 INFO [main] [o.t.p.FullNode](FullNode.java:21) Full node running.
20:43:18.486 INFO [main] [o.t.c.c.a.Args](Args.java:429) Bind address wasn't set, Punching to identify it...
20:43:18.493 INFO [main] [o.t.c.c.a.Args](Args.java:433) UDP local bound to: 10.0.8.146
20:43:18.495 INFO [main] [o.t.c.c.a.Args](Args.java:448) External IP wasn't set, using checkip.amazonaws.com to identify it...
20:43:19.450 INFO [main] [o.t.c.c.a.Args](Args.java:461) External address identified: 47.74.147.87
20:43:19.599 INFO [main] [o.s.c.a.AnnotationConfigApplicationContext](AbstractApplicationContext.java:573) Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@124c278f: startup date [Fri Apr 27 20:43:19 CST 2018]; root of context hierarchy
20:43:19.972 INFO [main] [o.s.b.f.a.AutowiredAnnotationBeanPostProcessor](AutowiredAnnotationBeanPostProcessor.java:153) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
20:43:20.380 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:244) update latest block header timestamp = 0
20:43:20.383 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:252) update latest block header number = 0
20:43:20.393 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:260) update latest block header id = 00
20:43:20.394 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:265) update state flag = 0
20:43:20.559 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.567 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.568 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.568 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.569 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.596 INFO [main] [o.t.c.d.Manager](Manager.java:300) create genesis block
20:43:20.607 INFO [main] [o.t.c.d.Manager](Manager.java:306) save block: BlockCapsule

```

Then observe whether block synchronization success,If synchronization successfully explains the success of the super node

</details>


### How to run a Super Node
### Running a Super Representative Node for private testnet
* use master branch
* You should modify the config.conf
1. Replace existing entry in genesis.block.witnesses with your address.
Expand All @@ -157,17 +207,11 @@ https://github.com/tronprotocol/Documentation/blob/master/TRX/Solidity_and_Full_

```bash
cd build/libs
java -jar java-tron.jar -p yourself private key --witness -c yourself config.conf(Example:/data/java-tron/config.conf)
java -jar FullNode.jar -p your private key --witness -c your config.conf (Example:/data/java-tron/config.conf)
Example:
java -jar java-tron.jar -p 650950B193DDDDB35B6E48912DD28F7AB0E7140C1BFDEFD493348F02295BD812 --witness -c /data/java-tron/config.conf
java -jar FullNode.jar -p 650950B193DDDDB35B6E48912DD28F7AB0E7140C1BFDEFD493348F02295BD812 --witness -c /data/java-tron/config.conf

```

* In the Terminal
Un the config.conf localwitness add your private key.
```bash
./gradlew run -Pwitness
```

<details>
<summary>Show Output</summary>
Expand Down Expand Up @@ -286,50 +330,6 @@ In the `Program arguments` option, fill in `--witness`:

Then, run `FullNode::main()` again.

### Running a Super Node

* Use the executable JAR(Recommended way)

```bash
cd build/libs
java -jar java-tron.jar -p yourself private key --witness -c yourself config.conf(Example:/data/java-tron/config.conf)
Example:
java -jar java-tron.jar -p 650950B193DDDDB35B6E48912DD28F7AB0E7140C1BFDEFD493348F02295BD812 --witness -c /data/java-tron/config.conf

```

This is similar to running a private testnet, except that the IPs in the `config.conf` are officially declared by TRON.

<details>
<summary>Correct output</summary>

```bash

20:43:18.138 INFO [main] [o.t.p.FullNode](FullNode.java:21) Full node running.
20:43:18.486 INFO [main] [o.t.c.c.a.Args](Args.java:429) Bind address wasn't set, Punching to identify it...
20:43:18.493 INFO [main] [o.t.c.c.a.Args](Args.java:433) UDP local bound to: 10.0.8.146
20:43:18.495 INFO [main] [o.t.c.c.a.Args](Args.java:448) External IP wasn't set, using checkip.amazonaws.com to identify it...
20:43:19.450 INFO [main] [o.t.c.c.a.Args](Args.java:461) External address identified: 47.74.147.87
20:43:19.599 INFO [main] [o.s.c.a.AnnotationConfigApplicationContext](AbstractApplicationContext.java:573) Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@124c278f: startup date [Fri Apr 27 20:43:19 CST 2018]; root of context hierarchy
20:43:19.972 INFO [main] [o.s.b.f.a.AutowiredAnnotationBeanPostProcessor](AutowiredAnnotationBeanPostProcessor.java:153) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
20:43:20.380 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:244) update latest block header timestamp = 0
20:43:20.383 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:252) update latest block header number = 0
20:43:20.393 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:260) update latest block header id = 00
20:43:20.394 INFO [main] [o.t.c.d.DynamicPropertiesStore](DynamicPropertiesStore.java:265) update state flag = 0
20:43:20.559 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.567 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.568 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.568 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.569 INFO [main] [o.t.c.c.TransactionCapsule](TransactionCapsule.java:83) Transaction create succeeded!
20:43:20.596 INFO [main] [o.t.c.d.Manager](Manager.java:300) create genesis block
20:43:20.607 INFO [main] [o.t.c.d.Manager](Manager.java:306) save block: BlockCapsule

```

Then observe whether block synchronization success,If synchronization successfully explains the success of the super node

</details>

# Quick Start

Read the [Quick Start](http://wiki.tron.network/en/latest/The_TRON_Network.html#how-to-build).
Expand Down
22 changes: 20 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ repositories {
maven { url 'http://mvnrepository.com' }
mavenLocal()
mavenCentral()
maven { url 'http://repo.spring.io/plugins-release' }
}
def versions = [
checkstyle: '8.7',
Expand All @@ -68,6 +69,24 @@ configurations.getByName('checkstyleConfig') {
transitive = false
}

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 {
//local libraries
compile fileTree(dir: 'libs', include: '*.jar')
Expand Down Expand Up @@ -95,8 +114,7 @@ dependencies {

compile "org.iq80.leveldb:leveldb:0.7"

compile group: 'org.fusesource.leveldbjni', name: 'leveldbjni-all',
version: '1.8'
compile group: leveldbGroup, name: leveldbName, version: leveldbVersion

compile "org.apache.commons:commons-collections4:4.0"

Expand Down
29 changes: 0 additions & 29 deletions core/Contract.proto

This file was deleted.

2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
ssh tron@47.93.9.236 -p 22008 sh /home/tron/workspace/deploy_all.sh

./gradlew stest
1 change: 1 addition & 0 deletions src/main/java/org/tron/common/application/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ public interface Application {
void addService(Service service);

Manager getDbManager();

}
12 changes: 0 additions & 12 deletions src/main/java/org/tron/common/application/ApplicationFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,10 @@

package org.tron.common.application;

import com.google.inject.Guice;
import com.google.inject.Injector;
import org.springframework.context.ApplicationContext;

public class ApplicationFactory {

/**
* Build a Guice instance.
*
* @return Guice
*/
public Injector buildGuice() {
return Guice.createInjector(
new Module());
}

/**
* Build a new application.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.tron.core.config.args.Args;
import org.tron.core.db.BlockStore;
import org.tron.core.db.Manager;
import org.tron.core.db.RevokingStore;
import org.tron.core.net.node.Node;
import org.tron.core.net.node.NodeDelegate;
import org.tron.core.net.node.NodeDelegateImpl;
Expand All @@ -25,7 +24,7 @@ public class ApplicationImpl implements Application {

@Autowired
private Manager dbManager;

private boolean isProducer;

private void resetP2PNode() {
Expand Down Expand Up @@ -76,6 +75,7 @@ public void shutdown() {
closeAllStore();
}
closeConnection();
dbManager.stopRepushThread();
System.err.println("******** end to shutdown ********");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ public void addService(Service service) {
public Manager getDbManager() {
return null;
}

}
60 changes: 0 additions & 60 deletions src/main/java/org/tron/common/application/Module.java

This file was deleted.

Loading