Making MetaMask and TronLink sign transactions for a custom Rust blockchain
说明与用途
Clutch 是一个基于 Rust 的区块链,已通过实现三种签名方案和 WalletTransfer 类型集成 MetaMask 和 TronLink 钱包。修复了关于延迟写入、矿工费用和开发者模式的关键错误,确保了真实 USDT 的安全处理。
问题
Wallets refuse to sign a bare hash for a custom chain, and the node must accept signatures from MetaMask, Trust Wallet, and TronLink while preventing replay attacks and ensuring correct token handling.
结果
The blockchain now accepts standard wallet signatures, allows MetaMask to send CLT, and securely backs CLT with USDT. Three critical bugs were identified and fixed, preventing potential money creation or loss.
工作流
- 1. Define three signature schemes and their digests. 2. Update node to accept SDK, MetaMask/Trust Wallet, and TronLink signatures. 3. Add WalletTransfer transaction type for MetaMask legacy send. 4. Enforce value conversion (CLT units ×10^12) and reject values with >6 decimals. 5. Implement consensus‑controlled activation via wallet_chain_id and wallet_transfers_from_block. 6. Deploy mainnet with real USDT backing and mint/burn logic. 7. Fix three critical bugs related to deferred writes, block author fee, and developer_mode database deletion. 8. Release testnet for user testing and feedback.
证据
A wallet will not sign 32 opaque bytes for you, and it is right not to: a bare hash could be an Ethereum transaction on another chain.
The node decodes the raw Ethereum transaction and recovers from from its signature.
Three bugs that could have created money…
- 记录日期: 2026-11-02T06:28:57.941Z