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

Implement Comprehensive Dojo Storage Benchmarking with Katana #24

Open
neotheprogramist opened this issue Oct 23, 2023 · 0 comments · Fixed by dojoengine/dojo#1148
Open
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@neotheprogramist
Copy link
Member

Overview

With a goal to achieve optimal storage efficiency, it's essential to evaluate how Dojo performs in terms of improving storage efficiency, especially focusing on gas consumption. Between Scarb and Katana, the latter is the preferred choice for benchmarking due to its ability to export gas usage information, unlike Scarb.

Goals

Conduct a comprehensive benchmark using Katana to measure gas consumption related to storage operations in various scenarios:

  1. Native Storage: Benchmarking storage operations without integrating Dojo.
  2. Simple Dojo Storage: Standard storage operations with the integration of Dojo.
  3. Dojo Packing Storage: Storage operations with Dojo's packing feature.
  4. Dojo Indexing Storage: Storage operations using Dojo's indexing.

Proposed Architecture

  • Katana running locally (or remotely)
  • Dojo contracts as test ground, because of compability with tooling and familiarity for developers
  • proptest crate generating cases for property testing, failure persistence and regression (as well as async capabilities)
  • Each contract is deployed, and called with data generated by proptest
  • Fee is read from receipts

Levels of Test Complexity

To provide a comprehensive understanding of how Dojo performs across different use-cases, benchmarking should be carried out under three distinct complexities:

  1. Simple Data Structures: Mainly basic data structures.
  2. Medium Complexity Data Structures: Intermediate level structures that offer more complexity than the basic ones but aren't highly intricate.
  3. Complex Data Structures: Highly intricate structures that are robust and multifaceted.

Suggested Development Order

  1. Basic Katana Setup

    • Branch Name: 24-1-basic-katana-setup
  2. Simple Benchmark

    • Task: Benchmark using simple data structures.
    • Branch Name: 24-2-simple-benchmark
  3. Medium Benchmark

    • Task: Benchmark using medium complexity data structures.
    • Branch Name: 24-3-medium-benchmark
  4. Complex Benchmark

    • Task: Benchmark using highly intricate data structures.
    • Branch Name: 24-4-complex-benchmark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
2 participants