Skip to content

Commit

Permalink
Merge branch 'master' into aleem/8961-simapp-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
atheeshp authored Sep 15, 2021
2 parents b46c739 + e700838 commit a066318
Show file tree
Hide file tree
Showing 13 changed files with 703 additions and 69 deletions.
14 changes: 3 additions & 11 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ pull_request_rules:
method: squash
strict: true
commit_message: title+body
- name: backport patches to v0.43.x branch
- name: backport patches to v0.44.x branch
conditions:
- base=master
- label=backport/0.43.x
- label=backport/0.44.x
actions:
backport:
branches:
- release/v0.43.x
- release/v0.44.x
- name: backport patches to v0.42.x branch
conditions:
- base=master
Expand All @@ -25,11 +25,3 @@ pull_request_rules:
backport:
branches:
- release/v0.42.x
- name: backport patches to v0.39.x branch
conditions:
- base=master
- label=backport/0.39.x (Launchpad)
actions:
backport:
branches:
- launchpad/backports
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
+ [\#9980](https://github.com/cosmos/cosmos-sdk/pull/9980) Returning the error when the invalid argument is passed to bank query total supply cli.
+ [\#10061](https://github.com/cosmos/cosmos-sdk/pull/10061) Ensure that `LegacyAminoPubKey` struct correctly unmarshals from JSON
* (server) [#10016](https://github.com/cosmos/cosmos-sdk/issues/10016) Fix marshaling of index-events into server config file.
* (x/feegrant) [\#10049](https://github.com/cosmos/cosmos-sdk/issues/10049) Fixed the error message when `period` or `period-limit` flag is not set on a feegrant grant transaction.


### State Machine Breaking
Expand Down Expand Up @@ -150,6 +151,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [\#8518](https://github.com/cosmos/cosmos-sdk/pull/8518) Help users of multisig wallets debug signature issues.
* [\#9573](https://github.com/cosmos/cosmos-sdk/pull/9573) ADR 040 implementation: New DB interface
* [\#9952](https://github.com/cosmos/cosmos-sdk/pull/9952) ADR 040: Implement in-memory DB backend
* [\#9848](https://github.com/cosmos/cosmos-sdk/pull/9848) ADR-040: Implement BadgerDB backend


### Client Breaking Changes
Expand Down
25 changes: 25 additions & 0 deletions db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,28 @@ This represents a self-contained and immutable view of a database's version hist

The in-memory DB in the `db/memdb` package cannot be persisted to disk. It is implemented using the Google [btree](https://pkg.go.dev/github.com/google/btree) library.
* This currently does not perform write conflict detection, so it only supports a single open write-transaction at a time. Multiple and concurrent read-transactions are supported.

### BadgerDB

A [BadgerDB](https://pkg.go.dev/github.com/dgraph-io/badger/v3)-based backend. Internally, this uses BadgerDB's ["managed" mode](https://pkg.go.dev/github.com/dgraph-io/badger/v3#OpenManaged) for version management.
Note that Badger only recognizes write conflicts for rows that are read _after_ a conflicting transaction was opened. In other words, the following will raise an error:

```go
tx1, tx2 := db.Writer(), db.ReadWriter()
key := []byte("key")
tx2.Get(key)
tx1.Set(key, []byte("a"))
tx2.Set(key, []byte("b"))
tx1.Commit() // ok
err := tx2.Commit() // err is non-nil
```

But this will not:
```go
tx1, tx2 := db.Writer(), db.ReadWriter()
key := []byte("key")
tx1.Set(key, []byte("a"))
tx2.Set(key, []byte("b"))
tx1.Commit() // ok
tx2.Commit() // ok
```
Loading

0 comments on commit a066318

Please sign in to comment.