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

fix: Capability Issue on Restart, Backport to v0.42 #9835

Merged
merged 14 commits into from
Aug 4, 2021

Conversation

AdityaSripal
Copy link
Member

@AdityaSripal AdityaSripal commented Aug 2, 2021

Description

Closes: #9800

This PR fixes the issue explained in #9800 . The previous was bug happened because initialization logic was put in first transaction execution pipeline, and initialized state got reverted if the first capability tx to run the initialization logic got reverted.

This PR fixes the problem by moving the initialized flag from a global variable in the binary, to a flag in the memory store. It gets set once the capabilities have been correctly initialized which will happen either on InitChain (in case of genesis start). Or in BeginBlock (regular restart/upgrade with upgrade module/statesync)


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@orijbot
Copy link

orijbot commented Aug 2, 2021

Visit https://dashboard.github.orijtech.com?pr=9835&repo=cosmos%2Fcosmos-sdk to see benchmark details.

@AdityaSripal AdityaSripal changed the title Backport Capability Fix to v0.42 Fix: Capability Issue on Restart, Backport to v0.42 Aug 2, 2021
Copy link
Member Author

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Moved the in-memory initialization logic to BeginBlock and InitGenesis rather than having it run on first capability tx.

This removes worry about tx reverting. It also is a cleaner solution. In-memory initialization happens in InitGenesis for new chains or genesis restarts. It happens on first BeginBlock, for all other cases.

Comment on lines +20 to 22
// initialize in-memory capabilities
k.InitMemStore(ctx)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be used if node is restarted from genesis (either a new chain or genesis restart)

func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)

k.InitMemStore(ctx)
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be used if node is restarting without genesis restart (ie. regular restart, upgrade with upgrade module, statesync)

Copy link
Contributor

Choose a reason for hiding this comment

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

BeginBlocker will be called on genesis I think (i.e. the 1st block).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but the initialization logic won't get rerun because the initialization flag in memory is already set

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm, state sync nodes will only run NewApp and not InitGenesis or BeginBlocker (before state sync)?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is my understanding, please confirm @alexanderbez

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct, state-synced nodes will NOT run InitGenesis and will not run BeginBlock until the first block after the state-sync height.

@AdityaSripal AdityaSripal changed the title Fix: Capability Issue on Restart, Backport to v0.42 fix: Capability Issue on Restart, Backport to v0.42 Aug 2, 2021
@RiccardoM
Copy link
Contributor

RiccardoM commented Aug 3, 2021

Tested using our upgrade test CI action: the fix works!

The CI does the following:

  1. Setup a 4 node local testnet with the current Desmos version and using Cosmovisor
  2. Submit an upgrade proposal
  3. Setup the new binary to be used as the future upgrade binary
  4. Wait until upgrade happens
  5. Submit a first failing transfer transaction
  6. Submit a second valid channel open-init transaction

The first transaction (transfer) fails with insufficient funds: https://github.com/desmos-labs/desmos/runs/3227885529?check_suite_focus=true#step:8:57

The second transaction (channel open-init) works properly: https://github.com/desmos-labs/desmos/runs/3227885529?check_suite_focus=true#step:8:92

Previously the second transaction would have failed with the error reported inside the issues.

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Excellent work! Very clean fix!! Left some nits

func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)

k.InitMemStore(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm, state sync nodes will only run NewApp and not InitGenesis or BeginBlocker (before state sync)?

prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixIndexCapability)
iterator := sdk.KVStorePrefixIterator(prefixStore, nil)
k.sealed = true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

so InitializeAndSeal no longer initializes any capabilities, it just seals the keeper and ensures the mem store is a mem store. Should the godoc be updated?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct and yes, I break this API on the breaking-changes pr

Copy link
Collaborator

Choose a reason for hiding this comment

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

This function doesn't do a full initialization - it doesn't call InitMemStore. Maybe let's make a note, that this function should be called after InitMemStore. So we should update the comments of this function and InitMemStore function. And in 0.43 we can maybe rework it to make it more clear - by renaming this function to k.Seal(ctx)

BTW: we don't need to check the store type - this should be done in InitMemStore.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see that you are sealing in the InitMemStore. So we should update the comments of this function and InitMemStore. And in 0.43 we can maybe rework it to make it more clear.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, this is a breaking change of the state machine.

Copy link
Member Author

Choose a reason for hiding this comment

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

No this shouldn't be breaking the state machine. InitializeCapability only writes to the memstores and in-memory go map.

The memory store does not get committed along with the rest of the app state. It is in-memory local storage for each node. So changing things inside of it does not break the state machine.

https://github.com/cosmos/cosmos-sdk/blob/master/store/mem/store.go

Copy link
Collaborator

Choose a reason for hiding this comment

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

The memory store does not

I know. Breaking state machine doesn't necessary mean to break the written state. To illustrate this issue:

  1. Node A will run app with 0.42.8
  2. Node B will run same app (same app manager config) but using 0.42.9

Node A will have all capabilities initialized, Node B will not have.

Copy link
Member Author

Choose a reason for hiding this comment

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

No this PR just changes where/when the capabilities are initialized.

In 0.42.8, the capabilities are initialized in app start NewApp, and then reinitialized on the first transaction that calls GetCapability.

In 0.42.9, the capabilities are initialized at the first abci method after startup (either InitChain or BeginBlock).

In either case, the capabilities are initialized before they are requested in a transaction, which is what is necessary for keeping nodes in sync.

There is a bug in 0.42.7 and 0.42.8, so there are situations where its state becomes out of sync with a node from 0.42.6.

However, comparing a node on 0.42.6 to a node on 0.42.9. They may initialize the in-memory capabilities in different places; however both will be fully initialized by the time the capability module gets used and thus will authenticate and reject the same transactions and be perfectly in sync.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The behavior of InitializeCapability is different - so an app will need to make more changes in the code than bumping a version. IMHO this is a breaking change - we signal to the app that bumping a version is not enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes just bumping the version will not be enough. You will also have to make changes to app.go. But it should be clear that you can run gaia with 0.42.6 and 0.42.9 on the same network and there will be no state divergence

x/capability/capability_test.go Outdated Show resolved Hide resolved
x/capability/capability_test.go Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)

k.InitMemStore(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Correct, state-synced nodes will NOT run InitGenesis and will not run BeginBlock until the first block after the state-sync height.

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

Let's update the function comments and changelog.

x/capability/abci.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixIndexCapability)
iterator := sdk.KVStorePrefixIterator(prefixStore, nil)
k.sealed = true
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function doesn't do a full initialization - it doesn't call InitMemStore. Maybe let's make a note, that this function should be called after InitMemStore. So we should update the comments of this function and InitMemStore function. And in 0.43 we can maybe rework it to make it more clear - by renaming this function to k.Seal(ctx)

BTW: we don't need to check the store type - this should be done in InitMemStore.

prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixIndexCapability)
iterator := sdk.KVStorePrefixIterator(prefixStore, nil)
k.sealed = true
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see that you are sealing in the InitMemStore. So we should update the comments of this function and InitMemStore. And in 0.43 we can maybe rework it to make it more clear.

x/capability/keeper/keeper.go Show resolved Hide resolved
x/capability/abci.go Outdated Show resolved Hide resolved
x/capability/keeper/keeper.go Show resolved Hide resolved
// IsInitialized returns true if the initialized flag is set, and false otherwise
func (k *Keeper) IsInitialized(ctx sdk.Context) bool {
memStore := ctx.KVStore(k.memKey)
return memStore.Get(types.KeyMemInitialized) != nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we use a keeper variable to cache the state? Now we are doing an extra state hit all the time. Once the response is true, we can cache it in the Keeper private variable (eg k.initialized).

Copy link
Member Author

@AdityaSripal AdityaSripal Aug 3, 2021

Choose a reason for hiding this comment

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

Sure, but note this is a read to an in-memory store, so it's not nearly as expensive as an I/O read. Maybe caching with private variable will be a bit faster so I can do this if desired

Copy link
Collaborator

Choose a reason for hiding this comment

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

right, I made this automatic by looking at the code. I think it's "nice to have"

x/capability/keeper/keeper.go Outdated Show resolved Hide resolved
x/capability/keeper/keeper.go Outdated Show resolved Hide resolved
AdityaSripal and others added 3 commits August 4, 2021 11:35
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

utACK. Thanks for updates Aditya

@robert-zaremba robert-zaremba added the A:automerge Automatically merge PR once all prerequisites pass. label Aug 4, 2021
mergify bot pushed a commit that referenced this pull request Aug 4, 2021
…9845)

## Description

+ Backported go doc comment updates from #9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
mergify bot pushed a commit that referenced this pull request Aug 4, 2021
…9845)

## Description

+ Backported go doc comment updates from #9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit bdf5aee)

# Conflicts:
#	CHANGELOG.md
#	x/capability/keeper/keeper.go
#	x/capability/module.go
@amaury1093 amaury1093 added this to the v0.42.9 milestone Aug 4, 2021
@robert-zaremba robert-zaremba merged commit 7f41de9 into release/v0.42.x Aug 4, 2021
@robert-zaremba robert-zaremba deleted the aditya/backport-cap-fix branch August 4, 2021 10:50
RiccardoM pushed a commit to desmos-labs/cosmos-sdk that referenced this pull request Aug 4, 2021
* implement BeginBlock fix

* add changelog

* fix lint

* address reviews

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* address reviews

* Apply suggestions from code review

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* move store check

* add api breaking changelog

* fix lint

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
robert-zaremba added a commit that referenced this pull request Aug 4, 2021
…ackport #9845) (#9846)

* style(capability)!: update go doc comments and remove BeginBlocker (#9845)

## Description

+ Backported go doc comment updates from #9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit bdf5aee)

# Conflicts:
#	CHANGELOG.md
#	x/capability/keeper/keeper.go
#	x/capability/module.go

* solve conflicts

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this pull request Aug 19, 2021
…ackport #9845) (#9846)

* style(capability)!: update go doc comments and remove BeginBlocker (#9845)

## Description

+ Backported go doc comment updates from cosmos/cosmos-sdk#9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this pull request Aug 20, 2021
…ackport #9845) (#9846)

* style(capability)!: update go doc comments and remove BeginBlocker (#9845)

## Description

+ Backported go doc comment updates from cosmos/cosmos-sdk#9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog
evan-forbes pushed a commit to evan-forbes/cosmos-sdk that referenced this pull request Oct 12, 2021
…ackport cosmos#9845) (cosmos#9846)

* style(capability)!: update go doc comments and remove BeginBlocker (cosmos#9845)

## Description

+ Backported go doc comment updates from cosmos#9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit bdf5aee)

# Conflicts:
#	CHANGELOG.md
#	x/capability/keeper/keeper.go
#	x/capability/module.go

* solve conflicts

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
evan-forbes pushed a commit to evan-forbes/cosmos-sdk that referenced this pull request Nov 1, 2021
…ackport cosmos#9845) (cosmos#9846)

* style(capability)!: update go doc comments and remove BeginBlocker (cosmos#9845)

## Description

+ Backported go doc comment updates from cosmos#9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit bdf5aee)

# Conflicts:
#	CHANGELOG.md
#	x/capability/keeper/keeper.go
#	x/capability/module.go

* solve conflicts

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Raumo0 pushed a commit to mapofzones/cosmos-sdk that referenced this pull request Feb 13, 2022
* docs: add v0.43 release version option (backport cosmos#9506) (cosmos#9677)

* docs: add v0.43 version option (cosmos#9506)

Co-authored-by: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com>
(cherry picked from commit 325dabd)

# Conflicts:
#	docs/versions

* fix conflicts

Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>

* chore: Add missing entry in 0.42.7 Changelog (cosmos#9722)

* fix: support output flag on tx commands (backport cosmos#9717) (cosmos#9772)

* fix: support output flag on tx commands (cosmos#9717)

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: cosmos#9684

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

* feat: Query txs by signature and by address+seq (backport cosmos#9750) (cosmos#9783)

* feat: Query txs by signature and by address+seq (cosmos#9750)

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: cosmos#9741

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

* fix: hardcoded ledger algo on `keys add` (backport cosmos#9766) (cosmos#9804)

* fix: hardcoded ledger algo on `keys add` (cosmos#9766)

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: cosmos#9734

cc: @jleni

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

* chore: Add Changelog and Release Notes for v0.42.8 (cosmos#9807)

* chore: Add Changelog and Release Notes for v0.42.8

* Change date

* feat: Improve withdraw-all-rewards UX (backport cosmos#9781) (cosmos#9825)

* feat: Improve withdraw-all-rewards UX (cosmos#9781)

## Description
Related to cosmos#9489, this PR improves the UX when using the `withdraw-all-rewards` command by forcing the broadcast mode to `block` if the chunk size is greater than 0. This will ensure that the transactions do not fail even if the user uses invalid broadcast modes for this command (`sync` and `async`).

* fix: Capability Issue on Restart, Backport to v0.42 (cosmos#9835)

* implement BeginBlock fix

* add changelog

* fix lint

* address reviews

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* address reviews

* Apply suggestions from code review

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* move store check

* add api breaking changelog

* fix lint

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Fixed the --recover flag not working properly inside the init command (cosmos#9201) (cosmos#9850)

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
(cherry picked from commit fdbc32e)

Co-authored-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>

* chore: prepare 0.42.9 release (cosmos#9852)

* prepare 0.42.9 release

* add 9201 to changelog

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this pull request Mar 1, 2022
…ackport #9845) (#9846)

* style(capability)!: update go doc comments and remove BeginBlocker (#9845)

## Description

+ Backported go doc comment updates from cosmos/cosmos-sdk#9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog
Eengineer1 pushed a commit to cheqd/cosmos-sdk that referenced this pull request Aug 26, 2022
…ackport cosmos#9845) (cosmos#9846)

* style(capability)!: update go doc comments and remove BeginBlocker (cosmos#9845)

+ Backported go doc comment updates from cosmos#9835
+ Removed BeginBlocker function which only wraps the `InitMemStore` -> https://github.com/cosmos/cosmos-sdk/pull/9835/files#r681987005  -- this is not a breaking change because RC3 was not yet released.
+ Updated changelog

---

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit bdf5aee)

* solve conflicts

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/capability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Impossible to create IBC channels after on-chain upgrade
8 participants