Skip to content

Commit

Permalink
Problem: non-stable Gravity Bridge module related functionality (#168)
Browse files Browse the repository at this point in the history
Solution: drafted ADR to disable Gravity Bridge at genesis
  • Loading branch information
tomtau committed Oct 13, 2021
1 parent 86ebb2b commit 51db712
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ To suggest an ADR, please make use of the [ADR template](./adr-template.md) prov
## Table of Contents

| ADR \# | Description | Status |
| ------ | ----------- | ------ |
| ------ | ----------- | ------ |
| [001](./adr-001.md) | Disable Gravity Bridge at Genesis | Proposed |
51 changes: 51 additions & 0 deletions docs/architecture/adr-001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# ADR 001: Disable Gravity Bridge at Genesis

## Changelog
* 12-10-2021: Initial Draft
* 13-10-2021: Code deletion instead of conditional compilation

## Context

The Gravity Bridge module was added for fungible asset transfers from and to the Ethereum network.
Additionally, custom code was added for directly mapping the native tokens from Gravity Bridge
to the Ethermint module. At the time of writing, Gravity Bridge does not have a stable release
and the codebase contains several known issues.

## Decision

The Gravity Bridge module will be removed from:
1. "app/app.go" which contains the module initialization boilerplate
2. "cmd/cronosd/cmd/root.go" which adds Gravity Bridge-related commands.

In addition to that, the "x/cronos" module contains Gravity Bridge-related code in its types and keeper. This following code will be removed:
1. the whole x/cronos/keeper/gravity_hooks.go module
2. the gravityKeeper field in CronosKeeper

Existing integration tests related to Gravity Bridge can be temporarily disabled and later enabled when Gravity Bridge is added back.

Once the Gravity Bridge code is added back, the x/cronos module `ConsensusVersion` should be increased and the corresponding upgrade handler should be added.

## Status

Accepted

## Consequences

### Positive
* Reduced complexity in the initial Cronos state
* Reduced complexity in the initial infrastructure deployment
* Possible to add the Gravity Bridge module in a coordinated upgrade when the module gets a stable release

### Negative
* Not testing Gravity Bridge temporarily

### Neutral
* A need for a breaking change upgrade

## References

* https://github.com/althea-net/cosmos-gravity-bridge/issues/348
* https://github.com/althea-net/cosmos-gravity-bridge/issues/347
* https://github.com/althea-net/cosmos-gravity-bridge/issues/346
* https://github.com/althea-net/cosmos-gravity-bridge/issues/344
* in-place store migrations: https://github.com/cosmos/cosmos-sdk/blob/a47bd592e951d34ebbffca03f85ca98d65b61be8/docs/architecture/adr-041-in-place-store-migrations.md

0 comments on commit 51db712

Please sign in to comment.