Skip to content

align API docs with java-tron v4.8.2#633

Open
abn2357 wants to merge 6 commits into
tronprotocol:masterfrom
abn2357:align_api_with_482
Open

align API docs with java-tron v4.8.2#633
abn2357 wants to merge 6 commits into
tronprotocol:masterfrom
abn2357:align_api_with_482

Conversation

@abn2357

@abn2357 abn2357 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Align the HTTP and JSON-RPC API docs with java-tron v4.8.2 behavior.

  • Replace node.maxMessageSize error rows with node.http.maxMessageSize and HTTP 413 SizeLimitHandler behavior
  • Add oversized-body HTTP 413 rows to endpoints that lacked them
  • Document int64_as_string=true GET flag on applicable endpoints
  • Add blockTimestamp to JSON-RPC log outputs
  • Document maxLogFilterNum, maxAddressSize, maxResponseSize, maxBatchSize, and data/input alias handling for eth_call, eth_estimateGas, and buildTransaction
  • Align documented JSON parse errors with org.tron.json.JSONException after fastjson removal
  • Expand smart-contract trigger/constant/estimate error response rows with concrete CONTRACT_VALIDATE_ERROR messages
  • Document JSON-RPC safe block tag handling and eth_newFilter pending/safe errors
  • Correct JSON-RPC servlet-level error codes for parse errors, invalid requests, oversized responses, batch limits, and internal errors
  • Update demo JSONObject import to org.tron.json.JSONObject

Test plan

  • Verified changed config keys, error messages, and JSON values against java-tron v4.8.2
  • Cross-checked English and Chinese docs for parity

@abn2357 abn2357 force-pushed the align_api_with_482 branch 2 times, most recently from 8734a00 to 8a631a8 Compare July 8, 2026 10:22
abn2357 added 3 commits July 13, 2026 11:09
- Replace node.maxMessageSize error rows with node.http.maxMessageSize and HTTP 413 SizeLimitHandler behavior
- Add oversized-body HTTP 413 rows to endpoints that lacked them
- Document int64_as_string=true GET flag on applicable endpoints
- Add blockTimestamp to JSON-RPC log outputs
- Document maxLogFilterNum, maxAddressSize, maxResponseSize, maxBatchSize, and data/input alias handling for eth_call, eth_estimateGas, and buildTransaction
- Align documented JSON parse errors with org.tron.json.JSONException after fastjson removal
- Expand smart-contract trigger/constant/estimate error response rows with concrete CONTRACT_VALIDATE_ERROR messages
- Document JSON-RPC safe block tag handling and eth_newFilter pending/safe errors
- Correct JSON-RPC servlet-level error codes for parse errors, invalid requests, oversized responses, batch limits, and internal errors
- Clarify unstable JSON-RPC error mappings and parameter-level validation for eth_chainId, net_version, eth_getStorageAt, eth_getLogs, and eth_estimateGas
- Update demo JSONObject import to org.tron.json.JSONObject
@abn2357 abn2357 force-pushed the align_api_with_482 branch from 8a631a8 to 6ba046e Compare July 13, 2026 05:20
@abn2357 abn2357 force-pushed the align_api_with_482 branch from 4358737 to 7895f89 Compare July 14, 2026 10:50
Fix POST optional fields and endpoint-specific request schemas. Model
int64_as_string responses, HTTP 404/413 bodies, Lite FullNode text
responses, and shared in-band errors.

Correct required flags verified against java-tron source:
- getaccountbalance: require account_identifier/block_identifier and their
  nested address/hash; keep number optional (defaults to 0, only the genesis
  block may omit it).
- votewitnessaccount: require vote_address/vote_count on each votes item.
- getblockbyid/getcontract/getcontractinfo: GET value is optional; a missing
  value queries empty bytes and returns {}, not an error.

This commit only modifies API spec files (docs/api/specs/http/*.yaml and
docs/api/openapi.yaml); no Markdown documentation is changed.
@abn2357 abn2357 force-pushed the align_api_with_482 branch from 7895f89 to 831fa42 Compare July 14, 2026 12:01
Audit the HTTP API Markdown against the corrected specs and java-tron source across request, response, and error-response semantics.

- Correct Required semantics for defaulted and empty-Protobuf fields, including method-specific GET/POST behavior.
- Document conditional contract inputs and the actual estimateenergy request surface.
- Correct signature optionality, account permission cardinality, and account type enum forms.
- Document Stake 1.0 TRON_POWER behavior and shared rate-limit rejection responses.
- Keep the change scoped to Markdown; no spec or OpenAPI files are modified.
@abn2357 abn2357 force-pushed the align_api_with_482 branch from 831fa42 to db1c55e Compare July 14, 2026 12:48
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.

1 participant