[Shipped] Incognito Dev Framework

Currently, developing and debugging features in the Incognito Blockchain is difficult and time-consuming. Most of the design test requires running a real environment which need a large amount of resources. Real environment tests also cannot cover special cases, such as network-related tests. In this proposal, we aim to solve this pain by providing tools for our dev and tester, that:

  • allow one to easily learn about Incognito blockchain by simulating a whole Incognito blockchain with single process
  • offer more control of the environment and easily capture and check state by both code & RPC
  • runs a consistent pre-defined scenario without waiting days for testing
  • allows TDD(test-driven development) processes

The first version of this framework would be:
- Running a simple simulation of whole Incognito blockchain, including the beacon and shards producing blocks
- Quickly generate blocks using commands
- Create tx using commands
- Stop and resume simulation for checking state with RPC server
- Hook functions before and after creating, and insert operation

Length: 3 months

Resource: @0xkumi, @lam, @hyng


@0xkumi Will you take me into your gang?

Thank you for your request. This work needs to be done by core members, which have better communication and discussion environment. However, after the framework is ready, you can contribute by providing feedback or implementing several protocol flow for educational purposes.

1 Like

Update Progress:

  • The progress is faster than we expected. Currently, the basic component of the framework is implemented and it can support fast generating block, hook function for Create/Validation/Insert block.
  • Next month, we will add more API into the framework, so that it can help client to simulate more advanced flow such as pdex, stake/unstake protocol

Update progress:

  • Basic flow is added. Now we can simulate pdex, stake/unstake protocol.
  • We also implemented app node feature, which allow any developer easily integrate their business logic to Incognito chain.
  • The rest of this month will be refactor codebase and document for the first release.

Update progress (27-Nov-2020)

  • The first version of the framework is finished and ready to use by the Incognito Core Team member (Dynamic Committee Size team will explore first)
  • In the next version, we will add Consensus and Network module into the simulation codebase, which allows developers to simulate consensus protocol and interact with highway infrastructure.

Final Update (28-Dec-2020)

  • Previous month, we added network module into the framework API, so that developers can call API to get block from Highway. Based on this, an example of new node mode (Light node) is introduced.
  • We also added some logic of Consensus protocol for supporting validation. However, the full flow of consensus protocol should be tested by a separated Simulation package
  • This tool currently is enough for our dev team to explore the chain protocol. Any modification will be done when needed. For security concerns, the protocol simulation part will not be released publicly in the near future but will be used by the internal team instead.
  • In addition, there will be the framework for the development dApp on IncognitoChain, which will be released soon.

Hi @0xkumi,

How would this impact our current builder development flow, any critical changes ?

Hi @taind, the framework is just an optional code base that eases the development process, so we can have more app utilities in the network. The old builder may follow their old development environment and don’t care about this framework.

1 Like