Otterscan, an open source, local block explorer for EVM chains by Willian Mitsuda (@wmitsuda)
ETHDubai 2023 · 16 Mar 2023 · 12:15
Willian Mitsuda demonstrates Otterscan, a lightweight local block explorer for Erigon users. He discusses reducing reliance on centralized explorers and the challenges of matching their features.
Speakers
Topics
From ETHDubai 2023, hosted by DeFi Dubai.
Transcript
hello everyone thank you for having me well I'm William and I'm here to present to others come so first of all first of all what is others come simply put sub block explorer that you can actually run at your home and that's how it looks like but we decided to take a different approach on how it's implemented compared to other block explorers in the market we didn't just want to implement another block Explorer but we wanted to make it like a real depth and in the process of some of the issues that other
block explorers have let's take a quick look at each one of these problems the first one is the classic eaters coins down we all want decentralization but the inconvenience proof is that we are very dependent on centralized closed search assistance that's a big issue author Square relies on Argon with some archive knowledge implementation that takes over two terabytes of disk space and is able to sync main that in less than one week depends on your Hardware also they require the required hardware is not so expensive so compared to other
implementations you can actually run at your home and that's all you need author's current self is a react app and it connects through air going to obtain all data that it needs there's no need to install additional software no needs to configure external databases or other kind of middleware and since everything is local your only requirements is to have a work internet connection so your node is always up to date with the rest of the network issue number two I just said that all you need is an ergo node but not the entire truth because the standard apis like a lot of
features many of them we need for routers come for example there is no easy way to get out transactions made by a given address and as we can see many people from communities have complaining over and over about those limitations so we implemented the custom apis inside the Argon to enable these non-standard info to be extracted for your nodes and these apis can be used by any aircon user so not only we solved our problem but we also contributed something back to the communities and these apis are building inside the
Argon starting from version 2.29 which was released last year so if you have a recent argon installation you are good good to go you just need to enable a flag as uh initialization flag now let's take a look at an example here's the OTS gets contract Creator methods it allows us to get the address who created the contracts also the transaction where it was created it also works very well with the player contracts another example here is the OTS get transaction level which self-explaining
it allows us to get the hour message on failure transactions and there are many other methods that support childhood requirements that we have in others come and could be useful for you so I invite you all to check our documentation on GitHub issue number three we don't rely on closed search data a block Explorer needs more than just one chain data for example for displaying token icons or decoding for bytes data we only use open date open data sources like we get the icons from trust wallets and we use the open search for bytes
database from the Italian lists projects even the price conversion comes from unchain info we get them from the chain link feed so you don't need to rely on external apis another issue is the source verification for search verification we use source5 which is an open source decentralized or open database for contract verification data you can download it from ipfs you can keep a cop for yourself it's totally permissionless
this is an example showing the deposited contract it reads the contracts metadata from ipfs and this is the nift2 deposit transaction note how the API which comes from the metadata is used to decode the transaction parameters so what is the current status of the projects we are a community project supported by the ergon team and git coin grants donors which allows us to keep working on it we've been organically growing in popularity over time but we are still not future complete
there are lots of features that still need to to be implemented so now I'd like to show some of the features and challenge that we are being worked on so there will be some some Alpha all data that daughter's current uses today is taking from the Argon database however we now need higher level data that's not directly available from it so what are the possible solutions for it the most obvious solution is to migrate to use some kind of external indexer but there are a few problems with that
approach the first one is having to rely on some kind of RPC interface which is slow like jsrpc or maybe grpc could be a little faster but still it is inter-process communication another problem is how to handle reargs the indexer needs to be aware of reorgs otherwise it will show incorrect data another issue is you need to set up some additional middleware but well I think you can you can see that that approach would not work and that's the exact reason why I started
routers as an alternative solution to other explorers or targets user is the home user but keeping a useful node infrastructure at home is becoming harder and harder over time so again we are trying a different approach Ergo has a sink life cycle Based On A specialized stages we are adding a set of custom sync stages inside the Argon that way we are integrating an indexer inside the execution layer and solving all the pain points it's to a work in progress the code is
not published yet but I've been publishing some in intermediate results on Twitter like that one with talking daxer which works in real time so as soon as a block is added it's because for new token deployments so far I've made a set of custom stages which could identify erc20 tokens nfts minimal proxies also talking holding so giving a give you a certain address you can determine which tokens has some balancing associated and also we have an indexer for transfer between address and now that is
fascinated by transaction transactions and as I said before all these new indexers will be available for any any Ergo user out of box I intend to publish a First Alpha of these indexers in a few weeks so please keep an eye on your your on our Twitter account for news and that's it thank you very much questions all right do we have any questions for William if you have any questions yep right over
here good stuff thank you for for building this uh so my question is how do you see collaboration between uh this part of uh scan and like other explorers like do you think that can be some like interfaces between components of um like indexer I don't know UI maybe some like not only right now like most explorers rely on some like Json RPC right and it's standardized but also we have some other components right like smart contract verification indexing services you know like nft metadata indexing and so on right
so uh would be great to have some I know components which other explorers can plug in right and use it um because you know I'm I'm working on uh also in this field on black Scout which is open source Explorer and we we hope to see you know more components to be used in different explorers as well so like back to the question is like how do you see it integrated with other explorers like do you want to work from your site to be it included as a part of indexer of other explorers for example or it's just like okay guys take it that's how I developed it and so on well uh well let's see I think eventually we will
extract some of the components that we use in other scone and we we already use a lot of external components like other open databases but we also plan to eventually spin off some common components like our indexer could be something that could be isolated from where you go eventually and that could attract other projects to to use it but I that that does not that the the number one priority this is something that I think if the the component is good enough it will happen naturally so I'm not that worried about it right now and
in more concerned about making something that works in a reasonable reasonable reasonable time and does not consume a lot of disk space so we can keep the authors kind of something that home users come room at home