informalsystems / informalsystems/quartz

Figure out how to create merkle proofs for CosmWasm `Map`s

Open
#30 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted protocol-design scaling
Dominant language
Rust
Stars
63
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Summary

CosmWasm stores each Map item under a separate (namespaced) key. This makes it complicated to prove the existence of multiple items in an 'all-encompassing' manner (i.e. covering all items).

We could store the list in a serialized Vec but that would lead to increased gas costs for checking duplicates, etc. and we would have to implement pagination ourselves. (This is the current impl in the https://github.com/informalsystems/bisenzone-cw-mvp)

A potential alternative is to use cw_storage_plus::Deque (although that also probably uses namespaced keys).

Acceptance Criteria

  • Devise/Implement a better method to store and retrieve items on CosmWasm with proofs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the CosmWasm Map storage model and the cw_storage_plus::Deque alternative described in the issue, including the bisenzone-cw-mvp approach. Compare storage, pagination, duplicate-checking, gas, and proof requirements. Done means a documented or implemented method for storing and retrieving items with proofs that satisfies the acceptance criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.