Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade v0.45.8 #133

Merged
merged 23 commits into from
Sep 27, 2022
Merged

chore: upgrade v0.45.8 #133

merged 23 commits into from
Sep 27, 2022

Conversation

MissingNO57
Copy link
Collaborator

No description provided.

mergify bot and others added 12 commits September 16, 2022 11:06
* feat: improve GetLastCompletedUpgrade

* rename

* use var block
…nterfaces (backport #12603) (#12638)

* feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces (#12603)

## Description
Most modules right now have a no-op for AppModule.BeginBlock and AppModule.EndBlock. We should move these methods off the AppModule interface so we have less deadcode, and instead move them to extension interfaces.

1. I added `BeginBlockAppModule` and `EndBlockAppModule` interface.
2. Remove the dead-code from modules that do no implement them
3. Add type casting in the the module code to use the new interface

Closes: #12462
… balance for a given denom (backport #12674) (#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
* bump tendermint version

* add changelog entry

* replace on jhump

* updates

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
* prepare for release

* modify release notes
@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2022

Codecov Report

Merging #133 (3fc8a80) into master (9be8f9f) will decrease coverage by 0.10%.
The diff coverage is 40.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #133      +/-   ##
==========================================
- Coverage   60.81%   60.70%   -0.11%     
==========================================
  Files         595      595              
  Lines       38363    38534     +171     
==========================================
+ Hits        23330    23392      +62     
- Misses      13078    13173      +95     
- Partials     1955     1969      +14     
Impacted Files Coverage Δ
baseapp/abci.go 60.31% <0.00%> (ø)
baseapp/baseapp.go 78.26% <ø> (ø)
client/grpc/tmservice/service.go 71.15% <ø> (ø)
client/tx/legacy.go 64.28% <ø> (ø)
codec/proto_codec.go 73.41% <ø> (ø)
codec/unknownproto/unknown_fields.go 75.00% <ø> (ø)
crypto/armor.go 85.89% <ø> (ø)
crypto/hd/algo.go 0.00% <0.00%> (ø)
crypto/keyring/keyring.go 59.47% <0.00%> (ø)
crypto/keys/ed25519/ed25519.go 69.38% <ø> (ø)
... and 157 more

mergify bot and others added 11 commits September 16, 2022 12:58
* fix(docs): typo in staking/state (#12834)

(cherry picked from commit fe89212)

# Conflicts:
#	x/staking/spec/01_state.md

* updates

Co-authored-by: Ari Rubinstein <arirubinstein@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…11737) (#12818)

* fix: Use fixed length hex for pointer at FwdCapabilityKey (backport #11737)

* Update CHANGELOG.md

* add comments and unit tests
* feat: deterministic map iteration (#12781)

## Description

We should ensure that events emitted are in a deterministic order on any node.

Sorry, the previous [PR-12693](cosmos/cosmos-sdk#12693) was closed due to wrong operation.

Close: #12693
…ckport #12885) (#12961)

* perf: Amortize clearing unsorted cache entries (Juno genesis fix) (#12885)

This change fixes a bounty by the Juno team.  Juno's invariant checks took 10 hours during their most recent chain halt. This PR cuts that down to 30 seconds.  See https://github.com/CosmosContracts/bounties#improve-speed-of-invariant-checks.

The root problem is deep in the `can-withdraw` invariant check, which calls this repeatedly: https://github.com/cosmos/cosmos-sdk/blob/main/x/distribution/keeper/store.go#L337.  Iterators have a chain of parents and in this case creates an iterator from the `cachekv` store.  For the genesis file, it has a cache of 500,000+ unsorted entries, which are sorted as strings here: https://github.com/cosmos/cosmos-sdk/blob/main/store/cachekv/store.go#L314.  Each delegation from `can-withdraw` uses this cache and many of the cache checks miss or are a very small range.  This means very few entries get removed from the unsorted cache and they have to be re-sorted on the next call.  With a full cache it takes about 180ms on my machine to sort them.

This change introduce a minimum number of entries that will get processed and removed from the unsorted list. It's set at the same value that directs the code to sort them in the first place.  This ensures the unsorted values get removed in a relative short amount of time, and amortizes the cost to ensure an individual check does not have to process the entire cache.

## Benchmarks
On running the benchmarks included in this change produces:
```shell
name                    old time/op    new time/op    delta
LargeUnsortedMisses-32     21.2s ± 9%      0.0s ± 1%   -99.91%  (p=0.000 n=20+17)

name                    old alloc/op   new alloc/op   delta
LargeUnsortedMisses-32    1.64GB ± 0%    0.00GB ± 0%   -99.83%  (p=0.000 n=19+19)

name                    old allocs/op  new allocs/op  delta
LargeUnsortedMisses-32     20.0k ± 0%     41.1k ± 0%  +105.23%  (p=0.000 n=19+20)
```

## Invariant checks results
This is what the invariant checks for Juno look like with this change (on a Hetzner AX101):

```shell
INF starting node with ABCI Tendermint in-process
4:11PM INF Starting multiAppConn service impl=multiAppConn module=proxy
4:11PM INF Starting localClient service connection=query impl=localClient module=abci-client
4:11PM INF Starting localClient service connection=snapshot impl=localClient module=abci-client
4:11PM INF Starting localClient service connection=mempool impl=localClient module=abci-client
4:11PM INF Starting localClient service connection=consensus impl=localClient module=abci-client
4:11PM INF Starting EventBus service impl=EventBus module=events
4:11PM INF Starting PubSub service impl=PubSub module=pubsub
4:11PM INF Starting IndexerService service impl=IndexerService module=txindex
4:11PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=v9.0.0-36-g8fd6f16
4:11PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
4:12PM INF asserting crisis invariants inv=1/11 module=x/crisis name=gov/module-account
4:12PM INF asserting crisis invariants inv=2/11 module=x/crisis name=distribution/nonnegative-outstanding
4:12PM INF asserting crisis invariants inv=3/11 module=x/crisis name=distribution/can-withdraw
4:12PM INF asserting crisis invariants inv=4/11 module=x/crisis name=distribution/reference-count
4:12PM INF asserting crisis invariants inv=5/11 module=x/crisis name=distribution/module-account
4:12PM INF asserting crisis invariants inv=6/11 module=x/crisis name=bank/nonnegative-outstanding
4:12PM INF asserting crisis invariants inv=7/11 module=x/crisis name=bank/total-supply
4:12PM INF asserting crisis invariants inv=8/11 module=x/crisis name=staking/module-accounts
4:12PM INF asserting crisis invariants inv=9/11 module=x/crisis name=staking/nonnegative-power
4:12PM INF asserting crisis invariants inv=10/11 module=x/crisis name=staking/positive-delegation
4:12PM INF asserting crisis invariants inv=11/11 module=x/crisis name=staking/delegator-shares
4:12PM INF asserted all invariants duration=28383.559601 height=4136532 module=x/crisis
```

## Alternatives
There is another PR which fixes this problem for the Juno genesis file cosmos/cosmos-sdk#12886. However, because of its concurrent nature, it happens to hit a large range relatively early, clearing the unsorted entries and allowing the rest of the checks to not sort it.

(cherry picked from commit 4fc1f73)

# Conflicts:
#	CHANGELOG.md

* fix conflict

Co-authored-by: blazeroni <blazeroni@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…050)

* fix: missing return statement in BaseApp.Query (#13046)

## Description

Closes: #13040
* chore: v0.45.8 release changelog

* fix issue name
@MissingNO57 MissingNO57 changed the title [WiP] chore: upgrade v0.45.8 chore: upgrade v0.45.8 Sep 16, 2022
Copy link
Contributor

@daeMOn63 daeMOn63 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants