เอกสารไวท์เปเปอร์ของตรอน

TRON Whitepaper v2.0

作者 Justin Sun · 2017

Introduction

Introduction

1.1 Vision

TRON is an ambitious project dedicated to the establishment of a truly decentralized Internet and its infrastructure. The TRON Protocol, one of the largest blockchain-based operating systems in the world, offers public blockchain support of high throughput, high scalability, and high availability for all Decentralized Applications (DApps) in the TRON ecosystem. The July 2018 acquisition of BitTorrent further cemented TRON’s leadership in pursuing a decentralized ecosystem.
1.2 Background

The introduction of Bitcoin in 2009 revolutionized society’s perception of the traditional financial system in the wake of the Great Recession (2007-2008). As centralized hedge funds and banks collapsed from speculation in opaque financial derivatives, blockchain technology provided a transparent universal ledger from which anybody could glean transaction information. The transactions were cryptographically secured using a Proof of Work (PoW) consensus mechanism, thus preventing double spend issues.

In late 2013, the Ethereum white paper proposed a network in which smart contracts and a Turing-complete Ethereum Virtual Machine (EVM) would allow developers to interact with the network through DApps. However, as transaction volumes in Bitcoin and Ethereum peaked in 2017, it was apparent from the low transaction throughput times and high transaction fees that cryptocurrencies like Bitcoin and Ethereum in their existing state were not scalable for widespread adoption. Thus, TRON was founded and envisioned as an innovative solution to these pressing scalability challenges.

TRON development roadmap phase 1 timeline from July 2017 to June 2018

1.3 History The TRON DAO was established in July 2017 in Singapore. In December 2017, TRON had launched its open source protocol. The Testnet, Blockchain Explorer, and Web Wallet were all launched by March 2018. TRON Mainnet launched shortly afterward in May 2018, marking the Odyssey 2.0 release as a technical milestone. In June 2018, TRON declared its independence with the creation of the Genesis block, along with the July 2018 acquisition of BitTorrent. In October 2018, TRON launched the TRON Virtual Machine (TVM), a complete developers’ toolset, and 360 support system. The TRON roadmap involves combining BitTorrent’s 100 million users with the TRON network via Project Atlas, as well as fostering the developer community to launch exciting new DApps on the TRON network1. 1 V1.0 is available at https://tron.network/static/doc/white_paper_v_1_0.pdf

TRON development roadmap phase 2 timeline from July 2018 to 2019

1.4 Terminology

Address/Wallet An address or wallet consisting of account credentials on the TRON network are generated by a key pair, which consists of a private key and a public key, the latter being derived from the former through an algorithm. The public key is usually used for session key encryption, signature verification, and encrypting data that could be decrypted by a corresponding private key.

ABI An application binary interface (ABI) is an interface between two binary program modules; usually one of these modules is a library or an operating system facility, and the other is a user run program.

API An application programming interface (API) is mainly used for user clients development. With API support, token issuance platforms can also be designed by developers themselves.

Asset In TRON's documents, asset is the same as token, which is also denoted as TRC-10 token.

Bandwidth Points (BP) To keep the network operating smoothly, TRON network transactions use BP as fuel. Each account gets 5000 free daily BP and more can be obtained by freezing TRX for BP. Both TRX and TRC-10 token transfers are normal transactions costing BP. Smart contract deployment and execution transactions consume both BP and Energy.

Block Blocks contain the digital records of transactions. A complete block consists of the magic number, block size, block header, transaction counter, and transaction data.

Block Reward Block production rewards are sent to a sub-account (address/wallet). Super Representatives can claim their rewards on Tronscan or through the API directly.

Block Header A block header is part of a block. TRON block headers contain the previous block’s hash, the Merkle root, timestamp, version, and witness address.

Cold Wallet Cold wallet, also known as offline wallet, keeps the private key completely disconnected from any network. Cold wallets are usually installed on "cold" devices (e.g. computers or mobile phones staying offline) to ensure the security of TRX private key.

DApp Decentralized Application is an App that operates without a centrally trusted party. An application that enables direct interaction/agreements/communication between end users and/or resources without a middleman.

gRPC gRPC (gRPC Remote Procedure Calls) is an open source remote procedure call (RPC) system 2 initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts. It generates cross-platform client and server bindings for many languages. Most common usage scenarios include connecting services in microservices style architecture and connecting mobile devices, and browser clients to backend services.

Hot Wallet Hot wallet, also known as online wallet, allows user's private key to be used online, thus it could be susceptible to potential vulnerabilities or interception by malicious actors.

JDK Java Development Kit is the Java SDK used for Java applications. It is the core of Java development, comprising the Java application environment (JVM+Java class library) and Java tools.

KhaosDB TRON has a KhaosDB in the full-node memory that can store all the newly-forked chains generated within a certain period of time and supports witnesses to switch from their own active chain swiftly into a new main chain. See 2.2.2 State Storage for more details.

LevelDB LevelDB was initially adopted with the primary goal to meet the requirements of fast R/W and rapid development. After launching the Mainnet, TRON upgraded its database to an entirely customized one catered to its very own needs. See 2.2.1 Blockchain Storage for more details.

Merkle Root A Merkle root is the hash of all hashes of all transactions included as part of a block in a blockchain network. See 3.1 Delegated Proof of Stake (DPoS) for more details. 2 https://en.wikipedia.org/wiki/GRPC

Public Testnet (Shasta) A version of the network running in a single-node configuration. Developers can connect and test features without worrying about the economic loss. Testnet tokens have no value and anyone can request more from the public faucet.

RPC
3 In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (local) procedure call, without the programmer explicitly coding the details for the remote interaction.

Scalability Scalability is a feature of the TRON Protocol. It is the capability of a system, network, or process to handle a growing amount of work or its potential to be enlarged to accommodate that growth.

SUN SUN replaced drop as the smallest unit of TRX. 1 TRX = 1,000,000 SUN.

Throughput High throughput is a feature of TRON Mainnet. It is measured in Transactions Per Second (TPS), namely the maximum transaction capacity in one second.

Timestamp The approximate time of block production is recorded as Unix timestamp, which is the number of milliseconds that have elapsed since 00:00:00 01 Jan 1970 UTC.

TKC Token configuration.

TRC-10 A standard of crypto token on TRON platform. Certain rules and interfaces are required to follow when holding an initial coin offering on TRON blockchain.

TRX TRX stands for Tronix, which is the official cryptocurrency of TRON.

3 https://en.wikipedia.org/wiki/Remote_procedure_call

การแนะนำ

1.1 วิสัยทัศน์

TRON เป็นโครงการที่มีความทะเยอทะยานที่อุทิศให้กับการสร้างอินเทอร์เน็ตที่มีการกระจายอำนาจอย่างแท้จริงและ โครงสร้างพื้นฐาน TRON Protocol หนึ่งในระบบปฏิบัติการที่ใช้ blockchain ที่ใหญ่ที่สุดใน world เสนอ blockchain การสนับสนุนสาธารณะสำหรับปริมาณงานสูง ความสามารถในการปรับขนาดสูง และความพร้อมใช้งานสูงสำหรับ แอปพลิเคชันแบบกระจายอำนาจ (DApps) ทั้งหมดในระบบนิเวศ TRON การเข้าซื้อกิจการเดือนกรกฎาคม 2561 ของ BitTorrent ยังตอกย้ำความเป็นผู้นำของ TRON ในการแสวงหาระบบนิเวศแบบกระจายอำนาจ
1.2 ความเป็นมา

การเปิดตัว Bitcoin ในปี 2009 ได้ปฏิวัติการรับรู้ของสังคมเกี่ยวกับการเงินแบบดั้งเดิม หลังเกิดภาวะเศรษฐกิจถดถอยครั้งใหญ่ (พ.ศ. 2550-2551) เป็นกองทุนป้องกันความเสี่ยงแบบรวมศูนย์และธนาคาร ทรุดตัวลงจากการเก็งกำไรในอนุพันธ์ทางการเงินที่ทึบแสง blockchain เทคโนโลยีให้ บัญชีแยกประเภทสากลที่โปร่งใสซึ่งใครก็ตามสามารถรวบรวมข้อมูลธุรกรรมได้ ที่ ธุรกรรมได้รับการรักษาความปลอดภัยแบบเข้ารหัสโดยใช้กลไกฉันทามติ Proof of Work (PoW) จึงป้องกันปัญหาการใช้จ่ายซ้ำซ้อน

ในช่วงปลายปี 2013 เอกสารไวท์เปเปอร์ Ethereum เสนอเครือข่ายที่ smart contracts และ Turing-complete Ethereum Virtual Machine (EVM) จะช่วยให้นักพัฒนาสามารถโต้ตอบกับ เครือข่ายผ่าน DApps อย่างไรก็ตาม เนื่องจากปริมาณธุรกรรมใน Bitcoin และ Ethereum พุ่งถึงจุดสูงสุดในปี 2017 เห็นได้ชัดจากเวลาการทำธุรกรรมที่ต่ำและค่าธรรมเนียมการทำธุรกรรมที่สูง cryptocurrencies เช่น Bitcoin และ Ethereum ในสถานะที่มีอยู่ไม่สามารถปรับขนาดได้อย่างกว้างขวาง การรับเลี้ยงบุตรบุญธรรม ดังนั้น TRON จึงถูกก่อตั้งขึ้นและจินตนาการว่าเป็นโซลูชันเชิงนวัตกรรมสำหรับการกดเหล่านี้ ความท้าทายด้านความสามารถในการขยายขนาด

TRON development roadmap phase 1 timeline from July 2017 to June 2018

1.3 ประวัติศาสตร์ TRON DAO ก่อตั้งขึ้นในเดือนกรกฎาคม 2017 ในสิงคโปร์ ในเดือนธันวาคม 2017 TRON มี เปิดตัวโปรโตคอลโอเพ่นซอร์ส Testnet, Blockchain Explorer และ Web Wallet ล้วนเป็นทั้งหมด เปิดตัวภายในเดือนมีนาคม 2018 TRON Mainnet เปิดตัวหลังจากนั้นไม่นานในเดือนพฤษภาคม 2018 ซึ่งถือเป็น การเปิดตัว Odyssey 2.0 ถือเป็นก้าวสำคัญทางเทคนิค ในเดือนมิถุนายน 2018 TRON ประกาศเอกราช ด้วยการสร้างบล็อก Genesis พร้อมกับการเข้าซื้อกิจการ BitTorrent ในเดือนกรกฎาคม 2561 ใน ตุลาคม 2018 TRON เปิดตัว TRON Virtual Machine (TVM) ซึ่งเป็นชุดเครื่องมือของนักพัฒนาที่สมบูรณ์ และระบบรองรับ 360 องศา แผนงาน TRON เกี่ยวข้องกับการรวมผู้ใช้ BitTorrent 100 ล้านคนเข้าด้วยกัน ด้วยเครือข่าย TRON ผ่าน Project Atlas ตลอดจนส่งเสริมชุมชนนักพัฒนาให้เปิดตัว DApps ใหม่ที่น่าตื่นเต้นบน TRON network1 1 V1.0 มีให้ที่ https://tron.network/static/doc/white_paper_v_1_0.pdf

1.4 คำศัพท์เฉพาะทาง

ที่อยู่/กระเป๋าเงิน ที่อยู่หรือกระเป๋าเงินที่ประกอบด้วยข้อมูลรับรองบัญชีบนเครือข่าย TRON ถูกสร้างขึ้นโดย คู่คีย์ซึ่งประกอบด้วยคีย์ส่วนตัวและคีย์สาธารณะ ซึ่งคีย์หลังได้รับมาจากคีย์แรก ผ่านอัลกอริธึม กุญแจสาธารณะมักจะใช้สำหรับการเข้ารหัสคีย์เซสชันและลายเซ็น การตรวจสอบและการเข้ารหัสข้อมูลที่สามารถถอดรหัสได้ด้วยคีย์ส่วนตัวที่เกี่ยวข้อง

เอบีไอ Application Binary Interface (ABI) เป็นส่วนต่อประสานระหว่างโมดูลโปรแกรมไบนารีสองโมดูล ปกติแล้ว หนึ่งในโมดูลเหล่านี้คือไลบรารีหรือสิ่งอำนวยความสะดวกของระบบปฏิบัติการ และอีกโมดูลหนึ่งคือส่วนเรียกใช้งานของผู้ใช้ โปรแกรม

เอพีไอ Application Programming Interface (API) ส่วนใหญ่จะใช้สำหรับการพัฒนาไคลเอนต์ผู้ใช้ ด้วยเอพีไอ สนับสนุน token แพลตฟอร์มการออกสามารถออกแบบโดยนักพัฒนาเองได้

สินทรัพย์ ในเอกสารของ TRON เนื้อหาจะเหมือนกับ token ซึ่งยังแสดงเป็น TRC-10 token

คะแนนแบนด์วิธ (BP) เพื่อให้เครือข่ายทำงานได้อย่างราบรื่น ธุรกรรมเครือข่าย TRON จะใช้ BP เป็นเชื้อเพลิง แต่ละบัญชี รับ 5,000 BP ฟรีทุกวัน และสามารถรับได้อีกมากโดยการแช่แข็ง TRX สำหรับ BP ทั้ง TRX และ TRC-10 token การโอนเป็นธุรกรรมปกติที่คิดต้นทุน BP การปรับใช้และการดำเนินการตามสัญญาอัจฉริยะ ธุรกรรมใช้ทั้ง BP และพลังงาน

บล็อก บล็อกประกอบด้วยบันทึกธุรกรรมดิจิทัล บล็อกที่สมบูรณ์ประกอบด้วยหมายเลขเวทย์มนตร์ ขนาดบล็อก ส่วนหัวของบล็อก ตัวนับธุรกรรม และข้อมูลธุรกรรม

รางวัลบล็อก รางวัลการผลิตบล็อกจะถูกส่งไปยังบัญชีย่อย (ที่อยู่/กระเป๋าเงิน) ตัวแทนซุปเปอร์ก็ได้ รับรางวัลจาก Tronscan หรือผ่าน API โดยตรง

ส่วนหัวของบล็อก ส่วนหัวของบล็อกเป็นส่วนหนึ่งของบล็อก TRON ส่วนหัวของบล็อกประกอบด้วย hash ของบล็อกก่อนหน้า ราก Merkle การประทับเวลา เวอร์ชัน และที่อยู่พยานกระเป๋าเงินเย็น กระเป๋าเงินเย็นหรือที่รู้จักกันในชื่อกระเป๋าเงินออฟไลน์ จะทำให้รหัสส่วนตัวถูกตัดการเชื่อมต่ออย่างสมบูรณ์ เครือข่าย โดยปกติแล้ว กระเป๋าเงินเย็นจะติดตั้งบนอุปกรณ์ "เย็น" (เช่น คอมพิวเตอร์หรือโทรศัพท์มือถือ อยู่ในสถานะออฟไลน์) เพื่อรับรองความปลอดภัยของรหัสส่วนตัว TRX

ดีแอป แอปพลิเคชันแบบกระจายอำนาจเป็นแอปที่ทำงานโดยไม่มีฝ่ายที่เชื่อถือได้จากส่วนกลาง ใบสมัคร ที่ช่วยให้มีปฏิสัมพันธ์/ข้อตกลง/การสื่อสารโดยตรงระหว่างผู้ใช้ปลายทางและ/หรือทรัพยากร โดยไม่มีคนกลาง

จีอาร์พีซี gRPC (gRPC Remote Procedure Calls) เป็นระบบการเรียกขั้นตอนระยะไกล (RPC) แบบโอเพ่นซอร์ส 2 พัฒนาครั้งแรกที่ Google ใช้ HTTP/2 สำหรับการขนส่ง โดยมี Protocol Buffers เป็นอินเทอร์เฟซ ภาษาคำอธิบาย และมีคุณสมบัติต่างๆ เช่น การรับรองความถูกต้อง การสตรีมและโฟลว์แบบสองทิศทาง การควบคุม การบล็อกหรือการไม่บล็อกการเชื่อมโยง และการยกเลิกและการหมดเวลา มันสร้าง ไคลเอนต์ข้ามแพลตฟอร์มและการเชื่อมโยงเซิร์ฟเวอร์สำหรับหลายภาษา สถานการณ์การใช้งานที่พบบ่อยที่สุด รวมถึงบริการเชื่อมต่อในสถาปัตยกรรมสไตล์ไมโครเซอร์วิสและการเชื่อมต่ออุปกรณ์มือถือ และ ไคลเอ็นต์เบราว์เซอร์ไปยังบริการแบ็กเอนด์

กระเป๋าเงินสุดฮอต กระเป๋าเงินร้อนหรือที่เรียกว่ากระเป๋าเงินออนไลน์ อนุญาตให้ใช้รหัสส่วนตัวของผู้ใช้ออนไลน์ได้ ดังนั้นจึงอาจเป็นเช่นนั้น อ่อนแอต่อช่องโหว่ที่อาจเกิดขึ้นหรือการสกัดกั้นโดยผู้ดำเนินการที่เป็นอันตราย

เจดีเค Java Development Kit คือ Java SDK ที่ใช้สำหรับแอปพลิเคชัน Java มันเป็นแกนหลักของ Java การพัฒนาประกอบด้วยสภาพแวดล้อมแอปพลิเคชัน Java (ไลบรารีคลาส JVM + Java) และ Java เครื่องมือ

KhaosDB TRON มี KhaosDB ในหน่วยความจำโหนดเต็มที่สามารถจัดเก็บเชนที่แยกใหม่ทั้งหมดที่สร้างขึ้น ภายในระยะเวลาที่กำหนดและสนับสนุนให้พยานเปลี่ยนจากห่วงโซ่ที่ใช้งานของตนเองได้อย่างรวดเร็ว เข้าสู่ห่วงโซ่หลักใหม่ ดู 2.2.2 การจัดเก็บสถานะสำหรับรายละเอียดเพิ่มเติม

ระดับDB เริ่มแรก LevelDB ถูกนำมาใช้โดยมีเป้าหมายหลักเพื่อให้เป็นไปตามข้อกำหนดของ R/W ที่รวดเร็วและรวดเร็ว การพัฒนา หลังจากเปิดตัว Mainnet แล้ว TRON ได้อัปเกรดฐานข้อมูลเป็นแบบที่ปรับแต่งเองทั้งหมด สิ่งหนึ่งที่สนองความต้องการของตัวเอง ดู 2.2.1 ที่เก็บข้อมูลบล็อคเชน สำหรับรายละเอียดเพิ่มเติม

รากเมิร์เคิล รากของ Merkle คือ hash ของ hashes ทั้งหมด ของธุรกรรมทั้งหมดที่รวมเป็นส่วนหนึ่งของบล็อกใน blockchain เครือข่าย ดู 3.1 หลักฐานการเดิมพันที่ได้รับมอบหมาย (DPoS) สำหรับรายละเอียดเพิ่มเติม 2 https://en.wikipedia.org/wiki/GRPC

TRON development roadmap phase 2 timeline from July 2018 to 2019

เครือข่ายทดสอบสาธารณะ (Shasta) เวอร์ชันของเครือข่ายที่ทำงานในการกำหนดค่าโหนดเดียว นักพัฒนาสามารถเชื่อมต่อและทดสอบได้ คุณสมบัติโดยไม่ต้องกังวลกับการสูญเสียทางเศรษฐกิจ Testnet tokens ไม่มีค่าและใครๆ ก็สามารถทำได้ ขอเพิ่มเติมจาก faucet สาธารณะ

อาร์พีซี
3 ในการคำนวณแบบกระจาย การเรียกขั้นตอนระยะไกล (RPC) คือเมื่อโปรแกรมคอมพิวเตอร์ทำให้เกิด ขั้นตอน (รูทีนย่อย) เพื่อดำเนินการในพื้นที่ที่อยู่อื่น (โดยทั่วไปบนคอมพิวเตอร์เครื่องอื่นที่เปิดอยู่ เครือข่ายที่ใช้ร่วมกัน) ซึ่งถูกเข้ารหัสราวกับว่าเป็นการเรียกโพรซีเดอร์ปกติ (ในเครื่อง) โดยไม่มี โปรแกรมเมอร์เข้ารหัสรายละเอียดสำหรับการโต้ตอบระยะไกลอย่างชัดเจน

ความสามารถในการขยายขนาด ความสามารถในการปรับขนาดเป็นคุณลักษณะของโปรโตคอล TRON เป็นความสามารถของระบบ เครือข่าย หรือกระบวนการในการ รับมือกับปริมาณงานที่เพิ่มขึ้นหรือศักยภาพที่จะขยายเพื่อรองรับการเติบโตนั้น

อาทิตย์ SUN แทนที่ drop เป็นหน่วยที่เล็กที่สุดของ TRX 1 TRX = 1,000,000 อาทิตย์

ปริมาณงาน ปริมาณงานสูงเป็นคุณลักษณะของ TRON Mainnet มีหน่วยวัดเป็นธุรกรรมต่อวินาที (TPS) คือความสามารถในการทำธุรกรรมสูงสุดในหนึ่งวินาที

การประทับเวลา เวลาโดยประมาณของการผลิตบล็อกจะถูกบันทึกเป็นการประทับเวลา Unix ซึ่งเป็นจำนวน มิลลิวินาทีที่ผ่านไปตั้งแต่ 00:00:00 01 มกราคม 1970 UTC

ทีเคซี การกำหนดค่าโทเค็น

ทีอาร์ซี-10 มาตรฐานของ crypto token บนแพลตฟอร์ม TRON จำเป็นต้องปฏิบัติตามกฎและอินเทอร์เฟซบางอย่าง เมื่อถือข้อเสนอเหรียญเริ่มต้นใน TRON blockchain

TRX TRX ย่อมาจาก Tronix ซึ่งเป็นสกุลเงินดิจิทัลอย่างเป็นทางการของ TRON

3 https://en.wikipedia.org/wiki/Remote_procedure_call

Architecture

Architecture

TRON adopts a 3-layer architecture divided into Storage Layer, Core Layer, and Application Layer. The TRON protocol adheres to Google Protobuf, which intrinsically supports multi-language extension.

TRON three-layer architecture diagram showing Application Layer Core Layer and Storage Layer

Figure 1: TRON 3-layer Architecture

2.1 Core

There are several modules in the core layer, including smart contracts, account management, and consensus. A stack-based virtual machine is implemented on TRON and an optimized instruction set is used. In order to better support DApp developers, Solidity was chosen as the smart contract 4 language, followed by future support of other advanced languages. In addition, TRON's consensus mechanism is based on Delegated Proof of Stake (DPoS) and many innovations were made in order to meet its unique requirements. 2.2 Storage

TRON designed a unique distributed storage protocol consisting of Block Storage and State Storage. The notion of a graph database was introduced into the design of the storage layer to better meet the need for diversified data storage in the real world. 2.2.1 Blockchain Storage

TRON blockchain storage chooses to use LevelDB, which is developed by Google and proven successful with many companies and projects. It has high performance and supports arbitrary byte arrays as both keys and values, singular get, put and delete, batched put and delete, bi-directional iterators, and simple compression using the very fast Snappy algorithm. 2.2.2 State Storage

TRON has a KhaosDB in the full-node memory that can store all the newly forked chains generated within a certain period of time and supports witnesses to switch from their own active chain swiftly into a new main chain. It can also protect blockchain storage by making it more stable from being terminating abnormally in an intermediate state. 2.3 Application

Developers can create a diverse range of DApps and customized wallets on TRON. Since TRON enables smart contracts to be deployed and executed, the opportunities of utility applications are unlimited. 4 Solidity official documentation: https://solidity.readthedocs.io/

2.4 Protocol

TRON protocol adheres to Google Protocol Buffers , which is a language-neutral, platform-neutral, 5 and extensible way of serializing structured data for use in communications protocols, data storage, and more. 2.4.1 Protocol Buffers

Protocol Buffers (Protobuf) is a flexible, efficient, automated mechanism for serializing structured data, similar to JSON or XML, but much smaller, faster and simpler.

Protobuf (.proto) definitions can be used to generate code for C++, Java, C#, Python, Ruby, Golang, and Objective-C languages through the official code generators. Various third-party implementations are also available for many other languages. Protobuf eases development for clients by unifying the API definitions and also optimizing data transfers. Clients can take the API .proto from TRON’s protocol repository and integrate through the automatically-generated code libraries.

As a comparison, Protocol Buffers is 3 to 10 times smaller and 20 to 100 times faster than XML, with less ambiguous syntax. Protobuf generates data access classes that are easier to use programmatically. 2.4.2 HTTP

TRON Protocol provides a RESTful HTTP API alternative to the Protobuf API. They share the same interface but the HTTP API can be readily used in javascript clients. 2.5 TRON Virtual Machine (TVM)

The TVM is a lightweight, Turing complete virtual machine developed for TRON’s ecosystem. The TVM connects seamlessly with the existing development ecosystem to provide millions of global developers with a custom-built blockchain system that is efficient, convenient, stable, secure, and scalable.
2.6 Decentralized Exchange (DEX)

5 Google Protocol Buffers official documentation: https://developers.google.com/protocol-buffers/

The TRON network natively supports decentralized exchange functions. A decentralized exchange consists of multiple trading pairs. A trading pair (notation “Exchange”) is an Exchange Market between TRC-10 tokens, or between a TRC-10 token and TRX. Any account can create a trading pair between any tokens, even if the same pair already exists on the TRON network. Trading and price fluctuations of the trading pairs follow the Bancor Protocol . The TRON network stipulates that 6 the weights of the two tokens in all trading pairs are equal, so the ratio of their balances is the price between them. For example, consider a trading pair containing two tokens, ABC and DEF. ABC has a balance of 10 million and DEF has a balance of 1 million. Since their weights are equal, 10 ABC = 1 DEF. This means that the ratio of ABC to DEF is 10 ABC per DEF. 2.7 Implementation

The TRON blockchain code is implemented in Java and was originally a fork from EthereumJ.

6 Bancor Protocol official website: https://about.bancor.network/protocol/

สถาปัตยกรรมระบบ

TRON ใช้สถาปัตยกรรม 3 เลเยอร์ซึ่งแบ่งออกเป็น Storage Layer, Core Layer และ Application Layer โปรโตคอล TRON เป็นไปตาม Google Protobuf ซึ่งสนับสนุนหลายภาษาอย่างแท้จริง ส่วนขยาย

TRON three-layer architecture diagram showing Application Layer Core Layer and Storage Layer

รูปที่ 1: TRON สถาปัตยกรรม 3 ชั้น

2.1 แกน

มีหลายโมดูลในเลเยอร์หลัก รวมถึง smart contracts การจัดการบัญชี และ ฉันทามติ เครื่องเสมือนแบบสแต็กถูกใช้งานบน TRON และคำสั่งที่ปรับให้เหมาะสม มีการใช้ชุด เพื่อสนับสนุนนักพัฒนา DApp ได้ดียิ่งขึ้น Solidity ได้รับเลือกให้เป็น smart contract 4 ตามมาด้วยการสนับสนุนภาษาขั้นสูงอื่นๆ ในอนาคต นอกจากนี้ ฉันทามติของ TRON กลไกจะขึ้นอยู่กับ Delegated Proof of Stake (DPoS) และมีการสร้างนวัตกรรมมากมายใน เพื่อให้เป็นไปตามข้อกำหนดเฉพาะของมัน 2.2 การจัดเก็บ

TRON ออกแบบโปรโตคอลการจัดเก็บข้อมูลแบบกระจายที่ไม่ซ้ำใคร ซึ่งประกอบด้วย Block Storage และ State ที่เก็บของ แนวคิดของฐานข้อมูลกราฟถูกนำมาใช้ในการออกแบบชั้นจัดเก็บข้อมูลเพื่อ ตอบสนองความต้องการการจัดเก็บข้อมูลที่หลากหลายในโลกแห่งความเป็นจริงได้ดีขึ้น 2.2.1 ที่เก็บข้อมูลบล็อคเชน

TRON blockchain พื้นที่เก็บข้อมูลเลือกใช้ LevelDB ซึ่งพัฒนาโดย Google และผ่านการพิสูจน์แล้ว ประสบความสำเร็จกับบริษัทและโครงการมากมาย มีประสิทธิภาพสูงและรองรับไบต์โดยพลการ อาร์เรย์เป็นทั้งคีย์และค่า รับเอกพจน์ ใส่และลบ ใส่และลบเป็นกลุ่ม สองทิศทาง ตัววนซ้ำและการบีบอัดอย่างง่ายโดยใช้อัลกอริธึม Snappy ที่รวดเร็วมาก 2.2.2 การจัดเก็บของรัฐ

TRON มี KhaosDB ในหน่วยความจำโหนดเต็มที่สามารถจัดเก็บโซ่ที่แยกใหม่ทั้งหมดที่สร้างขึ้น ภายในระยะเวลาที่กำหนดและสนับสนุนให้พยานเปลี่ยนจากห่วงโซ่ที่ใช้งานของตนเองได้อย่างรวดเร็ว เข้าสู่ห่วงโซ่หลักใหม่ นอกจากนี้ยังสามารถปกป้องที่เก็บข้อมูล blockchain โดยการทำให้มันมีเสถียรภาพมากขึ้นจากการเป็น ยุติอย่างผิดปกติในสภาวะระหว่างกลาง 2.3 การสมัคร

นักพัฒนาสามารถสร้าง DApps ที่หลากหลายและกระเป๋าเงินแบบกำหนดเองได้บน TRON ตั้งแต่ TRON เปิดใช้งาน smart contracts เพื่อปรับใช้และดำเนินการ โอกาสของแอปพลิเคชันยูทิลิตี้คือ ไม่จำกัด 4 เอกสารอย่างเป็นทางการของ Solidity: https://solidity.readthedocs.io/

2.4 พิธีสาร

TRON โปรโตคอลเป็นไปตาม Google Protocol Buffers ซึ่งเป็นภาษาที่เป็นกลาง แพลตฟอร์มที่เป็นกลาง 5 และวิธีที่ขยายได้ของซีเรียลไลซ์ข้อมูลที่มีโครงสร้างเพื่อใช้ในโปรโตคอลการสื่อสาร การจัดเก็บข้อมูล และอีกมากมาย 2.4.1 บัฟเฟอร์โปรโตคอล

Protocol Buffers (Protobuf) เป็นกลไกอัตโนมัติที่ยืดหยุ่น มีประสิทธิภาพ สำหรับการจัดโครงสร้างอนุกรม ข้อมูลคล้ายกับ JSON หรือ XML แต่มีขนาดเล็กกว่า เร็วกว่า และง่ายกว่ามาก

คำจำกัดความ Protobuf (.proto) สามารถใช้เพื่อสร้างโค้ดสำหรับ C++, Java, C#, Python, Ruby, ภาษา Golang และ Objective-C ผ่านตัวสร้างโค้ดอย่างเป็นทางการ บุคคลที่สามต่างๆ การใช้งานยังมีให้บริการในภาษาอื่นอีกมากมาย Protobuf ช่วยให้การพัฒนาง่ายขึ้น ลูกค้าโดยการรวมคำจำกัดความ API และเพิ่มประสิทธิภาพการถ่ายโอนข้อมูล ลูกค้าสามารถรับ API ได้ .proto จากที่เก็บโปรโตคอลของ TRON และบูรณาการผ่านโค้ดที่สร้างขึ้นโดยอัตโนมัติ ห้องสมุด

จากการเปรียบเทียบ Protocol Buffers มีขนาดเล็กกว่า 3 ถึง 10 เท่าและเร็วกว่า XML 20 ถึง 100 เท่า ด้วยไวยากรณ์ที่ไม่ชัดเจนน้อยกว่า Protobuf สร้างคลาสการเข้าถึงข้อมูลที่ใช้งานง่ายกว่า โดยทางโปรแกรม 2.4.2 HTTP

TRON โปรโตคอลให้ทางเลือก RESTful HTTP API แทน Protobuf API พวกเขาแบ่งปันเหมือนกัน อินเทอร์เฟซ แต่ HTTP API สามารถใช้งานได้ทันทีในไคลเอนต์จาวาสคริปต์ 2.5 TRON เครื่องเสมือน (TVM)

TVM เป็นเครื่องเสมือนทัวริงที่สมบูรณ์แบบน้ำหนักเบาที่พัฒนาขึ้นสำหรับระบบนิเวศของ TRON ที่ TVM เชื่อมโยงอย่างราบรื่นกับระบบนิเวศการพัฒนาที่มีอยู่เพื่อให้บริการผู้คนนับล้านทั่วโลก นักพัฒนาซอฟต์แวร์ที่มีระบบ blockchain ที่สร้างขึ้นเองซึ่งมีประสิทธิภาพ สะดวก มีเสถียรภาพ ปลอดภัย และ ปรับขนาดได้
2.6 การแลกเปลี่ยนแบบกระจายอำนาจ (DEX)

5 เอกสารอย่างเป็นทางการของ Google Protocol Buffers: https://developers.google.com/protocol-buffers/เครือข่าย TRON รองรับฟังก์ชันการแลกเปลี่ยนแบบกระจายอำนาจโดยกำเนิด การแลกเปลี่ยนแบบกระจายอำนาจ ประกอบด้วยคู่การซื้อขายหลายคู่ คู่การซื้อขาย (สัญลักษณ์ “การแลกเปลี่ยน”) คือตลาดแลกเปลี่ยน ระหว่าง TRC-10 tokens หรือระหว่าง TRC-10 token และ TRX บัญชีใดก็ได้สามารถสร้างการซื้อขายได้ จับคู่ระหว่าง tokens ใด ๆ แม้ว่าจะมีคู่เดียวกันอยู่แล้วบนเครือข่าย TRON ก็ตาม การค้าขายและ ความผันผวนของราคาของคู่การซื้อขายเป็นไปตามพิธีสาร Bancor เครือข่าย TRON กำหนดไว้เช่นนั้น 6 น้ำหนักของ token สองคู่ในคู่การซื้อขายทั้งหมดเท่ากัน ดังนั้นอัตราส่วนของยอดคงเหลือคือราคา ระหว่างพวกเขา ตัวอย่างเช่น พิจารณาคู่การซื้อขายที่มี tokens สองรายการ ได้แก่ ABC และ DEF เอบีซีก็มี ยอดคงเหลือ 10 ล้าน และ DEF มียอด 1 ล้าน เนื่องจากน้ำหนักเท่ากัน 10 ABC = 1 การป้องกัน ซึ่งหมายความว่าอัตราส่วนของ ABC ต่อ DEF คือ 10 ABC ต่อ DEF 2.7 การนำไปปฏิบัติ

รหัส TRON blockchain ถูกนำมาใช้ใน Java และเดิมทีเป็นทางแยกจาก EthereumJ

6 เว็บไซต์อย่างเป็นทางการของพิธีสาร Bancor: https://about.bancor.network/protocol/

Consensus

Consensus

3.1 Delegated Proof of Stake (DPoS)

The earliest consensus mechanism is the Proof of Work (PoW) consensus mechanism. This protocol is currently implemented in Bitcoin and Ethereum . In PoW systems, transactions 7 8 broadcast through the network are grouped together into nascent blocks for miner confirmation. The confirmation process involves hashing transactions using cryptographic hashing algorithms until a merkle root has been reached, creating a merkle tree:

Figure 2: 8 TRX transactions are hashed into the merkle root. This merkle root is then included in the block header, which is attached to the previously confirmed blocks to form a blockchain. This allows for easy and transparent tracking of transactions, timestamps, and other related information.

7 Bitcoin whitepaper: https://bitcoin.org/bitcoin.pdf 8 Ethereum whitepaper: https://github.com/ethereum/wiki/wiki/White-Paper

Cryptographic hashing algorithms are useful in network attack prevention because they possess several properties :
9

● Input/Output length size​ - The algorithm can pass in an input of any length in size, and outputs a fixed length hash value.
● Efficiency​ - The algorithm is relatively easy and fast to compute.
● Preimage resistance​ - For a given output ​z​, it is impossible to find any input ​x​ such that h(x) =​ ​z​. In other words, the hashing algorithm ​h(x)​ is a one-way function in which only the output can be found, given an input. The reverse is not possible.
● Collision resistance​ - It is computationally infeasible to find any pairs \(x_1 \neq x_2\) such that \(h(x_1) = h(x_2)\). In other words, the probability of finding two different inputs hashing to the same output is extremely low. This property also implies ​second preimage resistance​.
● Second preimage resistance​ - Given ​x​1​, and thus ​h(x​1​)​, it is computationally infeasible to find any ​x​2​ such that ​h(x​1​) = h(x​2​)​. While this property is similar to ​collision resistance​, the property differs in that it is saying an attacker with a given ​x​1​ will find it computationally infeasible to find any ​x​2​ hashing to the same output.
● Deterministic​ - maps each input to one and only one output. ● Avalanche effect​ - a small change in the input results in an entirely different output.

These properties give the cryptocurrency network its intrinsic value by ensuring attacks do not compromise the network. When miners confirm a block, they are rewarded tokens as a built-in incentive for network participation. However, as the global cryptocurrency market capitalization steadily increased, the miners became centralized and focused their computing resources on hoarding tokens as assets, rather than for network participation purposes. CPU miners gave way to GPUs, which in turn gave way to powerful ASICs. In one notable study, the total power consumption of Bitcoin mining has been estimated to be as high as 3 GW , comparable to Ireland’s 10 power consumption. This same study projected total power consumption to reach 8 GW in the near future.

To solve the energy waste issue, the Proof of Stake (PoS) consensus mechanism was proposed by many new networks. In PoS networks, token holders lock their token balances to become block validators. The validators take turns proposing and voting on the next block. However, the problem with standard PoS is that validator influence correlates directly to the amount of tokens locked up. This results in parties hoarding large amounts of the network’s base currency wielding undue influence in the network ecosystem.

The TRON consensus mechanism uses an innovative Delegated Proof of Stake system in which 27 Super Representatives (SRs) produce blocks for the network. Every 6 hours, TRX account holders who freeze their accounts can vote for a selection of SR candidates, with the top 27 candidates deemed the SRs. Voters may choose SRs based on criteria such as projects sponsored by SRs to 9 PAAR, C., PELZL, J., ​Understanding Cryptography: A Textbook for Students and Practitioners​, 2010 ed. Springer-Verlag Berlin Heidelberg, 2010.
10 https://www.sciencedirect.com/science/article/pii/S2542435118301776

increase TRX adoption, and rewards distributed to voters. This allows for a more democratized and decentralized ecosystem. SRs’ accounts are normal accounts, but their accumulation of votes allows them to produce blocks. With the low throughput rates of Bitcoin and Ethereum due to their PoW consensus mechanism and scalability issues, TRON’s DPoS system offers an innovative mechanism resulting in 2000 TPS compared to Bitcoin’s 3 TPS and Ethereum’s 15 TPS.

The TRON protocol network generates one block every three seconds, with each block awarding 32 TRX to Super Representatives. A total of 336,384,000 TRX will be awarded annually to the 27 SRs. Each time an SR finishes block production, rewards are sent to a sub-account in the super-ledger. SRs can check, but not directly make use of these TRX tokens. A withdrawal can be made by each SR once every 24 hours, transferring the rewards from the sub-account to the specified SR account.

The three types of nodes on the TRON network are Witness Node, Full Node, and Solidity Node. Witness nodes are set up by SRs and are mainly responsible for block production and proposal creation/voting. Full nodes provide APIs and broadcast transactions and blocks. Solidity nodes sync blocks from other Full Nodes and also provide indexable APIs.

ฉันทามติ

3.1 หลักฐานการเดิมพันที่ได้รับมอบหมาย (DPoS)

กลไกฉันทามติแรกสุดคือกลไกฉันทามติ Proof of Work (PoW) นี้ ปัจจุบันมีการใช้โปรโตคอลใน Bitcoin และ Ethereum ในระบบ PoW ธุรกรรม 7 8 การออกอากาศผ่านเครือข่ายจะถูกจัดกลุ่มเข้าด้วยกันเป็นบล็อกใหม่เพื่อยืนยันการขุด ที่ กระบวนการยืนยันเกี่ยวข้องกับธุรกรรม hashing โดยใช้อัลกอริธึมการเข้ารหัส hashing จนกระทั่ง ถึงราก Merkle แล้ว ทำให้เกิดต้นไม้ Merkle:

รูปที่ 2: ธุรกรรม 8 TRX ถูก hashed เข้าสู่ Merkle Root ราก Merkle นี้จะถูกรวมไว้ในส่วนหัวของบล็อกซึ่ง ถูกแนบไปกับบล็อกที่ยืนยันก่อนหน้านี้เพื่อสร้าง blockchain ช่วยให้สามารถติดตามได้ง่ายและโปร่งใส ธุรกรรม การประทับเวลา และข้อมูลอื่นๆ ที่เกี่ยวข้อง

7 Bitcoin เอกสารไวท์เปเปอร์: https://bitcoin.org/bitcoin.pdf 8 Ethereum เอกสารไวท์เปเปอร์: https://github.com/ethereum/wiki/wiki/White-Paper

อัลกอริธึมการเข้ารหัส hashing มีประโยชน์ในการป้องกันการโจมตีเครือข่ายเนื่องจากมี คุณสมบัติหลายประการ:
9

● ขนาดความยาวอินพุต/เอาต์พุต​ - อัลกอริธึมสามารถส่งผ่านอินพุตขนาดความยาวเท่าใดก็ได้ และ ส่งออกค่า hash ที่มีความยาวคงที่
● ประสิทธิภาพ​ - อัลกอริธึมค่อนข้างง่ายและรวดเร็วในการคำนวณ
● ความต้านทานพรีอิมเมจ​ - สำหรับเอาท์พุตที่กำหนด ​z​ เป็นไปไม่ได้ที่จะหาอินพุต x เช่นนั้น ชั่วโมง(x) =​ ​z​ กล่าวอีกนัยหนึ่ง hashing อัลกอริธึม ​h(x)​ เป็นฟังก์ชันทางเดียวซึ่งมีเพียงฟังก์ชันทางเดียวเท่านั้น สามารถค้นหาเอาต์พุตได้โดยระบุอินพุต ย้อนกลับเป็นไปไม่ได้
● ความต้านทานการชน​ - การคำนวณเป็นไปไม่ได้ที่จะหาคู่ใดๆ ​x​1 ​≠ x​2​ ​โดยที่ ​h(x​1​) = ชม(x​2​)​. กล่าวอีกนัยหนึ่ง ความน่าจะเป็นในการค้นหาอินพุตที่แตกต่างกันสองรายการ hashing เหมือนกัน เอาต์พุตต่ำมาก คุณสมบัตินี้ยังหมายถึงความต้านทานของพรีอิมเมจที่สองด้วย
● ความต้านทานพรีอิมเมจที่สอง - เมื่อให้ x​1​ และด้วยเหตุนี้ ​h(x​1​)​ จึงเป็นไปไม่ได้โดยการคำนวณ จงหา x​2​ ใดๆ ที่ทำให้ h(x​1​) = h(x​2​)​ แม้ว่าคุณสมบัตินี้จะคล้ายกับ 'ความต้านทานการชน' แต่ คุณสมบัติแตกต่างตรงที่บอกว่าผู้โจมตีที่ได้รับ x​1​ จะค้นหามันโดยการคำนวณ เป็นไปไม่ได้ที่จะค้นหา ​x​2​ hashing ใด ๆ ไปยังเอาต์พุตเดียวกัน
● กำหนด - แมปแต่ละอินพุตกับเอาต์พุตเดียวเท่านั้น ● Avalanche effect​ - การเปลี่ยนแปลงเล็กน้อยในอินพุตส่งผลให้เอาต์พุตแตกต่างไปจากเดิมอย่างสิ้นเชิง

คุณสมบัติเหล่านี้ทำให้เครือข่ายสกุลเงินดิจิทัลมีมูลค่าที่แท้จริงโดยทำให้แน่ใจว่าการโจมตีจะไม่เกิดขึ้น ประนีประนอมเครือข่าย เมื่อนักขุดยืนยันบล็อก พวกเขาได้รับรางวัล tokens เป็นบล็อกในตัว แรงจูงใจในการเข้าร่วมเครือข่าย อย่างไรก็ตาม เนื่องจากมูลค่าตลาดของสกุลเงินดิจิทัลทั่วโลก เพิ่มขึ้นอย่างต่อเนื่อง นักขุดกลายเป็นศูนย์กลางและมุ่งเน้นไปที่ทรัพยากรคอมพิวเตอร์ของพวกเขา การกักตุน tokens เป็นทรัพย์สิน แทนที่จะสะสมไว้เพื่อวัตถุประสงค์ในการเข้าร่วมเครือข่าย นักขุดซีพียูหลีกทางให้ GPU ซึ่งทำให้ ASIC ทรงพลังกลับมา ในการศึกษาที่โดดเด่นเรื่องหนึ่งคือพลังทั้งหมด ปริมาณการใช้ Bitcoin การขุดคาดว่าจะสูงถึง 3 GW เทียบได้กับของไอร์แลนด์ 10 การใช้พลังงาน การศึกษาเดียวกันนี้คาดการณ์ว่าการใช้พลังงานทั้งหมดจะสูงถึง 8 GW ในเร็วๆ นี้ อนาคต

เพื่อแก้ไขปัญหาขยะพลังงาน กลไกฉันทามติ Proof of Stake (PoS) ได้รับการเสนอโดย เครือข่ายใหม่มากมาย ในเครือข่าย PoS ผู้ถือ token ล็อคยอดคงเหลือ token ของตนเพื่อให้กลายเป็นบล็อก validatorส. validators ผลัดกันเสนอและลงคะแนนในบล็อกถัดไป อย่างไรก็ตามปัญหา ด้วย PoS มาตรฐานคืออิทธิพลของ validator มีความสัมพันธ์โดยตรงกับจำนวน tokens ที่ถูกล็อค ส่งผลให้ฝ่ายต่างๆ กักตุนสกุลเงินหลักของเครือข่ายจำนวนมากจนเกินควร อิทธิพลในระบบนิเวศเครือข่าย

กลไกฉันทามติ TRON ใช้ระบบ Delegated Proof of Stake ที่เป็นนวัตกรรมใหม่ ซึ่ง 27 ผู้แทนระดับสูง (SR) ผลิตบล็อกสำหรับเครือข่าย ทุก 6 ชั่วโมง ผู้ถือบัญชี TRX ผู้ระงับบัญชีของตนสามารถลงคะแนนให้ผู้สมัคร SR ที่เลือกได้ โดยมีผู้สมัคร 27 อันดับแรก ถือว่า ส.ส. ผู้ลงคะแนนอาจเลือก SR ตามเกณฑ์ เช่น โครงการที่ได้รับการสนับสนุนจาก SR 9 PAAR, C., PELZL, J., ​ทำความเข้าใจการเข้ารหัส: หนังสือเรียนสำหรับนักเรียนและผู้ปฏิบัติงาน, 2010 ed. สปริงเกอร์-แวร์ลัก เบอร์ลิน ไฮเดลเบิร์ก, 2010.
10 https://www.sciencedirect.com/science/article/pii/S2542435118301776เพิ่มการยอมรับ TRX และรางวัลจะแจกจ่ายให้กับผู้มีสิทธิเลือกตั้ง ซึ่งจะช่วยให้เกิดความเป็นประชาธิปไตยมากขึ้นและ ระบบนิเวศกระจายอำนาจ บัญชีของ SR เป็นบัญชีปกติแต่เป็นการสะสมคะแนนเสียง ทำให้พวกเขาสามารถสร้างบล็อกได้ ด้วยอัตราปริมาณงานต่ำที่ Bitcoin และ Ethereum เนื่องจาก กลไกฉันทามติ PoW และปัญหาความสามารถในการปรับขนาด ระบบ DPoS ของ TRON นำเสนอนวัตกรรมใหม่ กลไกที่ส่งผลให้ปี 2000 TPS เปรียบเทียบกับ Bitcoin's 3 TPS และ Ethereum's 15 TPS

เครือข่ายโปรโตคอล TRON สร้างหนึ่งบล็อกทุกๆ สามวินาที โดยแต่ละบล็อกจะให้รางวัล 32 TRX ถึงตัวแทนระดับสูง จะมีการมอบ TRX รวม 336,384,000 TRX เป็นประจำทุกปีให้กับ SR 27 รายการ แต่ละครั้งที่ SR เสร็จสิ้นการผลิตบล็อก รางวัลจะถูกส่งไปยังบัญชีย่อยในบัญชีแยกประเภทขั้นสูง SR สามารถตรวจสอบได้ แต่ไม่สามารถใช้ TRX tokens เหล่านี้ได้โดยตรง การถอนเงินสามารถทำได้โดยแต่ละคน SR หนึ่งครั้งทุกๆ 24 ชั่วโมง โดยโอนรางวัลจากบัญชีย่อยไปยัง SR ที่ระบุ บัญชี

โหนดสามประเภทบนเครือข่าย TRON ได้แก่ Witness Node, Full Node และ Solidity Node โหนดพยานได้รับการจัดตั้งขึ้นโดย SR และมีหน้าที่หลักในการผลิตบล็อกและข้อเสนอ การสร้าง/การลงคะแนนเสียง โหนดแบบเต็มมี API และธุรกรรมและบล็อกการออกอากาศ การซิงค์โหนด Solidity บล็อกจากโหนดเต็มอื่นๆ และยังมี API ที่สามารถจัดทำดัชนีได้

Account

Account

4.1 Types

The three types of accounts in the TRON network are regular accounts, token accounts, and contract accounts.

1. Regular accounts are used for standard transactions.
2. Token accounts are used for storing TRC-10 tokens.
3. Contract accounts are smart contract accounts created by regular accounts and can be triggered by regular accounts as well. 4.2 Creation

There are three ways to create a TRON account:

1. Create a new account through API 2. Transfer TRX into a new account address 3. Transfer any TRC-10 token into a new account address

An offline key-pair consisting of an address (public key) and a private key, and not recorded by the TRON network, can also be generated. The user address generation algorithm consists of generating a key-pair and then extracting the public key (64-byte byte array representing x, y coordinates). Hash the public key using the SHA3-256 function (the SHA3 protocol adopted is KECCAK-256) and extract the last 20 bytes of the result. Add 41 to the beginning of the byte array and ensure the initial address length is 21 bytes. Hash the address twice using SHA3-256 function and take the first 4 bytes as verification code. Add the verification code to the end of the initial address and obtain the address in base58check format through base58 encoding. An encoded Mainnet address begins with T and is 34 bytes in length. 4.3 Structure

The three different account types are Normal, AssetIssue, and Contract. An Account contains 7 parameters:

1. account_name​: the name for this account – e.g. BillsAccount.
2. type​: what type of this account is – e.g. 0 (stands for type ‘Normal’).
3. balance​: balance of this account – e.g. 4213312.

4. vote​: received votes on this account – e.g. {(“0x1b7w…9xj3”,323), (“0x8djq…j12m”,88),…,(“0x82nd…mx6i”,10001)}.
5. asset​: other assets expected TRX in this account – e.g. {<“WishToken”, 66666>, <”Dogie”, 233>}. 6. latest_operation_time​: the latest operation time of this account.

Protobuf data structure: message​ ​Account​ {
​message​ ​Vote​ {

​bytes​ vote_address = ​1​;

​int64​ vote_count = ​2​;

} ​bytes​ accout_name = ​1​;
AccountType type = ​2​;
​bytes​ address = ​3​;
​int64​ balance = ​4​;
​repeated​ Vote votes = ​5​;
map<​string​, ​int64​> asset = ​6​; ​int64​ latest_operation_time = ​10​; }

enum​ ​AccountType​ {
Normal = ​0​;
AssetIssue = ​1​;
Contract = ​2​; }

บัญชี

4.1 ประเภท

บัญชีสามประเภทในเครือข่าย TRON คือบัญชีปกติ บัญชี token และ บัญชีสัญญา

1. บัญชีปกติใช้สำหรับธุรกรรมมาตรฐาน
2. บัญชีโทเค็นใช้สำหรับจัดเก็บ TRC-10 tokens
3. บัญชีสัญญาคือ smart contract บัญชีที่สร้างขึ้นโดยบัญชีปกติและสามารถเป็นได้ กระตุ้นโดยบัญชีปกติเช่นกัน 4.2 การสร้าง

มีสามวิธีในการสร้างบัญชี TRON:

1. สร้างบัญชีใหม่ผ่าน API 2. โอน TRX ไปยังที่อยู่บัญชีใหม่ 3. โอน TRC-10 token ใด ๆ ไปยังที่อยู่บัญชีใหม่

คู่คีย์ออฟไลน์ที่ประกอบด้วยที่อยู่ (คีย์สาธารณะ) และคีย์ส่วนตัว และไม่ได้บันทึกโดย เครือข่าย TRON ก็สามารถสร้างได้เช่นกัน อัลกอริธึมการสร้างที่อยู่ผู้ใช้ประกอบด้วย สร้างคู่คีย์แล้วแยกคีย์สาธารณะ (อาร์เรย์ไบต์ 64 ไบต์แทน x, y พิกัด) แฮชคีย์สาธารณะโดยใช้ฟังก์ชัน SHA3-256 (โปรโตคอล SHA3 ที่นำมาใช้คือ KECCAK-256) และแยกผลลัพธ์ 20 ไบต์สุดท้าย เพิ่ม 41 ที่จุดเริ่มต้นของอาร์เรย์ไบต์ และตรวจสอบให้แน่ใจว่าความยาวที่อยู่เริ่มต้นคือ 21 ไบต์ แฮชที่อยู่สองครั้งโดยใช้ฟังก์ชัน SHA3-256 และใช้ 4 ไบต์แรกเป็นรหัสยืนยัน เพิ่มรหัสยืนยันที่ส่วนท้ายของอักษรย่อ ที่อยู่และรับที่อยู่ในรูปแบบ base58check ผ่านการเข้ารหัส base58 มีการเข้ารหัส ที่อยู่ Mainnet เริ่มต้นด้วย T และมีความยาว 34 ไบต์ 4.3 โครงสร้าง

บัญชีสามประเภทที่แตกต่างกัน ได้แก่ Normal, AssetIssue และ Contract บัญชีประกอบด้วย 7 พารามิเตอร์:

1. account_name​: ชื่อของบัญชีนี้ – เช่น บัญชีบิล.
2. type​ : บัญชีนี้เป็นประเภทใด – เช่น 0 (ย่อมาจากประเภท 'ปกติ')
3. balance​: ยอดคงเหลือของบัญชีนี้ – เช่น 4213312.

Protobuf data structure: message​ ​Account​ {
​message​ ​Vote​ {

​bytes​ vote_address = ​1​;

​int64​ vote_count = ​2​;

} ​bytes​ accout_name = ​1​;
AccountType type = ​2​;
​bytes​ address = ​3​;
​int64​ balance = ​4​;
​repeated​ Vote votes = ​5​;
map<​string​, ​int64​> asset = ​6​; ​int64​ latest_operation_time = ​10​; }

enum​ ​AccountType​ {
Normal = ​0​;
AssetIssue = ​1​;
Contract = ​2​; }

Block

Block

A block typically contains a block header and several transactions.

Protobuf data structure: message​ ​Block​ {
BlockHeader block_header = ​1​; ​repeated​ Transaction transactions = ​2​; } 5.1 Block Header

A block header contains ​raw_data​, ​witness_signature​, and ​blockID​.

Protobuf data structure: message​ ​BlockHeader​ {
​message​ ​raw​ {

​int64​ timestamp = ​1​;

​bytes​ txTrieRoot = ​2​; 
​bytes​ parentHash = ​3​;

​uint64​ number = ​4​;  
​uint64​ version = ​5​;

​bytes​ witness_address = ​6​;

} ​bytes​ witness_signature = ​2​; ​bytes​ blockID = ​3​;
} 5.1.1 Raw Data

Raw data is denoted as ​raw_data​ in Protobuf. It contains the raw data of a message, containing 6 parameters:

1. timestamp​: timestamp of this message – e.g. 1543884429000. 2. txTrieRoot​: the Merkle Tree’s Root – e.g. 7dacsa…3ed. 3. parentHash​: the hash of the last block – e.g. 7dacsa…3ed. 4. number​: the block height – e.g. 4638708. 5. version​: reserved – e​.g. 5.

Block header and Merkle tree structure showing how TRX transactions are hashed into the Merkle root

6. witness_address​: the address of the witness packed in this block – e.g. 41928c...4d21. 5.1.2 Witness Signature

Witness signature is denoted as ​witness_signature​ in Protobuf, which is the signature for this block header from the witness node. 5.1.3 Block ID

Block ID is denoted as ​blockID​ in Protobuf. It contains the atomic identification of a block. A Block ID contains 2 parameters: 1. hash​: the hash of block. 2. number​: the hash and height of the block. 5.2 Transaction 5.2.1 Signing

TRON’s transaction signing process follows a standard ECDSA cryptographic algorithm, with a SECP256K1 selection curve. A private key is a random number, and the public key is a point on the elliptic curve. The public key generation process consists of first generating a random number as a private key, and then multiplying the base point of the elliptic curve by the private key to obtain the public key. When a transaction occurs, the transaction raw data is first converted into byte format. The raw data then undergoes SHA-256 hashing. The private key corresponding to the contract address then signs the result of the SHA256 hash. The signature result is then added to the transaction.
5.2.2 Bandwidth Model

Ordinary transactions only consume bandwidth points, but smart contract operations consume both energy and bandwidth points. There are two types of bandwidth points available. Users can gain bandwidth points from freezing TRX, while 5000 free bandwidth points are also available daily.

When a TRX transaction is broadcast, it is transmitted and stored in the form of a byte array over the network. Bandwidth Points consumed by one transaction = number of transaction bytes multiplied by bandwidth points rate. For example, if the byte array length of a transaction is 200, then the transaction consumes 200 bandwidth points. However, if a TRX or token transfer results in the target account being created, then only the bandwidth points consumed to create the account will be deducted, and additional bandwidth points will not be deducted. In an account creation scenario, the network will first consume the bandwidth points that the transaction initiator gained

from freezing TRX. If this amount is insufficient, then the network consumes the transaction initiator’s TRX.

In standard TRX transfer scenarios from one TRX account to another, the network first consumes the bandwidth points gained by the transaction initiator for freezing TRX. If that is insufficient, it then consumes from the free 5000 daily bandwidth points. If that is still not enough, then the network consumes the TRX of the transaction initiator. The amount is calculated by the number of bytes in the transaction multiplied by 10 SUN. Thus, for most TRX holders who may not necessarily freeze their TRX to participate in SR voting, the first step is automatically skipped (since TRX balance frozen = 0) and the 5000 daily free bandwidth powers the transaction.

For TRC-10 token transfers, the network first verifies whether the total free bandwidth points of the issued token asset are sufficient. If not, the bandwidth points obtained from freezing TRX are consumed. If there is still not enough bandwidth points, then it consumes the TRX of the transaction initiator.

5.2.3 Fee

TRON network generally does not charge fees for most transactions, however, due to system restrictions and fairness, bandwidth usage and transactions do take in certain fees.

Fee charges are broken down into the following categories: 1. Normal transactions cost bandwidth points. Users can use the free daily bandwidth points (5000) or freeze TRX to obtain more. When bandwidth points are not enough, TRX will be used directly from the sending account. The TRX needed is the number of bytes * 10 SUN. 2. Smart contracts cost energy (Section 6) but will also need bandwidth points for the transaction to be broadcasted and confirmed. The bandwidth cost is the same as above. 3. All query transactions are free. It doesn’t cost energy or bandwidth.

TRON network also defines a set of fixed fees for the following transactions: 1. Creating a witness node: 9999 TRX 2. Issuing a TRC-10 token: 1024 TRX 3. Creating a new account: 0.1 TRX 4. Creating an exchange pair: 1024 TRX 5.2.4 Transaction as Proof of Stake (TaPoS)

TRON uses TaPoS to ensure the transactions all confirm the main blockchain, while making it difficult to forge counterfeit chains. In TaPoS, the networks require each transaction include part of the hash of a recent block header. This requirement prevents transactions from being replayed on forks not including the referenced block, and also signals the network that a particular user and their

stake are on a specific fork. This consensus mechanism protects the network against Denial of Service, 51%, selfish mining, and double spend attacks.
5.2.5 Transaction Confirmation

A transaction is included in a future block after being broadcast to the network. After 19 blocks are mined on TRON (including its own block), the transaction is confirmed. Each block is produced by one of the top 27 Super Representatives in a round robin fashion. Each block takes ~3 seconds to be mined on the blockchain. Time may slightly vary for each Super Representative due to network conditions and machine configurations. In general, a transaction is considered fully confirmed after ~1 minute. 5.2.6 Structure

Transaction APIs consist of the following functions: message​ ​Transaction​ { ​message​ ​Contract​ { ​enum​ ​ContractType​ { AccountCreateContract = ​0​; // Create account/wallet TransferContract = ​1​; // Transfer TRX TransferAssetContract = ​2​; // Transfer TRC10 token VoteWitnessContract = ​4​; // Vote for Super Representative (SR) WitnessCreateContract = ​5​; // Create a new SR account AssetIssueContract = ​6​; // Create a new TRC10 token WitnessUpdateContract = ​8​; // Update SR information ParticipateAssetIssueContract = ​9​; // Purchase TRC10 token AccountUpdateContract = ​10​; // Update account/wallet information FreezeBalanceContract = ​11​; // Freeze TRX for bandwidth or energy UnfreezeBalanceContract = ​12​; // Unfreeze TRX WithdrawBalanceContract = ​13​; // Withdraw SR rewards, once per day UnfreezeAssetContract = ​14​; // Unfreeze TRC10 token UpdateAssetContract = ​15​; // Update a TRC10 token’s information ProposalCreateContract = ​16​; // Create a new network proposal by any SR ProposalApproveContract = ​17​; // SR votes yes for a network proposal ProposalDeleteContract = ​18​; // Delete a network proposal by owner CreateSmartContract = ​30​; // Deploy a new smart contract TriggerSmartContract = ​31​; // Call a function on a smart contract GetContract = ​32​; // Get an existing smart contract UpdateSettingContract = ​33​; // Update a smart contract’s parameters ExchangeCreateContract = ​41​; // Create a token trading pair on DEX ExchangeInjectContract = ​42​; // Inject funding into a trading pair

ExchangeWithdrawContract = ​43​; // Withdraw funding from a trading pair ExchangeTransactionContract = ​44​; // Perform token trading UpdateEnergyLimitContract = ​45​; // Update origin_energy_limit on a smart contract } } }

บล็อก

โดยทั่วไปบล็อกจะมีส่วนหัวของบล็อกและธุรกรรมหลายรายการ

Protobuf data structure: message​ ​Block​ {
BlockHeader block_header = ​1​; ​repeated​ Transaction transactions = ​2​; } 5.1 ส่วนหัวของบล็อก

ส่วนหัวของบล็อกประกอบด้วย ​raw_data​, ​witness_signature​ และ ​blockID​

Protobuf data structure: message​ ​BlockHeader​ {
​message​ ​raw​ {

​int64​ timestamp = ​1​;

​bytes​ txTrieRoot = ​2​; 
​bytes​ parentHash = ​3​;

​uint64​ number = ​4​;  
​uint64​ version = ​5​;

​bytes​ witness_address = ​6​;

} ​bytes​ witness_signature = ​2​; ​bytes​ blockID = ​3​;
} 5.1.1 ข้อมูลดิบ

ข้อมูลดิบจะแสดงเป็น ​raw_data​ ใน Protobuf ประกอบด้วยข้อมูลดิบของข้อความ ประกอบด้วย 6 พารามิเตอร์:

1. timestamp​: การประทับเวลาของข้อความนี้ – เช่น 1543884429000. 2. txTrieRoot​: รากของ Merkle Tree – เช่น 7แดคซา…3ed. 3. parentHash​: hash ของบล็อกสุดท้าย – เช่น 7แดคซา…3ed. 4. number​: ความสูงของบล็อก – เช่น 4638708. 5. เวอร์ชัน​ : สงวนไว้ – เช่น​.ก. 5.

Block header and Merkle tree structure showing how TRX transactions are hashed into the Merkle root

6. พยาน_ที่อยู่: ที่อยู่ของพยานที่อยู่ในบล็อกนี้ – เช่น 41928c...4d21. 5.1.2 ลายเซ็นพยาน

ลายเซ็นพยานแสดงเป็น ​witness_signature​ ใน Protobuf ซึ่งเป็นลายเซ็นสำหรับสิ่งนี้ ส่วนหัวบล็อกจากโหนดพยาน 5.1.3 รหัสบล็อก

Block ID จะแสดงเป็น ​blockID​ ใน Protobuf มันมีการระบุอะตอมของบล็อก บล็อก ID มี 2 พารามิเตอร์: 1. hash​ : hash ของบล็อก 2. number​ : hash และความสูงของบล็อก 5.2 การทำธุรกรรม 5.2.1 การลงนาม

TRON กระบวนการลงนามธุรกรรมของ __ เป็นไปตามอัลกอริธึมการเข้ารหัส ECDSA มาตรฐาน โดยมี เส้นโค้งการเลือก SECP256K1 คีย์ส่วนตัวคือตัวเลขสุ่ม และคีย์สาธารณะคือจุดบน เส้นโค้งรูปไข่ กระบวนการสร้างคีย์สาธารณะประกอบด้วยการสร้างตัวเลขสุ่มเป็น a ก่อน คีย์ส่วนตัวแล้วคูณจุดฐานของเส้นโค้งรูปไข่ด้วยคีย์ส่วนตัวเพื่อให้ได้ กุญแจสาธารณะ เมื่อธุรกรรมเกิดขึ้น ข้อมูลดิบของธุรกรรมจะถูกแปลงเป็นรูปแบบไบต์ก่อน ข้อมูลดิบจะผ่าน SHA-256 hashing รหัสส่วนตัวที่สอดคล้องกับสัญญา ที่อยู่ จากนั้นลงนามผลลัพธ์ของ SHA256 hash จากนั้นผลลายเซ็นจะถูกเพิ่มลงใน การทำธุรกรรม
5.2.2 โมเดลแบนด์วิธ

ธุรกรรมทั่วไปใช้เฉพาะจุดแบนด์วิธเท่านั้น แต่การดำเนินการ smart contract ใช้ทั้งสองจุด จุดพลังงานและแบนด์วิธ มีจุดแบนด์วิธให้เลือกสองประเภท ผู้ใช้สามารถรับได้ จุดแบนด์วิธจากการแช่แข็ง TRX ในขณะที่จุดแบนด์วิธฟรี 5,000 จุดก็มีให้บริการทุกวัน

เมื่อมีการออกอากาศธุรกรรม TRX มันจะถูกส่งและจัดเก็บในรูปแบบของอาร์เรย์ไบต์ เครือข่าย คะแนนแบนด์วิธที่ใช้โดยหนึ่งธุรกรรม = จำนวนไบต์ของธุรกรรม คูณด้วยอัตราคะแนนแบนด์วิธ ตัวอย่างเช่น หากความยาวอาร์เรย์ไบต์ของธุรกรรมคือ 200 จากนั้นธุรกรรมจะใช้จุดแบนด์วิธ 200 จุด อย่างไรก็ตาม หากการโอน TRX หรือ token ส่งผลให้ บัญชีเป้าหมายที่กำลังสร้าง จากนั้นใช้เฉพาะจุดแบนด์วิธที่ใช้ในการสร้างบัญชี จะถูกหักออก และคะแนนแบนด์วิธเพิ่มเติมจะไม่ถูกหักออก ในการสร้างบัญชี ในสถานการณ์สมมติ เครือข่ายจะใช้จุดแบนด์วิธที่ผู้ริเริ่มธุรกรรมได้รับก่อนจากการแช่แข็ง TRX หากจำนวนเงินนี้ไม่เพียงพอ เครือข่ายจะใช้ธุรกรรม TRX ของผู้ริเริ่ม

ในสถานการณ์การถ่ายโอน TRX มาตรฐานจากบัญชี TRX หนึ่งไปยังอีกบัญชีหนึ่ง เครือข่ายจะใช้ก่อน จุดแบนด์วิธที่ได้รับจากตัวเริ่มต้นธุรกรรมสำหรับการแช่แข็ง TRX ถ้านั่นไม่เพียงพอก็แล้วไป ใช้จากจุดแบนด์วิธฟรี 5,000 รายวัน หากยังไม่เพียงพอก็ต่อเครือข่าย ใช้ TRX ของตัวเริ่มต้นธุรกรรม จำนวนเงินจะคำนวณตามจำนวนไบต์ใน ธุรกรรมคูณด้วย 10 SUN ดังนั้น สำหรับผู้ถือ TRX ส่วนใหญ่ที่อาจไม่จำเป็นต้องหยุด TRX ของพวกเขาที่จะมีส่วนร่วมในการโหวต SR ขั้นตอนแรกจะถูกข้ามโดยอัตโนมัติ (ตั้งแต่ยอดคงเหลือ TRX แช่แข็ง = 0) และแบนด์วิดธ์ฟรี 5,000 ต่อวันขับเคลื่อนธุรกรรม

สำหรับการถ่ายโอน TRC-10 token เครือข่ายจะตรวจสอบก่อนว่าจุดแบนด์วิธว่างทั้งหมดของ ออกสินทรัพย์ token เพียงพอแล้ว ถ้าไม่เช่นนั้น จุดแบนด์วิธที่ได้จากการแช่แข็ง TRX จะเป็นดังนี้ บริโภค หากยังมีจุดแบนด์วิธไม่เพียงพอ จะใช้ TRX ของธุรกรรม ผู้ริเริ่ม

5.2.3 ค่าธรรมเนียม

โดยทั่วไปเครือข่าย TRON จะไม่เรียกเก็บค่าธรรมเนียมสำหรับธุรกรรมส่วนใหญ่ อย่างไรก็ตาม เนื่องจากระบบ ข้อจำกัดและความเป็นธรรม การใช้แบนด์วิธ และการทำธุรกรรมมีค่าธรรมเนียมบางอย่าง

ค่าธรรมเนียมจะแบ่งออกเป็นประเภทต่างๆ ดังต่อไปนี้: 1. ธุรกรรมปกติจะมีค่าใช้จ่ายจุดแบนด์วิธ ผู้ใช้สามารถใช้จุดแบนด์วิธรายวันฟรี (5,000) หรือตรึง TRX เพื่อรับเพิ่ม เมื่อจุดแบนด์วิธไม่เพียงพอ TRX ก็จะเป็นเช่นนั้น ใช้โดยตรงจากบัญชีผู้ส่ง TRX ที่ต้องการคือจำนวนไบต์ * 10 SUN 2. สัญญาอัจฉริยะมีค่าใช้จ่ายพลังงาน (ส่วนที่ 6) แต่ยังต้องมีจุดแบนด์วิธสำหรับ ธุรกรรมที่จะออกอากาศและยืนยัน ค่าใช้จ่ายแบนด์วิดท์จะเหมือนกับข้างต้น 3. ธุรกรรมการค้นหาทั้งหมดนั้นฟรี ไม่มีค่าใช้จ่ายด้านพลังงานหรือแบนด์วิธ

TRON เครือข่ายยังกำหนดชุดค่าธรรมเนียมคงที่สำหรับธุรกรรมต่อไปนี้: 1. การสร้างโหนดพยาน: 9999 TRX 2. การออก TRC-10 token: 1024 TRX 3. การสร้างบัญชีใหม่: 0.1 TRX 4. การสร้างคู่แลกเปลี่ยน: 1024 TRX 5.2.4 การทำธุรกรรมเป็นหลักฐานการเดิมพัน (TaPoS)

TRON ใช้ TaPoS เพื่อให้แน่ใจว่าธุรกรรมทั้งหมดจะยืนยัน blockchain หลักในขณะที่ดำเนินการ ยากที่จะปลอมแปลงโซ่ปลอม ใน TaPoS เครือข่ายต้องการให้แต่ละธุรกรรมรวมส่วนหนึ่งของ hash ของส่วนหัวของบล็อกล่าสุด ข้อกำหนดนี้ป้องกันไม่ให้ธุรกรรมถูกเล่นซ้ำ ทางแยกไม่รวมบล็อกที่อ้างอิง และยังส่งสัญญาณไปยังเครือข่ายที่ผู้ใช้รายใดรายหนึ่งและของพวกเขาเงินเดิมพันอยู่บนทางแยกเฉพาะ กลไกฉันทามตินี้ปกป้องเครือข่ายจากการปฏิเสธ บริการ 51% การขุดที่เห็นแก่ตัว และการโจมตีแบบใช้จ่ายสองเท่า
5.2.5 การยืนยันธุรกรรม

ธุรกรรมจะรวมอยู่ในบล็อกในอนาคตหลังจากออกอากาศไปยังเครือข่าย หลังจากครบ 19 บล็อคแล้ว ขุดบน TRON (รวมถึงบล็อกของตัวเอง) ธุรกรรมได้รับการยืนยันแล้ว แต่ละบล็อกผลิตโดย หนึ่งใน 27 สุดยอดผู้แทนราษฎรแบบพบกันหมด แต่ละบล็อกใช้เวลาประมาณ 3 วินาทีในการ ถูกขุดบน blockchain เวลาอาจแตกต่างกันเล็กน้อยสำหรับตัวแทนระดับสูงแต่ละคนเนื่องจากเครือข่าย เงื่อนไขและการกำหนดค่าเครื่อง โดยทั่วไปแล้วการทำธุรกรรมจะถือว่าได้รับการยืนยันโดยสมบูรณ์หลังจากนั้น ~1 นาที 5.2.6 โครงสร้าง

Transaction APIs consist of the following functions: message​ ​Transaction​ { ​message​ ​Contract​ { ​enum​ ​ContractType​ { AccountCreateContract = ​0​; // Create account/wallet TransferContract = ​1​; // Transfer TRX TransferAssetContract = ​2​; // Transfer TRC10 token VoteWitnessContract = ​4​; // Vote for Super Representative (SR) WitnessCreateContract = ​5​; // Create a new SR account AssetIssueContract = ​6​; // Create a new TRC10 token WitnessUpdateContract = ​8​; // Update SR information ParticipateAssetIssueContract = ​9​; // Purchase TRC10 token AccountUpdateContract = ​10​; // Update account/wallet information FreezeBalanceContract = ​11​; // Freeze TRX for bandwidth or energy UnfreezeBalanceContract = ​12​; // Unfreeze TRX WithdrawBalanceContract = ​13​; // Withdraw SR rewards, once per day UnfreezeAssetContract = ​14​; // Unfreeze TRC10 token UpdateAssetContract = ​15​; // Update a TRC10 token’s information ProposalCreateContract = ​16​; // Create a new network proposal by any SR ProposalApproveContract = ​17​; // SR votes yes for a network proposal ProposalDeleteContract = ​18​; // Delete a network proposal by owner CreateSmartContract = ​30​; // Deploy a new smart contract TriggerSmartContract = ​31​; // Call a function on a smart contract GetContract = ​32​; // Get an existing smart contract UpdateSettingContract = ​33​; // Update a smart contract’s parameters ExchangeCreateContract = ​41​; // Create a token trading pair on DEX ExchangeInjectContract = ​42​; // Inject funding into a trading pair

ExchangeWithdrawContract = ​43​; // Withdraw funding from a trading pair ExchangeTransactionContract = ​44​; // Perform token trading UpdateEnergyLimitContract = ​45​; // Update origin_energy_limit on a smart contract } } }

TRON Virtual Machine

TRON Virtual Machine

6.1 Introduction

TRON Virtual Machine (TVM) is a lightweight, Turing complete virtual machine developed for the TRON's ecosystem. Its goal is to provide a custom-built blockchain system that is efficient, convenient, stable, secure and scalable.

TVM initially forked from EVM and can connect seamlessly with the existing solidity smart contract 11 development ecosystem. Based on that, TVM additionally supports DPoS consensus.

TVM employs the concept of Energy. Different from the Gas mechanism on EVM, operations of transactions and smart contracts on TVM are free, with no TRX consumed. Technically, executable computation capacity on TVM is not restricted by total holding amount of tokens. 6.2 Workflow

The compiler first translates the Solidity smart contract into bytecode readable and executable on the TVM. The TVM then processes data through opcode, which is equivalent to operating the logic of a stack-based finite state machine. Finally, the TVM accesses blockchain data and invokes External Data Interface through the Interoperation layer. 11 EVM: Ethereum Virtual Machine (https://github.com/ethereum/ethereumj)

TVM workflow showing compiler translating Solidity smart contracts into bytecode for execution on the TRON Virtual Machine

Figure 3: TVM Workflow

6.3 Performance 6.3.1 Lightweight Architecture

TVM adopts a lightweight architecture with the aim of reducing resource consumption to guarantee system performance. 6.3.2 Robust

TRX transfers and smart contract execution cost bandwidth points only, instead of TRX, which exempts TRON from being attacked. Bandwidth consumption is predictable and static since each computational step cost is fixed. 6.3.3 High Compatibility

TVM is compatible with EVM and will be compatible with more mainstream VMs in the future. Thereby, all smart contracts on EVM are executable on TVM. 6.3.4 Low Cost

Due to TVM’s bandwidth setup, development costs are reduced and developers can focus on the logic development of their contract code. TVM also offers all-in-one interfaces for contract deployment, triggering and viewing to offer the convenience for developers.

TRON เครื่องเสมือน

6.1 บทนำ

TRON Virtual Machine (TVM) เป็นเครื่องเสมือนทัวริงที่สมบูรณ์แบบน้ำหนักเบาที่พัฒนาขึ้นสำหรับ ระบบนิเวศของ TRON เป้าหมายคือการจัดหาระบบ blockchain ที่สร้างขึ้นเองซึ่งมีประสิทธิภาพ สะดวก มั่นคง ปลอดภัย และปรับขนาดได้

TVM เริ่มแรกแยกจาก EVM และสามารถเชื่อมต่อกับความแข็งแกร่งที่มีอยู่ smart contract ได้อย่างราบรื่น 11 ระบบนิเวศการพัฒนา ด้วยเหตุนี้ TVM จึงสนับสนุน DPoS ฉันทามติเพิ่มเติม

TVM ใช้แนวคิดเรื่องพลังงาน แตกต่างจากกลไกของแก๊สใน EVM การทำงานของ ธุรกรรมและ smart contracts บน TVM นั้นฟรี โดยไม่ต้องใช้ TRX ในทางเทคนิคแล้วสามารถเรียกใช้งานได้ ความสามารถในการคำนวณบน TVM ไม่ได้ถูกจำกัดด้วยจำนวนการถือครองทั้งหมด tokens 6.2 ขั้นตอนการทำงาน

คอมไพเลอร์จะแปล Solidity smart contract เป็น bytecode ที่สามารถอ่านและเรียกใช้งานได้บน ทีวีเอ็ม จากนั้น TVM จะประมวลผลข้อมูลผ่าน opcode ซึ่งเทียบเท่ากับการใช้งานลอจิก ของเครื่องสถานะจำกัดแบบสแต็ก สุดท้าย TVM เข้าถึงข้อมูล blockchain และเรียกใช้ อินเทอร์เฟซข้อมูลภายนอกผ่านเลเยอร์ Interoperation 11 EVM: Ethereum เครื่องเสมือน (https://github.com/ethereum/ethereumj)

TVM workflow showing compiler translating Solidity smart contracts into bytecode for execution on the TRON Virtual Machine

รูปที่ 3: ขั้นตอนการทำงานของ TVM

6.3 ประสิทธิภาพ 6.3.1 สถาปัตยกรรมน้ำหนักเบา

TVM ใช้สถาปัตยกรรมน้ำหนักเบาโดยมีจุดประสงค์เพื่อลดการใช้ทรัพยากรเพื่อรับประกัน ประสิทธิภาพของระบบ 6.3.2 แข็งแกร่ง

TRX ถ่ายโอนและ smart contract จุดแบนด์วิดธ์ค่าใช้จ่ายในการดำเนินการเท่านั้น แทนที่จะเป็น TRX ซึ่ง ยกเว้น TRON จากการถูกโจมตี ปริมาณการใช้แบนด์วิธสามารถคาดเดาได้และคงที่ตั้งแต่แต่ละรายการ ต้นทุนขั้นตอนการคำนวณได้รับการแก้ไขแล้ว 6.3.3 ความเข้ากันได้สูง

TVM เข้ากันได้กับ EVM และจะเข้ากันได้กับ VM หลักอื่นๆ ในอนาคต ด้วยเหตุนี้ smart contracts ทั้งหมดบน EVM จึงสามารถเรียกใช้งานได้บน TVM 6.3.4 ต้นทุนต่ำ

เนื่องจากการตั้งค่าแบนด์วิธของ TVM ต้นทุนการพัฒนาจึงลดลง และนักพัฒนาสามารถมุ่งเน้นไปที่ การพัฒนาตรรกะของรหัสสัญญา TVM ยังมีอินเทอร์เฟซแบบครบวงจรสำหรับสัญญาอีกด้วย การปรับใช้ การทริกเกอร์ และการดูเพื่อมอบความสะดวกสบายให้กับนักพัฒนา

Smart Contract

Smart Contract

7.1 Introduction

A smart contract is a protocol that digitally verifies contract negotiation. They define the rules and penalties related to an agreement and also automatically enforce those obligations. The smart contract code facilitates, verifies, and enforces the negotiation or performance of an agreement or transaction. From a tokenization perspective, smart contracts also facilitate automatic funds transfers between participating parties should certain criteria be met.

TRON smart contracts are written in the Solidity language. Once written and tested, they can be compiled into bytecode, then deployed onto the TRON network for the TRON Virtual Machine. Once deployed, smart contracts can be queried via their contract addresses. The contract Application Binary Interface (ABI) shows the contract’s call functions and is used for interacting with the network. 7.2 Energy Model

The maximum energy limit for deploying and triggering a smart contract is a function of several variables:

● Dynamic energy from freezing 1 TRX is 50,000,000,000 (Total Energy Limit) / (Total Energy Weight) ● Energy limit is the daily account energy limit from freezing TRX ● Remaining daily account energy from freezing TRX is calculated as Energy Limit - Energy Used ● Fee limit in TRX is set in smart contract deploy/trigger call ● Remaining usable TRX in the account ● Energy per TRX if purchased directly (10 SUN = 1 Energy) = 100,000, SRs can vote on adjustment

There are two consumption scenarios to calculate for maximum energy limit for deployment and trigger. The logic can be expressed as follows:
const​ R = Dynamic Energy Limit const​ F = Daily account energy ​from​ freezing TRX const​ E = Remaining daily account energy ​from​ freezing TRX const​ L = Fee limit ​in​ TRX set ​in​ deploy/trigger call const​ T = Remaining usable TRX ​in​ account

const​ C = Energy per TRX ​if​ purchased directly

// Calculate M, defined as maximum energy limit for deployment/trigger of smart contract if​ F > LR let​ M = min(E+TC, LR) else let​ M = E+TC 7.3 Deployment

When a TRON solidity smart contract is compiled, the TRON Virtual Machine reads the compiled bytecode. The bytecode consists of a section for code deployment, contract code, and the Auxdata. The Auxdata is the source code’s cryptographic fingerprint, used for verification. The deployment bytecode runs the constructor function and sets up the initial storage variables. The deployment code also calculates the contract code and returns it to the TVM. The ABI is a JSON file that describes a TRON smart contract’s functions. This file defines the function names, their payability, the function return values, and their state mutability. 7.4 Trigger Function

Once the TRON smart contracts are deployed, their functions can be triggered individually either via TronStudio or through API calls. State-changing functions require Energy while read-only functions execute without Energy. 7.5 TRON Solidity

TRON Solidity is a fork from Ethereum’s Solidity language. TRON modifies the original project to support TRX and SUN units (1 TRX = 1,000,000 SUN). The rest of the language syntax is compatible with Solidity ^0.4.24. Thus the Tron Virtual Machine (TVM) is almost 100% compatible with EVM instructions.

สัญญาอัจฉริยะ

7.1 บทนำ

smart contract เป็นโปรโตคอลที่ตรวจสอบการเจรจาสัญญาแบบดิจิทัล พวกเขากำหนดกฎเกณฑ์และ บทลงโทษที่เกี่ยวข้องกับข้อตกลงและบังคับใช้ข้อผูกพันเหล่านั้นโดยอัตโนมัติ ผู้ฉลาด รหัสสัญญาอำนวยความสะดวก ตรวจสอบ และบังคับใช้การเจรจาหรือการปฏิบัติตามข้อตกลงหรือ การทำธุรกรรม จากมุมมองของ tokenization smart contracts ยังอำนวยความสะดวกในการให้เงินอัตโนมัติ การโอนระหว่างบุคคลที่เข้าร่วมควรเป็นไปตามเกณฑ์ที่กำหนด

TRON smart contracts เขียนด้วยภาษา Solidity เมื่อเขียนและทดสอบแล้วก็สามารถเป็นได้ คอมไพล์เป็น bytecode จากนั้นปรับใช้บนเครือข่าย TRON สำหรับ TRON Virtual Machine ครั้งหนึ่ง เมื่อปรับใช้แล้ว smart contracts สามารถสอบถามผ่านที่อยู่สัญญาได้ การสมัครสัญญา Binary Interface (ABI) แสดงฟังก์ชันการโทรของสัญญาและใช้สำหรับโต้ตอบกับ เครือข่าย 7.2 แบบจำลองพลังงาน

ขีดจำกัดพลังงานสูงสุดสำหรับการปรับใช้และทริกเกอร์ smart contract เป็นฟังก์ชันของหลายฟังก์ชัน ตัวแปร:

● พลังงานไดนามิกจากการแช่แข็ง 1 TRX คือ 50,000,000,000 (ขีดจำกัดพลังงานรวม) / (พลังงานทั้งหมด น้ำหนัก) ● ขีดจำกัดพลังงานคือขีดจำกัดพลังงานในบัญชีรายวันจากการแช่แข็ง TRX ● พลังงานในบัญชีรายวันที่เหลืออยู่จากการแช่แข็ง TRX จะถูกคำนวณเป็นขีดจำกัดพลังงาน - พลังงาน ใช้แล้ว ● ขีดจำกัดค่าธรรมเนียมใน TRX ถูกตั้งค่าไว้ใน smart contract ปรับใช้/ทริกเกอร์การโทร ● TRX ที่ใช้งานได้คงเหลืออยู่ในบัญชี ● พลังงานต่อ TRX หากซื้อโดยตรง (10 SUN = 1 พลังงาน) = 100,000 SR สามารถลงคะแนนได้ การปรับตัว

มีสองสถานการณ์การใช้งานในการคำนวณขีดจำกัดพลังงานสูงสุดสำหรับการปรับใช้และ ทริกเกอร์ ตรรกะสามารถแสดงได้ดังนี้:
const​ R = Dynamic Energy Limit const​ F = Daily account energy ​from​ freezing TRX const​ E = Remaining daily account energy ​from​ freezing TRX const​ L = Fee limit ​in​ TRX set ​in​ deploy/trigger call const​ T = Remaining usable TRX ​in​ account

const​ C = Energy per TRX ​if​ purchased directly

// Calculate M, defined as maximum energy limit for deployment/trigger of smart contract if​ F > LR let​ M = min(E+TC, LR) else let​ M = E+TC 7.3 การปรับใช้

เมื่อคอมไพล์ TRON ความแข็งแกร่ง smart contract แล้ว TRON Virtual Machine จะอ่านคอมไพล์แล้ว ไบต์โค้ด bytecode ประกอบด้วยส่วนสำหรับการปรับใช้โค้ด รหัสสัญญา และ Auxdata Auxdata คือลายนิ้วมือเข้ารหัสของซอร์สโค้ด ซึ่งใช้สำหรับการตรวจสอบ การใช้งาน bytecode รันฟังก์ชัน Constructor และตั้งค่าตัวแปรหน่วยเก็บข้อมูลเริ่มต้น การใช้งาน รหัสยังคำนวณรหัสสัญญาและส่งกลับไปยัง TVM ABI เป็นไฟล์ JSON ที่ อธิบายฟังก์ชันของ TRON smart contract ไฟล์นี้กำหนดชื่อฟังก์ชัน ความสามารถในการชำระ ค่าส่งคืนฟังก์ชันและความไม่แน่นอนของสถานะ 7.4 ฟังก์ชั่นทริกเกอร์

เมื่อ TRON smart contracts ถูกปรับใช้ ฟังก์ชันของพวกมันจะถูกทริกเกอร์แยกกันผ่าน TronStudio หรือผ่านการเรียก API ฟังก์ชันการเปลี่ยนสถานะต้องใช้พลังงานในขณะที่ฟังก์ชันอ่านอย่างเดียว ดำเนินการโดยไม่มีพลังงาน 7.5 TRON ความแข็งแกร่ง

TRON Solidity มาจากภาษา Solidity ของ Ethereum TRON แก้ไขโครงการดั้งเดิมเป็น รองรับหน่วย TRX และ SUN (1 TRX = 1,000,000 SUN) ไวยากรณ์ภาษาที่เหลือคือ เข้ากันได้กับ Solidity ^0.4.24 ดังนั้น Tron Virtual Machine (TVM) จึงเข้ากันได้เกือบ 100% พร้อมคำแนะนำ EVM

Token

Token

8.1 TRC-10 Token

In the TRON network, each account can issue tokens at the expense of 1024 TRX. ​To issue tokens, the issuer needs to specify a token name, the total capitalization, the exchange rate to TRX, circulation duration, description, website, maximum bandwidth consumption per account, total bandwidth consumption, and the amount of token frozen. Each token issuance can also configure each account’s maximum daily token transfer Bandwidth Points, the entire network’s maximum daily token transfer Bandwidth Points, total token supply, locking duration in days, and the total amount of tokens locked. 8.2 TRC-20 Token

TRC-20 is a technical standard used for smart contracts implementing tokens supported by the TRON Virtual Machine. It is fully compatible with ERC-20.

The interface is as follows:
contract​ TRC20Interface { ​function​ ​totalSupply​() ​public​ ​constant​ ​returns​ (uint); ​function​ ​balanceOf​(address tokenOwner) ​public​ ​constant​ ​returns​ (uint balance); ​function​ ​allowance​(address tokenOwner, address spender) ​public​ ​constant returns​ (uint remaining); ​function​ ​transfer​(address to, uint tokens) ​public​ ​returns​ (bool success); ​function​ ​approve​(address spender, uint tokens) ​public​ ​returns​ (bool success); ​function​ ​transferFrom​(address from, address to, uint tokens) ​public returns​ (bool success);

​event​ ​Transfer​(address indexed from, address indexed to, uint tokens); 
​event​ ​Approval​(address indexed tokenOwner, address indexed spender, uint

tokens); }

From a developer’s perspective, there are several differences between TRC-10 and TRC-20. Some of the key differences are that TRC-10 tokens are accessible by APIs and smart contracts while TRC-20 tokens allow for interface customization but are only accessible within smart contracts.

From a cost perspective, TRC-10 tokens have transaction fees that are 1000 times lower than TRC-20, but carry bandwidth costs for API transfers and deposits. Transfers and deposits in smart contracts for TRC-10 tokens cost both bandwidth and energy.
8.3 Beyond

Since TRON uses the same Solidity version as Ethereum, more token standards could be readily ported to TRON.

โทเค็น

8.1 โทเค็น TRC-10

ในเครือข่าย TRON แต่ละบัญชีสามารถออก tokens ได้โดยมีค่าใช้จ่าย 1,024 TRX ​ในการออก tokens ผู้ออกต้องระบุชื่อ token, มูลค่ารวมทั้งหมด, อัตราแลกเปลี่ยนเป็น TRX, ระยะเวลาการหมุนเวียน คำอธิบาย เว็บไซต์ การใช้แบนด์วิธสูงสุดต่อบัญชี รวมทั้งหมด การใช้แบนด์วิธ และจำนวน token ที่ถูกแช่แข็ง token แต่ละฉบับสามารถกำหนดค่าได้เช่นกัน สูงสุดรายวันของแต่ละบัญชี token โอนคะแนนแบนด์วิธ สูงสุดรายวันของเครือข่ายทั้งหมด token โอนคะแนนแบนด์วิธ, การจัดหาทั้งหมด token, ระยะเวลาการล็อคเป็นวัน และจำนวนทั้งหมด ของ tokens ถูกล็อค 8.2 โทเค็น TRC-20

TRC-20 เป็นมาตรฐานทางเทคนิคที่ใช้สำหรับ smart contracts การใช้งาน tokens ที่สนับสนุนโดย TRON เครื่องเสมือน สามารถใช้งานร่วมกับ ERC-20 ได้อย่างสมบูรณ์

อินเทอร์เฟซมีดังนี้:
สัญญา TRC20อินเทอร์เฟซ { ​ฟังก์ชัน ​totalSupply() ​ผลตอบแทนคงที่สาธารณะ (uint); ฟังก์ชั่น balanceOf (ที่อยู่ token เจ้าของ) ผลตอบแทนสาธารณะคงที่ (uint สมดุล); ​ฟังก์ชัน​ ​เบี้ยเลี้ยง​(ที่อยู่ tokenเจ้าของ ที่อยู่ผู้ใช้จ่าย) ​สาธารณะ​ ​ค่าคงที่ ผลตอบแทน (ไม่เหลือ); ​ฟังก์ชั่น ​การถ่ายโอน (ที่อยู่ไปที่ uint tokens) ผลตอบแทนสาธารณะ (บูลสำเร็จ); ​ฟังก์ชั่น ​อนุมัติ (ที่อยู่ผู้ใช้บริการ, uint tokens) ผลตอบแทนสาธารณะ (บูล ความสำเร็จ); ​ฟังก์ชั่น ​transferFrom (ที่อยู่จาก, ที่อยู่ถึง, uint tokens) สาธารณะ ผลตอบแทน (ความสำเร็จของบูล);

เหตุการณ์ ​การโอน (ที่อยู่จัดทำดัชนีจาก, ที่อยู่จัดทำดัชนีถึง, uint tokens); 
เหตุการณ์ การอนุมัติ (ที่อยู่จัดทำดัชนี token เจ้าของ ที่อยู่ผู้ใช้จ่ายที่จัดทำดัชนี uint

tokens); }

จากมุมมองของนักพัฒนา TRC-10 และ TRC-20 มีความแตกต่างหลายประการ บ้าง ความแตกต่างที่สำคัญคือ TRC-10 tokens สามารถเข้าถึงได้โดย API และ smart contracts ในขณะที่ TRC-20 tokens อนุญาตให้ปรับแต่งอินเทอร์เฟซได้ แต่สามารถเข้าถึงได้ภายใน smart contracts เท่านั้น

จากมุมมองของต้นทุน TRC-10 tokens มีค่าธรรมเนียมการทำธุรกรรมที่ต่ำกว่า 1,000 เท่า TRC-20 แต่มีค่าใช้จ่ายแบนด์วิธสำหรับการโอนและการฝาก API การโอนและการฝากเงินในสมาร์ท สัญญาสำหรับ TRC-10 tokens มีค่าใช้จ่ายทั้งแบนด์วิดท์และพลังงาน
8.3 เกินกว่านั้น

เนื่องจาก TRON ใช้เวอร์ชัน Solidity เดียวกันกับ Ethereum ดังนั้น token มาตรฐานเพิ่มเติมจึงพร้อมใช้งาน ย้ายไปยัง TRON แล้ว

Governance

Governance

9.1 Super Representative 9.1.1 General

Every account in the TRON network can apply and have the opportunity to become a Super Representative (denoted as SR). Everyone can vote for SR candidates. The top 27 candidates with the most votes will become SRs with the right and obligation to generate blocks. The votes are counted every 6 hours and the SRs will change accordingly.

To prevent malicious attacks, there is a cost to becoming an SR candidate. When applying, 9999 TRX will be burned from the applicant’s account. Once successful, such account can join the SR election. 9.1.2 Election

TRON Power (denoted as TP) is needed to vote and the amount of TP depends on the voter’s frozen assets (TRX).

TP is calculated in the following way:
TP 1 TRX frozen to get bandwidth 1 =

Every account in the TRON network has the right to vote for their own SRs.

After the release (unfreeze, available after 3 days), users won't have any frozen assets and lose all TP accordingly. As a result, all votes become invalid for the ongoing and future voting round unless TRX is frozen again to vote.

Note that the TRON network only records the most recent vote, which means that every new vote will negate all previous votes. 9.1.3 Reward a. Vote Reward

Also known as Candidate Reward, which the top 127 candidates updated once every round (6 hours) will share 115,200 TRX as mined. The reward will be split in accordance with the vote weight each candidate receives. Each year, the total reward for candidates will be 168,192,000 TRX. Total vote reward per round Why 115,200 TRX every round? 15, 00 TRX total vote reward per round (V R/round) 1 2 =
V R/round = 16 T RX/block × 20 blocks/min × 60 mins/hr × 6 hrs/round Notice: this is set by WITNESS_STANDBY_ALLOWANCE = 115,200 TRX. See dynamic network parameters. Total vote reward per year Why 168,192,000 TRX every year? 168, 192, 000 T RX = total vote reward per year (V R/year) V R/year = 115, 200 T RX/round × 4 rounds/day × 365 days/year b. Block Reward Also known as Super Representative Reward, which the top 27 candidates (SRs) who are elected every round (6 hours) will share roughly 230,400 TRX as mined. The reward will be split evenly between the 27 SRs (minus the total reward blocks missed due to network error). A total of 336,384,000 TRX will be awarded annually to the 27 SRs. Total block reward per round Why 230,400 TRX every round? 230, 400 T RX = total block reward per round (BR/round) BR/round = 32 T RX/bloc × 20 blocks/min × 60 mins/hr × 6 hrs/round Notice: the unit block reward is set by WITNESS_PAY_PER_BLOCK = 32 TRX. See dynamic network parameters. Total block reward per year Why 336,384,000 TRX every year? 336, 384, 000 T RX = total block reward per year (BR/year) BR/year = 230, 400 T RX/round × 4 rounds/day × 365 days/year January 1, 2021 There will be no inflation on the TRON network before January 1, 2021, and the TRON DAO will award all block rewards and candidate rewards prior to that date. c. Reward Calculation

SR reward calculation otal reward vote reward (V R) block reward (BR) t =
+

R total V R V =
×
total votes votes SR candidate received
R

block missed 2 B =
27 total BR − × 3
Note: the reward is calculated per SR per round (6 hours)

Rank 28 to rank 127 SR candidate reward calculation otal reward vote reward (V R) t =

R total V R V =
×
total votes votes SR candidate received
Note: the reward is calculated per SR candidate per round (6 hours) 9.2 Committee 9.2.1 General

The committee is used to modify TRON dynamic network parameters, such as block generation rewards, transaction fees, etc. The committee consists of the 27 SRs in the current round. Each SR has the right to propose and vote on proposals. When a proposal receives 19 votes or more, it is approved and the new network parameters will be applied in the next maintenance period (3 days). 9.2.2 Dynamic Network Parameters 0. MAINTENANCE_TIME_INTERVAL a. Description
Modify the maintenance interval time in ms. Known as the SR vote interval time per round.
b. Example [6 * 3600 * 1000] ms - which is 6 hours. c. Range [3 * 27* 1000, 24 * 3600 * 1000] ms 1. ACCOUNT_UPGRADE_COST a. Description Modify the cost of applying for SR account. b. Example [9,999,000,000] SUN - which is 9,999 TRX. c. Range [0,100 000 000 000 000 000] SUN 2. CREATE_ACCOUNT_FEE a. Description Modify the account creation fee.

b. Example [100,000] SUN - which is 1 TRX. c. Range [0,100 000 000 000 000 000] SUN 3. TRANSACTION_FEE a. Description Modify the amount of fee used to gain extra bandwidth. b. Example [10] SUN/byte. c. Range [0,100 000 000 000 000 000] SUN/byte 4. ASSET_ISSUE_FEE a. Description Modify asset issuance fee. b. Example [1024,000,000] SUN - which is 1024 TRX. c. Range [0,100 000 000 000 000 000] SUN 5. WITNESS_PAY_PER_BLOCK a. Description Modify SR block generation reward. Known as unit block reward. b. Example [32,000,000] SUN - which is 32 TRX. c. Range [0,100 000 000 000 000 000] SUN 6. WITNESS_STANDBY_ALLOWANCE a. Description Modify the rewards given to the top 127 SR candidates. Known as total vote reward per round. b. Example [115,200,000,000] SUN - which is 115,200 TRX. c. Range [0,100 000 000 000 000 000] SUN 7. CREATE_NEW_ACCOUNT_FEE_IN_SYSTEM_CONTRACT a. Description Modify the cost of account creation. Combine dynamic network parameters #8 to get total account creation cost:
REATE_NEW_ACCOUNT_FEE_IN_SY STEM_CONTRACT REATE_NEW_ACCOUNT_BANDWIDTH_RATE
C × C

b. Example [0] SUN. c. Range [0,100 000 000 000 000 000] SUN 8. CREATE_NEW_ACCOUNT_BANDWIDTH_RATE

a. Description Modify the cost of account creation. Combine dynamic network parameters #7 to get total account creation cost:
REATE_NEW_ACCOUNT_FEE_IN_SY STEM_CONTRACT REATE_NEW_ACCOUNT_BANDWIDTH_RATE
C × C

b. Example [1]. c. Range [0,100,000,000,000,000,000] 9. ALLOW_CREATION_OF_CONTRACTS a. Description To turn on Tron Virtual Machine (TVM). b. Example True - set to activate and effect since 10/10/2018 23:47 UTC. c. Range True/False 10. REMOVE_THE_POWER_OF_THE_GR a. Description Remove the initial GR genesis votes b. Example True - effected at 11/4/2018 08:46 UTC. c. Range True/False - Notice: cannot set back to False from True. 11. ENERGY_FEE a. Description Modify the fee of 1 energy. b. Example 20 SUN. c. Range [0,100 000 000 000 000 000] SUN 12. EXCHANGE_CREATE_FEE a. Description Modify the cost of trading pair creation. Known as the cost of creating a trade order. b. Example [1,024,000,000] SUN - which is 1024 TRX. c. Range [0,100 000 000 000 000 000] SUN 13. MAX_CPU_TIME_OF_ONE_TX a. Description Modify the maximum execution time of one transaction. Known as the timeout limit of one transaction. b. Example 50 ms. c. Range

[0, 1000] ms 14. ALLOW_UPDATE_ACCOUNT_NAME a. Description Modify the option to let an account update their account name.
b. Example False - which is available to propose from java-tron Odyssey v3.2. c. Range True/False - Notice: cannot set back to False from True. 15. ALLOW_SAME_TOKEN_NAME a. Description Modify the validation of allowing different token have a duplicate name.
b. Example False - which is available to propose from java-tron Odyssey v3.2. c. Range True/False - Notice: cannot set back to False from True. 16. ALLOW_DELEGATE_RESOURCE a. Description Modify the validation of allowing to issue token with a duplicate name, so the tokenID​ of the token, in long integer data type, would be the only atomic identification of a token.
b. Example False - which is available to propose from java-tron Odyssey v3.2. c. Range True/False - Notice: cannot set back to False from True. 17. TOTAL_ENERGY_LIMIT a. Description Modify the whole network total energy limit. b. Example [50,000,000,000,000,000] SUN - which is 50,000,000,000 TRX. c. Range [0,100,000,000,000,000,000] SUN 18. ALLOW_TVM_TRANSFER_TRC10 a. Description Allow TRC-10 token transfer within smart contracts. ALLOW_UPDATE_ACCOUNT_NAME, ALLOW_SAME_TOKEN_NAME, ALLOW_DELEGATE_RESOURCE proposals must all be approved before proposing this parameter change.
b. Example False - which is available to propose from java-tron Odyssey v3.2. c. Range True/False - Notice: cannot set back to False from True.

9.2.3 Create Proposal

Only the SR accounts have the rights to propose a change in dynamic network parameters. 9.2.4 Vote Proposal

Only committee members (SRs) can vote for a proposal and the member who does not vote in time will be considered as a disagree. The proposal is active for 3 days after it is created. The vote can be changed or retrieved during the 3-days voting window. Once the period ends, the proposal will either succeed (19+ votes) or fail (and end). 9.2.5 Cancel Proposal

The proposer can cancel the proposal before it becomes effective. 9.3 Structure

SRs are the witnesses of newly generated blocks. A witness contains 8 parameters:
1. address​: the address of this witness – e.g. 0xu82h…7237.
2. voteCount​: number of received votes on this witness – e.g. 234234.
3. pubKey​: the public key for this witness – e.g. 0xu82h…7237.
4. url​: the url for this witness – e.g. https://www.noonetrust.com.
5. totalProduced​: the number of blocks this witness produced – e.g. 2434.
6. totalMissed​: the number of blocks this witness missed – e.g. 7.
7. latestBlockNum​: the latest height of block – e.g. 4522. 8. isjobs​: a boolean flag.

Protobuf data structure: message​ ​Witness​{
​bytes​ address = ​1​;
​int64​ voteCount = ​2​;
​bytes​ pubKey = ​3​;
​string​ url = ​4​;
​int64​ totalProduced = ​5​;
​int64​ totalMissed = ​6​;
​int64​ latestBlockNum = ​7​; ​bool​ isJobs = ​8​; }

  1. DApp Development 10.1 APIs

The TRON network offers a wide selection of over 60+ HTTP API gateways for interacting with the network via Full and Solidity Nodes. Additionally, TronWeb is a comprehensive JavaScript library containing API functions that enable developers to deploy smart contracts, change the blockchain state, query blockchain and contract information, trade on the DEX, and much more. These API gateways can be directed towards a local privatenet, the Shasta testnet, or the TRON Mainnet.

10.2 Networks

TRON has both a Shasta testnet as well as a Mainnet. Developers may connect to the networks by deploying nodes, interacting via TronStudio, or using APIs via the TronGrid service. The TronGrid service consists of load balanced node clusters hosted on AWS servers worldwide. As DApp development scales up and API call volumes increase, TronGrid successfully fields the increase in API traffic.
10.3 Tools

TRON offers a suite of development tools for enabling developers to create innovative DApps.
TronBox is a framework that allows developers to test and deploy smart contracts via the TronWeb API. TronGrid is a load balanced and hosted API service that allows developers to access the TRON network without having to run their own node. TronGrid offers access to both the Shasta testnet as well as the TRON Mainnet. TronStudio is a comprehensive Integrated Development Environment (IDE) that enables developers to compile, deploy, and debug their Solidity smart contracts. TronStudio contains an internal full node that creates a private local environment for smart contract testing prior to deployment. The TronWeb API library connects developers to the network via a wide selection of HTTP API calls wrapped in JavaScript.
10.4 Resources

The TRON Developer Hub is a comprehensive API documentation site tailored towards 12 developers wishing to build on the TRON network. The Developer Hub provides a high-level conceptual understanding of TRON and walks users through the details of interacting with the 12 Developer Hub: https://developers.tron.network/

network. The guides walk developers through node setup, deployment and interaction with smart contracts, API interaction and implementation, building sample DApps, and using each of the developer tools. Additionally, developer community channels are available through Discord .
13

13 Discord: https://discordapp.com/invite/GsRgsTD

  1. Conclusion

TRON is a scalable blockchain solution that has employed innovative methods for tackling challenges faced by legacy blockchain networks. Having reached over 2M transactions per day, with over 700K TRX accounts, and surpassing 2000 TPS, TRON has enabled the community in creating a decentralized and democratized network.

ธรรมาภิบาล

9.1 ตัวแทนระดับสูง 9.1.1 ทั่วไป

ทุกบัญชีในเครือข่าย TRON สามารถสมัครและมีโอกาสที่จะเป็น Super ตัวแทน (แสดงเป็น SR) ทุกคนสามารถลงคะแนนให้ผู้สมัคร SR ได้ ผู้สมัคร 27 อันดับแรกด้วย ผู้โหวตมากที่สุดจะกลายเป็น SR ที่มีสิทธิ์และหน้าที่ในการสร้างบล็อก คะแนนเสียงคือ นับทุกๆ 6 ชั่วโมง และ SR จะเปลี่ยนตามไปด้วย

เพื่อป้องกันการโจมตีที่เป็นอันตราย การสมัครเป็น SR มีค่าใช้จ่าย เมื่อสมัคร 9999 TRX จะถูกเผาจากบัญชีของผู้สมัคร เมื่อสำเร็จแล้ว บัญชีดังกล่าวจะสามารถเข้าร่วม SR ได้ การเลือกตั้ง 9.1.2 การเลือกตั้ง

TRON ต้องใช้อำนาจ (แสดงเป็น TP) ในการลงคะแนนเสียง และจำนวน TP ขึ้นอยู่กับผู้ลงคะแนนเสียง สินทรัพย์ที่ถูกแช่แข็ง (TRX)

TP คำนวณด้วยวิธีต่อไปนี้:
ทีพี 1 TRX ถูกแช่แข็งเพื่อรับแบนด์วิธ 1 =

ทุกบัญชีในเครือข่าย TRON มีสิทธิ์ลงคะแนนให้ SR ของตนเอง

หลังจากการเปิดตัว (เลิกระงับ และใช้งานได้หลังจาก 3 วัน) ผู้ใช้จะไม่มีเนื้อหาที่ถูกแช่แข็งและสูญเสียทั้งหมด ทีพี ตามนั้น ส่งผลให้การลงคะแนนเสียงทั้งหมดเป็นโมฆะสำหรับการลงคะแนนเสียงที่กำลังดำเนินอยู่และรอบต่อไป เว้นแต่ TRX ถูกระงับการลงคะแนนเสียงอีกครั้ง

โปรดทราบว่าเครือข่าย TRON จะบันทึกเฉพาะการโหวตล่าสุดเท่านั้น ซึ่งหมายความว่าทุกการโหวตใหม่ จะลบล้างคะแนนเสียงก่อนหน้านี้ทั้งหมด 9.1.3 รางวัล ก. โหวตรางวัล

เรียกอีกอย่างว่ารางวัลผู้สมัคร ซึ่งผู้สมัคร 127 อันดับแรกจะอัปเดตทุกๆ รอบ (6 ชั่วโมง) จะแบ่ง 115,200 TRX เมื่อขุดได้ รางวัลจะแบ่งตามน้ำหนักคะแนนโหวต ผู้สมัครแต่ละคนจะได้รับ ในแต่ละปี รางวัลรวมสำหรับผู้สมัครจะเท่ากับ 168,192,000 TRX รางวัลโหวตรวมต่อรอบ ทำไมต้อง 115,200 TRX ทุกรอบ? 15, 00 TRX รางวัลคะแนนโหวตรวมต่อรอบ (VR/รอบ) 1 2 =
VR/รอบ = 16 T RX/บล็อก × 20 บล็อค/นาที × 60 นาที/ชม × 6 ชม./รอบ หมายเหตุ: ค่านี้กำหนดโดย WITNESS_STANDBY_ALLOWANCE = 115,200 TRX ดูพารามิเตอร์เครือข่ายแบบไดนามิก รางวัลคะแนนเสียงทั้งหมดต่อปี ทำไมต้อง 168,192,000 TRX ทุกปี? 168, 192, 000 T RX = รางวัลคะแนนโหวตทั้งหมดต่อปี (V R/ปี) V R/ปี = 115, 200 T RX/รอบ × 4 รอบ/วัน × 365 วัน/ปี ข. รางวัลบล็อก หรือที่เรียกว่า Super Representative Reward ซึ่งผู้เข้าชิง 27 อันดับแรก (SRs) ที่ได้รับเลือก ทุกรอบ (6 ชั่วโมง) จะแบ่งประมาณ 230,400 TRX เมื่อขุดได้ รางวัลจะแบ่งเท่าๆ กัน ระหว่าง 27 SR (ลบบล็อกรางวัลทั้งหมดที่พลาดเนื่องจากข้อผิดพลาดของเครือข่าย) รวมของ 336,384,000 TRX จะมอบให้ทุกปีแก่ 27 SR รางวัลบล็อกทั้งหมดต่อรอบ ทำไมต้อง 230,400 TRX ทุกรอบ? 230, 400 T RX = รางวัลบล็อคทั้งหมดต่อรอบ (BR/รอบ) BR/รอบ = 32 T RX/bloc × 20 บล็อก/นาที × 60 นาที/ชม × 6 ชม./รอบ หมายเหตุ: รางวัลบล็อกหน่วยถูกกำหนดโดย WITNESS_PAY_PER_BLOCK = 32 TRX ดูเครือข่ายแบบไดนามิก พารามิเตอร์ รางวัลบล็อกทั้งหมดต่อปี ทำไมต้อง 336,384,000 TRX ทุกปี? 336, 384, 000 T RX = รางวัลบล็อกทั้งหมดต่อปี (BR/ปี) BR/ปี = 230, 400 T RX/รอบ × 4 รอบ/วัน × 365 วัน/ปี 1 มกราคม 2021 จะไม่มีอัตราเงินเฟ้อบนเครือข่าย TRON ก่อนวันที่ 1 มกราคม 2021 และ TRON DAO จะ มอบรางวัลบล็อกและรางวัลผู้สมัครทั้งหมดก่อนวันที่ดังกล่าว ค. การคำนวณรางวัล

การคำนวณรางวัล SR รางวัลทั้งหมด รางวัลการโหวต (VR) รางวัลบล็อก (BR) ที =
+

ร วี อาร์ ทั้งหมด วี =
×
คะแนนเสียงทั้งหมด คะแนนโหวต ผู้สมัคร SR ที่ได้รับ

บล็อกพลาด 2 บี =
27 รวม BR - × 3
หมายเหตุ: รางวัลจะคำนวณต่อ SR ต่อรอบ (6 ชั่วโมง)

อันดับที่ 28 ถึงอันดับที่ 127 การคำนวณรางวัลผู้สมัคร SR รางวัลทั้งหมด รางวัลการโหวต (VR) ที =

ร วี อาร์ ทั้งหมด วี =
×
คะแนนเสียงทั้งหมด คะแนนโหวต ผู้สมัคร SR ที่ได้รับ
หมายเหตุ: รางวัลจะคำนวณต่อผู้สมัคร SR ต่อรอบ (6 ชั่วโมง) 9.2 คณะกรรมการ 9.2.1 ทั่วไป

คณะกรรมการใช้เพื่อแก้ไขพารามิเตอร์เครือข่ายไดนามิก TRON เช่น การสร้างบล็อก รางวัล ค่าธรรมเนียมการทำธุรกรรม ฯลฯ คณะกรรมการประกอบด้วย SR 27 รายการในรอบปัจจุบัน เอสอาร์แต่ละคน มีสิทธิเสนอและลงคะแนนเสียงข้อเสนอได้ เมื่อข้อเสนอได้รับคะแนนเสียง 19 เสียงขึ้นไปก็คือ ได้รับการอนุมัติและพารามิเตอร์เครือข่ายใหม่จะถูกนำไปใช้ในช่วงการบำรุงรักษาครั้งถัดไป (3 วัน) 9.2.2 พารามิเตอร์เครือข่ายแบบไดนามิก 0. การบำรุงรักษา_TIME_INTERVAL ก. คำอธิบาย
แก้ไขช่วงเวลาการบำรุงรักษาเป็นมิลลิวินาที เรียกว่าช่วงเวลาการลงคะแนนเสียง SR ต่อ รอบ
ข. ตัวอย่าง [6 * 3600 * 1,000] ms - ซึ่งก็คือ 6 ชั่วโมง ค. พิสัย [3271,000, 2436001,000] มิลลิวินาที 1. ACCOUNT_UPGRADE_COST ก. คำอธิบาย ปรับเปลี่ยนค่าใช้จ่ายในการสมัครบัญชี SR ข. ตัวอย่าง [9,999,000,000] SUN - ซึ่งก็คือ 9,999 TRX ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 2. CREATE_ACCOUNT_FEE ก. คำอธิบาย แก้ไขค่าธรรมเนียมการสร้างบัญชีข. ตัวอย่าง [100,000] SUN - ซึ่งก็คือ 1 TRX ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 3. ธุรกรรม_ค่าธรรมเนียม ก. คำอธิบาย แก้ไขจำนวนค่าธรรมเนียมที่ใช้เพื่อเพิ่มแบนด์วิธเพิ่มเติม ข. ตัวอย่าง [10] อาทิตย์/ไบต์ ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์/ไบต์ 4. ASSET_ISSUE_FEE ก. คำอธิบาย ปรับเปลี่ยนค่าธรรมเนียมการออกสินทรัพย์ ข. ตัวอย่าง [1,024,000,000] SUN - ซึ่งก็คือ 1,024 TRX ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 5. WITNESS_PAY_PER_BLOCK ก. คำอธิบาย แก้ไขรางวัลการสร้างบล็อก SR รู้จักกันในชื่อรางวัลบล็อกหน่วย ข. ตัวอย่าง [32,000,000] อาทิตย์ - ซึ่งก็คือ 32 TRX ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 6. WITNESS_STANDBY_ALLOWANCE ก. คำอธิบาย ปรับเปลี่ยนรางวัลที่มอบให้กับผู้สมัคร SR 127 อันดับแรก เรียกว่ารางวัลการโหวตทั้งหมด ต่อรอบ ข. ตัวอย่าง [115,200,000,000] SUN - ซึ่งก็คือ 115,200 TRX ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 7. CREATE_NEW_ACCOUNT_FEE_IN_SYSTEM_CONTRACT ก. คำอธิบาย แก้ไขต้นทุนการสร้างบัญชี รวมพารามิเตอร์เครือข่ายไดนามิก #8 เพื่อรับ ต้นทุนการสร้างบัญชีทั้งหมด:
REATE_NEW_ACCOUNT_FEE_IN_SY STEM_CONTRACT REATE_NEW_ACCOUNT_BANDWIDTH_RATE
ค × ซี

ข. ตัวอย่าง [0] อาทิตย์ ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 8. CREATE_NEW_ACCOUNT_BANDWIDTH_RATE

ก. คำอธิบาย แก้ไขต้นทุนการสร้างบัญชี รวมพารามิเตอร์เครือข่ายแบบไดนามิก #7 เพื่อรับ ต้นทุนการสร้างบัญชีทั้งหมด:
REATE_NEW_ACCOUNT_FEE_IN_SY STEM_CONTRACT REATE_NEW_ACCOUNT_BANDWIDTH_RATE
ค × ซี

ข. ตัวอย่าง [1]. ค. พิสัย [0,100,000,000,000,000,000] 9. ALLOW_CREATION_OF_CONTRACTS ก. คำอธิบาย เพื่อเปิด Tron Virtual Machine (TVM) ข. ตัวอย่าง จริง - ตั้งค่าให้เปิดใช้งานและมีผลตั้งแต่ 10/10/2018 23:47 UTC ค. พิสัย จริง/เท็จ 10. REMOVE_THE_POWER_OF_THE_GR ก. คำอธิบาย ลบคะแนนการกำเนิด GR เริ่มต้น ข. ตัวอย่าง จริง - มีผลเมื่อ 4/11/2561 08:46 UTC ค. พิสัย จริง/เท็จ - หมายเหตุ: ไม่สามารถตั้งค่ากลับเป็นเท็จจากจริงได้ 11. พลังงาน_ค่าธรรมเนียม ก. คำอธิบาย แก้ไขค่าธรรมเนียม 1 พลังงาน ข. ตัวอย่าง 20 อาทิตย์ ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 12. EXCHANGE_CREATE_FEE ก. คำอธิบาย ปรับเปลี่ยนต้นทุนการสร้างคู่การซื้อขาย เรียกว่าต้นทุนในการสร้างคำสั่งซื้อขาย ข. ตัวอย่าง [1,024,000,000] SUN - ซึ่งก็คือ 1,024 TRX ค. พิสัย [0,100 000 000 000 000 000] อาทิตย์ 13. MAX_CPU_TIME_OF_ONE_TX ก. คำอธิบาย แก้ไขเวลาดำเนินการสูงสุดของหนึ่งธุรกรรม เรียกว่าขีดจำกัดการหมดเวลาของ หนึ่งธุรกรรม ข. ตัวอย่าง 50 มิลลิวินาที ค. พิสัย

[0, 1,000] มิลลิวินาที 14. ALLOW_UPDATE_ACCOUNT_NAME ก. คำอธิบาย แก้ไขตัวเลือกเพื่อให้บัญชีอัปเดตชื่อบัญชีของตน
ข. ตัวอย่าง เท็จ - ซึ่งสามารถเสนอได้จาก java-tron Odyssey v3.2 ค. พิสัย จริง/เท็จ - หมายเหตุ: ไม่สามารถตั้งค่ากลับเป็นเท็จจากจริงได้ 15. ALLOW_SAME_TOKEN_NAME ก. คำอธิบาย แก้ไขการตรวจสอบความถูกต้องของการอนุญาตให้ token ที่แตกต่างกันมีชื่อซ้ำกัน
ข. ตัวอย่าง เท็จ - ซึ่งสามารถเสนอได้จาก java-tron Odyssey v3.2 ค. พิสัย จริง/เท็จ - หมายเหตุ: ไม่สามารถตั้งค่ากลับเป็นเท็จจากจริงได้ 16. ALLOW_DELEGATE_RESOURCE ก. คำอธิบาย แก้ไขการตรวจสอบความถูกต้องของการอนุญาตให้ออก token ด้วยชื่อที่ซ้ำกัน ดังนั้น tokenID​ ของ token ซึ่งเป็นประเภทข้อมูลจำนวนเต็มยาว จะเป็นอะตอมเพียงชนิดเดียว บัตรประจำตัวของ token
ข. ตัวอย่าง เท็จ - ซึ่งสามารถเสนอได้จาก java-tron Odyssey v3.2 ค. พิสัย จริง/เท็จ - หมายเหตุ: ไม่สามารถตั้งค่ากลับเป็นเท็จจากจริงได้ 17. TOTAL_ENERGY_LIMIT ก. คำอธิบาย แก้ไขขีดจำกัดพลังงานรวมของเครือข่ายทั้งหมด ข. ตัวอย่าง [50,000,000,000,000,000] SUN - ซึ่งเท่ากับ 50,000,000,000 TRX ค. พิสัย [0,100,000,000,000,000,000] อาทิตย์ 18. ALLOW_TVM_TRANSFER_TRC10 ก. คำอธิบาย อนุญาตให้ถ่ายโอน TRC-10 token ภายใน smart contracts ALLOW_UPDATE_ACCOUNT_NAME, ALLOW_SAME_TOKEN_NAME, ข้อเสนอ ALLOW_DELEGATE_RESOURCE ทั้งหมดต้องได้รับการอนุมัติก่อนที่จะเสนอ การเปลี่ยนแปลงพารามิเตอร์นี้
ข. ตัวอย่าง เท็จ - ซึ่งสามารถเสนอได้จาก java-tron Odyssey v3.2 ค. พิสัย จริง/เท็จ - หมายเหตุ: ไม่สามารถตั้งค่ากลับเป็นเท็จจากจริงได้9.2.3 สร้างข้อเสนอ

เฉพาะบัญชี SR เท่านั้นที่มีสิทธิ์เสนอการเปลี่ยนแปลงในพารามิเตอร์เครือข่ายแบบไดนามิก 9.2.4 การเสนอการลงคะแนนเสียง

เฉพาะสมาชิกคณะกรรมการ (SR) เท่านั้นที่สามารถลงคะแนนเสียงให้กับข้อเสนอและสมาชิกที่ไม่ลงคะแนนเสียงได้ทันเวลา จะถือว่าไม่เห็นด้วย ข้อเสนอมีผลใช้งานเป็นเวลา 3 วันหลังจากสร้างขึ้น โหวตก็ได้ สามารถเปลี่ยนแปลงหรือเรียกคืนได้ในช่วงหน้าต่างลงคะแนนเสียง 3 วัน เมื่อสิ้นสุดระยะเวลาข้อเสนอจะสิ้นสุดลง สำเร็จ (19+ โหวต) หรือล้มเหลว (และสิ้นสุด) 9.2.5 ยกเลิกข้อเสนอ

ผู้เสนอสามารถยกเลิกข้อเสนอก่อนที่จะมีผลใช้บังคับ 9.3 โครงสร้าง

SR เป็นพยานของบล็อกที่สร้างขึ้นใหม่ พยานประกอบด้วย 8 พารามิเตอร์:
1. ที่อยู่: ที่อยู่ของพยานนี้ – เช่น 0xu82h…7237.
2. voteCount​: จำนวนคะแนนเสียงที่ได้รับจากพยานคนนี้ - เช่น 234234.
3. pubKey​: กุญแจสาธารณะสำหรับพยานนี้ – เช่น 0xu82h…7237.
4. url​: URL ของพยานรายนี้ – เช่น https://www.noonetrust.com.
5. TotalProduced​: จำนวนบล็อกที่พยานนี้สร้างขึ้น - เช่น 2434.
6. TotalMissed​: จำนวนบล็อกที่พยานรายนี้พลาด – เช่น 7.
7. latestBlockNum​: ความสูงล่าสุดของบล็อก – เช่น 4522. 8. isjobs​ : ธงบูลีน

โครงสร้างข้อมูล Protobuf: ข้อความ​ ​พยาน{
ที่อยู่ไบต์ = 1;
int64​ โหวตนับ = ​2;
ไบต์ pubKey = 3;
​สตริง​ url = ​4​;
int64 ผลรวมที่ผลิต = 5;
int64 รวมพลาด = 6;
int64​ ล่าสุดBlockNum = ​7​; ​บูล​คืองาน = ​8​; }

  1. การพัฒนา DApp 10.1 API

เครือข่าย TRON มีเกตเวย์ HTTP API ให้เลือกมากกว่า 60+ รายการสำหรับการโต้ตอบกับ เครือข่ายผ่าน Full และ Solidity Nodes นอกจากนี้ TronWeb ยังเป็นไลบรารี JavaScript ที่ครอบคลุมอีกด้วย มีฟังก์ชัน API ที่ช่วยให้นักพัฒนาสามารถปรับใช้ smart contracts เปลี่ยน blockchain สถานะ, สอบถาม blockchain และข้อมูลสัญญา, ซื้อขาย DEX และอื่นๆ อีกมากมาย API เหล่านี้ เกตเวย์สามารถมุ่งตรงไปยังไพรเวทเน็ตเฉพาะที่, เทสเน็ต Shasta หรือ TRON เมนเน็ต

10.2 เครือข่าย

TRON มีทั้ง Shasta testnet และ Mainnet นักพัฒนาอาจเชื่อมต่อกับเครือข่ายโดย การปรับใช้โหนด การโต้ตอบผ่าน TronStudio หรือใช้ API ผ่านบริการ TronGrid ตรอนกริด บริการประกอบด้วยคลัสเตอร์โหนดที่สมดุลโหลดซึ่งโฮสต์บนเซิร์ฟเวอร์ AWS ทั่วโลก ในฐานะ DApp การพัฒนาขยายขนาดและปริมาณการเรียก API เพิ่มขึ้น TronGrid ประสบความสำเร็จในการเพิ่มจำนวน การรับส่งข้อมูล API
10.3 เครื่องมือ

TRON นำเสนอชุดเครื่องมือการพัฒนาที่ช่วยให้นักพัฒนาสามารถสร้าง DApps ที่เป็นนวัตกรรมใหม่ได้
TronBox เป็นเฟรมเวิร์กที่ช่วยให้นักพัฒนาสามารถทดสอบและปรับใช้ smart contracts ผ่านทาง TronWeb เอพีไอ TronGrid เป็นบริการ API ที่สมดุลโหลดและโฮสต์ซึ่งช่วยให้นักพัฒนาสามารถเข้าถึง TRON เครือข่ายโดยไม่ต้องรันโหนดของตนเอง TronGrid ให้การเข้าถึงทั้ง Shasta testnet เช่นเดียวกับ TRON Mainnet TronStudio เป็นการพัฒนาแบบรวมที่ครอบคลุม สภาพแวดล้อม (IDE) ที่ช่วยให้นักพัฒนาสามารถคอมไพล์ ปรับใช้ และดีบัก Solidity smart ของตนได้ สัญญา TronStudio มีโหนดเต็มภายในที่สร้างสภาพแวดล้อมท้องถิ่นส่วนตัวสำหรับ smart contract การทดสอบก่อนการปรับใช้งาน ไลบรารี TronWeb API เชื่อมต่อนักพัฒนาเข้ากับ เครือข่ายผ่านการเรียก HTTP API ที่หลากหลายซึ่งรวมอยู่ใน JavaScript
10.4 ทรัพยากร

TRON Developer Hub คือไซต์เอกสารประกอบ API ที่ครอบคลุมซึ่งปรับแต่งมาโดยเฉพาะ 12 นักพัฒนาที่ต้องการสร้างบนเครือข่าย TRON Developer Hub มอบระดับสูง ความเข้าใจแนวคิดของ TRON และแนะนำผู้ใช้ผ่านรายละเอียดการโต้ตอบกับ 12 ศูนย์กลางนักพัฒนา: https://developers.tron.network/

เครือข่าย คู่มือนี้จะแนะนำนักพัฒนาเกี่ยวกับการตั้งค่าโหนด การปรับใช้ และการโต้ตอบกับระบบอัจฉริยะ สัญญา การโต้ตอบและการใช้งาน API การสร้าง DApps ตัวอย่าง และการใช้แต่ละอย่าง เครื่องมือสำหรับนักพัฒนา นอกจากนี้ ช่องทางชุมชนนักพัฒนายังมีให้บริการผ่าน Discord
13

13 ความขัดแย้ง: https://discordapp.com/invite/GsRgsTD

  1. บทสรุป

TRON เป็นโซลูชัน blockchain ที่ปรับขนาดได้ ซึ่งได้ใช้วิธีการที่เป็นนวัตกรรมใหม่สำหรับการแก้ปัญหา ความท้าทายที่เครือข่าย blockchain เดิมต้องเผชิญ มีธุรกรรมมากกว่า 2 ล้านรายการต่อวัน ด้วยบัญชี TRX มากกว่า 700,000 บัญชี และมากกว่า 2,000 บัญชี TPS, TRON ได้เปิดใช้งานชุมชนใน การสร้างเครือข่ายกระจายอำนาจและเป็นประชาธิปไตย