TRON 4.0 Online Conference: Thomas Fan — Senior Technical Architect of TRONSCAN: The Future of Blockchain Explorer
Hello, everyone! I’m Thomas from the TRONSCAN developer team. I’m glad to share with you my information.
Let’s start our talk. Today, my topic is TRONSCAN - the future of Blockchain explore. Here, I will reveal the internal working mechanism of TRONSCAN and I will briefly introduce the future plan.
Here, I will reveal TRONSCAN in this three parts. First is the basic work of TRONSCAN and I will introduce you three major works of TRONSCAN. This is part is mainly about what you can see in the website.
Next, I will introduce TRONSCAN’s technical work. This part is mainly about the performance of TRONSCAN such as the loading speed and the response time of the API core and at last, I will briefly introduce the future plan. As for the basic work, I divided it into basic data analysis, statistic work and user interaction. Let’s start with basic data analysis.
So before we can do the data analysis, first, we should have data. So our first and priority work is to bring data from footnote or solidated note from TRONSCAN. First, I want to emphasize that TRONSCAN does not produce data. We are only data messengers.
So next time, if you find the TRONSCAN data is inconsistent with the data from the data sources, please feel safe to trust them. Don’t forget to inform the TRONSCAN to fix the incorrect data.
After we fetch the data, we’re going to the next step: process data. All of the raw data from TRON note is hex encoded. So we need to pass the data to make it readable. And classify the data by its features such as blocks, transactions, and transfers as you can see on the TRONSCAN website. We store the data into our data base. After doing that, at last, according to TRONSCAN’s demands, we will develop different API to show the data to users. Here in conclusion, the basic data analysis work of TRONSCAN is to obtain and process data from data sources and finally, display them to the users.
Next, I will show you three major works of TRONSCAN last year. First, TRONSCAN supports some network. Here is a graph of Sunnetwork and you can view through this link. This graphic is so small. I’m wondering if you can see it.
Now, TRONSCAN and the mainnet TRONSCAN are updated simultaneously. So the new feature of TRONSCAN is also displayed in the Sunnetwork. Next, TRONSCAN is supporting the full note data. Now, if you scan the blocks, transactions and transfers in TRONSCAN, you will see both the unconfirmed and confirmed data. And if you view the videos of this data, you may find the confirmation numbers.
Third, TRONSCAN has transaction screening features. This feature, I think, is the greatest in our work. Here in this graph, you can see, you can filter this transactions by the transaction time, transaction type, status, results and the tokens. Further more, you can screen the result by searching the addresses and transaction hash.
This is amazing work! This is our basic data analysis work and 3 major works of TRONSCAN. Next, let’s move on to the statistic work. Basically, TRONSCAN source stores over 6.7 terra byte of data. This data will produce many statistics after analysis so let’s start to look at the home page graph.
There are two common, most common statistical graphs and five statistical data on the TRONSCAN home page. I think if you follow Justin’s Twitter, you will find he always codes this data. If not, just open your Twitter and follow Justin and you will get all of this messages.
Okay. Let’s move on to the top statistics. You can view the top statistics through the link. Here, the top statistics mainly focus on the changes of accounts, tokens, contracts and resources of TRONSCAN in the period of time.
So you can see the addresses that receive the most of TRX. For more information, you can view this link. As for the statistic charts, this mainly focuses on the overall trends or proportion or the other features of different data. The time range is from the TRON independence day to the present and for example, you can see the energy conception and daily transactions here and for more information, you can view this link showed here.
Last, I will show you the proposal votes in our TRONSCAN. Here with the statistic, every super representatives vote for and against each proposal. Here in the proposal details, you will intuitively find which super representative vote for or against this proposals. Here and this is all the statistic work of TRONSCAN.
Here, in summary, in addition to data acquisition and processing abilities, TRONSCAN also analyzes data to show the users the statistical data and show us the development trend of TRONSCAN. Next is the user interaction compared with the two parts that we just discussed. This part is relatively simple. First, we develop the login system. Users can login here and tag their addresses in their own way. And secondly, we have a token record feature. Users can record TRC-10 and TRC-20 created by themselves.
We will develop more features of TRONSCAN later. Here, this is all of the basic data, the basic work of TRONSCAN.
Here, we will talking about the technical work of TRONSCAN. Before I show you the architecture of TRONSCAN, I would like to show you some numbers. Here, you can see we stored much data and the data size is over 6.7 terra byte and our QPS is 332 and the max is over 73 thousand but you can see, the response time is still very good. The average response time is 0.041 seconds and 99 percent of response time is below 0.651 seconds.
So how can TRONSCAN maintain such great performance under such a large scale of requests? Let’s take a look at the architecture of the TRONSCAN. Here, the TRONSCAN is composed of three models. They are display module, employ module and interactive module. We use footnote and — here, you can see this plays the messenger role. It brings data from our data sources and stores it to the data base and also, the import model does the statistical work. As for the display model, a read data from our data base and shows it all to the users and for the interactive model, we save users logging in and token information into my circle and this internal part of this mode will regularly synchronize my circle data to the elastic surge cluster.
Here, we use elastic search as our data base because it better feeds our business for reading more and writing less and this is our architecture diagram.
Here is the technology upgrade of TRONSCAN. The first one is TRONSCAN upgrade no API. Actually, this is not made by TRONSCAN. This is made by TRON note. The newly added message can fetch all info in the block and significantly improve the import speed. Secondly, these three are all really the TRONSCAN upgrade. First, we separate import model from elastic search clusters to make that, such that the server can be the elastic search note.
Next, we create the new index and merge the old index segments and then we deal with wrong and missing data to make TRONSCAN data accurate. At last, we made code upgrade from removing it and cache the important data and after this series of operations, wow! Let’s see. There is a significant drop of the average response time.
Okay, I think I have some time so I will briefly introduce the future plan of TRONSCAN.
First, what is more important is that TRONSCAN will be able provide stable services for the user. It will support new features such as privacy features and since TRONSCAN has powerful data of processing abilities. In the future, TRONSCAN will provide more statistical data. Thirdly, TRONSCAN will upgrade the architecture to adapt to the changing business needs.
Before, I finished my presentation, if you want to know the progress of TRONSCAN, just open your Wechat to scan our official code. If you don’t have Wechat, that’s okay. Just open your Twitter and follow Justin. You will not only see TRONSCAN process but you’ll find the current information of the TRONSCAN ecosystem and that’s all I want to share with you. Thank you for listening. Thanks!