Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
2134e56
Add support trx and sun test case
Aug 27, 2018
eac9f30
fix sycn bug
lvs007 Aug 27, 2018
142be45
add log
lvs007 Aug 27, 2018
0a17184
Merge pull request #1389 from tronprotocol/fix-sycn-l
wubin12 Aug 27, 2018
ef01d3a
change proto.
CodeNinjaEvan Aug 27, 2018
225b0bb
add tolerance
tjchern Aug 27, 2018
c056809
fix bug
ithinker1991 Aug 28, 2018
7728009
fix bug
ithinker1991 Aug 28, 2018
d969a4c
add tolerance
tjchern Aug 28, 2018
80cba38
set contract result.
CodeNinjaEvan Aug 28, 2018
3ddac7f
Merge pull request #1391 from tronprotocol/fix/delete_account
huzhenyuan Aug 28, 2018
4b8837f
Merge branch 'set_out_of_time' of https://github.com/tronprotocol/jav…
CodeNinjaEvan Aug 28, 2018
b8c9959
remove disconnect
lvs007 Aug 28, 2018
4682e3d
remove else
lvs007 Aug 28, 2018
2280753
Merge remote-tracking branch 'origin/develop' into set_out_of_time
CodeNinjaEvan Aug 28, 2018
b8cffdf
merge develop to this.
CodeNinjaEvan Aug 28, 2018
7f1b5b4
Merge pull request #1392 from tronprotocol/fix-sycn-l
wubin12 Aug 28, 2018
0c6cffd
rename exception.
CodeNinjaEvan Aug 28, 2018
9bae495
Add test for cycle energy cost test case
Aug 28, 2018
fa5f8ee
rename exception.
CodeNinjaEvan Aug 28, 2018
015aeff
Merge pull request #1388 from tronprotocol/stest_VM_detail_fee
pangpangfeng Aug 28, 2018
e87257f
add constant
tjchern Aug 28, 2018
21ccfca
refactor check receipt.
CodeNinjaEvan Aug 28, 2018
46b96c6
rename exception.
CodeNinjaEvan Aug 28, 2018
f96acf2
check supporting constant
tjchern Aug 28, 2018
00fff61
Merge branch 'set_out_of_time' of https://github.com/tronprotocol/jav…
tjchern Aug 28, 2018
178d4d2
remove .
CodeNinjaEvan Aug 28, 2018
72ff740
rename exception.
CodeNinjaEvan Aug 28, 2018
fa1309d
:arrow_up:upgrade grpc version to 1.14.0
Yrp Aug 28, 2018
52b4ba9
fix runtime constructor.
CodeNinjaEvan Aug 28, 2018
514ab3a
fix runtime constructor.
CodeNinjaEvan Aug 28, 2018
3e3900e
add test
tjchern Aug 28, 2018
8be60d0
fix empty.
CodeNinjaEvan Aug 28, 2018
db8b981
modify time limit logic
tjchern Aug 28, 2018
b00cbcf
Update TransactionTrace.java
huzhenyuan Aug 28, 2018
c851fda
fix bug
tjchern Aug 28, 2018
98af44b
Merge branch 'set_out_of_time' of https://github.com/tronprotocol/jav…
tjchern Aug 28, 2018
b1c177e
restrict call deep
taihaofu Aug 28, 2018
34722c4
refine exception description
taihaofu Aug 28, 2018
26f38d9
Merge pull request #1394 from tronprotocol/update_grpc_version
huzhenyuan Aug 28, 2018
b1aa755
Merge pull request #1396 from tronprotocol/restrict_call_deep
CodeNinjaEvan Aug 28, 2018
4450e36
clear support-constant
tjchern Aug 28, 2018
3c7b830
merge
tjchern Aug 28, 2018
edc22f5
add exception.
CodeNinjaEvan Aug 28, 2018
0050063
Merge branch 'set_out_of_time' of https://github.com/tronprotocol/jav…
CodeNinjaEvan Aug 28, 2018
57860ea
add JVMStackOverFlowException.
CodeNinjaEvan Aug 28, 2018
8ee9b45
fix bug
tjchern Aug 28, 2018
b394901
Merge remote-tracking branch 'remotes/origin/set_out_of_time' into fi…
tjchern Aug 28, 2018
3006abd
change setResult.
CodeNinjaEvan Aug 28, 2018
657c033
Merge branch 'set_out_of_time' of https://github.com/tronprotocol/jav…
CodeNinjaEvan Aug 28, 2018
28da21c
remove unused code
taihaofu Aug 28, 2018
d169877
Merge pull request #1397 from tronprotocol/remove_unused_code
huzhenyuan Aug 28, 2018
29eb6d9
distinguish witness2 and witness 3
tjchern Aug 28, 2018
8b2bf1d
Merge remote-tracking branch 'remotes/origin/develop' into set_out_of…
tjchern Aug 28, 2018
8391832
change consume bandwidth.
CodeNinjaEvan Aug 28, 2018
5d3ca69
delete useless code
tjchern Aug 28, 2018
782b357
fix bug
tjchern Aug 28, 2018
1527490
fix bug
tjchern Aug 28, 2018
54b789d
remove exception.
CodeNinjaEvan Aug 28, 2018
edc624c
checkstyle.
CodeNinjaEvan Aug 28, 2018
4ae4572
revert bandwidth.
CodeNinjaEvan Aug 28, 2018
9bf3d89
fix bugs
tjchern Aug 28, 2018
58eb7f9
change bandwidth.
CodeNinjaEvan Aug 28, 2018
a8b62a2
Merge pull request #1401 from tronprotocol/distinguish__timeout
huzhenyuan Aug 28, 2018
3bf1186
Merge pull request #1393 from tronprotocol/set_out_of_time
huzhenyuan Aug 29, 2018
2cc6a62
set default result size to 40
Aug 29, 2018
ad8fdf1
use 3M to checkmemsize in anyplace
tjchern Aug 29, 2018
4f915c2
change
tjchern Aug 29, 2018
80b2277
clear some para in args.java
tjchern Aug 29, 2018
4cc104b
in triggerContract first stage, throw ContractValidateException anywhen
tjchern Aug 29, 2018
8e6ad6b
fix "dbManager.getDynamicPropertiesStore().supportVM()".
CodeNinjaEvan Aug 29, 2018
a854415
fix trx.resetResult();
CodeNinjaEvan Aug 29, 2018
13c0fbc
Update Constant.java
huzhenyuan Aug 29, 2018
342b71d
Merge pull request #1403 from tronprotocol/use_3m_check_mem_in_anyplace
huzhenyuan Aug 29, 2018
345458f
update consume test
Aug 29, 2018
58296f9
Merge pull request #1404 from tronprotocol/default_result_size
huzhenyuan Aug 29, 2018
25cfe68
add MAX_CPU_TIME_OF_ONE_TX in dynamicStore
nanfengpo Aug 29, 2018
df4c85c
add chainparameters
nanfengpo Aug 29, 2018
2bab248
mdf getChainParameters func
nanfengpo Aug 29, 2018
aedb66a
mdf proposalController
nanfengpo Aug 29, 2018
3ec47d7
fix bug
ithinker1991 Aug 29, 2018
c67cf3a
mdf proposalcreate validateValue func
nanfengpo Aug 29, 2018
f4787f7
Merge pull request #1406 from tronprotocol/feature/chainparameters_add
sean-liu55 Aug 29, 2018
bcca508
timestamp in vm use second as unit
taihaofu Aug 29, 2018
12483ad
Update ProgramInvokeFactoryImpl.java
huzhenyuan Aug 29, 2018
d17e648
use getMaxCpuTimeOfOneTX()
tjchern Aug 29, 2018
b1783db
Merge pull request #1407 from tronprotocol/fix/storage_put
huzhenyuan Aug 29, 2018
027ca7e
Merge pull request #1408 from tronprotocol/timestamp_use_seconde_in_vm
huzhenyuan Aug 29, 2018
419dc6c
Merge pull request #1409 from tronprotocol/add_getMaxCpuTimeOfOneTX
huzhenyuan Aug 29, 2018
2cbc74d
Polish exception
ithinker1991 Aug 29, 2018
c3d4cb1
Refresh committee with timeout setting function test case
Aug 29, 2018
a7af7bf
Merge pull request #1411 from tronprotocol/stest_VM_detail_fee
pangpangfeng Aug 29, 2018
cbf6ea4
change longValue Exact.
CodeNinjaEvan Aug 29, 2018
8de86f6
change longValue Exact.
CodeNinjaEvan Aug 29, 2018
5ce7d1b
Merge branch 'develop' into longvalue_exact
CodeNinjaEvan Aug 29, 2018
f7d24a5
Merge pull request #1410 from tronprotocol/fix/constant_exception
huzhenyuan Aug 29, 2018
b72a9c7
Merge branch 'develop' into longvalue_exact
huzhenyuan Aug 29, 2018
6d33f2a
revert longValue Exact.
CodeNinjaEvan Aug 29, 2018
a780ba1
Merge pull request #1412 from tronprotocol/longvalue_exact
huzhenyuan Aug 29, 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
31 changes: 1 addition & 30 deletions src/main/java/org/tron/common/runtime/Runtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public class Runtime {
private Deposit deposit;
private ProgramInvokeFactory programInvokeFactory = null;
private String runtimeError;
private boolean readyToExecute = false;

private EnergyProcessor energyProcessor = null;
private StorageMarket storageMarket = null;
Expand Down Expand Up @@ -200,27 +199,6 @@ public void precompiled() throws ContractValidateException, ContractExeException
}
}

/**
*/
public void init() {
readyToExecute = true;
// switch (trxType) {
// case TRX_PRECOMPILED_TYPE:
// readyToExecute = true;
// break;
// case TRX_CONTRACT_CREATION_TYPE:
// case TRX_CONTRACT_CALL_TYPE:
// // if (!curENERGYLimitReachedBlockENERGYLimit()) {
// // readyToExecute = true;
// // }
// readyToExecute = true;
// break;
// default:
// readyToExecute = true;
// break;
// }
}


public BigInteger getBlockCPULeftInUs() {

Expand Down Expand Up @@ -261,10 +239,6 @@ public boolean curCPULimitReachedBlockCPULimit() {
}

public void execute() throws ContractValidateException, ContractExeException {

if (!readyToExecute) {
return;
}
switch (trxType) {
case TRX_PRECOMPILED_TYPE:
precompiled();
Expand All @@ -276,7 +250,7 @@ public void execute() throws ContractValidateException, ContractExeException {
call();
break;
default:
break;
throw new ContractValidateException("Unknown contract type");
}
}

Expand Down Expand Up @@ -517,9 +491,6 @@ private void call()
}

public void go() throws OutOfSlotTimeException {
if (!readyToExecute) {
return;
}

try {
if (vm != null) {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/tron/core/Wallet.java
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,6 @@ public Transaction triggerContract(TriggerSmartContract triggerSmartContract,

Runtime runtime = new Runtime(trxCap.getInstance(), headBlock, deposit,
new ProgramInvokeFactoryImpl());
runtime.init();
runtime.execute();
runtime.go();
runtime.finalization();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/tron/core/db/TransactionTrace.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public void setNetBill(long netUsage, long netFee) {
public void exec(Runtime runtime)
throws ContractExeException, ContractValidateException, OutOfSlotTimeException {
/** VM execute **/
runtime.init();
runtime.execute();
runtime.go();
pay();
runtime.finalization();
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/tron/core/net/node/NodeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -727,16 +727,16 @@ private void onHandleBlockMessage(PeerConnection peer, BlockMessage blkMsg) {
isFetchSyncActive = true;
}
}
}

if (advObjWeRequested.containsKey(item)) {
} else if (advObjWeRequested.containsKey(item)) {
advObjWeRequested.remove(item);
if (!syncFlag) {
processAdvBlock(peer, blkMsg.getBlockCapsule());
startFetchItem();
}
} else {
if (!syncFlag) {//not we request and not sync,disconnect
logger.error("not we request and not sync, disconnect : {}, block : {}",
peer.getInetAddress(), blockId.getString());
banTraitorPeer(peer, ReasonCode.BAD_PROTOCOL);
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/tron/common/runtime/TVMTestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ public static TVMTestResult processTransactionAndReturnTVMTestResult(Transaction
//exec
trace.exec(runtime);

trace.pay();

return new TVMTestResult(runtime, trace.getReceipt(), null);
}

Expand Down
1 change: 0 additions & 1 deletion src/test/java/org/tron/core/db/TransactionTraceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public void testUseFee() throws InvalidProtocolBufferException {
new ProgramInvokeFactoryImpl());
try {
trace.exec(runtime);
trace.pay();
Assert.assertEquals(0, trace.getReceipt().getEnergyUsage());
Assert.assertEquals(49503930, trace.getReceipt().getEnergyFee());
// Assert.assertEquals(deployStorageDelta, trace.getReceipt().getStorageDelta());
Expand Down