Patract Labs' treasury proposal for Europa v0.1

4yrs ago
0 Comments

Github: https://github.com/patractlabs/europa

Europa is inspired by Ganache, Ethereumjs-VM and Buidler EVM from the Ethereum ecosystem. Europa is a sandbox of Substrate runtime environment, which would be used to simplify the developing, debugging, and integration test when developers develop Substrate runtime applications and test pallet-contracts. The sandbox will remove P2P and consensus functions, just remaining the execution environment and RPC interface. We will wrap the core modules, then provide a local database, a detailed log print function, a concept of workspaces which isolates different developing environments, and interact with different front-end UIs. The sandbox has no time interval between producing blocks, so debugging can be optimised to be very quickly.

Summary of Europa's future plan:

1. v0.1: Have an independent runtime environment to facilitate more subsequent expansion directions.


The independent runtime environment of excluded nodes can be expanded more without the constraints of the node environment and WASM compilation, and can be easily integrated with other components. In this version, it is more like simulating the Ganache project in Ethereum ecosystem, enabling contract developers to develop without having to build a contract blockchain. Developers can quickly fire up a personal Substrate chain, which can be used to run tests, execute commands, and inspect state while controlling how the chain operates.

**2. v0.2: Modify at contract module level to provide more information
**

In this version, we will fork the pallet-contracts module for secondary development. We will strengthen the part of the error notification for contract developers, such as providing:

  • WASM stack traces, the function call stack during WASM contract execution;
  • Contracts stack traces, the call stack of a contract calling another contract;
  • Console.log, provides libraries and methods to print command lines during contract development;
  • Strengthen the error type and error display of the contract module;
  • Simple integration with Redspot;

** 3. v0.3: Improve the developement experience, strengthen collaboration with other tools, and extend the sandbox to be compatible with other runtime modules**

  • Strengthen the integration with Redspot
  • Strengthen the integration with polkadot.js.org/apps to achieve complete RPC support
  • Support status data query

Detailed design of v0.1 (6 weeks, 21 Sept ~ 2 Nov):

Milestone 1 : (3 developers * 1 weeks)

  • Implement an independent runtime executive environment
  • Implement Externalities trait for a Externalities -like object
  • Implement needed Extension trait interface.

Milestone 2 : (3 developers * 1 weeks)

  • Implement a local database for this runtime executive environment to store all trie data, block and extrinsic
  • Implement a local database to store a bypath k/v state data, for exporting and querying from those data.

Milestone 3 : (3 developers * 1 weeks)

  • Implement a block packing function to pack blocks directly rather than through consensus process, allowing to pack one or multiple extrinsics at once.
  • Providing a workspace concept to isolate different environment.

Milestone 4 : (3 developers * 1 weeks)

  • Implement RPC functions of "forward to height" and "backward to height"
  • Providing a way to pack blocks directly to assigned height
  • Revert current state to a reverted height

Milestone 5 : (3 developers * 2 weeks)

  • Integration and testing

Cost of v0.1 (18 developers * weeks)

  • Operating activities: $3600 ( Rent and Devices: $200 per developer * week )
  • Employee payments: $36000 ($1900 per developer * week)
  • —————————— +
  • Total Cost: $37800
  • Exchange Rate: $4/ New DOT
  • Treasury Proposal: 9450 New DOT

How to verify v0.1: Youtube demo video & Github source

  • Build and run in an independent executable file
  • Can start from different workspaces, and a new workspace is an empty chain
  • Can receive extrinsics to set_code, deploy and call contracts directly
  • Can interact with Redspot
  • Can use RPC to jump over some blocks and revert to a specified height to revert states
Up
Comments
No comments here