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

Delayed Write Buffers, WebSocket Multiplexer, Secret HEAPS, & SNIP-250 #148

Open
blake-regalia opened this issue Mar 30, 2024 · 0 comments
Assignees
Labels
Q2'24 Q2'24 Cohort

Comments

@blake-regalia
Copy link

Summary

Privacy Hardening and Network Scaling on Secret
by Blake Regalia and Ben Adams, Solar Republic LLC

This is an R&D proposal seeking to address and overcome specific challenges facing the network related to storage access patterns, metadata leakage, and scalability.

Delayed Write Buffers is a novel approach to solving storage access patterns for Secret tokens. The solution is done entirely within the contract, i.e., without any changes to the network, without off-chain computation, and without the need for client intelligence. It is both cheaper and more effective than decoys, maintains compatibility with existing interfaces, and allows existing tokens to adopt through contract upgrade.

Creating a Tendermint events multiplexer service would allow wallets and frontends to immediately reduce the loads being put on Secret query nodes, which by default are limited to 100 simultaneous clients, with a maximum of 5 subscriptions per client. Additionally, apps that start leveraging SNIP-52 notifications (instead of polling contracts with queries every 6 seconds in anticipation of an event or action) will not only benefit their end-users through a more responsive experience, but will also substantially improve the availability and resource utilization of query nodes.

Secret H.E.A.P.S. (Fully Homomorphically-Encrypted & Authenticated Private Storage) is an L2 storage mechanism hosted outside the enclave for Secret contracts that serves clients in a way that is private, unidirectional, authenticated, and oblivious. Secret HEAPS reduces loads on query nodes by allowing private data to be accessed without the use of smart queries. However, the primary benefit of using HEAPS comes from its performance. Instead of waiting between 8 to 30 seconds retrieving up to 20 token different balances as is the case now, dozens of simultaneous HEAPS queries would only take on the order of milliseconds.

Proposal Objectives

  1. Publish a blog post and/or docs.scrt.network technical article detailing Delayed Write Buffers
  2. Add a SNIP-52 notification library to Secret Toolkit
  3. Develop and deploy WebSocket multiplexer for Tendermint events capable of rewind, search, and filter
  4. Develop and deploy prototype of Secret HEAPS node
  5. Develop the SNIP-250 reference implementation to supersede the SNIP-2x token implementation, consisting of delayed write buffers + SNIP-50 gas evaporation + SNIP-52 private notifications for tokens spent/received and allowances granted/received + the contract-side of Secret HEAPS

Funding & Milestones

  1. Delayed Write Buffers docs & sample impl - $10k
    • $5k initial, $5k upon delivery
  2. Adding SNIP-52 to Secret Toolkit - Pro bono
  3. Tendermint event WebSocket multiplexer - $6k
    • $2k initial, $2k upon delivery, $2k upon deployment in cloud and use in StarShell
  4. Secret HEAPS node software impl - $8k
    • $2k initial, $3k upon delivery, $3k upon deployment and use serving at least 500 queries per day
  5. SNIP-250 spec & ref impl - $10k
    • $2k initial, $4k upon delivery, $4k upon mainnet deployment

Team

The core StarShell developers:

  • Blake Regalia, supdoggie
  • Ben Adams, darwinzero
@azaidelson azaidelson self-assigned this Apr 1, 2024
@azaidelson azaidelson added the Q2'24 Q2'24 Cohort label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Q2'24 Q2'24 Cohort
Projects
None yet
Development

No branches or pull requests

2 participants