Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ad4268c
docs: fix typo defualt -> default (#6933)
vaibhav8a Sep 3, 2026
57b7b04
docs: clarify outdated code comments (#6914)
GrothenDI Sep 3, 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
bc7b5f7
refactor(rpc): serve solidity and pbft grpc via shared service instances
Little-Peony Sep 17, 2026
75fb525
Merge branch 'release_v4.8.3' into refactor_merge_rpc
Little-Peony 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
51f6f79
test(rpc): check the cursor reset on the handler thread and wait for it
Little-Peony Sep 30, 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
90db120
Merge branch 'release_v4.8.3' into refactor_merge_rpc
SeriousCoding789 Oct 10, 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
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