Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
f322441
add --experimental--via-ir for compile contract
mumianhua Jul 3, 2025
5bb5757
change --experimental--via-ir into --experimental-via-ir
mumianhua Jul 3, 2025
23ed714
enable vote cases
mumianhua Jul 9, 2025
c5672f0
add withdraw to freezev2
mumianhua Jul 10, 2025
6aafacf
add case for solidity v0.8.25
mumianhua Jul 11, 2025
de8edfb
delete useless code
mumianhua Jul 11, 2025
757a6fc
add contract cases for "warning first occurrence of tstore"
mumianhua Jul 14, 2025
696649d
add cases for push13-15,17-19,22-27,30
mumianhua Jul 23, 2025
eadda55
add cases for swap14-16
mumianhua Jul 23, 2025
b1a6855
remove "--experimental-via-ir" from PublicMethed.getBycodeAbi
mumianhua Aug 13, 2025
e6056eb
remove unused space
mumianhua Aug 13, 2025
a04901b
delegatecall can not trans msg.tokenid and msg.tokenvalue
mumianhua Aug 13, 2025
f7fa27b
adjust energy to solidity v0.8.25
mumianhua Aug 14, 2025
60b2caf
rename method name
mumianhua Aug 14, 2025
2a2d990
Merge pull request #80 from XvZipo/test/solidity_0825
wangzichichi Aug 14, 2025
705177f
fix zenproof cases
mumianhua Aug 29, 2025
30c6303
Merge remote-tracking branch 'origin/test/solidity_0825' into test/so…
mumianhua Aug 29, 2025
6ccf6fc
Merge pull request #81 from XvZipo/test/solidity_0825
wangzichichi Sep 8, 2025
0b774de
Optimize test cases and Add proposal 94 in testng.conf
XvZipo Sep 10, 2025
c287529
add case about eth_getBlockReceipts
XvZipo Sep 11, 2025
ff7cb14
adjust cases to tip_6780_selfdestruct
mumianhua Sep 11, 2025
6299281
Merge remote-tracking branch 'origin/test/release_v4.8.1' into test/r…
mumianhua Sep 11, 2025
bab4cde
fix case Bug abouteth_getBlockReceipts
XvZipo Sep 11, 2025
4b348a9
fix case Bug abouteth_getBlockReceipts at JsonRpcBase
XvZipo Sep 11, 2025
43ea04b
add case fore tip_6780_selfdestruct
mumianhua Sep 11, 2025
a5e8713
add case fore tip_6780_selfdestruct
mumianhua Sep 11, 2025
f012f5b
fix case Bug abouteth_getBlockReceipts in test57JsonRpcApiTestForEthG…
XvZipo Sep 12, 2025
ee91bbf
fix case Bug
XvZipo Sep 12, 2025
8e6e5a8
fix case Bug
XvZipo Sep 12, 2025
8b9da5e
fix case Bug
XvZipo Sep 12, 2025
f295510
add new case about getPaginatedNowWitnessList
XvZipo Sep 12, 2025
b9cece5
fix bug about test57JsonRpcApiTestForEthGetBlockReceipts
XvZipo Sep 12, 2025
f919d84
upload dependency function
XvZipo Sep 12, 2025
c8584a2
add case fore tip_6780_selfdestruct
mumianhua Sep 12, 2025
2cb2dcd
fix unstable case
XvZipo Sep 12, 2025
a81fb0a
fix unstable case
XvZipo Sep 12, 2025
d405407
fix unstable wait block in test57JsonRpcApiTestForEthGetBlockReceipts
XvZipo Sep 12, 2025
4fc0fa5
add wallet/getpaginatednowwitnesslist http case
XvZipo Sep 12, 2025
f2a9cf5
fix wallet/getpaginatednowwitnesslist http case
XvZipo Sep 12, 2025
8299e7a
add require for batchvalidatesign
mumianhua Sep 15, 2025
c911cf3
Merge remote-tracking branch 'origin/test/release_v4.8.1' into test/r…
mumianhua Sep 15, 2025
89f2369
fix unstable case
XvZipo Sep 16, 2025
0ca5a6b
Merge remote-tracking branch 'origin/test/release_v4.8.1' into test/r…
XvZipo Sep 16, 2025
4e04ee2
rollback case test1Grammar014
XvZipo Sep 18, 2025
56439cb
fix unstable case in short maintenance time sence
XvZipo Sep 22, 2025
e841c3e
fix test12CheckVoteChangesRealtimeAfterVote in short maintenance time…
XvZipo Sep 28, 2025
4713653
add time offset in setTimestamp to avoid dup transaction
XvZipo Oct 10, 2025
279fddd
add case for suicide2
mumianhua Oct 11, 2025
fade0a8
Merge remote-tracking branch 'origin/test/release_v4.8.1' into test/r…
mumianhua Oct 11, 2025
0579035
add solc 0.8.26 case
XvZipo Oct 16, 2025
ce7cae7
Merge remote-tracking branch 'origin/test/release_v4.8.1' into test/r…
XvZipo Oct 16, 2025
d9fe8ea
fix case bug about 0.8.26
XvZipo Oct 16, 2025
bc3cfdc
add config for arm version
XvZipo Dec 16, 2025
40c7741
fix unstable case
XvZipo Dec 17, 2025
463938c
fix unstable case test09CheckVoteChangesRealtimeAfterVote
XvZipo Dec 18, 2025
61855bd
fix unstable case test09CheckVoteChangesRealtimeAfterVote
XvZipo Dec 18, 2025
5d9c6ce
fix case conflict
XvZipo Dec 19, 2025
048f080
fix code bug
XvZipo Dec 19, 2025
ab76167
fix unstable case
XvZipo Dec 19, 2025
6717408
fix unstable case
XvZipo Dec 19, 2025
34c2240
fix unstable case
XvZipo Dec 23, 2025
baf13f2
fix unstable case
XvZipo Dec 23, 2025
7e135ce
fix unstable case
XvZipo Dec 23, 2025
fe3a1db
adapt validate multi sign
mumianhua Dec 25, 2025
dac46a4
Merge remote-tracking branch 'origin/test/release_v4.8.1' into test/r…
mumianhua Dec 25, 2025
9036480
close 44
XvZipo Dec 30, 2025
33f6fb7
close 44
XvZipo Dec 30, 2025
5b27654
close exchange transaction
XvZipo Jan 13, 2026
458f46d
fix unstable case in EventQuery005
XvZipo Jan 22, 2026
8f6e4ca
rollback config and remove redundant comments
XvZipo Feb 4, 2026
af25f08
move the common code block "getting allowTvmSelfdestructRestriction" …
mumianhua Feb 4, 2026
5e555ed
Merge remote-tracking branch 'origin/test/release_v4.8.1' into test/r…
mumianhua Feb 4, 2026
dd744ee
delete unused code
mumianhua Feb 4, 2026
35d747c
Merge pull request #83 from XvZipo/test/release_v4.8.1
wangzichichi Feb 5, 2026
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
6 changes: 6 additions & 0 deletions protocol/src/main/protos/api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ service Wallet {
};
};

rpc GetPaginatedNowWitnessList (PaginatedMessage) returns (WitnessList) {
};

rpc GetDelegatedResource (DelegatedResourceMessage) returns (DelegatedResourceList) {
};
Expand Down Expand Up @@ -880,6 +882,10 @@ service WalletSolidity {
}
};
};

rpc GetPaginatedNowWitnessList (PaginatedMessage) returns (WitnessList) {
};

rpc GetAssetIssueList (EmptyMessage) returns (AssetIssueList) {
option (google.api.http) = {
post: "/walletsolidity/getassetissuelist"
Expand Down
2 changes: 1 addition & 1 deletion testcase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ task replaceConfig(type: Test){

task dailyBuild(type: Test, dependsOn: replaceConfig ) {
doFirst{
maxHeapSize = "3072m"
maxHeapSize = "2048m"
useTestNG {
suites(file('src/test/resources/daily-build.xml'))
parallel 'tests'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.concurrent.atomic.AtomicLong;

import lombok.extern.slf4j.Slf4j;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.ITestResult;
import org.testng.TestListenerAdapter;
Expand Down Expand Up @@ -49,6 +50,10 @@ public class DailyBuildReport extends TestListenerAdapter {
private String slack = Configuration.getByPath("testng.conf")
.getString("defaultParameter.slack");

private final String witnessKey03 =
Configuration.getByPath("testng.conf").getString("witness.key3");
private final byte[] witnessAddress03 = PublicMethed.getFinalAddress(witnessKey03);

@Override
public void onConfigurationFailure(ITestResult itr) {
super.onConfigurationFailure(itr);
Expand Down Expand Up @@ -131,8 +136,13 @@ public void onFinish(ITestContext testContext) {
sb.append("Total: " + (passedNum.get() + failedNum.get() + skippedNum.get()) + ", " + "Passed: " + passedNum
+ ", " + "Failed: " + failedNum + ", " + "Skipped: " + skippedNum + "\n");
sb.append("------------------------------------------------------------------------------\n");
List<Map.Entry<String, Integer>> list = calculateAfterDailyBuild();
sb.append("Total transaction number:" + totalTransactionNum.get() + "\n");
List<Map.Entry<String, Integer>> list = null;
try {
list = calculateAfterDailyBuild();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
sb.append("Total transaction number:" + totalTransactionNum.get() + "\n");
sb.append("Transaction type list:" + "\n");
for (Map.Entry<String, Integer> entry : list) {
sb.append(entry.getKey());
Expand Down Expand Up @@ -170,7 +180,7 @@ public void onFinish(ITestContext testContext) {
/**
* calculate transaction num and transaction type After DailyBuild.
*/
public List<Map.Entry<String, Integer>> calculateAfterDailyBuild() {
public List<Map.Entry<String, Integer>> calculateAfterDailyBuild() throws InterruptedException {
channelFull = ManagedChannelBuilder.forTarget(fullnode)
.usePlaintext()
.build();
Expand Down Expand Up @@ -202,6 +212,14 @@ public List<Map.Entry<String, Integer>> calculateAfterDailyBuild() {
}
}
}

boolean sr3Status = checkSRStatus();
if(!sr3Status){
String cmd = slack + " " + "3rd witness not produce block";
PublicMethed.exec(cmd);
}
Assert.assertTrue(sr3Status,"3rd witness not produce block");

try {
if (channelFull != null) {
channelFull.shutdown().awaitTermination(5, TimeUnit.SECONDS);
Expand All @@ -220,5 +238,26 @@ public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2)
return list;
}

public boolean checkSRStatus(){
String add41 = ByteArray.toHexString(witnessAddress03);
Long beginNum = blockingStubFull.getNowBlock(GrpcAPI.EmptyMessage.newBuilder().build())
.getBlockHeader().getRawData().getNumber();
Long nowNum = beginNum;
while (nowNum - beginNum < 210) {
List<Protocol.Witness> list =
PublicMethed.listWitnesses(blockingStubFull).get().getWitnessesList();
for (Protocol.Witness tem: list) {
if ((add41.equalsIgnoreCase(ByteArray.toHexString(tem.getAddress().toByteArray())))
&& (tem.getTotalProduced() > 3)) {
return true;
}
}
PublicMethed.waitProduceNextBlock(blockingStubFull);
nowNum = blockingStubFull.getNowBlock(GrpcAPI.EmptyMessage.newBuilder().build())
.getBlockHeader().getRawData().getNumber();
}
return false;
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -6127,6 +6127,40 @@ public static HttpResponse getEstimateEnergyDeployContract(
return response;
}

public static HttpResponse getPaginatedNowWitnessList(String httpNode, Long offset, Long limit, boolean visible){
HttpResponse response = null;
final String requestUrl = "http://" + httpNode + "/wallet/getpaginatednowwitnesslist";
JsonObject requestParam = new JsonObject();
requestParam.addProperty("offset", offset);
requestParam.addProperty("limit", limit);
requestParam.addProperty("visible", visible);
try {
response = createConnect(requestUrl, requestParam);
} catch (Exception e) {
e.printStackTrace();
httppost.releaseConnection();
}
return response;

}

public static HttpResponse getPaginatedNowWitnessListSolidity(String httpNodeSolidity, Long offset, Long limit, boolean visible){
HttpResponse response = null;
final String requestUrl = "http://" + httpNodeSolidity + "/walletsolidity/getpaginatednowwitnesslist";
JsonObject requestParam = new JsonObject();
requestParam.addProperty("offset", offset);
requestParam.addProperty("limit", limit);
requestParam.addProperty("visible", visible);
try {
response = createConnect(requestUrl, requestParam);
} catch (Exception e) {
e.printStackTrace();
httppost.releaseConnection();
}
return response;
}




}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public class JsonRpcBase {
public String fullnode =
Configuration.getByPath("testng.conf").getStringList("fullnode.ip.list").get(0);

public String solidityNode =
Configuration.getByPath("testng.conf").getStringList("solidityNode.ip.list").get(1);

public static long maxFeeLimit = 0L;
public static String trc20AddressByteString;
public static String trc20AddressHex;
Expand Down Expand Up @@ -113,6 +116,10 @@ public void deployJsonRpcUseResource() throws Exception {
// Wallet.setAddressPreFixByte(CommonConstant.ADD_PRE_FIX_BYTE_MAINNET);
channelFull = ManagedChannelBuilder.forTarget(fullnode).usePlaintext().build();
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);

channelSolidity = ManagedChannelBuilder.forTarget(solidityNode).usePlaintext().build();
blockingStubSolidity = WalletSolidityGrpc.newBlockingStub(channelSolidity);

freezeBeforeAllTest();
Assert.assertTrue(
PublicMethed.sendcoin(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

public enum ProposalEnum {

GetAllowTvmSelfdestructRestriction("getAllowTvmSelfdestructRestriction"),
GetAllowNewResourceModel("getAllowNewResourceModel"),
GetUnfreezeDelayDays("getUnfreezeDelayDays"),
GetAllowDynamicEnergy("getAllowDynamicEnergy"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.google.common.primitives.Longs;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.protobuf.Any;
import com.google.protobuf.ByteString;
Expand All @@ -24,10 +23,7 @@

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.bouncycastle.util.encoders.Hex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.tron.api.GrpcAPI;
import org.tron.api.GrpcAPI.AccountNetMessage;
Expand Down Expand Up @@ -73,7 +69,6 @@
import org.tron.protos.Protocol.Account;

import org.tron.protos.Protocol.Account.FreezeV2;
import org.tron.protos.Protocol.Account.Frozen;
import org.tron.protos.Protocol.Block;
import org.tron.protos.Protocol.ChainParameters;
import org.tron.protos.Protocol.DelegatedResourceAccountIndex;
Expand Down Expand Up @@ -158,6 +153,7 @@ public class PublicMethed {
public static String code;

public static AtomicInteger randomFreezeAmount = new AtomicInteger(1);
public static AtomicInteger randomTimeOffset = new AtomicInteger(1);

private static final String fullnode2 = Configuration.getByPath("testng.conf")
.getStringList("fullnode.ip.list").get(1);
Expand Down Expand Up @@ -1139,6 +1135,10 @@ public static Boolean freezeV2ProposalIsOpen(WalletGrpc.WalletBlockingStub block
.getProposalName(), blockingStubFull) > 0;
}

public static Boolean allowTvmSelfdestructRestrictionIsActive(WalletGrpc.WalletBlockingStub blockingStubFull) {
return PublicMethed.getChainParametersValue(ProposalEnum.GetAllowTvmSelfdestructRestriction.getProposalName(),
blockingStubFull) == 1;
}

public static Boolean tronPowerProposalIsOpen(WalletGrpc.WalletBlockingStub blockingStubFull) {
return PublicMethed.getChainParametersValue(ProposalEnum.GetAllowNewResourceModel
Expand Down Expand Up @@ -5740,7 +5740,7 @@ public synchronized static HashMap<String, String> getBycodeAbi(String solFile,
logger.debug("outputPath: " + outputPath);
String cmd =
compile
+ " --optimize --evm-version cancun --bin --abi --overwrite "
+ " --optimize --bin --abi --overwrite "
+ absolutePath
+ "/"
+ solFile
Expand Down Expand Up @@ -5798,7 +5798,7 @@ public synchronized static HashMap<String, String> getBycodeAbiWithParam(String
logger.debug("outputPath: " + outputPath);
String cmd =
compile
+ " --optimize " + param +" --evm-version cancun --bin --abi --overwrite "
+ " --optimize " + param +" --bin --abi --overwrite "
+ absolutePath
+ "/"
+ solFile
Expand Down Expand Up @@ -8461,8 +8461,12 @@ public static String gRPCurlRequest(String data, String requestUrl, String node)
return null;
}

public static GrpcAPI.WitnessList getPaginatedNowWitnessList(Long offset, Long limit, WalletBlockingStub blockingStubFull){
return blockingStubFull.getPaginatedNowWitnessList(GrpcAPI.PaginatedMessage.newBuilder().setLimit(limit).setOffset(offset).build());
}



public static GrpcAPI.WitnessList getPaginatedNowWitnessListSolidity(Long offset, Long limit, WalletSolidityGrpc.WalletSolidityBlockingStub blockingStubSolidity){
return blockingStubSolidity.getPaginatedNowWitnessList(GrpcAPI.PaginatedMessage.newBuilder().setLimit(limit).setOffset(offset).build());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public static String getTransactionSign(String transaction, String priKey,
*/

public static Transaction setTimestamp(Transaction transaction) {
long currentTime = System.currentTimeMillis();//*1000000 + System.nanoTime()%1000000;
long currentTime = System.currentTimeMillis() + PublicMethed.randomTimeOffset.getAndAdd(1);//*1000000 + System.nanoTime()%1000000;
Transaction.Builder builder = transaction.toBuilder();
org.tron.protos.Protocol.Transaction.raw.Builder rowBuilder = transaction.getRawData()
.toBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public void test5WithdrawExchange() {

}

@Test(enabled = true,description = "Test exchange transaction")
@Test(enabled = false,description = "Test exchange transaction")
public void test6TransactionExchange() {
exchangeIdInfo = PublicMethed.getExchange(exchangeId.toString(), blockingStubFull);
final Long beforeExchangeToken1Balance = exchangeIdInfo.get().getFirstTokenBalance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import stest.tron.wallet.common.client.utils.ECKey;
import stest.tron.wallet.common.client.utils.PublicMethed;
import stest.tron.wallet.common.client.utils.Utils;
import stest.tron.wallet.common.client.utils.ProposalEnum;

@Slf4j
public class ContractGrammar002 {
Expand Down Expand Up @@ -309,9 +310,15 @@ public void test6Grammar013() {
"getCount()", "#", false,
0, maxFeeLimit, grammarAddress2, testKeyForGrammarAddress2, blockingStubFull);
PublicMethed.waitProduceNextBlock(blockingStubFull);
Assert.assertTrue(txid4 == null);


if(PublicMethed.allowTvmSelfdestructRestrictionIsActive(blockingStubFull)) {
infoById4 = PublicMethed.getTransactionInfoById(txid4, blockingStubFull);
Assert.assertTrue(infoById4.get().getResultValue() == 0);
returnnumber1 = ByteArray.toLong(ByteArray
.fromHexString(ByteArray.toHexString(infoById2.get().getContractResult(0).toByteArray())));
Assert.assertTrue(returnnumber1 == 10);
}else {
Assert.assertTrue(txid4 == null);
}
}

/**
Expand Down
Loading