Skip to content

Commit

Permalink
Merge branch 'main' of github.com:strangelove-ventures/wormhole into …
Browse files Browse the repository at this point in the history
…chore-add-wormchain-receiver-tests
  • Loading branch information
kakucodes committed Sep 18, 2024
2 parents c22de2d + d3b6331 commit 1cbaa8c
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 0 deletions.
1 change: 1 addition & 0 deletions wormchain/docs/.adr-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
architecture
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 1. ADRs will be the Canonical Source of Truth for architecture decisions

Date: 2024-06-24

## Status

Accepted

## Context

- As WH/SL
- We want a place to memorialize decisions
- Because it helps with context / institutional memory / onboarding

As discussed and agreed to in the Strangelove / Wormhole [project kick-off](https://miro.com/app/board/uXjVK_fZYq0=/?share_link_id=596301298163).

## Decision

To memorialize decisions, we'll use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).

Briefly: ~if~ whenever we make a decision which might reasonably cause a Future Developer (e.g., a new dev, or Six-Months-In-The-Future-Us) to say "Wait—why'd we choose that?", we'll log an ADR to act as a Canonical Source Of Truth, contemporaneously detailing reasoning.

At times, we'll certainly be wrong.

We'll almost certainly backtrack certain ideas.

But—hopefully—we won't bark up the same tree twice.

## Consequences

- You might want some tooling. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools), or `brew install adr-tools` if you're the trusting sort.
- We instantiated w/ the default template (Status, Context, Decision, Consequences). If/when we want to update the ADR format, this gh issue has the rundown: https://github.com/npryce/adr-tools/issues/120.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 2. wasmvm will be upgraded to v1.5.2 and not v2.x.x

Date: 2024-06-24

## Status

Accepted

## Context

wasmvm 1.5.2 has an EOL that will arrive sooner, but v2.x.x is a riskier upgrade path.

## Decision

We will upgrade to v1.5.2 and NOT v2.x.x because it was suggested that the risk/reward isn't worth it: too new,
bugs on tokenfactory for chains which deployed it. We will hold off on that for now.

## Consequences

Not being on wasmvm v2.x.x will leave wormhole gateway missing out on the "factor of 1000" lower cosmwasm gas costs,
improved submessage ergonomics and ability to query cosmwasm via grpc which are some of the main 2.x benefits.
Reference: https://medium.com/cosmwasm/cosmwasm-2-0-bbb94126ce6f
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 3. Cosmos SDK v0.47 upgrade will be implemented in Wormhole Fork

Date: 2024-07-10

## Status

Accepted

## Context

The Wormhole Foundation has made a copy of the Cosmos SDK repository, which can be found in their Github organization [here](https://github.com/wormhole-foundation/cosmos-sdk). They are referencing this copied repository in the wormchain [go.mod](https://github.com/wormhole-foundation/wormhole/blob/6236a9a6cbd0dc00a940e6654c6f6106d0904ece/wormchain/go.mod#L142) file, referencing the [v0.45.9-wormhole-2](https://github.com/wormhole-foundation/cosmos-sdk/releases/tag/v0.45.9-wormhole-2) tag. This tag has [commits](https://github.com/wormhole-foundation/cosmos-sdk/commits/v0.45.9-wormhole-2/?since=2022-10-19&until=2022-12-21) made by the wormhole-foundation team that fundamentally change the behavior of the staking module, particularly implementing proof of authority based on the wormchain guardian set.

## Decision

With the use of a forked Cosmos SDK and fundamental changes to the staking module, the initial Cosmos SDK v0.45 to v0.47 upgrade will be done on their fork in the following manner:

1. Pull in the [v0.47.12](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.12) (latest in the v0.47 series) tag from the Cosmos SDK repository into the
2. Re-implement the changes made in the v0.45.9-wormhole-2 tag into the v0.47.12 tag.
3. Release a new tag that includes the changes from the v0.47.12 tag and the changes made on top of it from the v0.45.9-wormhole-2 tag.
4. Reference this new version in the wormchain go.mod file.

## Consequences

With the changes to the staking module being applied directly in the Wormhole Foundation Cosmos SDK fork, this will have the following good and bad consequences:

1. It will maintain the required changes made to the staking module as they were at the time of the v0.45.9-wormhole-2 tag.
2. It will be easier to maintain the changes made to the staking module as they will be directly applied to the forked repository.
3. Maintaining the fork of the Cosmos SDK will be more difficult as the Cosmos SDK repository will continue to evolve.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 4. Tendermint Core Will be Migrated to CometBFT by Bumping to Latest Cosmos SDK Upstream v0.45

Date: 2024-07-12

## Status

Accepted

## Context

The Wormhole Cosmos SDK was forked at [v0.45.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.9) of the Cosmos SDK releases. This can be seen by looking at their [in-use tag's](https://github.com/wormhole-foundation/cosmos-sdk/commits/v0.45.9-wormhole-2/) last commit from the upstream [here](https://github.com/wormhole-foundation/cosmos-sdk/commit/2582f0aab7b2cbf66ade066fe570a4622cf0b098), which shares the commit history and SHA of the v0.45.9 release.

This version of the Cosmos SDK was released before the fork of Tendermint Core and migration provided by the Cosmos SDK core team in the [Comet BFT](https://github.com/cometbft/cometbft) project, the motivation of which was announced [here](https://informal.systems/blog/cosmos-meet-cometbft).

To facilitate a more modern usage of the Cosmos SDK, projects should move away from Tendermint Core to CometBFT, as it is more up-to-date, maintained and provides security and bug fixes.

The Cosmos SDK team slowly rolled out migrations from Tendermint Core to CometBFT in the Comsos SDK repo, and this migration was implemented in the v0.45 line in release [v0.45.15](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.15).

## Decision

The migration to Tendermint Core will take place by:

1. Pulling in the upstream latest version in the v0.45 line, which is [v0.45.16](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.16) (one version after the v0.45.15 migration release)
2. Replaying the [commits](https://github.com/wormhole-foundation/cosmos-sdk/commits/v0.45.9-wormhole-2/?since=2022-10-19&until=2022-12-21) implemented by the Wormhole developers on top of this tag
3. Release a new tag that includes the changes from the v0.45.16 tag and the changes made on top of it from the v0.45.9-wormhole-2 tag.
4. Reference this new version in the wormchain go.mod file.

## Consequences

This change will have the following consequences:

1. It pulls in the latest bug fixes and security updates in the v0.45 line while work on moving to v0.47 continues (see ADR 3 for details)
2. It will require extensive testing and review to ensure the changes from v0.45.9 to v0.45.16 did not break the Wormchain repo's usage of the Cosmos SDK

0 comments on commit 1cbaa8c

Please sign in to comment.