以太坊网络区块浏览器目前主要是etherscan.io提供。官方正规的区块浏览器没有etherscan.io强大,不具有合约内联交易,Token交易分析功能,而etherscan.io不开源,而且API仅提供有限的服务。
不过etherscan.io的速度的确快,无论是查交易,还是查地址,查询速度基本可以在几秒之内返回。
The web browser is currently mainly available as etherscan.io. The official block browser does not have eitherscan.io strong , has no inter-contractual transactions & #xff0c; Token trade analysis function & #xff0c; and otherscan.io has no open source & #xff0c; and API provides only limited services. 为什么可以做得这么块呢,因为对于任意地址,仅保存了其100k(10万)的交易,这样查询一般的数据库在建立索引的情况,可以在3秒内返回。 xff0c; because for any address xff0c; only its 100kxff08; 100,000xff09; transactions xff0c; so searching the general database for indexing xff0c; can return within three seconds. https://blockscout.com 的功能覆盖了etherscan.io的主要功能,包括内联交易,代笔交易等。 blockscout采用Erlang/OTP 20.2+,Elixir 1.6+开发,Phoenix Framework WEB框架,Postgres 10.0数据库。 Blockscout uses Erlang/OTP 20.2+ & #xff0c; Elixir 1.6+ Development & #xff0c; Phoenix Framewerk WEB framework & #xff0c; Postgres 10.0 database. 交易表有3.89亿条记录,blockscout如何存储和检索? The schedule contains 389 million records & #xff0c; blockscout how to store and retrieve ? 如何处理如此大的数据量,对于一个开源项目仍然是一个很大的挑战。 How to deal with such a large amount of data xff0c; this remains a major challenge for an open source project.
, however
目前(2019.2.10)地址有567万个,3.89亿个交易,这么大的数据量,可以满足如此高并发的查询请求,背后的资源投入可想而知。
Current xff08; 2019.2.10xff09; address 56.7 millionxff0c; 389 million transactions xff0c; such a large data volume xff0c; able to satisfy such high and simultaneous query requests xff0c; and resource input behind.
如下是其特征:
为啥blockscout采用Postgres数据库,而不是MySQL或者MogoDB?
有点儿担心后面数据的查询性能是否可以跟得上。
Why Blockscout uses Postgres database xff0c; instead of MySQL or MogoDB?
has some concerns about whether the query performance of the latter data can be followed up.
参见:
https://github.com/poanetwork/blockscout/blob/master/apps/explorer/priv/repo/migrations/20180117221923_create_transactions.exs
区块高度,交易哈希都建立索引,属于正规操作。
;
https://gethub.com/ponnetwork/blockscout/master/apps/explorer/priv/repo/migrations/2018022193_reate_transactions.exs
high-level #xff0c; #hx0c; #xffp.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论