[pull] develop from tronprotocol:develop#149
Merged
Merged
Conversation
* 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
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 : )