Skip to content

feat(version): merge release_v4.8.2 into master#6875

Merged
lvs0075 merged 172 commits into
masterfrom
release_v4.8.2
Jul 15, 2026
Merged

feat(version): merge release_v4.8.2 into master#6875
lvs0075 merged 172 commits into
masterfrom
release_v4.8.2

Conversation

@halibobo1205

Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR merges release_v4.8.2 into master.

Main Changes

  • Adapt to the Ethereum Osaka/Pectra upgrades.
  • Enhance core configuration, JSON processing, and TVM capabilities.
  • Optimize node connectivity, block synchronization, and P2P message processing.
  • Improve HTTP and JSON-RPC functionality, validation, rate limiting, and resource control.
  • Improve logging, tooling, CI workflows, and dependencies.

For more details, see the GreatVoyage-v4.8.2 milestone.

InventiveCoder and others added 30 commits December 10, 2024 14:18
Signed-off-by: InventiveCoder <liucongcong@outlook.com>
Signed-off-by: xiaochangbai <704566072@qq.com>
opt(framework): optimization Help Instruction
Signed-off-by: imalasong <imalasong@qq.com>
# Conflicts:
#	framework/src/main/java/org/tron/program/FullNode.java
fix(doc): fix some typos in comment
* fix readme typo and format
Removed 4 config files from framework/src/main/resources that were
not referenced anywhere in the codebase:
- config-backup.conf: no references
- config-beta.conf: no references
- config-test-net.conf: no references
- config-localtest.conf: only used in tests, shadowed by
  src/test/resources/config-localtest.conf on the test classpath
…6586)

* test: add dual DB engine (LevelDB + RocksDB) test coverage
317787106 and others added 23 commits June 5, 2026 11:11
* feat(vm): check CREATE2 max depth under Osaka

* feat(vm): clear residual logs on exception escape paths under Osaka

Mirror the in-try failure path: failed txs must not leak event logs into TransactionInfo/Bloom. Gated on Osaka to preserve replay.
… triggers (#6833)

On a chain reorg, BlockLogTrigger/TransactionLogTrigger subscribers previously
never learned that an orphaned block's events were rolled back. Add the same
"removed" semantics already used by ContractTrigger.

- add a `removed` field to BlockLogTrigger/TransactionLogTrigger and the
  matching setRemoved() on their capsules
- Manager (event version 0): refactor postBlockTrigger to emit a single
  real-time block (with removed), move the solidified-mode batch into
  postSolidityTrigger, add reOrgBlockTrigger to re-emit erased blocks with
  removed=true, rename reApplyLogsFilter to reApplyBlockEvents and re-emit the
  re-applied fork branch's block/tx triggers (forward), thread removed through
  processTransactionTrigger/postTransactionTrigger
- RealtimeEventService (event version 1): post block/tx triggers synchronously
  to the plugin with the removed flag instead of the async triggerCapsuleQueue,
  avoiding overwrite of the shared cached capsule; drop the unused manager field
- tests: capsule removed passthrough, version-0 emit (testReOrgBlockTriggerRemoved),
  rewritten RealtimeEventServiceTest, updated ManagerTest stub
Improve the hand-rolled JsonFormat parser used by HTTP wallet APIs so field-heavy and deeply nested JSON no longer overflows the request thread stack.

mergeField now consumes one field per call and leaves comma iteration to the caller. JsonFormat also enforces Constant.MAX_NESTING_DEPTH for object/array descent and returns ParseException instead of allowing StackOverflowError to escape.

Compatibility notes: direct JsonFormat.merge callers now reject nesting beyond 100 levels; trailing commas on known-field parse paths (top-level fields, known message fields, and known repeated fields) may be accepted, while trailing commas inside unknown nested object/array fields remain rejected; malicious deep-nesting requests now surface as parse errors instead of container-level HTTP 500s.
* fix(jsonrpc): enforce maxBlockRange on eth_getFilterLogs

* style(jsonrpc): fix styles and comments
…#6851)

Validate the inventory type at the inbound entry points and reject any value
other than TRX or BLOCK with P2pException(BAD_MESSAGE), before the type is
used for cache insertion or outbound fetch construction:
- P2pEventHandlerImpl.checkInvRateLimit: add else branch for unknown type
- InventoryMsgHandler.check: add type allowlist check
- FetchInvDataMsgHandler.check: validate raw getInventoryType() instead of
  getInvMessageType() (which mapped non-BLOCK types to TRX)

Use getTypeValue() when building the error message to avoid calling
getNumber() on an UNRECOGNIZED enum value. Add regression tests for all
three entry points.

Co-authored-by: wb <wb@wbdeMacBook-Air.local>
#6857)

* fix(vm): self-dispatch vote-witness cost by proposal flag

getVoteWitnessCost3 falls back to cost2 when Osaka is off, and cost2 to the legacy cost when energy adjustment is off. The energy then stays correct even if a stale cost function lingers in the shared jump table after a reorg, or is read by a constant call whose view has the proposal off.

* fix(vm): isolate constant-call config view to prevent global pollution

Constant calls bound to a lagging solidity/PBFT snapshot loaded their flags into the process-global VMConfig, racing block processing during a proposal's activation-to-solidification window and risking a fork. Route a constant call's config into a thread-local snapshot; the block/broadcast path keeps writing (and reading) the global.
1. Treat known protobuf fields with literal null as absent so HTTP APIs recover the 4.8.1 fastjson-compatible behavior for null object fields.

2. This relaxes JSON-RPC buildTransaction ABI handling because that path now accepts null ABI fields instead of returning invalid abi.

3. TRON's JsonFormat now aligns more closely with protobuf Java JsonFormat: field-level null is treated as absent, while null elements inside repeated arrays remain invalid.
The switchFork new-branch apply loop only re-validated each block's witness
signature; the transactions inside were applied through the isVerified cache.
That flag caches a signature-verification result computed against a specific
account-permission state, but a fork switch re-applies blocks on a rewound,
diverged chain state where those permissions may have changed. Trusting the
stale flag lets a transaction skip verification and be accepted with a
signature no longer valid under the fork-chain state.

- Manager.switchFork: clear isVerified on every transaction of each block on
  the branch being switched to, before applyBlock, forcing full signature
  re-validation against the fork-chain state. The switch-back path (original
  main branch) is left untouched: it reproduces the exact original state, so
  its cached verifications stay valid and resetting them would only cost perf.
- ManagerTest: add switchForkShouldResetTransactionSignVerifiedOnNewBranch,
  which drives a real reorg and asserts the new branch's transaction gets its
  cached verification flag cleared (fails without the fix).
chore(release): record master merge into release_v4.8.2
@lvs0075
lvs0075 merged commit aced0d5 into master Jul 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.