Substracer - an open-source Substrate network simulator (experimental)

Hello Polkadot Community!

Full project description is here: GitHub - lowlevelers/substracer: Simulate the substrate network in an interactive graphical interface.
I would love to propose my idea for the interactive substrate simulator.

Description

Simulate the substrate network in an interactive graphical interface.

  • Run a virtual Substrate node directly on the browser
  • Configure pallets and chain specification interactively
  • Tracing the peer-to-peer network behavior

Motivation

One of the biggest obstacles to diving deeper into the Polkadot blockchain is the limitation of hardware requirements and lack of interactive approaches. The learning curve is huge to start with the Polkadot core technologies and requires much time to read the documentation. Inspired by this thread on Polkadot forum, there is no unified approach for DevRel to widespread the value of the whole Polkadot ecosystem.

Hence, we feel like the community needs a more creative solution to the stated problem. With experience in traditional networking software, the Cisco Packet Tracker is a tool that hugely inspired the birth of the Substrate Simulator.

Current issues

Our team is researching and trying to figure out how to build a simulated environment for Substracer. After learning about zombienet and netsim approach, if we apply the design of zombienet for Substracer, we need to refractor the runtime to add custom logger overriding the existing runtime logger so it can stream the data of node back to Substracer backend. However, this still use a local testing environment not a simulated environment. Hence, it’s hard if we want to spawn >10 daemons just for testing. But the benefit is we don’t have to worry much about the underlying networking protocol built on top of libp2p.

With netsim, it gives us the ability to simulate the simple network but there is not way to integrate it with libp2p. Hence, we need to mock libp2p code and build a simpler version to support the simulation.

As we don’t have much experience with Substrate and still in the progress of learning about the technology, it would be great if we can receive the feedback and suggestion from the community!

I don’t really understand the scope of this. You listed 3 items in the description and each of them are its own project and not really related to each other. So with only one sentence, what exactly are you trying to build?

BTW, in case you are not aware, Chopsticks already allow emulator Substrate node directly on the browser. Integrate chopsticks by qiweiii · Pull Request #9965 · polkadot-js/apps · GitHub

One of the biggest obstacles to diving deeper into the Polkadot blockchain is the limitation of hardware requirements and lack of interactive approaches.

Hardware requirement, yeah that’s not something can be solved easily and I don’t recommend anyone seeking for recommendations to try to solve this. Lack of interactive approaches? What do you mean by this? How is this an issue?

1 Like

Thanks for your questions. What I mean is from the aspect of developer experience, the DevRel and educators don’t have a way to intuitively visualize the behavior of the Substrate node and its underlying activities. For example, in the Ethereum ecosystem, we have CryptoZombies to educate new developers about ERC721.

With Substrate, there is no easy-to-use solution, or maybe I have not found one yet, that new developers can run a node with a few clicks and see how the node works under the hood. If they want to reconfigure the node to see the behavior changes of the whole network, it is possible too.

I am super confused by your examples. I tried CryptoZombies many years ago and it is good but it doesn’t intuitively visualize the behavior of the Ethereum node and its underlying activities.

Can you give me one sentence to describe the product that you want to build?

1 Like

Maybe I took a bad example. Let’s say Cisco Packet Tracker but for Substrate node. I think it is an appropriate headline for the idea.

I don’t know what is Cisco Packet Tracker so that isn’t helping