Skip to content

Commit

Permalink
Merge pull request #129 from rootulp/rp/disable-blobstream
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp authored Apr 17, 2024
2 parents d784a17 + 77f208c commit 06d9031
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Read [CIP-1](https://github.com/celestiaorg/CIPs/blob/main/cips/cip-1.md) for in
| [17](/cips/cip-17.md) | Lemongrass Hardfork | Evan Forbes (@evan-forbes) |
| [18](/cips/cip-18.md) | Standardised Gas and Pricing Estimation Interface | Callum Waters (@cmwaters) |
| [19](/cips/cip-19.md) | Shwap Protocol | Hlib Kanunnikov (@Wondertan) |
| [20](/cips/cip-20.md) | Disable Blobstream module | Rootul Patel (@rootulp) |

## Contributing

Expand Down
75 changes: 75 additions & 0 deletions cips/cip-20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
cip: 20
title: Disable Blobstream module
description: Disable the Blobstream state machine module
author: Rootul Patel (@rootulp)
discussions-to: https://forum.celestia.org/t/cip-disable-blobstream-module/1693
status: Draft
type: Standards Track
category: Core
created: 2024-04-16
---

## Abstract

The purpose of this proposal is to disable the Blobstream module in celestia-app.

## Motivation

The Blobstream module is a celestia-app specific state machine module. The Blobstream module was designed to serve as a single component in the original Blobstream architecture. The original Blobstream architecture has been deprecated in favor of [Blobstream X](https://github.com/succinctlabs/blobstreamx) so the Blobstream module is no longer needed and thus can be disabled.

## Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

If this CIP is adopted:

1. The state machine MUST NOT accept new transactions that include Blobstream messages (e.g. `NewMsgRegisterEVMAddress`).
1. The state machine MUST NOT respond to queries for the Blobstream module (e.g. `AttestationRequestByNonce`, `LatestAttestationNonce`, `EarliestAttestationNonce`).

## Parameters

If this CIP is adopted, the following parameter can be removed:

| Parameter | Value | Description | Changeable via Governance |
|---------------------------------|-------|------------------------------------------------------------------------|---------------------------|
| blobstream.DataCommitmentWindow | 400 | Number of blocks that are included in a signed batch (DataCommitment). | True |

## Rationale

Disabling the Blobstream module reduces the functionality of the celestia-app state machine. Disabling the Blobstream module also reduces the amount of state that needs to be stored and maintained in the celestia-app state machine.

## Backwards Compatibility

This proposal is backwards-incompatible because it is state-machine breaking. Therefore, this proposal cannot be introduced without an app version bump.

## Test Cases

> [!NOTE]
> Blobstream was previously named Quantum Gravity Bridge (QGB) and the codebase never fully adopted the name change so you may interpret instances of `qgb` as `blobstream`.
1. Ensure that celestia-app no longer accepts transactions for the Blobstream module. Example: `celestia-app tx qgb <command>` should return an error message.
1. Ensure that celestia-app no longer accepts gRPC, RPC, or CLI queries for the Blobstream module. Example: `celestia-app query qgb <command>` should return an error message.

## Reference Implementation

Celestia-app uses a versioned module manager and configurator that enables the removal of modules during app version upgrades. Concretely, the Blobstream module can be disabled via this diff in `app.go`:

```diff
{
Module: blobstream.NewAppModule(appCodec, app.BlobstreamKeeper),
FromVersion: v1,
- ToVersion: v2,
+ ToVersion: v1,
},
```

Additionally, a store migration needs to be registered during the upgrade process to ensure that the Blobstream module's state is removed. Lastly, the Blobstream module's tx commands and query commands should be removed from the CLI.

## Security Considerations

TBD

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).

0 comments on commit 06d9031

Please sign in to comment.