Skip to content

[pull] develop from tronprotocol:develop#149

Merged
pull[bot] merged 5 commits into
All-Blockchains:developfrom
tronprotocol:develop
May 7, 2026
Merged

[pull] develop from tronprotocol:develop#149
pull[bot] merged 5 commits into
All-Blockchains:developfrom
tronprotocol:develop

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 7, 2026

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 : )

waynercheung and others added 5 commits May 7, 2026 19:49
* fix(jsonrpc): accept "input" as alias for "data" in call args

Closes #6517.

JSON-RPC requests using the execution-apis field name `input` were
rejected with UnrecognizedPropertyException, blocking spec-compliant
clients -- notably go-ethereum's ethclient since
ethereum/go-ethereum#28078, which only emits `input`.

CallArguments and BuildArguments now declare both fields. A new
resolveData() does pure precedence resolution -- `input` wins over
`data` -- mirroring go-ethereum's TransactionArgs.data(). Five call
sites in TronJsonRpcImpl use the resolver instead of getData(). The
verb-prefix name (not getXxx) keeps Jackson and FastJSON's JavaBean
introspection from picking the method up as a `resolveData` wire
property; two serialisation tests pin this as a regression guard.

Hex validation is mode-driven via JsonRpcApiUtil.requireValidHex
(HexMode.STRICT / HexMode.LENIENT):

- `input` (new field) is STRICT: follows the execution-apis BYTES
  schema -- requires `0x` prefix and even length; "" is accepted as
  empty bytes per geth's hexutil.Bytes.UnmarshalText.
- `data` retains LENIENT parsing via ByteArray.fromHexString for
  backward compatibility with existing callers (e.g.
  BuildTransactionTest.testCreateSmartContract uses bare-hex
  bytecode).

Conflict between `input` and `data` (both set, not equal) is
detected on the build path at BuildArguments.getContractType(),
mirroring geth's data() / setDefaults split. The error message
matches go-ethereum's setDefaults wording verbatim. Comparison is
byte-level so case differences are not flagged. The query path
(CallArguments.resolveData()) stays lenient -- input wins silently.

Tested by 52 unit tests including Jackson/FastJSON serialisation
safety guards; BuildTransactionTest.testCreateSmartContract still
passes; checkstyle clean.

* refactor(jsonrpc): extract conflict error message to constant

Hoist the input/data conflict error string in BuildArguments to a
private static final field CONFLICT_ERR_MSG, replacing the inline
literal in validateCallDataConflict.

The wording mirrors go-ethereum's setDefaults verbatim and is a
cross-project contract — external EVM tooling may pattern-match the
string. The constant's javadoc records this so future refactors do
not drift from the geth wording.
…6747)

1. bump bcprov-jdk18on from 1.79 to 1.84 fix CVE-2026-5598
   2. bump jetty from 9.4.57 to 9.4.58 fix CVE-2025-5115
   3. bump pf4j from 3.10.0 to 3.14.1 fix CVE-2025-70952
   4. bump grpc-java from 1.75 to 1.81 fix CVE-2026-33871
* feat(proposal): add ALLOW_HARDEN_RESOURCE_CALCULATION (code 97)

* feat(vm,consensus): harden resource calculations(TIP-833)

* fix(vm): correct parens in RepositoryImpl.calculateGlobalEnergyLimit

* feat(vm): use TRX_PRECISION
Co-authored-by: zeusoo001 <zeus_oo@163.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
)

* feat(toolkit): add --exclude-historical-balance for lite snapshot split

Default behavior is unchanged: balance-trace and account-trace stay in
the lite snapshot as before, so default operators
(historyBalanceLookup=off) see no difference.

Opt-in via `--exclude-historical-balance=true` on `split -t snapshot`
excludes the two trace stores from the snapshot for size-conscious
operators. A loud warning is printed at split time noting that this
loss is permanent for nodes that had historyBalanceLookup=true (merge
cannot restore the feature) and that operators who need historical
balance lookup on the resulting lite node must NOT enable this flag.

`split -t history` and `merge` ignore the flag and continue using the
legacy 5-db archive set, so merge logic stays untouched.

Includes:
- DbLite: new CLI option, helper method, runtime warning.
- README: parameter documentation and worked example.
- DbLiteTest: 3-arg testTools overload and packaging-contract assertion.
- DbLiteExcludeHistoricalBalanceRocksDbTest: opt-in path coverage.

close #6597

* docs(toolkit): clarify lite snapshot trace exclusion
@pull pull Bot locked and limited conversation to collaborators May 7, 2026
@pull pull Bot added the ⤵️ pull label May 7, 2026
@pull pull Bot merged commit bd3b5ef into All-Blockchains:develop May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants