-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Software Versions
Note: I apologize for posting a Go implementation question in the Java TRON repository. While Go implementations exist, I'm following the official TRON documentation and API specifications, yet encountering this protocol-level signature validation issue. I'm hoping the core protocol experts here can help understand the TRON-specific signature validation differences between TRX and TRC20 transactions.
Client: Custom Go implementation using TRON API
TRON Network: Testnet
API Endpoint: TronGrid
Crypto Library: go-ethereum/crypto (latest)
Expected behaviour
TRC20 (USDT) token transfers should be signed and accepted by the TRON network using standard ECDSA signature, similar to how native TRX transfers work with the same signing implementation.
Actual behaviour
TRC20 transfers fail with signature validation error:
API error: Validate signature error: cc1de6c85da363c051ca6206a957b49a741fc1325ea6f03ec3c781886ebacbd80eff1e73d8072a9bc3e6058bf8c6043c72b0b369479cc7e25472115c388c93dc1c is signed by TJSabY59bePRMUpERghYKvfNrD8ZbYuq4Y but it is not contained of permission.
Key Issue: The address in the error (TJSabY59bePRMUpERghYKvfNrD8ZbYuq4Y
) doesn't match either sender or recipient address.
Frequency
100% - Every TRC20 (USDT) transfer attempt fails with this error, while TRX transfers work perfectly.
Steps to reproduce the behaviour
- Create TRC20 (USDT) transfer transaction using TronGrid API
triggersmartcontract
- Extract
raw_data
from transaction response, serialize to protobuf bytes - Calculate SHA256 hash of the raw_data bytes
- Sign hash using go-ethereum/crypto ECDSA implementation
- Add signature to transaction and broadcast via TronGrid
- Observe signature validation error
Files to reproduce the error: https://gist.github.com/slaenov/1676ac20fc9f5cdd4989b562850162d3
TRON-Specific Questions
- Is there a difference in permission requirements between TRX and TRC20 signature validation?
- Could this be related to TRON's account permission model or multisig features?
- Are there specific requirements for TRC20 smart contract transaction signing that differ from native transfers?
Cross-References
Also investigating on: