There are three types of nodes on Tron’s network, namely witness, FullNode and SolidityNode. A witness is responsible for block production; a FullNode provides APIs, and broadcasts transactions and blocks; a SolidityNode synchronizes irrevocable blocks and provides inquiry APIs.

Fix the problem of disconnection due to BAD_TX due to certain transaction orders.

Fixes the problem that some transactions will be broadcast by nodes when an exception occurs.

Fixed the problem that the signed parallel verification counter in the block could not be zeroed.

Fix the deadlock problem caused by the log system.

Updated seed nodes.

Mechanism

New Bandwidth Model

If the transaction is a token transfer, TRON will try to charge bandwidth points from the token issuer if sufficient.

Bandwidth points will be charged from the initiator if sufficient.

Complimentary bandwidth points will be charged from the initiator if sufficient.

TRX will be charged from and the transaction initiator and burnt.

For more information, please view the document.

Account Creation

In order to create a wallet using this private key, you will need to invoke one of the following three APIs:

Directly invoke account creation API.

Transfer TRX to the address.

Transfer tokens to the address.

Rewards

Candidate reward: 127 candidates updated once every 6 hours will share 115,200 TRX. The reward will be split in accordance to the votes each candidate receives. Each year, candidate reward will total 168,192,000 TRX.

Super Representative reward: The TRON Protocol network will generate one block every 3 seconds, with each block awarding 32 TRX to super representatives. A total of 336,384,000 TRX will be awarded annually to twenty-seven super representatives.

Bug Bounty Program

On June 1, TRON Foundation launched Tron Bug Bounty Program with a highest reward of USD$10 million. It is aimed at discovering potential technical vulnerabilities in the mainnet with the help of TRON’s community members, especially those who specialize in global network security, to sustain TRON mainnet as the most secure public blockchain in the industry and to provide secure and stable infrastructure and services to DApps deployed on the mainnet.

We encourage our community to run Tron Odyssey-v2.0.1. If you have some problems on running Tron mainnet, please join our Slacks to get help. You are welcome to ask questions here, we also encourage your answers for other developer’s questions.

Future Release

6.25 will be Tron Independence Day, at that day we will transfer TRX erc20 token into TRX mainnet token. On 6.26, Tron will hold the first Super Representative election for producing blocks. On 7.31, official Tron Virtual Machine will be released.

Credits

Credits for winners of Tron Program Contest. Rovak, Marius Gill, zx63, TeamGaryTron, Flott, jr, John Savadkuhi, jake Lin are winners of Tron Program Contest for their works of Block Explorer, Android/IOS wallet, Mac wallet, Windows Wallet and Chrome extension wallet.

Odyssey-v2.0

Feature

Storage

Network

Optimizes handshake logic.

Optimizes sending ping message.

Optimizes message entities and net log.

Solving the problem of disconnection.

Solving thread sharing problem: send msg thread & handle msg thread.

Solving sync problem chain block inventory msg handle problem.

Solving the problem of repeated transaction in network module.

Architecture

Mechanism

New Bandwidth Model

If the transaction is a token transfer, TRON will try to charge bandwidth points from the token issuer if sufficient.

Bandwidth points will be charged from the initiator if sufficient.

Complimentary bandwidth points will be charged from the initiator if sufficient.

TRX will be charged from and the transaction initiator and burnt.

For more information, please view the document.

Account Creation

In order to create a wallet using this private key, you will need to invoke one of the following three APIs:

directly invoke account creation API

transfer TRX to the address

transfer tokens to the address

Rewards

1.Candidate reward: 127 candidates updated once every 6 hours will share 115,200 TRX. The reward will be split in accordance to the votes each candidate receives. Each year, candidate reward will total 168,192,000 TRX.

Super Representative reward: The TRON Protocol network will generate one block every 3 seconds, with each block awarding 32 TRX to super representatives. A total of 336,384,000 TRX will be awarded annually to twenty-seven super representatives.

Bug Bounty Program

On June 1, TRON Foundation launched Tron Bug Bounty Program with a highest reward of USD$10 million. It is aimed at discovering potential technical vulnerabilities in the mainnet with the help of TRON’s community members, especially those who specialize in global network security, to sustain TRON mainnet as the most secure public blockchain in the industry and to provide secure and stable infrastructure and services to DApps deployed on the mainnet.

We encourage our community to run Tron Odyssey-v2.0. If you have some problems on running Tron mainnet, please join our Slacks to get help. You are welcome to ask questions here, we also encourage your answers for other developer’s questions.

Future Release

6.25 will be Tron Independence Day, at that day we will transfer TRX erc20 token into TRX mainnet token. On 6.26, Tron will hold the first Super Representative election for producing blocks. On 7.31, official Tron Virtual Machine will be released.

Credits

Credits for winners of Tron Program Contest. Rovak, Marius Gill, zx63, TeamGaryTron, Flott, jr, John Savadkuhi, jake Lin are winners of Tron Program Contest for their works of Block Explorer, Android/IOS wallet, Mac wallet, Windows Wallet and Chrome extension wallet.

Odyssey-v1.1.2

Odyssey-v1.1.1

Feature

New bandwidth model

Improvement

More stable sync module.

Improve the database performance.

Odyssey-v1.1

Feature

Remove the TRONSR minimum balance limit.

Token transaction consumes bandwidth of the token issuer.

Avoid flood attack

Add token frozen

When an account issues an asset, it can promise the public to freeze multiple assets. The asset can be unfrozen manually after maturity

Minimum specifications for FullNode deployment
CPU：16-core
RAM：16G
Bandwidth：100M
DISK：10T
Recommended specifications for FullNode deployment
CPU：64-core or more
RAM：64G or more
Bandwidth：500M and more
DISK：20T or more
Minimum specifications for SolidityNode deployment
CPU：16-core
RAM：16G
Bandwidth：100M
DISK：10T
Recommended specifications for SolidityNode deployment
CPU：64-core or more
RAM：64G or more
Bandwidth：500M and more
DISK：20T or more
DISK capacity depends on the actual transaction volume after deployment, but it’s always better to leave some excess capacity.

Copy the FullNode.jar and SolidityNode.jar along with config files into the respective directories.

download your needed config file from https://github.com/tronprotocol/TronDeployment.
main_net_config.conf is the config for mainnet, and test_net_config.conf is the config for testnet.
please rename the config file to `config.conf` and use this config.conf to start fullnode and soliditynode.
cp build/libs/FullNode.jar ../fullnode
cp build/libs/SolidityNode.jar ../soliditynode

Configure the SolidityNode configuration file. You’ll need to edit config.conf to connect to your local FullNode. Change trustNode in node to local 127.0.0.1:50051, which is the default rpc port. Set listen.port to any number within the range of 1024-65535. Please don’t use any ports between 0-1024 since you’ll most likely hit conflicts with other system services. Also change rpc port to 50052 or something to avoid conflicts.

bash start_tron.sh --app [FullNode|SolidityNode] --net [mainnet|testnet] --db [keep|remove|backup]
--app Running application. The default node is Fullnode and it could be FullNode or SolidityNode.
--net Connecting network. The default network is mainnet and it could be mainnet or testnet.
--db The way of data processing could be keep, remove and backup. If you launch two different networks, like from mainnet to testnet or from testnet to mainnet, you need to delete database.
--trust-node It only works when deploying SolidityNode. The specified gRPC service of Fullnode, like 127.0.0.1:50051 or 13.125.249.129:50051.
--rpc-port Port of grp. If you deploy SolidityNode and FullNode on the same host，you need to configure different ports.
--commit Optional， commitid of project.
--branch Optional，branch of project.

APIs under wallet service are provided by the FullNode. APIs under walletSolidity and walletExtension services are provided by the SolidityNode. APIs under the walletExtension service, whose processing time is long, are provided by the SolidityNode. The FullNode provides APIs for operations on the blockchain and for data inquiry, while the SolidityNode only provides APIs for the latter. The difference between these two nodes is that data of the FullNode could be revoked due to forking, whereas the solidified data of the solidity one is irrevocable.

wallet/GetAccount
Function:Returns account information.
wallet/CreateTransaction
Function: Creates a transaction of transfer. If the recipient address does not exist, a corresponding account will be created on the blockchain.
wallet/ BroadcastTransaction
Function: Broadcasts transaction. Transaction has to be signed before being broadcasted.
wallet/ UpdateAccount
Function: Updates account name. Account name can only be updated once for each account.
wallet/ VoteWitnessAccount
Function:Users can vote for witnesses.
wallet/ CreateAssetIssue
Function: Creates token. Users can issue their own token on Tron’s public blockchain, which can be used for reciprocal transfers and be bought with TRX. Users can chose to freeze a certain portion of the token supply during token issuance.
wallet/ UpdateWitness
Function: Updates witness information.
wallet/ CreateAccount
Function: Created account. Existent accounts can revoke this API to create a new account with an address.
wallet/ CreateWitness
Function: Users can apply to become Super Representatives, which costs 9,999 TRX.
wallet/ TransferAsset
Function: Token transfer.
wallet/ ParticipateAssetIssue
Function: Token participation. Users can participate in token offerings with their TRX.
wallet/ FreezeBalance
Function: Freeze TRX. Freezing TRX gives users bandwidth points and Tron Power, which are used for transactions and voting for witnesses respectively.
wallet/ UnfreezeBalance
Function: Unfreezes TRX. Frozen TRX can only be unfrozen 3 days afterwards. Unfreezing TRX also takes away corresponding bandwidth points, Tron power and the votes.
wallet/ UnfreezeAsset
Function: Unfreezes tokens.
wallet/ WithdrawBalance
Function: SRs and SR candidates can withdraw block reward and witness reward for the top 127 candidates to their account balance. One withdrawal can be made by each account every 24 hours.
wallet/ UpdateAsset
Function: Updates information of an issued token.
wallet/ ListNodes
Function: Returns a list of all nodes.
wallet/ GetAssetIssueByAccount
Function: Get information on a token by account.
wallet/ GetAccountNet
Function: Get bandwidth information on an account, including complimentary bandwidth points and bandwidth points obtained from balance freeze.
wallet/ GetAssetIssueByName
Function: Inquire token by token name.
wallet/ GetNowBlock
Function: Returns the latest block.
wallet/ GetBlockByNum
Function: Inquire block by block height.
wallet/ GetBlockById
Function: Inquire block by block ID. The ID of a block is the hash of the blockheader’s Raw data.
wallet/ GetBlockByLimitNext index
Function: Returns blocks indexed between the startNum and the endNum (including both ends).
wallet/ GetBlockByLatestNum
Function: Get the latest N blocks. N is defined in the parameter.
wallet/ GetTransactionById
Function: Get transaction by ID, which is the hash of the Raw data of the transaction.
wallet/ ListWitnesses
Function: Get a list of all witnesses.
wallet/ GetAssetIssueList
Function: Get a list of all issued tokens.
wallet/ TotalTransaction
Function: Get the total amount of transactions on the blockchain.
wallet/ GetNextMaintenanceTime
Function: Get the next maintenance time, namely the next update of witness votes count.
WalletSolidity/ GetAccount
Function:
WalletSolidity/ ListWitnesses
Function:
WalletSolidity/ GetAssetIssueList
Function:
WalletSolidity/ GetNowBlock
Function:
WalletSolidity/ GetBlockByNum
Function:
WalletExtension/ GetTransactionsFromThis
Function: Get the record of all outbound transactions from a certain account.
WalletExtension/ GetTransactionsToThis
Function: Get the record of all incoming transactions of a certain account.

/walletsolidity/getpaginatedassetissuelist
Function：Query the list of Tokens with pagination
demo: curl -X POST http://127.0.0.1:8091/walletsolidity/getpaginatedassetissuelist -d ‘{“offset”: 0, “limit”:10}’
Parameters：Offset is the index of the starting Token, and limit is the number of Tokens expected to be returned.
Return value：List of Tokens

/walletextension/gettransactionsfromthis
Function：Query the list of transactions sent by an address
demo: curl -X POST http://127.0.0.1:8091/walletextension/gettransactionsfromthis -d ‘{“account” : {“address” : “41E552F6487585C2B58BC2C9BB4492BC1F17132CD0”}, “offset”: 0, “limit”: 10}’
Parameters：Address is the account address, converted to a hex string; offset is the index of the starting transaction; limit is the number of transactions expected to be returned
Return value：Transactions list

/walletextension/gettransactionstothis
Function：Query the list of transactions received by an address
demo: curl -X POST http://127.0.0.1:8091/walletextension/gettransactionstothis -d ‘{“account” : {“address” : “41E552F6487585C2B58BC2C9BB4492BC1F17132CD0”}, “offset”: 0, “limit”: 10}’
Parameters：Address is the account address, converted to a hex string; offset is the index of the starting transaction; limit is the number of transactions expected to be returned
Return value：Transactions list

FullNode Interface

The default http port on FullNode is 8090.

wallet/createtransaction
Function：Creates a transaction of transfer. If the recipient address does not exist, a corresponding account will be created on the blockchain.
demo: curl -X POST http://127.0.0.1:8090/wallet/createtransaction -d ‘{“to_address”: “41e9d79cc47518930bc322d9bf7cddd260a0260a8d”, “owner_address”: “41D1E7A6BC354106CB410E65FF8B181C600FF14292”, “amount”: 1000 }’
Parameters：To_address is the transfer address, converted to a hex string; owner_address is the transfer transfer address, converted to a hex string; amount is the transfer amount
Return value：Transaction contract data

wallet/updateaccount
Function：Modify account name
demo：curl -X POST http://127.0.0.1:8090/wallet/updateaccount -d ‘{“account_name”: “0x7570646174654e616d6531353330383933343635353139” ,”owner_address”:”41d1e7a6bc354106cb410e65ff8b181c600ff14292”}’
Parameters：account_name is the name of the account, converted into a hex string；owner_address is the account address of the name to be modified, converted to a hex string.
Return value：modified Transaction Object

wallet/votewitnessaccount
Function：Vote on the super representative
demo：curl -X POST http://127.0.0.1:8090/wallet/votewitnessaccount -d ‘{
“owner_address”:”41d1e7a6bc354106cb410e65ff8b181c600ff14292”,
“votes”: [{“vote_address”: “41e552f6487585c2b58bc2c9bb4492bc1f17132cd0”, “vote_count”: 5}]
}’
Parameters：Owner_address is the voter address, converted to a hex string; votes.vote_address is the address of the super delegate being voted, converted to a hex string; vote_count is the number of votes

wallet/createaccount
Function：Create an account. Uses an already activated account to create a new account
demo：curl -X POST http://127.0.0.1:8090/wallet/createaccount -d ‘{“owner_address”:”41d1e7a6bc354106cb410e65ff8b181c600ff14292”, “account_address”: “41e552f6487585c2b58bc2c9bb4492bc1f17132cd0”}’
Parameters：Owner_address is an activated account，converted to a hex String; account_address is the address of the new account, converted to a hex string, this address needs to be calculated in advance
Return value：Create account Transaction raw data

wallet/createwitness
Function：Apply to become a super representative
demo：curl -X POST http://127.0.0.1:8090/wallet/createwitness -d ‘{“owner_address”:”41d1e7a6bc354106cb410e65ff8b181c600ff14292”, “url”: “007570646174654e616d6531353330363038383733343633”}’
Parameters：owner_address is the account address of the applicant，converted to a hex string；url is the official website address，converted to a hex string
Return value：Super Representative application Transaction raw data

wallet/transferasset
Function：Transfer Token
demo：curl -X POST http://127.0.0.1:8090/wallet/transferasset -d ‘{“owner_address”:”41d1e7a6bc354106cb410e65ff8b181c600ff14292”, “to_address”: “41e552f6487585c2b58bc2c9bb4492bc1f17132cd0”, “asset_name”: “0x6173736574497373756531353330383934333132313538”, “amount”: 100}’
Parameters：Owner_address is the address of the withdrawal account, converted to a hex string；To_address is the recipient address，converted to a hex string；asset_name is the token contract address，converted to a hex string；Amount is the amount of token to transfer
Return value：Token transfer Transaction raw data

wallet/easytransfer
Function: Easily transfer from an address using the password string. Only works with accounts created from createAddress
Demo: curl -X POST http://127.0.0.1:8090/wallet/easytransfer -d ‘{“passPhrase”: “7465737470617373776f7264”,”toAddress”: “41D1E7A6BC354106CB410E65FF8B181C600FF14292”, “amount”:10}’
Parameters: passPhrase is the password, converted from ascii to hex. toAddress is the recipient address, converted into a hex string; amount is the amount of TRX ‘to transfer expressed in SUN.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

wallet/easytransferbyprivate
Function：Easily transfer from an address using the private key.
demo: curl -X POST http://127.0.0.1:8090/wallet/easytransferbyprivate -d ‘{“privateKey”: “D95611A9AF2A2A45359106222ED1AFED48853D9A44DEFF8DC7913F5CBA727366”, “toAddress”:”4112E621D5577311998708F4D7B9F71F86DAE138B5”,”amount”:10000}’
Parameters：passPhrase is the private key in hex string format. toAddress is the recipient address, converted into a hex string; amount is the amount of TRX to transfer in SUN.
Return value： transaction, including execution results.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

wallet/createaddress
Function: Create address from a specified password string (NOT PRIVATE KEY)
Demo: curl -X POST http://127.0.0.1:8090/wallet/createaddress -d ‘{“value”: “7465737470617373776f7264” }’
Parameters: value is the password, converted from ascii to hex
Return value：value is the corresponding address for the password, encoded in hex. Convert it to base58 to use as the address.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

wallet/generateaddress
Function: Generates a random private key and address pair
demo：curl -X POST -k http://127.0.0.1:8090/wallet/generateaddress
Parameters: no parameters.
Return value：value is the corresponding address for the password, encoded in hex. Convert it to base58 to use as the address.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

wallet/participateassetissue
Function：Create a new Token
demo：curl -X POST http://127.0.0.1:8090/wallet/participateassetissue -d ‘{
“to_address”: “41e552f6487585c2b58bc2c9bb4492bc1f17132cd0”,
“owner_address”:”41e472f387585c2b58bc2c9bb4492bc1f17342cd1”,
“amount”:100,
“asset_name”:”3230313271756265696a696e67”
}’
Parameters：
to_address is the address of the Token issuer，converted to a hex string
owner_address is the address of the Token owner，converted to a hex string
amount is the number of tokens created
asset_name is the name of the token，converted to a hex string
Return value：Token creation Transaction raw data

wallet/freezebalance
Function：Freezes an amount of TRX. Will give bandwidth and TRON Power(voting rights) to the owner of the frozen tokens.
demo：curl -X POST http://127.0.0.1:8090/wallet/freezebalance -d ‘{
“owner_address”:”41D1E7A6BC354106CB410E65FF8B181C600FF14294”,
“frozen_balance”: 10000,
“frozen_duration”: 3
}’
Parameters：
owner_address is the address that is freezing trx account，converted to a hex string
frozen_balance is the number of frozen TRX
frozen_duration is the duration in days to be frozen
Return value：Freeze trx transaction raw data

wallet/updateasset
Function：Update a Token’s information
demo：curl -X POST http://127.0.0.1:8090/wallet/updateasset -d ‘{
“owner_address”:”41e472f387585c2b58bc2c9bb4492bc1f17342cd1”,
“description”: “”，
“url”: “”,
“new_limit” : 1000000,
“new_public_limit” : 100
}’
Parameters：
Owner_address is the address of the token issuer, converted to a hex string
Description is a description of the token, converted to a hex string
Url is the official website address of the token issuer, converted to a hex string
New_limit is the free bandwidth that each token can use for each holder.
New_public_limit is the free bandwidth of the token
Return value: Token update transaction raw data

wallet/listnodes
Function：List the nodes which the api fullnode is connecting on the network
demo: curl -X POST http://127.0.0.1:8090/wallet/listnodes
Parameters：None
Return value：List of nodes

wallet/getpaginatedassetissuelist
Function：Query the list of Tokens with pagination
demo: curl -X POST http://127.0.0.1:8090/wallet/getpaginatedassetissuelist -d ‘{“offset”: 0, “limit”: 10}’
Parameters：Offset is the index of the starting Token, and limit is the number of Tokens expected to be returned.
Return value：List of Tokens

You will need to deploy a grpc-gateway
The grpc-gateway will encode the bytes fields defined in proto into base64 format. For input parameters in bytes format, you should encode in into base64 format, and for output parameters in bytes format, you should decode it into base64 format for subsequent processing. We provide a encoding/decoding tool which you can download from https://github.com/tronprotocol/tron-demo/blob/master/TronConvertTool.zip.
wallet/getaccount
Function: returns account info
Parameters: convert address to base64 format.
Demo: curl -X POST http://127.0.0.1:18890/wallet/getaccount -d ‘{“address”: “QYgZmb8EtAG27PTQy5E3TXNTYCcy”}’

Wallet/createtransaction
Function: create the transaction of a transfer. If the recipient address does not exist, then a corresponding account will be created on the blockchain.
Parameters: convert to_address and owner_address to base64 format
Demo:
curl -X POST http://127.0.0.1:18890/wallet/createtransaction -d ‘{“to_address”: “QYgZmb8EtAG27PTQy5E3TXNTYCcy” ,”owner_address”:”QfoWCvbA5qqphqTcvTU0D1+xZMHu”, “amount”: 1000 }’

Wallet/broadcasttransaction
Function: transaction broadcasting. Transaction needs to be signed before broadcasting.
Parameter: use the signed transaction as the input parameter.
Demo:
curl -X POST http://127.0.0.1:18890/wallet/broadcasttransaction -d ‘{

Wallet/createassetissue
Function: creates token; on Tron’s public blockchain, users can issue tokens which can be transferred reciprocally or participate in token offerings with their TRX. During token creation, an issuer can chose to freeze a certain amount of tokens.
Parameters: owner_address, issuer’s address, should be in base64 format; name, token name, should be in base64 format.
Demo: to issue a token named MyToken
curl -X POST http://127.0.0.1:18890/wallet/createassetissue -d ‘{“owner_address”:”QYgZmb8EtAG27PTQy5E3TXNTYCcy”, “votes”: [{“vote_address”: “QfSI1WI/szR9S3ZL5f7Mewb18Rd7”, “vote_count”: 11}]}’

Wallet/createaccount
Function: creates account. An existent account can call the api to create a new account at a ready address.
Parameters: owner_address, account creator’s address, should be in base64 format; account_address, the new address, should be in base64 format.
Demo: curl -X POST http://127.0.0.1:18890/wallet/createaccount -d ‘{“owner_address”:”QYgZmb8EtAG27PTQy5E3TXNTYCcy”, “account_address”: “”}’

Wallet/createwitness
Function: users can apply to become a Super Representative, which costs 9999 TRX.
Parameters: owner_address, address of the applicant, should be in base64 format; url, url of the applicant’s website, should be in base64 format.
Demo: curl -X POST http://127.0.0.1:18890/wallet/createwitness -d ‘{“owner_address”:”QYgZmb8EtAG27PTQy5E3TXNTYCcy”, “url”: “d3d3Lm5ld3VybC5jb20=”}’

Wallet/transferasset
Function: token transfer.
Parameters: asset_name, name of the token, should be in base64 format; owner_address, address of the sender’s account, should be in base64 format; to_address, recipient’s address, should be in base64 format; amount, the amount of tokens, should include only numbers.
Demo: curl -X POST http://127.0.0.1:18890/wallet/transferasset -d ‘{“owner_address”:”QYgZmb8EtAG27PTQy5E3TXNTYCcy”, “to_address”: “d3d3Lm5ld3VybC5jb20=”, “asset_name”: “TXlBc3NldA==”, “amount”: 1000}’

Wallet/participateassetissue
Function: to participate in token offerings, users can exchange for issued tokens with TRX.
Parameters: owner_address, issuer’s address, should be in base64 format; to_address, recipient’s address, should be in base64 format; asset_name, name of the token, should be in base64 format; amount, the amount of tokens, should include only numbers.
Demo: curl -X POST http://127.0.0.1:18890/wallet/participateassetissue -d ‘{“to_address”: “QYgZmb8EtAG27PTQy5E3TXNTYCcy” ,”owner_address”:”QfoWCvbA5qqphqTcvTU0D1+xZMHu”, “amount”:1000, “asset_name”:”TXlBc3NldA==”}’

Wallet/getblockbylimitnext
Function: Query block by a range of blockheight
Parameters: startNum is the starting blockheight and the endNum is the end blockheight. The return with include the startNum block and the endNum block.
Demo: curl -X POST http://127.0.0.1:18890/wallet/getblockbylimitnext -d ‘{“startNum” : 10, “endNum” : 10}’

Wallet/gettransactionbyid
Function: Query transaction by transaction ID
Parameters: value is the transaction ID, which can be obtained through hashing the raw_data of the transaction; value should be in base64 format.
Demo: curl -X POST http://127.0.0.1:18890/wallet/gettransactionbyid -d ‘{“value” : “JTqX9taV7RNDyZbwGsN4BsMthBqoBaqnROvCQtHYOyg=”}’

Paginated inquiry of list of issued tokens: /wallet/getpaginatedassetissuelist
Demo: curl -X POST http://127.0.0.1:18890/wallet/getpaginatedassetissuelist -d ‘{“offset” : 0, “limit” : 10}’
Parameters: offset is the ID of the first token on each page, while limit is the maximum amount of returned tokens on each page.

Parameters: transaction refers to a specific transaction and privateKey is the user’s private key in base64 format.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

Paginated inquiry of list of all tokens: /walletsolidity/getpaginatedassetissuelist
Demo: curl -X POST http://127.0.0.1:18890/walletsolidity/getpaginatedassetissuelist -d ‘{“offset” : 0, “limit” : 10}’
Parameters: offset is the ID of the first token on each page, while limit is the maximum amount of tokens returned on each page.

Inquire transaction fee and its block location by transaction hash: /walletsolidity/gettransactioninfobyid
Demo: curl -X POST http://127.0.0.1:18890/walletsolidity/gettransactioninfobyid -d ‘{“value” : “4ebiUlBCZ5vI1JtBMFXjiH/HSaVeIaUO8PN9l5E1kXU=”}’
Parameters: value is the transaction ID, hash of the raw_data of the transaction, and should be in base64 format.

Inquire transaction by transaction hash (and confirm the transaction through this API): /walletsolidity/gettransactionbyid
Demo: curl -X POST http://127.0.0.1:18890/walletsolidity/gettransactionbyid -d ‘{“value” : “9PeN9FHPDHr1qpILy3U+iMcLAKvwojUek9jYx1EESXA=”}’
Parameters: value is the transaction ID, hash of the raw_data of the transaction, and should be in base64 format.

Create address: /wallet/createadresss
Demo: curl -X POST http://127.0.0.1:18890/wallet/createadresss -d ‘{“value”: “QeVS9kh1hcK1i8LJu0SSvB8XEyzQ” }’
Parameters: value is the password; the address returned in base64 format needs to be converted into base58 for later use.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

TRX easy transfer: /wallet/easytransfer
Demo: curl -X POST http://127.0.0.1:18890/wallet/easytransfer -d ‘{“passPhrase”: “QeVS9kh1hcK1i8LJu0SSvB8XEyzQ”,”toAddress”: “QYkTnLE4evhePSTiEqAIrJdJZ+Vh”, “amount”:10}’
Parameters: passPhrase is the password; toAddress is the recipient address; amount is the amount of TRX to transfer.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

Generate private key and address: wallet/generateaddress
Wallet/solidity/generateaddress
demo：curl -X POST -k http://127.0.0.1:18890/wallet/generateaddress
Parameters: no parameters.
Warning: Please control risks when using this API. To ensure environmental security, please do not invoke APIs provided by other or invoke this very API on a public network.

/wallet/gettransactionbyid to retrieve ALL transactions by ID, including Unconfirmed transactions.

/walletextension/gettransactionsfromthis to retrieve transactions from an address.

/walletextension/gettransactionstothis to retrieve transactions to an address.

Use an RPC call for the block

If the block has transactions, it will be listed in the trasactions array. You can parse this to find all the transactions included on that block.

/walletsolidity/getblockbynum to retrieve block by block height/number from the Solidity Node. These blocks are guaranteed confirmed and irreversible.

/wallet/getblockbynum to retrieve a block by block height/number from the Full Node. These blocks are NOT confirmed.

/wallet/getblockbyid to retrieve by block hash.

Calculating Bandwidth for an Account

Bandwidth is used for all transactions and cost around 200~ for a TRX transfer. Every active account with an age greater than 24 hours starts with 5000 free bandwidth. Used bandwidth replenishes over a 24 hour period. If there isn’t enough bandwidth for a transaction, then a fee of 0.002TRX will be charged.

Use an RPC call to query an account’s available bandwidth.

/wallet/getaccountnet will retrieve the bandwidth information for an account. If a key isn’t present, then the value is 0.

All willing users can apply to become Super Representatives, but to prevent malicious attacks, we have set up a threshold for admittance—to run for Super Representative, 9999 TRX in the applicants’ account will be burnt. After successful application, users can run for Super Representatives.

Once the balance is frozen, the user will receive a proportionate amount of TRON Power(TP) and bandwidth. TRON Power(TP) represents voting power whereas bandwidth points are used to pay for transactions. Their usage and means of calculation will be introduced in following sections.

Frozen assets are held in your frozen account and cannot be used for trading.

More TP and bandwidth points can be obtained by freezing more balance. The balance can be unfrozen after 3 days from the latest freezing.

The freezing command is as follows:

freezebalance password amount time
amount: the unit of frozen balance is sun. The minimum balance frozen is 1,000,000 sun, or 1 TRX.
time: frozen duration lasting from date of freeze and date to unfreeze is 3 days.

Each time a Super Representative finishes block production, reward will be sent to the subaccount in the superledger. Super Representatives can check but not directly make use of this asset. A withdrawal can be made once every 24 hours, transferring the reward from the subaccount to the Super Representative’s account.

Having too many transactions will clog our network like Ethereum and may incur delays on transaction confirmation. To keep the network operating smoothly, TRON network only allows every account to initiate a limited number of transactions for free every once every 10 seconds. To engage in transactions more frequently requires bandwidth. Like TRON Power(TP), bandwidth can be obtained through freezing TRX.

Definition of bandwidth points

Transactions are transmitted and stored in the network in byte arrays. Bandwidth points consumed in a transaction equals the size of its byte array.

If the length of a byte array is 200 then the transaction consumes 200 bandwidth points.

Calculation of bandwidth points

Bandwidth points are the number of usable bytes for an account per day.

Within a given period of time, the entire network could only handle a fixed amount of bandwidth.

The ratio of bandwidth points in an account to the bandwidth capacity of TRON’s network equals the ratio of frozen balance in an account to frozen balance on the entire network.

e.g If frozen asset on the entire network totals 1,000,000 TRX and one given account froze 1,000 TRX, or 0.1% of total TRX frozen, then the account can perform about 300 transactions per day.

Note

Since the amount of frozen asset on the entire network and for a certain account are subject to change, bandwidth points held by an account isn’t always fixed.

Complimentary bandwidth points

There are 5000 bandwidth points for free per account per day. When an account hasn’t frozen any balance, or when its bandwidth points have run out, complimentary bandwidth points can be used.

Each transaction in Tron’ network is about 200 bytes, so each account enjoys about 25 transactions for free each day.

Token transfer

For transactions of token transfer, bandwidth points will first be charged from the token issuer.

When issuing tokens, the issuer can configure a limit to maximum bandwidth consumption, namely the maximal bandwidth points which can be charged from him/her for a token holder’s token transfers within 24 hours and the maximal total of bandwidth points.

These two parameters can be configured through updateAsset interface.

Consumption of bandwidth points

Aside from inquiries, any other type of transaction consumes bandwidth points. The bandwidth consumption procedure is as follows:

If the transaction isn’t a token transfer, skip to step 2. If the transaction is a token transfer, TRON will try to charge bandwidth points from the token issuer. If the issuer does not have sufficient bandwidth points or the charge is beyond the issuer’s maximal threshold, go to step 2.

Charge bandwidth points from the initiator. If bandwidth points are insufficient:
(1) If the transaction creates a new account, skip to step 4.
(2) If the transaction does not create a new account, go to step 3.

Charge free bandwidth points from the initiator. If there is insufficient free bandwidth points, go to step 4.

TRX will be charged from and the transaction initiator and burnt.
(1) For a normal transfer, it costs about 0.002 TRX.
(2) If a new account is created by the transaction, it costs about 0.1 TRX.

Note

When balance unfreezes, bandwidth points will be cleared since there is no more frozen TRX.

Account creation

Complimentary bandwidth points cannot be used for account creation. Bandwidth points gained from balance freezing or 0.1 TRX is needed.

Tokens named abc are issued with the above command, with a capitalization totaling 1 million. The exchange rate of abc to TRX is 1:1. The duration of circulation is May 31-June 30, 2018. It is described as abcdef. The provided website is a.com.

A maximum of 1000 bandwidth points can be charged from the issuer’s account per account per day. A maximum of 1,000,000 bandwidth points can be charged from the issuer’s account for all token holders’ transactions each day. in total capitalization, 200,000 tokens are locked for 180 days and 300,000 tokens are locked for 365 days.

SR Rewards

Candidate reward: 127 candidates updated once every 6 hours will share 115200 TRX. The reward will be split in accordance to the votes each candidate receives. Each year, candidate reward will total 168,192,000 TRX.

Super Representative reward: The TRON Protocol network will generate one block every 3 seconds, with each block awarding 32 TRX to super representatives. A total of 336,384,000 TRX will be awarded annually to twenty-seven super representatives.

There will be no inflation on the TRON network before January 1, 2021, and the TRON Foundation will award all block rewards and candidate rewards prior to that date.

When there are sufficient bandwidth points, no TRX is charged. If a transaction fee is charged, it will be recorded in the fee field in the transaction results. If no transaction fee is charged, meaning that corresponding bandwidth points have been deducted, the fee field will read “0”. There will only be a service charge after a transaction has been written into the blockchain. For more information on the fee field, please see also Transaction.Result.fee, with the corresponding proto file at https://github.com/tronprotocol/protocol/blob/master/core/Tron.proto.

Based on the definition of a transaction, you will need to fill in all fields of a transaction to construct a transaction at your local. Please note that you will need to configure the details of reference block and expiration, so you will need to connect to the mainnet during transaction construction. We advise that you set the latest block on the full node as your reference block and production time of the latest block+N minutes as your expiration time. N could be any number you find fit. The backstage condition is (Expiration > production time of the latest block and Expiration < production time of the latest block + 24 hours). If the condition is fulfilled, then the transaction is legit, and if not, the transaction is expired and will not be received by the mainnet. method of setting refference block: set RefBlockHash as subarray of newest block’s hash from 8 to 16, set BlockBytes as subarray of newest block’s height from 6 to 8. The code is as follows:

the signed result should be 65 byte in size—r 32 bytes, s 32 bytes and v 1 byte.

Signature verification

When a full node receives transaction, it will verify signature, comparing an address calculated with hash, r, s and v with the address of the contract. Signature is successfully verified if the two addresses match.

Block ID is a combination of block height and the hash of the blockheader’s raw data. To get block ID, first hash the raw data of the blockheader and replace the first 8 bytes of the hash with the blockheight, as the following:

Token migration from ERC20 TRX to Mainnet TRX will occur between June 21st – June 25th (GMT+8). If your TRX is held on an exchange, no action is required. If your TRX is held in a wallet, you must deposit your TRX to an exchange before June 24, 2018 to avoid any losses. From June 21st– 25th, TRX withdrawals on exchanges will be suspended. On June 25th, both TRX deposits and withdraws on exchanges will be suspended. Deposits and withdraws will resume on June 26th. During this period, TRX trading will not be affected. If your TRX is held in a wallet and you were not aware of the migration notice, or saw the migration notice after June 25th, please visit our permanent token-exchange counter to exchange your tokens for mainnet TRX.