Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPEC] Simulation environment and test system of the validator #742

Open
hellwolf opened this issue Apr 12, 2022 · 1 comment
Open

[SPEC] Simulation environment and test system of the validator #742

hellwolf opened this issue Apr 12, 2022 · 1 comment
Labels
Project: PROTOCOL-SPEC Superfluid protocol specification in haskell Tag: Idea Raw idea, questions, thoughts and brainstorming notes Type: Testing Testing cases or harness improvements

Comments

@hellwolf
Copy link
Contributor

hellwolf commented Apr 12, 2022

!NB! We are still sourcing the development partner for this

Why this is being developed?

Superfluid specification is being built up as a set of concepts defined in the superfluid-protocol-spec-core haskell module.

Why Specification?

  • It serves as a reference impelmentation which will help to port the protocol to different blockchain implementations.
  • It allows faster prototyping of new ideas in abstraction without being limited by any specific blockchain.

Why Haskell?

  • First of all, haskell is a pure, strongly typed, concise, high level, memory-managed modular language.
  • Because of this, it is well suited to for the job of writing the specification for the protocol where abstraction, precision and succinctness matter.
  • Having higher level of abstractions gets Superfluid protocol closer to being able to formal definitions in category theory e.g.
  • Developers using Haskell tend to be more comfortable in refining concepts and constant refactoring, sometimes pedantically. But production code usually can't afford these due to harder to refactor than using Haskell.

Why Simulation Environment?

  • An integrated experience for fast prototyping of new concepts.
  • Easy to share and demonstrate the foundational tech.

Why Test System?

  • Re-use the simulation environment but for controlled tests.
  • As the basis for implementation validations.

Requirements

The validator should be able to run in at least two different modes

Web App Mode | A Simulation Environment with REPL

  • A web app that servers the simulation sessions in the backend, while frontend reads the state of the simulation and renders them.
  • The state of the simulation mainly cosists of:
    • Global state: tokens, token statistics, etc.
    • Account state: real-time balances of accounts in testing, active agreements of the account.
  • Renderings of these states should include charts, timeline (with the ability to travel back-and-forth in time), etc.
  • User inputs should support simple DSL with a REPL like interface.
  • The backend should support multiple sessions, so that we could host it to limited partners for testing out.

Tester Mode

  • The same DSL used in the web app mode should also be reused here to write the scenario test scripts.
  • It can run any scenario test script using the same simulation engine, and take snapshots of test data as output.
  • These test data outputs will be used in the future for validating protocol implementations.
@hellwolf hellwolf added Project: PROTOCOL-SPEC Superfluid protocol specification in haskell Tag: Bounty Things that has a bounty on them Type: Testing Testing cases or harness improvements labels Apr 12, 2022
@hellwolf hellwolf added this to the [email protected] milestone Apr 12, 2022
@sunnyjaycer
Copy link
Contributor

sunnyjaycer commented Jun 1, 2022

To be closed as per 5/11 convo w/ @hellwolf

@hellwolf hellwolf reopened this Jun 13, 2022
@hellwolf hellwolf removed the Tag: Bounty Things that has a bounty on them label Jun 13, 2022
@hellwolf hellwolf added the Tag: Idea Raw idea, questions, thoughts and brainstorming notes label Aug 30, 2022
@hellwolf hellwolf added the Team: Protocol Protocol Core, Sentinel, Peripherals, Protocol Infrastructure Tools & DevOps label Aug 23, 2023
@hellwolf hellwolf removed the Team: Protocol Protocol Core, Sentinel, Peripherals, Protocol Infrastructure Tools & DevOps label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project: PROTOCOL-SPEC Superfluid protocol specification in haskell Tag: Idea Raw idea, questions, thoughts and brainstorming notes Type: Testing Testing cases or harness improvements
Projects
None yet
Development

No branches or pull requests

2 participants