Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
74bbf32
feat(framework): remove deprecated --keystore-factory from FullNode
0xbigapple Aug 17, 2026
1e9ab92
fix(framework): harden --keystore-factory tombstone
0xbigapple Aug 17, 2026
eb184f3
docs(plugins): --sm2 also applies to keystore update
0xbigapple Aug 17, 2026
dd8d4b4
fix(framework): correct witness keystore recovery tip to --password
0xbigapple Aug 17, 2026
bcdd33c
refactor(crypto): remove orphaned inputPassword2Twice
0xbigapple Aug 17, 2026
bd2450f
feat(version): merge release_v4.8.2.2 into master (#6952)
CodeNinjaEvan Sep 8, 2026
d5c3d1d
update a new version. version name:GreatVoyage-v4.8.2.1-1-gbd2450fe06…
yanghang8612 Sep 8, 2026
243b693
Merge pull request #6956 from tronprotocol/master
halibobo1205 Sep 9, 2026
b33eed8
fix(api): correct node info and network metric mappings (#6930)
xxo1shine Sep 11, 2026
a219222
chore(deps): upgrade grpc, jackson, logback, commons and drop joda-ti…
halibobo1205 Sep 14, 2026
0d19485
feat(api): sanitize HTTP API error responses (#6954)
halibobo1205 Sep 14, 2026
ee9fdb8
refactor(framework): refine --keystore-factory tombstone follow-ups
0xbigapple Sep 17, 2026
289c1f2
fix(config): remove inactive RocksDB options (#6944)
bladehan1 Sep 18, 2026
34d00c5
ci: optimize pull request checks (#6938)
bladehan1 Sep 18, 2026
880eef6
refactor(config): improve startup errors and remove inactive assertio…
bladehan1 Sep 22, 2026
4d6c240
fix(test): isolate cross-test state leaks and stabilize flaky suites …
warku123 Sep 22, 2026
11d555d
refactor(vm): remove unreachable trace compression path (#6997)
halibobo1205 Sep 24, 2026
9f3c9ae
chore(p2p): internalize libp2p v2.2.9 as a local `p2p` module (#6992)
barbatos2011 Sep 29, 2026
f3e8140
feat: improve node stability and execution efficiency (#7007)
yanghang8612 Sep 30, 2026
5c449a1
update a new version. version name:GreatVoyage-v4.8.2.2-1-gf3e81404fe…
yanghang8612 Sep 30, 2026
6d5adc4
feat(version): merge master to 4.8.3(#7010)
halibobo1205 Oct 2, 2026
1e8abb0
refactor(api): replace response copy wrappers with Jetty content coun…
halibobo1205 Oct 8, 2026
6f7b83a
refactor(framework): decouple Manager from TronJsonRpcImpl (#6990)
0xbigapple Oct 9, 2026
8bb6150
refactor(api): remove dead WalletExtension gRPC service and config (#…
0xbigapple Oct 10, 2026
91371cf
feat(plugins): backfill section bloom (#6973)
317787106 Oct 10, 2026
f62b25f
refactor(crypto): remove unused SM2 and SM3 (#6999)
Federico2014 Oct 10, 2026
1575c4f
fix(config): close resource streams (#7002)
Federico2014 Oct 11, 2026
8c7a58b
Merge remote-tracking branch 'upstream/release_v4.8.3' into feature/r…
0xbigapple Oct 11, 2026
7610520
test(p2p): ignore network-dependent RandomTest.testRandomIterator
0xbigapple Oct 11, 2026
c6c69ba
refactor(framework): move removed-option check into CLIParameter
0xbigapple Oct 11, 2026
c231082
refactor(framework): make rejectIfPresent non-static
0xbigapple Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
debian11-x86_64-gradle-

- name: Build
run: ./gradlew clean build --no-daemon --no-build-cache
run: ./gradlew clean build --no-daemon

- name: Toolkit jar smoke test
run: |
Expand All @@ -209,7 +209,7 @@ jobs:
java -jar "$JAR" keystore --help

- name: Test with RocksDB engine
run: ./gradlew :framework:testWithRocksDb --no-daemon --no-build-cache
run: ./gradlew :framework:testWithRocksDb --no-daemon

- name: Generate module coverage reports
run: ./gradlew jacocoTestReport --no-daemon
Expand Down Expand Up @@ -265,11 +265,11 @@ jobs:
# this PR. The only output we need from this job is the jacoco XML for
# coverage diffing, so we must not let a stale test failure block it.
continue-on-error: true
run: ./gradlew clean build --no-daemon --no-build-cache
run: ./gradlew clean build --no-daemon

- name: Test with RocksDB engine (base)
continue-on-error: true
run: ./gradlew :framework:testWithRocksDb --no-daemon --no-build-cache
run: ./gradlew :framework:testWithRocksDb --no-daemon

- name: Generate module coverage reports (base)
run: ./gradlew jacocoTestReport --no-daemon
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ jobs:
errors.push(`PR title is too long (${title.length}/72 characters).`);
}

// 2. Conventional format check
const conventionalRegex = /^(feat|fix|refactor|docs|style|test|chore|ci|perf|build|revert)(\([^)]+\))?:\s\S.*/;
if (title && !conventionalRegex.test(title)) {
// 2. Conventional format check (require a space after the colon)
const titlePrefix = '(?:feat|fix|refactor|docs|style|test|chore|ci|perf|build|revert)(?:[(][^)]+[)])?';
const missingSpaceAfterColonRegex = new RegExp(`^${titlePrefix}:[^ ]`);
const conventionalRegex = new RegExp(`^${titlePrefix}: [^ ].*`);
if (title && missingSpaceAfterColonRegex.test(title)) {
errors.push(
'PR title must include a space after the colon.\n' +
' Example: `feat(tvm): add blob opcodes`'
);
} else if (title && !conventionalRegex.test(title)) {
errors.push(
'PR title must follow conventional format: `type(scope): description`\n' +
' Allowed types: ' + allowedTypes.map(t => `\`${t}\``).join(', ') + '\n' +
Expand All @@ -60,7 +67,7 @@ jobs:

// 4. Description part should not start with a capital letter
if (title) {
const descMatch = title.match(/^\w+(?:\([^)]+\))?:\s*(.+)/);
const descMatch = title.match(/^\w+(?:\([^)]+\))?: (.+)/);
if (descMatch) {
const desc = descMatch[1];
if (/^[A-Z]/.test(desc)) {
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/pr-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,23 @@ jobs:
const normalize = s => s.toLowerCase().replace(/[\s\-_]/g, '');

// ── Extract scope from conventional commit title ──────────
// Format: type(scope): description
// Formats documented by CONTRIBUTING.md:
// type(scope): description
// type: description
// Also supports: type(scope1,scope2): description
// Only bare "ci" currently has an equivalent reviewer scope.
const scopeMatch = title.match(/^\w+\(([^)]+)\):/);
const rawScope = scopeMatch ? scopeMatch[1] : null;
const bareTypeMatch = title.match(/^(\w+):/);
const inferredScope = !scopeMatch && bareTypeMatch?.[1].toLowerCase() === 'ci'
? 'ci'
: null;
const rawScope = scopeMatch ? scopeMatch[1] : inferredScope;

core.info(`PR title : ${title}`);
core.info(`Raw scope: ${rawScope || '(none)'}`);
if (inferredScope) {
core.info('Inferred scope "ci" from bare "ci" PR title type.');
}

// ── Skip if reviewers already assigned ──────────────────
const pr = await github.rest.pulls.get({
Expand Down
39 changes: 29 additions & 10 deletions actuator/src/main/java/org/tron/core/actuator/VMActuator.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.tron.common.runtime.InternalTransaction.TrxType;
import org.tron.common.runtime.ProgramResult;
import org.tron.common.runtime.vm.DataWord;
import org.tron.common.utils.ForkController;
import org.tron.common.utils.StorageUtils;
import org.tron.common.utils.StringUtil;
import org.tron.common.utils.WalletUtil;
Expand All @@ -33,6 +34,7 @@
import org.tron.core.capsule.BlockCapsule;
import org.tron.core.capsule.ContractCapsule;
import org.tron.core.capsule.ReceiptCapsule;
import org.tron.core.config.Parameter;
import org.tron.core.db.EnergyProcessor;
import org.tron.core.db.TransactionContext;
import org.tron.core.exception.ContractExeException;
Expand Down Expand Up @@ -189,7 +191,8 @@ public void execute(Object object) throws ContractExeException {
throw e;
}

VM.play(program, OperationRegistry.getTable());
// Prepare the table once for this execution and all nested calls.
VM.play(program, OperationRegistry.prepareAndGetTable(isConstantCall));
result = program.getResult();

if (VMConfig.allowEnergyAdjustment()) {
Expand Down Expand Up @@ -217,6 +220,9 @@ public void execute(Object object) throws ContractExeException {
} else {
result.spendEnergy(saveCodeEnergy);
if (VMConfig.allowTvmConstantinople()) {
CreateSmartContract createContract =
ContractCapsule.getSmartContractFromTransaction(trx);
checkContractHashFields(createContract.getNewContract());
rootRepository.saveCode(program.getContractAddress().getNoLeadZeroesData(), code);
}
}
Expand Down Expand Up @@ -293,6 +299,10 @@ public void execute(Object object) throws ContractExeException {
result.setRuntimeError(result.getException().getMessage());
}
logger.info("runtime result is :{}", result.getException().getMessage());
} finally {
if (isConstantCall) {
VMConfig.clearLocalSnapshot();
}
}
//use program returned fill context
context.setProgramResult(result);
Expand All @@ -303,10 +313,6 @@ public void execute(Object object) throws ContractExeException {
.error(result.getException())
.toString();

if (VMConfig.vmTraceCompressed()) {
traceContent = VMUtils.zipAndEncode(traceContent);
}

String txHash = Hex.toHexString(rootInternalTx.getHash());
VMUtils.saveProgramTraceFile(txHash, traceContent);
}
Expand All @@ -330,6 +336,7 @@ private void create()
if (contract == null) {
throw new ContractValidateException("Cannot get CreateSmartContract from transaction");
}

SmartContract newSmartContract;
if (VMConfig.allowTvmCompatibleEvm()) {
newSmartContract = contract.getNewContract().toBuilder().setVersion(1).build();
Expand All @@ -341,11 +348,7 @@ private void create()
throw new ContractValidateException("OwnerAddress is not equals OriginAddress");
}

byte[] contractName = newSmartContract.getName().getBytes();

if (contractName.length > VMConstant.CONTRACT_NAME_LENGTH) {
throw new ContractValidateException("contractName's length cannot be greater than 32");
}
checkContractNameLength(contract.getNewContract());

long percent = contract.getNewContract().getConsumeUserResourcePercent();
if (percent < 0 || percent > VMConstant.ONE_HUNDRED) {
Expand Down Expand Up @@ -455,6 +458,22 @@ private void create()

}

static void checkContractHashFields(SmartContract contract) {
if (!contract.getCodeHash().isEmpty() || !contract.getTrxHash().isEmpty()) {
MUtil.checkCPUTimeForContractHashFields();
}
}

static void checkContractNameLength(SmartContract contract) throws ContractValidateException {
int contractNameLength =
ForkController.instance().pass(Parameter.ForkBlockVersionEnum.VERSION_4_8_2_2)
? contract.getNameBytes().size()
: contract.getName().getBytes().length;
if (contractNameLength > VMConstant.CONTRACT_NAME_LENGTH) {
throw new ContractValidateException("contractName's length cannot be greater than 32");
}
}

/**
* **
*/
Expand Down
18 changes: 17 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 @@ -941,6 +941,21 @@ public static void validator(DynamicPropertiesStore dynamicPropertiesStore,
}
break;
}
case ALLOW_OPTIMIZE_TVM_STORAGE: {
if (!forkController.pass(ForkBlockVersionEnum.VERSION_4_8_2_3)) {
throw new ContractValidateException(
"Bad chain parameter id [ALLOW_OPTIMIZE_TVM_STORAGE]");
}
if (dynamicPropertiesStore.getAllowOptimizeTvmStorage() == 1) {
throw new ContractValidateException(
"[ALLOW_OPTIMIZE_TVM_STORAGE] has been valid, no need to propose again");
}
if (value != 1) {
throw new ContractValidateException(
"This value[ALLOW_OPTIMIZE_TVM_STORAGE] is only allowed to be 1");
}
break;
}
default:
break;
}
Expand Down Expand Up @@ -1029,7 +1044,8 @@ public enum ProposalType { // current value, value range
ALLOW_TVM_PRAGUE(95), // 0, 1
ALLOW_TVM_OSAKA(96), // 0, 1
ALLOW_HARDEN_RESOURCE_CALCULATION(97), // 0, 1
ALLOW_HARDEN_EXCHANGE_CALCULATION(98); // 0, 1
ALLOW_HARDEN_EXCHANGE_CALCULATION(98), // 0, 1
ALLOW_OPTIMIZE_TVM_STORAGE(99); // 0, 1
private long code;

ProposalType(long code) {
Expand Down
10 changes: 3 additions & 7 deletions actuator/src/main/java/org/tron/core/utils/TransactionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.tron.api.GrpcAPI.TransactionExtention;
import org.tron.api.GrpcAPI.TransactionSignWeight;
import org.tron.api.GrpcAPI.TransactionSignWeight.Result;
import org.tron.common.parameter.CommonParameter;
import org.tron.common.utils.Sha256Hash;
import org.tron.core.ChainBaseManager;
import org.tron.core.capsule.AccountCapsule;
Expand Down Expand Up @@ -118,8 +117,7 @@ private static boolean validReadableBytes(byte[] bytes, int maxLength) {
}

public static Sha256Hash getTransactionId(Transaction transaction) {
return Sha256Hash.of(CommonParameter.getInstance().isECKeyCryptoEngine(),
transaction.getRawData().toByteArray());
return Sha256Hash.of(transaction.getRawData().toByteArray());
}


Expand Down Expand Up @@ -210,8 +208,7 @@ public TransactionSignWeight getTransactionSignWeight(Transaction trx) {
trx = truncateSignatures(trx);
TransactionExtention.Builder trxExBuilder = TransactionExtention.newBuilder();
trxExBuilder.setTransaction(trx);
trxExBuilder.setTxid(ByteString.copyFrom(Sha256Hash.hash(CommonParameter
.getInstance().isECKeyCryptoEngine(), trx.getRawData().toByteArray())));
trxExBuilder.setTxid(ByteString.copyFrom(Sha256Hash.hash(trx.getRawData().toByteArray())));
Return.Builder retBuilder = Return.newBuilder();
retBuilder.setResult(true).setCode(response_code.SUCCESS);
trxExBuilder.setResult(retBuilder);
Expand Down Expand Up @@ -246,8 +243,7 @@ public TransactionSignWeight getTransactionSignWeight(Transaction trx) {
if (trx.getSignatureCount() > 0) {
List<ByteString> approveList = new ArrayList<>();
long currentWeight = TransactionCapsule.checkWeight(permission, trx.getSignatureList(),
Sha256Hash.hash(CommonParameter.getInstance()
.isECKeyCryptoEngine(), trx.getRawData().toByteArray()), approveList);
Sha256Hash.hash(trx.getRawData().toByteArray()), approveList);
tswBuilder.addAllApprovedList(approveList);
tswBuilder.setCurrentWeight(currentWeight);
}
Expand Down
8 changes: 8 additions & 0 deletions actuator/src/main/java/org/tron/core/vm/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@ public void execute(Program program) {
public boolean isEnabled() {
return enabled.getAsBoolean();
}

public Operation adjustCost(Function<Program, Long> newCost) {
return new Operation(opcode, require, ret, newCost, action, enabled);
}

public Operation adjustAction(Consumer<Program> newAction) {
return new Operation(opcode, require, ret, cost, newAction, enabled);
}
}
Loading
Loading