Skip to content

Commit

Permalink
Merge branch 'main' into julien/buf-proto
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Jan 8, 2024
2 parents 7abd5bc + 41c84d6 commit 8026a74
Show file tree
Hide file tree
Showing 237 changed files with 12,354 additions and 4,730 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/fork-cherry-pick.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ build-tags:
linters:
disable-all: true
enable:
- errcheck
- dogsled
- errcheck
- exportloopref
- gci
- goconst
- gocritic
- gci
- gofumpt
- gosec
- gosimple
Expand All @@ -35,11 +35,11 @@ linters:
- misspell
- nakedret
- nolintlint
- staticcheck
- revive
- staticcheck
- stylecheck
- typecheck
- thelper
- typecheck
- unconvert
- unused

Expand Down
96 changes: 52 additions & 44 deletions CHANGELOG.md

Large diffs are not rendered by default.

50 changes: 46 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,56 @@ If you want to follow the updates or learn more about the latest design then joi
The Cosmos ecosystem is vast.
[Awesome Cosmos](https://github.com/cosmos/awesome-cosmos) is a community-curated list of notable frameworks, modules and tools.

### Cosmos Hub Mainnet

The Cosmos Hub application, `gaia`, has its own [cosmos/gaia repository](https://github.com/cosmos/gaia). Go there to join the Cosmos Hub mainnet and more.

### Inter-Blockchain Communication (IBC)

The IBC module for the Cosmos SDK has its own [cosmos/ibc-go repository](https://github.com/cosmos/ibc-go). Go there to build and integrate with the IBC module.

### Version Matrix

The version matrix below shows which versions of the Cosmos SDK, modules and libraries are compatible with each other.

#### Core Dependencies

Core Dependencies are the core libraries that a application may depend on.

> Note: the ❌ signals that the version of the Cosmos SDK does not need to import the dependency.
| Cosmos SDK | cosmossdk.io/core | cosmossdk.io/api | cosmossdk.io/math | cosmossdk.io/errors | cosmossdk.io/depinject | cosmossdk.io/log | cosmossdk.io/store |
|------------|-------------------|------------------|-------------------|---------------------|------------------------|------------------|--------------------|
| 0.50.z | 0.11.z | 0.7.z | 1.y.z | 1.y.z | 1.y.z | 1.y.z | 1.y.z |
| 0.47.z | 0.5.z | 0.3.z | 1.y.z | 1.y.z | 1.y.z | 1.y.z ||
| 0.46.z ||| 1.y.z | 1.y.z ||||

#### Module Dependencies

Module Dependencies are the modules that a application may depend on and which version of the Cosmos SDK they are compatible with.

> Note: The version table only goes back to 0.50.x, this is due to the reason that modules were not spun out into their own go.mods until 0.50.z. ❌ signals that the module was not spun out into its own go.mod file.

| Cosmos SDK | 0.50.z | 0.y.z |
|-----------------------------|-----------|-------|
| cosmossdk.io/x/auth || |
| cosmossdk.io/x/accounts || |
| cosmossdk.io/x/bank || |
| cosmossdk.io/x/circuit | 0.1.z | |
| cosmossdk.io/x/consensus || |
| cosmossdk.io/x/distribution || |
| cosmossdk.io/x/evidence | 0.1.z | |
| cosmossdk.io/x/feegrant | 0.1.z | |
| cosmossdk.io/x/gov || |
| cosmossdk.io/x/group || |
| cosmossdk.io/x/mint || |
| cosmossdk.io/x/nft | 0.1.z | |
| cosmossdk.io/x/protcolpool || |
| cosmossdk.io/x/slashing || |
| cosmossdk.io/x/staking || |
| cosmossdk.io/x/tx | =< 0.13.z | |
| cosmossdk.io/x/upgrade | 0.1.z | |




## Disambiguation

This Cosmos SDK project is not related to the [React-Cosmos](https://github.com/react-cosmos/react-cosmos) project (yet). Many thanks to Evan Coury and Ovidiu (@skidding) for this Github organization name. As per our agreement, this disambiguation notice will stay here.
75 changes: 75 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,81 @@ Note, always read the **SimApp** section for more information on application wir

## [Unreleased]

### Unordered Transactions

The Cosmos SDK now supports unordered transactions. This means that transactions
can be executed in any order and doesn't require the client to deal with or manage
nonces. This also means the order of execution is not guaranteed. To enable unordered
transactions in your application:

* Update the `App` constructor to create, load, and save the unordered transaction
manager.

```go
func NewApp(...) *App {
// ...

// create, start, and load the unordered tx manager
utxDataDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data")
app.UnorderedTxManager = unorderedtx.NewManager(utxDataDir)
app.UnorderedTxManager.Start()

if err := app.UnorderedTxManager.OnInit(); err != nil {
panic(fmt.Errorf("failed to initialize unordered tx manager: %w", err))
}
}
```

* Add the decorator to the existing AnteHandler chain, which should be as early
as possible.

```go
anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(),
// ...
ante.NewUnorderedTxDecorator(unorderedtx.DefaultMaxUnOrderedTTL, app.UnorderedTxManager),
// ...
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
```

* If the App has a SnapshotManager defined, you must also register the extension
for the TxManager.

```go
if manager := app.SnapshotManager(); manager != nil {
err := manager.RegisterExtensions(unorderedtx.NewSnapshotter(app.UnorderedTxManager))
if err != nil {
panic(fmt.Errorf("failed to register snapshot extension: %s", err))
}
}
```

* Create or update the App's `Close()` method to close the unordered tx manager.
Note, this is critical as it ensures the manager's state is written to file
such that when the node restarts, it can recover the state to provide replay
protection.

```go
func (app *App) Close() error {
// ...

// close the unordered tx manager
if e := app.UnorderedTxManager.Close(); e != nil {
err = errors.Join(err, e)
}

return err
}
```

To submit an unordered transaction, the client must set the `unordered` flag to
`true` and ensure a reasonable `timeout_height` is set. The `timeout_height` is
used as a TTL for the transaction and is used to provide replay protection. See
[ADR-070](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-070-unordered-account.md)
for more details.

### Params

* Params Migrations were removed. It is required to migrate to 0.50 prior to upgrading to .51.
Expand Down
Loading

0 comments on commit 8026a74

Please sign in to comment.