Skip to content

Some grammar updates on CONTRIBUTING.md - #20

Merged
sasaxie merged 1 commit into
tronprotocol:developfrom
xiaolin:develop
Dec 29, 2017
Merged

sasaxie merged 1 commit into
tronprotocol:developfrom
xiaolin:develop

Conversation

@xiaolin

@xiaolin xiaolin commented Dec 29, 2017

Copy link
Copy Markdown
Contributor

What does this PR do?
Grammar updates to CONTRIBUTING.md

Why are these changes required?
To help improve contribution guidelines and instructions.

@sasaxie

sasaxie commented Dec 29, 2017

Copy link
Copy Markdown
Contributor

LGTM

@sasaxie
sasaxie merged commit 17114fd into tronprotocol:develop Dec 29, 2017
zhaohong pushed a commit that referenced this pull request Feb 5, 2018
 J8u9HIox9F0l1jAap/UCU3WROuqcaG8yGlIDvwFGJcd5Bwl6JSuL5s6SJTmoPzF5
 V+rF1Kzs79VU5eapx81kOmu2nsU4AIUTSgcKKNykQi4lNRPKks0wLWkbCIw6asE4
 oAdlRNK/YVPD1hSycobQtgd+rj2DrkurRt9+fDJG3VEsuPgDoH6v/x2y1VTzZDWD
 wkZq+nGUeY9ZWB8uKk0ij8hUFlT1O7KsaPGe6kA0kRoe2yMn20UveCRhwNfrRgFl
 wDock9ICp7E5oA+RaNUbfi3j1YmihYqQFgcDkHYr6Ok30n2QRoibHAKCnIkbxg4=
 =ZN/C
 -----END PGP SIGNATURE-----
 

Merge pull request #20 from xiaolin/develop

:pencil2:docs(CONTRIBUTING.md): Some grammar updates on CONTRIBUTING.md
@ybhgenius

Copy link
Copy Markdown
Contributor

Hello, I am a crew member of TRON, and now we are planning to provide an incentive for your contribution. Please leave me your email address. Thanks.

huzhenyuan pushed a commit that referenced this pull request Apr 11, 2018
halibobo1205 added a commit that referenced this pull request Apr 1, 2024
zeusoo001 pushed a commit to zeusoo001/java-tron that referenced this pull request Mar 21, 2025
…gin_bttc

feat: add collection index and add solidity log and solidity event for mongodb
yanghang8612 pushed a commit to yanghang8612/java-tron that referenced this pull request Jan 4, 2026
Merge Release v4.8.1 to release_v4.8.1.build2
317787106 referenced this pull request in 0xbigapple/java-tron Mar 14, 2026
Little-Peony added a commit to Little-Peony/java-tron that referenced this pull request Jun 24, 2026
parent e23a628
author GrapeS <jiaoqingsunny@gmail.com> 1782274110 +0800
committer GrapeS <jiaoqingsunny@gmail.com> 1782274110 +0800

feat(proposal): add VERSION_4_8_2_PQ1 and gate PQC proposals on it

fix test checkstyle

reverse changes

reverse

reverse

delete comments, remove unused code

fix(vm): relocate pqc precompiles to 0x02000016-0x0200001a to avoid address conflicts

fix(chainbase): render pq_auth_sig safely in TransactionCapsule.toString

getBase64FromByteString parses bytes as an ECDSA r/s/v signature, so calling it
on a pq_auth_sig threw and crashed toString() for any PQ-signed transaction. The
i.get() gating also dropped the PQ output when an ECDSA signature was present and
only ever printed the first entry.

Print every pq_auth_sig at the transaction level and hex-encode the raw bytes.
Add toString format regression tests (PQ-only and hybrid ECDSA+PQ).

revers feberico change

add more test

fix format

refactor

fix(net): bound inbound HelloMessage size and pq_auth_sig fields

valid() capped legacy fields at 200B but left pq_auth_sig unbounded, so
an inbound hello was limited only by the 5MB frame. Per-field bounds are
not enough: raw bytes can still bloat via repeated pq_auth_sig (parser
merges), top-level unknown fields, or unbounded `from` sub-fields.

- Add MAX_HELLO_MESSAGE_SIZE (16KB); reject oversized hellos in
  TronMessageFactory before the body copy, and defensively in the
  HelloMessage constructors and valid() (-> BAD_MESSAGE/BAD_PROTOCOL).
- valid(): reject nested unknown fields in pq_auth_sig; bound
  public_key/signature to the scheme's max (global max for unknown).
- Add PQSchemeRegistry.getMaxPublicKeyLength()/getMaxSignatureLength().
- Tests for nested unknown field and the three raw-size bypasses.

fix(net): bound pq_auth_sig at the transaction entry points

The hello path bounded pq_auth_sig, but RPC broadcast and P2P tx ingress
length-checked only legacy ECDSA signatures, leaving pq_auth_sig
unguarded. Bounding public_key/signature alone is insufficient: PQAuthSig
retains/re-serializes unknown fields, so a large nested unknown field
passes while both known fields stay within bounds.

- Add shared PQAuthSigValidator.isLengthWithinBounds(): bounds
  public_key/signature to the scheme's max (global max for unknown
  schemes) and rejects nested unknown fields.
- Wire it into Wallet.broadcastTransaction() (SIGERROR) and
  TransactionsMsgHandler.check() (BAD_TRX); refactor HelloMessage.valid()
  to reuse it instead of its inline checks.
- Tests for the validator and both transaction ingress points.

# This is the commit message tronprotocol#15:

fix(pq): enforce pq_auth_sig field/count bounds uniformly across ingress and consensus

Harden post-quantum auth-signature validation so the same rules hold at every
layer (relay/RPC ingress and the consensus verify paths), closing asymmetries
an attacker could otherwise exploit.

- Extract hasNoUnknownFields() in PQAuthSigValidator as the single primitive
  enforcing PQAuthSig's fixed field set (scheme/public_key/signature);
  isLengthWithinBounds now delegates to it. A generated PQAuthSig retains and
  re-serializes unknown fields, so bounding only the known fields would let a
  caller smuggle a large length-delimited unknown field.
- Reject nested unknown fields on the consensus paths too, not just the ingress
  gates: TransactionCapsule#validatePQSignatureGetWeight and
  BlockCapsule#validatePQSignature, so a block-included tx is held to the same
  rule as a relayed/RPC one.
- Add a per-permission pq_auth_sig count gate in TransactionCapsule, mirroring
  legacy ECDSA checkWeight: each signature must map to a distinct permission
  key, so more entries than keys can never meet the threshold.
- Add an admission count cap (legacy + pq entries vs totalSignNum) at the
  ingress gates (Wallet#broadcastTransaction, TransactionsMsgHandler), rejecting
  a flood before the per-entry length loops. This also bounds empty/default pq
  entries, which would otherwise pass the per-entry size gate.

Tests: cover unknown-field rejection on the validator, tx and block paths; the
pq_auth_sig count-vs-key-count gate; and the totalSignNum admission cap on both
ingress gates.

# This is the commit message tronprotocol#17:

refactor(pq): tidy pq_auth_sig validation helpers and admission gates

No behavior change — readability cleanup on top of the pq_auth_sig
field/count-bound hardening.

- Rename PQAuthSigValidator.hasNoUnknownFields -> hasUnknownFields and
  invert its callers (TransactionCapsule, BlockCapsule, isLengthWithinBounds),
  so the predicate reads positively.
- Collapse the two-level admission-cap if into a single short-circuited
  condition at both ingress gates (Wallet#broadcastTransaction,
  TransactionsMsgHandler#check); totalSignNum is still skipped when the tx
  carries no signatures.
- Rewrite PQSchemeRegistry.getMax{PublicKey,Signature}Length with a stream
  and trim their javadoc.
- Update PQAuthSigValidatorTest for the renamed predicate.

# This is the commit message tronprotocol#18:

simplify comments

# This is the commit message tronprotocol#19:

Remove the `> 0` check and always read `totalSignNum`; for unregistered schemes, `isLengthWithinBounds` always returns `false`.

# This is the commit message tronprotocol#20:

refactor(pq): drop redundant hello size re-check and clarify count-limit messages
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.

3 participants