Skip to content

Align network connection doc with libp2p and java-tron source#327

Open
abn2357 wants to merge 1 commit into
tronprotocol:masterfrom
abn2357:fix_network_connection
Open

Align network connection doc with libp2p and java-tron source#327
abn2357 wants to merge 1 commit into
tronprotocol:masterfrom
abn2357:fix_network_connection

Conversation

@abn2357
Copy link
Copy Markdown
Contributor

@abn2357 abn2357 commented May 13, 2026

Summary

Reviewed docs/using_javatron/connecting_to_tron.md against the libp2p source and java-tron config.conf, and corrected several inaccuracies. Mirrors tronprotocol/documentation-en#598.

  • Expanded the "节点连接数量" section to cover minConnections, minActiveConnections, and maxConnectionsWithSameIp (previously only maxConnections was documented). The new wording reflects how the parameters actually interact in libp2p's ConnPoolService and ChannelManager: trust-peer handling, that outbound bypasses maxConnections, and the startup clamping done in TronNetService.
  • Corrected the HTTP port in API examples from 16887 to 8090, the actual default node.http.fullNodePort in config.conf. Applied in both connecting_to_tron.md and private_network.md.
  • Genesis block timestamp comment now matches the wording in java-tron's config.conf (# Genesis block timestamp, milli seconds), removing the misleading #2017-8-26 12:00:00 annotation next to a literal "0".

Test plan

  • Render the doc locally and confirm the new bullet list and code block under "节点连接数量" display correctly.
  • Verify the two curl examples (getnodeinfo, getnowblock) work against a local java-tron fullnode using port 8090.

- Expand "节点连接数量" to cover minConnections, minActiveConnections,
  and maxConnectionsWithSameIp, reflecting how the parameters interact
  in libp2p's ConnPoolService and ChannelManager.
- Correct the HTTP port in API examples from 16887 to 8090, the actual
  default node.http.fullNodePort. Applied in both connecting_to_tron.md
  and private_network.md.
- Update the genesis block timestamp comment to match java-tron's
  config.conf wording.

```
$ curl http://127.0.0.1:16887/wallet/getnodeinfo
$ curl http://127.0.0.1:8090/wallet/getnodeinfo
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: the curl example for getnodeinfo has a leading $ prefix while the getnowblock example below does not. For consistency, it would be good to standardize across all shell snippets — suggest dropping the $ from all shell snippets — this makes them easier to copy and paste directly. Maybe we can address this in a separate cleanup PR to keep this one focused.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Suggestion. I will start a new pr to solve such problems across all docs later.

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.

2 participants