Skip to content

Commit

Permalink
docs(cip-20): update reference implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Apr 24, 2024
1 parent 6e3e53d commit aa249d4
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion cips/cip-20.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,41 @@ Celestia-app uses a versioned module manager and configurator that enables the r
},
```

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.
The blobstream store key MUST be removed from the versioned store keys map in `app/modules.go` for app version 2:

```diff
func versionedStoreKeys() map[uint64][]string {
return map[uint64][]string{
1: {
// ...
},
2: {
// ...
- blobstreamtypes.StoreKey,
}
}
}
```

The Blobstream module's tx commands and query CLI commands MAY be removed from the CLI in `x/blobstream/module.go`:

```diff
// GetTxCmd returns no command because the blobstream module was disabled in app
// version 2.
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
- return bscmd.GetTxCmd()
+ return nil
}

// GetQueryCmd returns no command because the blobstream module was disabled in
// app version 2.
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
- return bscmd.GetQueryCmd()
+ return nil
}
```

Lastly, the x/blobstream module registers hooks in the staking module. Since these hooks are not version-aware, they MUST be made no-ops for app versions >= 2.

## Security Considerations

Expand Down

0 comments on commit aa249d4

Please sign in to comment.