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

Proposal: Optimizing Ordinals Protocol Performance for Log-Based Protocols #3983

Open
jolestar opened this issue Oct 6, 2024 · 0 comments
Open

Comments

@jolestar
Copy link

jolestar commented Oct 6, 2024

Background

The Ordinals protocol is currently facing a performance issue related to protocols built on top of it, such as BRC20, which use Inscriptions as logs. After these Inscriptions are inscribed and indexed, they essentially become obsolete, with users no longer concerned about them and often spending the BTC contained within. However, the Ordinals protocol continues to track SatPoint changes for these Inscriptions, leading to an increasing number of Inscriptions in certain transactions. This significantly impacts the performance of Ordinals protocol indexers.

Problem Statement

The continuous tracking of SatPoint changes for Inscriptions used as logs in higher-layer protocols (e.g., BRC20) is causing unnecessary computational overhead and degrading the performance of Ordinals indexers.

Examples of Problematic Transactions

To illustrate the severity of this issue, consider the following examples:

  1. Transaction ID: 80c233e3d72b5dbb735b7e06acd4accd74f33b5703292a36d9d0faba79e45c63

  2. Transaction ID: 832e9a18d07e9dcdaa21d4a2b548c28d17f0ad21ac5853976600d2c2853d4878

    The two transactions involve changes to over 10,000 Inscriptions. The sheer volume of Inscription updates in a single transaction demonstrates the scale of the tracking overhead.

Proposed Solutions

To address this issue, we propose the following solutions:

  1. Selective Tracking of Inscriptions
    Implement a mechanism to stop tracking SatPoint changes for Inscriptions that are used as logs by protocols like BRC20. This would involve identifying such Inscriptions and excluding them from ongoing SatPoint change tracking.

  2. One-Time Inscription Flag
    Introduce a new attribute or instruction at the Ordinals protocol level to flag an Inscription as "one-time" or "ephemeral". This flag would indicate that the Inscription should not be tracked for SatPoint changes after its initial inscription, similar to the OP_RETURN opcode in Bitcoin UTXO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant