[pull] develop from tronprotocol:develop#152
Merged
Merged
Conversation
Raise the floor to 500, switch the >32-byte branch to 2*words², and bump the long-exponent multiplier to 16. Drop the OSAKA gate's config-file plumbing — the on-chain proposal is the only switch.
Verify the new floor, the doubled-formula branch at the 33-byte boundary, and that pre-OSAKA pricing is preserved when the gate is off.
Cover CLZ in [128, 247] to exercise the (byte) cast through DataWord.of(byte), and pin the IllegalOperationException when allowTvmOsaka=0.
Make overflow safety explicit instead of relying on int range, and keep all arithmetic in the new energy helpers consistent with the existing StrictMathWrapper-based ops.
Activates via ALLOW_TVM_PRAGUE proposal: deploy() installs the BlockHashHistory bytecode + metadata at the canonical address; write() propagates parent hashes to a 8191-slot ring buffer.
processBlock writes the parent block hash before iterating transactions; generateBlock did not, so the producer's simulation loop saw a stale/empty slot at HISTORY_STORAGE_ADDRESS while validators saw the live value. Mirror processBlock's call order.
…lockhash feat(vm): implement TIP-2935 serve historical block hashes from state
…-test-fixes # Conflicts: # framework/src/test/java/org/tron/common/runtime/vm/AllowTvmOsakaTest.java
feat(vm): implement TIP-7939 CLZ opcode
feat(vm): implement TIP-7883 ModExp gas cost increase
…trigger processing (#6718)
… and throttling in-flight requests (#6717)
* feat(framework,actuator,common): replace fastjson with jackson
Replace `com.alibaba:fastjson` with Jackson-backed drop-in
wrappers (`org.tron.json.{JSON, JSONObject, JSONArray, JSONException}`).
No external API changes — all HTTP and JSON-RPC responses remain identical.
Motivation:
- Fastjson 1.2.83 is EOL with 20+ CVEs including critical RCE
- Upgrade jackson-databind 2.18.3 → 2.18.6 (GHSA-72hv-8253-57qq)
- Unify JSON handling (previously split between Jackson and Fastjson)
Core changes (common):
- Add org.tron.json wrappers backed by a shared ObjectMapper
- Remove fastjson from common/build.gradle
HTTP & servlet changes (framework):
- Swap imports from com.alibaba.fastjson → org.tron.json across
all HTTP servlets, JSON-RPC layer, and event/log parsers
Test changes:
- Add BaseHttpTest base class for servlet test lifecycle
Build:
- Update jackson to 2.18.6
- Remove fastjson
close #6607
* fix(test): remove trailing whitespace in GetDelegatedResourceAccountIndexV2ServletTest
* test(framework): add buildTransaction test
* refactor(common): tighten TypeUtils visibility and drop unused casts
* refactor(common): mark org.tron.json wrappers as @deprecated
* refactor(common): drop unused JSONException(Throwable) constructor
* test(framework): expand org.tron.json wrapper test coverage
* feat(common,framework): cap JSON parse depth and token count
* fix(common): match Fastjson 1.x NaN/Infinity/NULL behavior
* fix(json): align jackson parser with fastjson defaults
* test(json): remove Fastjson
* fix(json): reject unsupported fastjson edge cases
* test(json): cover duplicate field names
* fix(json): retain single trailing comma support
* refactor(trace): inline program trace json serialization
* fix(test): remove fastjson
* fix(test): use toLowerCase(Locale.ROOT)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )