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

15 Likes

@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
2 Likes

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.
1 Like

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.
2 Likes