Commit Graph

3184 Commits

Author SHA1 Message Date
mergify[bot] b402d1ce37
refactor: Improve txRaw decoder code (backport #9769) (#9779)
* refactor: Improve txRaw decoder code (#9769)

<!--
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

Apply post-merge reviews to a previous PR

ref: https://github.com/cosmos/cosmos-sdk/pull/9754#pullrequestreview-713819730

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

---

### 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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 3771ebdf24)

# Conflicts:
#	x/auth/tx/decoder.go

* Fix lint?

* Fix lint

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-07-27 17:09:19 +02:00
mergify[bot] 9cd4e58aa2
feat: TxRaw must follow ADR 027 (#9743) (#9754)
<!--
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: #XXXX

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

---

### 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
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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 adff7d804d)

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-07-27 10:35:09 +02:00
mergify[bot] 56c1650252
feat: add migrations for balances with zero coins (backport #9664) (#9687)
* feat: add migrations for balances with zero coins (#9664)

<!--
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: #9653

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

---

### 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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 d56c8cdbc9)

# Conflicts:
#	x/bank/legacy/v043/json.go
#	x/bank/legacy/v043/json_test.go
#	x/bank/legacy/v043/keys.go
#	x/bank/legacy/v043/store_test.go

* fix conflicts

* fix tests

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
2021-07-13 17:56:07 +02:00
mergify[bot] c0e0383b35
feat: Error on blank chain-id in multisign command (backport #9593) (#9606)
* feat: Error on blank chain-id in multisign command (#9593)

Error on `tx multisign` command if chain-id is blank. This is a common cause of signature verification failures when combining signatures and the error message doesn't provide any clues to this common cause.

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))
- [] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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 f65b6c9363)

# Conflicts:
#	CHANGELOG.md

* fix conflicts

Co-authored-by: Zaki Manian <zaki@manian.org>
Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
2021-06-30 19:58:06 +02:00
Amaury 7c0e6939c1
fix: Correctly populate legacy Vote.Option field (#9583) 2021-06-25 15:52:44 +02:00
likhita-809 8f21e26a65
feat: multisig should accept name, not just address (#9553)
ref: #9407 

`--multisig` should accept name, not just an address 

---

### 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
- [ ] 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`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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)
2021-06-23 16:21:59 +00:00
Amaury 29c7a469fe
refactor: Bring back deprecated proto fields to `v1beta1` (#9534)
<!--
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: #9446 

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

---

### 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
- [ ] 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
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] 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`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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)
2021-06-23 13:03:33 +00:00
Tyler 899b097da4
feat: make authz MsgExec emit events from all executed msgs (#9522)
<!--
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: #9501 

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

This PR makes MsgExec emit all events from each executed message. Adds a test to check for the additional events.

---

### 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)
- [ ] ~~added a changelog entry to `CHANGELOG.md`~~ **N/A**
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] ~~updated the relevant documentation or specification~~ **N/A**
- [x] 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](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)
2021-06-22 19:30:50 +00:00
Robert Zaremba d60cb3a49f
test(bank): check that zero balances are deleted (#9559)
## Description

Ref: zero balance check for v0.43

---

### 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
- [ ] 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)
- [ ] 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
- [ ] 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)
2021-06-22 12:41:56 +00:00
yihuang 0540ed2f06
fix: Dumping upgrade info interrupted by cosmovisor (#9384)
Solution:
- dumping upgrade info before emit `UPGRADED NEEDED` log which will
  cause cosmovisor to kill chain process

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Description

The problematic procedure:

1. chain process output UPGRADE NEEDED log
2. cosmovisor see the message and kill the chain binary
3. chain process dump upgrade info and panic itself

the step 2 and 3 runs concurrently, so the dumping process can be interrupted by cosmovisor's terminate signal. The proposed solution is to dump upgrade info before emitting the log.
there are two problematic situation:
1. the upgrade info file is created, but content is not written or flushed before killed, when the chain process restart, it'll panic because of json parsing error.
2. the upgrade info file is not created at all, when the chain process restart, the [store upgrades](https://github.com/crypto-org-chain/chain-main/blob/master/app/app.go#L436) are not activated, will cause app hash mismatch error later on.

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
2021-06-21 12:48:15 +00:00
vincent 304d0ff648
fix: query txs command adds output flag (#9540)
<!--
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

* `Query txs` command adds `output` flag, to make it consistent with other query commands.

* Delete unused flag `keyring-backend`.

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

---

### 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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)
2021-06-21 10:40:56 +00:00
Robert Zaremba 6a5a2de798
fix: collect all responses from authz/MsgExec (#9538)
## Description

Closes: #9536

### 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
- [ ] 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)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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)
2021-06-18 19:06:10 +00:00
Ryan Christoffersen 0ae07fe69c
fix: duplicate vesting and format (#9535)
<!--
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

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

This pull request fixes the duplicate `vesting` command displayed with `--help` for the `tx` command. It also removes line breaks for consistent formatting across all commands and it fixes a minor typo.

## Manual Test

```
make build
```

```
./build/simd tx -h
```

```
./build/simd tx vesting -h
```

---

### 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 - *n/a*
- [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 - *n/a*
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - *n/a*
- [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)
2021-06-18 01:50:37 +00:00
Dev Ojha 61dd71ed87
perf: Speedup to params simulation (#9481)
## Description

In Osmosis' simulation, we were observing that a large percent of the time was spent within SimulateParamChangeProposalContent, in particular within the composed key function. This is from a trace of our simulator running for 10 minutes:

<img width="931" alt="Screenshot 2021-06-08 at 2 32 28 PM" src="https://user-images.githubusercontent.com/6440154/121238788-16cdd000-c85e-11eb-8251-94537e69f8ce.png">

~This change lowers the number of calls to ComposedKey() by a factor of 3, and speeds up the underlying ComposedKey function. (sprintf is not particularly efficient for string concatenation, https://dev.to/pmalhaire/concatenate-strings-in-golang-a-quick-benchmark-4ahh ). After these change, the effect of ComposedKey() can no longer be seen in the profiler outputs.~

~This change does not change the result of the simulator on a given seed.~

See https://github.com/cosmos/cosmos-sdk/pull/9481#issuecomment-857119210 for description of changes.

---

### 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
- [ ] 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)
2021-06-17 07:42:07 +00:00
Amaury 5cd741a878
revert: Turn staking power reduction into an on-chain param (#9495)
<!--
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: #9447

This PR partially reverts #8505. Namely:
- it removes PowerReduction as a staking on-chain param
- however, it keeps #8505's API changes regarding adding a `powerReduction` function argument to staking functions. This allows us to rely less on global variables in said functions.

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

---

### 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](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)
2021-06-14 14:45:15 +00:00
Robert Zaremba 7bca49e2d2
refactor(client): add client/Context.Codec and deprecate JSONCodec (#9498)
* chore(types): add sdk.Context.Codec and deprecate JSONCodec

* Use clientContext.Codec rather than JSONCodec everywhere

* update tests to use clientContext.Codec

* added a note that EncodingConfig.Marshaler will be renamed to Codec

* update changelog

* fix tests to use clientCtx.WithCodec instead of WithJSONCodec

* fix genutil build

* Update simapp/params/encoding.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-06-11 11:49:39 +00:00
MD Aleem 606bb2f46d
test (#9484)
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
2021-06-10 15:23:20 +00:00
Augustin Chan 98cf72c4ba
style: fix lint errors and update lint timeout (#9464)
* fix: misc fixes for make to work off freshly cloned repo

* gocritic appendAssign fix

* markdown trailing space and blank line fixes

* change golangci-lint timeout to 5min

* update changelog

* Update .golangci.yml

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

* Update CHANGELOG.md

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

Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-06-08 16:27:39 +00:00
Ryan Christoffersen cab40b4c7a
fix: feegrant grant period not resetting (#9450)
* fix grant period reset

* add period reset test

* consolidate condition

Co-authored-by: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-06-07 15:02:49 +00:00
Marko f1289d0808
refactor: add util functions to reuse in simulations (#9456)
* add util functions to reuse in simulations

* keeper interface cleanup, gov migrate

* fix module name

* fix sims

* fix staking tests

* introduce a txContext

* fix feegrant

* take in consideration

* fix names

* fix tests

* add bank keeper where needed

* add bank keeper where needed
2021-06-07 09:03:24 +00:00
Amaury ec3e2b4d0d
feat: Add amino support for x/authz and x/feegrant (#9457)
* add amino for authz

* Add amion for feegrant

* add cl

* Remove protoCdc from simulations

* Update x/authz/client/testutil/tx.go

Co-authored-by: likhita-809 <78951027+likhita-809@users.noreply.github.com>

* Address reviews

Co-authored-by: likhita-809 <78951027+likhita-809@users.noreply.github.com>
2021-06-04 09:29:58 +00:00
MD Aleem 66ee994ce4
fix: x/gov deposits querier (Initial Deposit) (#9288)
* copied from old PR

* fix errors

* add test

* Update x/gov/client/utils/query.go

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

* fix tests

* fix failing test

* add test

* update test

* fix tests

* fix deposit query

* fix test

* update tests

* add more tests

* address lint error

* address lint error

* review changes

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-06-03 07:36:08 +00:00
yys 2ae7875488
fix: Bank module init genesis optimization (#9428)
* optimize the bank module genesis initialization

* remove k.setBalances & k.clearBalances and update changelog

* fix lint

Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-06-01 20:03:32 +00:00
likhita-809 da87ab0d36
fix: Staking delegations should return empty list instead of rpc error when no records found (#9423)
* return empty list instead of rpc error when no records found for staking delegations

* fix grpc query DelegatorDelegations tests

* remove response code tests for staking delegations

* fix failing tests

* change staking delegations response code to 200 in grpc test

* add staking delegations response code tests to TestQueryDelegatorDelegationsGRPC

* add address without delegations testcase

* add changes to grpc query tests of delegatorDelegations

* remove getRequest unused function from x/staking/client/rest/grpc_query_test.go

* minor fixes

* add testcases for request with no delegations

* address review comments

* add changelog

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-06-01 15:17:44 +00:00
Sunny Aggarwal 98fbdbd5b8
fix blond typo (#9422)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-06-01 13:20:16 +00:00
colin axnér d7c5bc5f35
fix typo, v0.42 -> v0.43 (#9430)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-06-01 07:48:19 +00:00
Robert Zaremba 917fb765d6
fix: rollback height->Height in x/upgrade plan.DueAt formatting (#9416)
* fix: rollback height->Height in x/upgrade plan.DueAt formatting

* fix test

make test string match function rollback

* fix abci_test.go

lowercase height

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
2021-05-28 20:06:06 +00:00
Ryan Christoffersen cb66c99eab
chore: add markdownlint to lint commands (#9353)
* add markdownlint config

* update make lint commands

* update markdownlint config

* run make lint-fix

* fix empty link

* resuse docker container

* run lint-fix

* do not echo commands

Co-authored-by: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com>
2021-05-27 15:31:04 +00:00
Barrie Byron f7701f5735
docs: minor edits and typo fix on 06_begin_block.md (#9370)
* docs: minor edits and typo fix on 06_begin_block.md

just a few edits when I went to fix a typo

* Update x/evidence/spec/06_begin_block.md

* fix typo

Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
2021-05-21 09:32:01 +00:00
Robert Zaremba b36664df4a
update spec and fix code snippets (#9334)
* update spec and fix code snippets

* updating authz.Grant documentation

* Update proto/cosmos/authz/v1beta1/tx.proto

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>

* rename messages to services

* Update proto/cosmos/authz/v1beta1/tx.proto

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>

* update snippets

* Apply suggestions from code review

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

* authz: update service docs to emphasis the service methods

* authz spec: rollback to use message oriented spec

* Apply suggestions from code review

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

* Update MsgGrant type doc

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
2021-05-19 20:22:06 +00:00
Tyler 53fe03eca6
x/upgrade gRPC methods for VersionMap (#9073)
* setup version map query

* query methods

* grpc methods

* cleanup

* grpc for VersionMap

* swagger update

* swagger sync

* cleanup

* reset docs

* clean

* grpc with field

* daily

* -add grpc methods
-add optional field to get specific module from version map
-added cli test for version map query from cli

* -consolidate grpc test to one test function
-return better errors in grpc methods

* consolidate tests

* swagger update

* this breaks

* Try stringer on individual msgs

* change map to slice in proto

* cleanup

* add comments to proto fields

* cleanup

* regen proto files

* jsoncodec

* rename gRPC methods

* * add fetch method for module version slice
* add method to return version given a module name
* remove sorting functions

* lint

* Update proto/cosmos/upgrade/v1beta1/query.proto

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update proto/cosmos/upgrade/v1beta1/upgrade.proto

Co-authored-by: Aaron Craelius <aaron@regen.network>

* fix up comments and regen proto/swagger

* Update x/upgrade/client/cli/query.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* conform to pr 6711

* lint

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-05-19 17:04:38 +00:00
Greg Morrison ad49ec1f5b
Remove Redundant Staking Errors (#9231)
* refactor(staking errors): 'invalid' errors: use ErrInvalidRequest, remove unused error types

* refactor(staking errors): fix error registration codes

* support(staking errors): add changelog entry

* fix(staking test suite): update expected error codes relative to refactor

* chore(staking errors): code formatting

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-19 12:20:17 +00:00
Marie Gauthier 9d0504808a
SDK Core Audit - simapp updates (#9315)
* Make package imports consistent

* Update comment

* Update FundAccount/FundModuleAccount

* Fix bench test

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
2021-05-17 15:42:44 +00:00
Andrea Giacobino 25ecec6c15
rosetta: upgrade to newest version (#9314)
* feat:  update rosetta sdk to v0.6.10 

embed from v1.0.0 release branch of the library: https://github.com/tendermint/cosmos-rosetta-gateway/tree/release/v1.0.0

closes:
https://github.com/cosmos/cosmos-sdk/issues/9300

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-05-15 00:18:59 +02:00
Andrei Ivasko 8997074028
Use module accounts in MsgSend and MsgMultiSend tests in bank module (#9075)
* first draft

* unable to cast to simtypes.Account

* fix test

* add for loop in TestSimulateModuleAccountMsgSend

* TestSimulateModuleAccountMsgMultiSend

* refactoring, r4r

* change fromSimAcc, toSimAcc to from,to respectively

* Update x/bank/simulation/operations.go

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

* Update x/bank/simulation/operations.go

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

* getModuleAccounts

* fix for loop

* applied reviewers suggestions, r4r

* Update x/bank/simulation/operations.go

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

* minor changes

* fix typo

* all simulation package tests pass, r4r

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-13 13:51:21 +00:00
Robert Zaremba f2cea6a137
doc: Updates related to ServiceMsg, sdk.Msg and Msg service (#9294)
* doc: Updates related to ServiceMsg, sdk.Msg and Msg service

* Apply suggestions from code review

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>

* remove one more ServiceMsg

* Use service method rathr than service RPC

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-12 15:47:54 +00:00
Marie Gauthier b4125d1f0c
Update x/auth AnteHandler Spec (#9298)
* Update auth antehandler spec

* Update x/auth/spec/03_antehandlers.md

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>

* Update x/auth/spec/03_antehandlers.md

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>

* Update x/auth/spec/03_antehandlers.md

Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>

* Use 1 line

* Use backticks

* Use consistent tx naming

* Fix grammar

* Update module naming

* Update x/auth/spec/03_antehandlers.md

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Ryan Christoffersen <12519942+ryanchrypto@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-12 09:10:11 +00:00
l-parabellum e79157c067
Update doc for IterateAccounts x/auth keeper meethod (#9285)
Co-authored-by: Lazar Ivanovic <livanovic@happiestbaby.com>
2021-05-11 21:13:31 +00:00
MD Aleem 8cfa2c2673
x/authz: simulation audit changes (#9107)
* addressing audit changes

* address simulation genesis changes

* address simulation operations changes

* fix tests

* typo

* add more authorizations to operations

* fix tests

* fix failing simulations

* WIP

* WIP

* testing simulations

* test simulations

* try fixing tests

* WIP

* fix error

* test

* Add exec authorization

* WIP

* WIP

* fix tests

* WIP

* WIP

* WIP

* WIP

* WIP

* fix errors

* fix test

* WIP

* try fix test

* update tests

* fix errors

* add exec authorization

* fix docs

* fix test

* fix error

* try fixing simulation

* fix errors

* fixing simulations

* fix errors

* rename GenTx -> GenerateTx

* Update x/authz/simulation/genesis.go

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

* Update x/authz/simulation/genesis.go

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

* Update x/authz/simulation/operations.go

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

* review changes

* fix tests

* rename GenerateTx => GenTx

* remove Authorization suffix

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
2021-05-11 15:33:33 +00:00
Amaury 56c0595f32
Remove migration scripts <=0.38 (#9291)
* Remove migration scripts <=0.38

* Add changelog

* remove more

* remove more stuff

* Fix test

* Relase wording

* Add comment

* Include migratio wording
2021-05-11 14:01:13 +00:00
technicallyty 709ab089c1
x/bank v0.43 Audit updates (#9271)
* add godoc to keeper functions

* re-add ValidateBasic to MsgSend CLI tx

* add comment to reflect new return value on method

* remove unecessary variable

* cleanup key comments

* typo

* unused param

* update messages spec

* move event emission to end of method

* update keeper spec

* update proto message to point correct path to interface

* keeper spec typos

* fix test for event emission being moved

* change to blocklist

* rename SendEnabledCoin(s) -> IsSendEnabledCoins

* typo

* remove unecessary check

* move changelog line

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
2021-05-10 12:17:55 -04:00
likhita-809 e96839de2f
x/staking v0.43 Audit updates (#9267)
* update staking specs

* use gosimple code in x/staking/client/testutil/suite.go

* small fixes

* add godoc to methods in msg_server and grpc_query

* changes to godoc and small fixes

* remove unnecessary lines

* remove mentions of serviceMsg and avoid having slash after Msg
2021-05-10 12:41:24 +00:00
Robert Zaremba 9038dfe3b6
authz: Update MsgGrant proto (#9280)
* adding GetAuthorization test

* update MsgGrant proto

* update comment
2021-05-10 09:28:08 +00:00
Robert Zaremba 1986104ef4
ADR-30 (authz) update based on authz audit (#9270)
* ADR-30 (authz) update based on authz audit

* changelog and comment update

* fix linter issue

* Apply suggestions from code review

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update MsgGrant to reuse the Grant type

* Update docs/architecture/adr-030-authz-module.md

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-05-07 19:38:43 +00:00
Amaury 5725659684
x/gov v0.43 Audit updates (#9258)
* Update gov tx usage

* Update proto

* make proto-gen

* Add deposit test

* Rename test function

* More audits

* Update x/gov/keeper/internal_test.go

* Update x/gov/spec/01_concepts.md

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
2021-05-07 12:00:19 +00:00
Robert Zaremba 4af85dc1a3
router: fix handler name (#9281) 2021-05-07 12:37:55 +02:00
Amaury 56ab4e4c93
Cleanup remains of ServiceMsg (#9236)
* Remove ServiceMsgClientConn from CLI

* Cleanup Operations

* Remove some legacytx.LegacyMsg

* Update CL

* Remove mentions of ServiceMsg

* Simply reflection MsgDescriptor

* Simplify more

* Add code comment

Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com>
2021-05-07 09:31:20 +00:00
Marie Gauthier 3582ccef7c
Move x/feegrant/types to x/feegrant (#9273)
* Move x/feegrant/types to x/feegrant

* Update spec

* Use feegrantmodule
2021-05-07 07:10:47 +00:00
Robert Zaremba 59810f3286
x/authz: audit updates (#9042)
* x/authz: audit updates

* audit with Aaron

* authz: Update Authorization.Accept method

* authz: add event proto definitions

* update query service

* authz: use typed events

* refactore and rename query authorizations

* remve Authorization infix from proto services

* renames wip

* refactoring

* update tests

* fix compilation

* fixing gRPC query tests

* fix simulation tests

* few renames

* more refactore

* add missing file

* moving export genesis to keeper

* Update docs

* update tests

* rename event Msg attribute to MsgTypeURL

* Upate Authorization interface

* rollback Makefile changes

* fix tests

* Apply suggestions from code review

Co-authored-by: Aaron Craelius <aaron@regen.network>

* renames

* refactore authz/exported

* lint fix

* authz/types refactore

* comment update

* conflict updates

* Apply suggestions from code review

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* authz: move storage keys to keeper

* review updates

* docs update

* Update x/authz/client/cli/query.go

Co-authored-by: Aaron Craelius <aaron@regen.network>

* move codec to the root package

* authz CMD info update

* comment update

* update imports and build flags

* fix functional tests

* update proto comment

* fix tests

* fix test

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-05-06 18:23:48 +00:00
Cuong Manh Le d9b20122d5
x/staking: lazily get consensus key address (#9264) 2021-05-05 11:28:37 -07:00
MD Aleem 1e1c812de2
x/feegrant remove height base expiration (#9206)
* remove height from proto files

* remove PrepareForExport

* fix basic fee

* fix periodic fee

* fix errors

* fix error

* fix errors

* add tests

* review changes

* fix errors

* fix tests

* fix lint error

* Update x/feegrant/types/basic_fee.go

Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com>

* fix errors

* fix keeper tests

* Update x/feegrant/keeper/keeper_test.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* review changes

* review changes

* fix tests

* run make proto-gen

* fix errors

* Update x/feegrant/keeper/keeper_test.go

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>

* Update x/feegrant/keeper/keeper_test.go

* update ADR

* add test

* review changes

* review changes

Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-05 16:29:22 +00:00
Cuong Manh Le 42a4e4b432
x/bank/types: speedy up by singly sort balances without having to re-iterate (#9260)
The speed is the same as old implementation, but the new one uses slightly
less memory and make the code easier to maintain.

name                    old time/op    new time/op    delta
SanitizeBalances500-8      933µs ± 1%     935µs ± 1%     ~     (p=0.400 n=9+10)
SanitizeBalances1000-8    1.91ms ± 0%    1.92ms ± 0%   +0.58%  (p=0.000 n=10+10)

name                    old alloc/op   new alloc/op   delta
SanitizeBalances500-8      588kB ± 0%     556kB ± 0%   -5.41%  (p=0.000 n=9+9)
SanitizeBalances1000-8    1.18MB ± 0%    1.12MB ± 0%   -5.37%  (p=0.000 n=9+9)

name                    old allocs/op  new allocs/op  delta
SanitizeBalances500-8      5.02k ± 0%     4.02k ± 0%  -19.94%  (p=0.000 n=10+10)
SanitizeBalances1000-8     10.0k ± 0%      8.0k ± 0%  -19.93%  (p=0.000 n=9+10)

Fixes #9259
2021-05-05 14:36:25 +00:00
Anil Kumar Kammari e3e89f5260
Rename memo to note inside CLI (#9134)
* rename Memo to note

* update change log

* typo

* address review changes

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: atheesh <atheesh@vitwit.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-05-04 09:00:54 +00:00
Rikard Hjort a3feeed665
docs: x/distribution spec (#8928)
* EndBlock => BeginBlock

* Add high-level algorithm

* Update documentation on params invariant

* Comment fix

* Update and extend BeginBlock documentation

* Update hooks documentation

* New intro to the concepts

* Update messages documentation

* Write in full sentences

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

* spelling error

* change link

* slashing spec clarification

* Revert "slashing spec clarification"

This reverts commit b08b5a8533ca9d355a0afb0e58254b95487ce880.

* Update x/distribution/spec/04_messages.md

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

* Update x/distribution/spec/03_begin_block.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* update link to latest version

* Update x/distribution/spec/04_messages.md

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

* clarify note on removed validator

* clarify validator removed hook

* clarify validator created hook

* clarify delegation modified/created hook

* clarify slash hook

* clarify possesive singular situation

* clarify hooks.go

* Move comment to clearer position

* Update x/distribution/spec/01_concepts.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* clarifications in concepts file

* Clarify introductory paragraphs

* communitytax => community_tax

* Apply suggestions from code review

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update delegator rewards descirption

* Remove "this"

* Fix error in non-proposer validator rewards spec

* Clarify validator rewards high level description

* Update x/distribution/spec/04_messages.md

* Clarify what fees are

* Misc grammar and style fixes

* Apply suggestions from code review

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Apply suggestions from code review

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>
2021-05-03 18:40:34 +00:00
Amaury d19791be89
Rename clientCtx.JSONMarshaler to JSONCodec (#9251)
* Rename clientCtx.JSONMarshaler to JSONCodec

* change md files

* Fix lint
2021-05-03 14:45:47 +00:00
technicallyty d3bcc15b11
x/feegrant API Audit changes (#9194)
* -add comments to proto fields
-add comments to msg and query server
-remove decorator from docs
-add coments to msgs.go
-remove decorator from godoc

* Update x/feegrant/spec/04_events.md

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* refactor and add to docs
*refactor proto msg names and functions
*add docs pertaining to auth's ante handler for deducted fees

* lint

* update comment

* gofmt

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-03 12:34:48 +00:00
atheeshp f04b5dcb96
fix zero coins (#9229)
* fix zero coins issue

* fix tests

* udpate tests

* Review change

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* add change log

* review changes

* review changes

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2021-04-30 16:54:08 +00:00
Amaury dfe3e7a8d7
Remove ServiceMsgs from ADR-031 (#9139)
* wip

* wip

* wip

* wip on refactoring adr 031 type URLs

* Fix msg_service_router

* Fix gov client queries

* Fix some modules tests

* Remove all instances of "*.Msg/*"

* Uncomment code

* Remove commented code

* // simulation.NewWeightedOperation(

* Fix CopyTx

* Fix more tests

* Fix x/gov test

* proto.MessageName->sdk.MsgName

* Fix authz tests

* Use MsgRoute in feegrant and staking/authz

* Fix more tests

* Fix sims?

* Add norace tag

* Add CL

* rebuild rosetta api test data

* Update ADR

* Rename MsgRoute -> MsgTypeURL

* Fix codec registration

* Remove sdk.GetLegacySignBytes

* Update types/tx_msg.go

* Update x/authz/simulation/operations.go

* Move LegacyMsg to legacytx

* Update CHANGELOG.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Remove NewAnyWithCustomTypeURL

* Keep support for ServiceMsgs

* Fix TxBody UnpackInterfaces

* Fix test

* Address review

* Remove support for ServiceMsg typeURLs

* Fix lint

* Update changelog

* Fix tests

* Use sdk.MsgTypeURL everywhere

* Fix tests

* Fix rosetta, run make rosetta-data

* Fix rosetta thanks to froydi

* Address reviews

* Fix test

* Remove stray log

* Update CL

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-04-30 11:00:47 +00:00
Federico Kunze e25f80d34c
gov, params: refactor tests (#9137)
* gov, params: refactor tests

* wrap up params tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-30 08:41:25 +00:00
Robert Zaremba be4a965599
codec: Rename codec and marshaler interfaces (#9226)
* codec: Rename codec and marshaler interfaces, ref: 8413

* codec: remove BinaryBare

* changelog update

* Update comments and documentation

* adding doc string comments

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update codec/codec.go

Co-authored-by: Marko <marbar3778@yahoo.com>

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-29 10:46:22 +00:00
yihuang c94e9eb1bb
fix validator address prefix (#9212)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-29 07:11:32 +00:00
Riccardo Montagnin afa818a58f
Added a "new_shares" attribute inside the delegate event type (#9214)
* Added a "new_shares" attribute inside the delegate event type

* ADded CHANGELOG entry
2021-04-29 06:57:46 +00:00
Cuong Manh Le 6ad84c5065
x/gov/keeper: fix flaky TestPaginatedVotesQuery (#9223)
When testing with -race, sometimes the random source generate the same
string for consecutive calls, causing duplicated voter address. So the
number of votes in DB is not 20.

To fix this, we ensure unique addresses are generated, by using a map
for tracking which one was produced, and skip the duplicated address and
generated new one. Testing with:

	go test -race -v -count=1000 -run=TestPaginatedVotesQuery

now passes.

Updates #9010
2021-04-28 17:08:42 +00:00
MD Aleem a2911d0dc6
x/feegrant state machine audit updates (#9176)
* replace panic with error

* improve test coverage

* add time based tests to basic-fee

* add periodic fee tests

* wip

* add msg_server tests

* improve getFeeGrant

* fix failing test

* fix test

* fix comments

* refactor

* review changes

* review changes

* fix errors

* Update x/feegrant/types/basic_fee_test.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* review changes

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2021-04-28 15:39:58 +00:00
technicallyty 0cbed20db8
x/feegrant audit: clean up / add test coverage to types package (#9193)
* Squashed commit of the following:

commit 58dc50051226a9eeb8d0ebea5bb0908fe5b9637f
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Fri Apr 23 15:09:27 2021 -0700

    remove comments

commit a84107e1b3eaa31324cb0f4f097b49f02af79c69
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Fri Apr 23 15:02:41 2021 -0700

    add tests for msgs.go

commit 2ad16869237e9631b402c93cde650c3fc554daf2
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Fri Apr 23 13:20:21 2021 -0700

    specify test name

commit b7121277c9be586a7c80d010ec401e50b510e02a
Merge: c0c134d971 3c65c3dacd
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Fri Apr 23 12:54:55 2021 -0700

    Merge branch 'master' into ty-9115-types_tests

commit c0c134d97107194dc4f9d3c501a15d023ae083e5
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Thu Apr 22 19:59:11 2021 -0700

    -add test case to cli_test.go for filtered fee
    -clean up identifiers
    -remove redundant import alias from filtered_fee.go

commit f7ab3699da39be3ab886f96962d28d23438d2e8e
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Thu Apr 22 09:57:31 2021 -0700

    remove unecessary constant

commit 9db59a82a7337cf5a7a3569c6900a44a6c81e8b4
Merge: a3e75ceb8a e28271b8e6
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Thu Apr 22 09:19:20 2021 -0700

    Merge branch 'master' into ty-9115-types_tests

commit a3e75ceb8a510ad9db43dd96073c43b7a8b062b0
Merge: 4d3dafab85 bffcae54a1
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Wed Apr 21 12:04:39 2021 -0700

    Merge branch 'master' into ty-9115-types_tests

commit 4d3dafab85d85526a7c94b045289605289ee6b0d
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Wed Apr 21 12:03:41 2021 -0700

    cleanup id's / add test case

commit e8f6924931ba95e592bfc3057ba167700458da41
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Wed Apr 21 10:55:29 2021 -0700

    add test for 0 allowance / remove unused field on exp test

commit 516b6ef89a4582ad681cc6c5c101cf50a9a54fb5
Author: technicallyty <48813565+tytech3@users.noreply.github.com>
Date:   Tue Apr 20 15:22:48 2021 -0700

    make names more clear, remove unused field

* fix imports

* fix tests

* rename test field

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: MD Aleem <72057206+aleem1314@users.noreply.github.com>
2021-04-28 14:18:38 +00:00
Marko f32597e510
remove unused list (#9219) 2021-04-28 12:46:22 +00:00
Devashish Dixit 15edf3c38f
Add more details in error message for invalid vote option (#9185)
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-28 10:19:08 +00:00
Marie Gauthier 3ab1bc2346
x/feegrant completeness audit updates (#9177)
* Updates to Genesis

* Move grpc_query tests to keeper pkg

* Unify CLI command usage message

* Use timestamp for time based expiration in cli

* Update FlagExpiration

* Update wording

* Add test case for invalid expiration

* Update cli Long description

* Update exp date examples

* Use constants
2021-04-27 13:37:26 +00:00
atheeshp fc256a3683
x/feegrant simulation audit changes (#9145)
* simulation genesis changes

* update msg types

* refactor

* update operations test

* fix sims

* fix tests

* fix tests

* address review changes

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2021-04-27 07:42:48 +00:00
Riccardo Montagnin fdbc32e50c
Fixed the --recover flag not working properly inside the init command (#9201)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-04-26 18:33:30 +00:00
Aaron Craelius 3c65c3dacd
Make integration test suites reusable by apps (#6711)
* WIP on refactoring new integration tests.

* godocs

* godocs

* Fix ineff assign

* Updates

* Updates

* fix test

* refactor crisis, distr testsuites

* fix import issue

* refactor x/auth

* refactor x/authz

* refactor x/evidence

* refactor x/feegrant

* refactor x/genutil

* refactor x/gov

* refactor x/mint

* refactor x/params

* refactor x/{auth_vesting, slashing, staking}

* fix lint

* fix tests & lint

* fix lint

* fix tests

* lint

* lint

* fix lint memory

* add missing `norace` build flag

* update feegrant cfg

* fix lint

Co-authored-by: atheesh <atheesh@vitwit.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
2021-04-23 14:49:49 -04:00
Sunny Aggarwal bffcae54a1
Add hooks to governance actions (#9133)
* add governance hooks

* fix lint

* fix lint

* CHANGELOG

* sh -> gh

* improve comments

* add test

* add more tests

* rename two of the hooks

Co-authored-by: ahmedaly113 <ahmedaly113@outlook.com>
2021-04-21 12:59:30 -04:00
Cory 603e89541f
Add support for permanent locked vesting accounts (#8520)
* add basics for permanent locked vesting account support

* remove sdk.Msg support for PermanentLockedVestingAccount

* add tests for PermanentLockedVestingAccount

* remove unecessary tests

* drop unecessary create vesting acct msgs

* Update x/auth/vesting/types/vesting_account.go

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update x/auth/vesting/types/vesting_account.go

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update x/auth/vesting/types/vesting_account.go

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update x/auth/vesting/types/vesting_account_test.go

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Review changes

* Factorize init function

* Factorize more

* Comments

* Fix build after rename

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-04-21 16:18:28 +00:00
Marko b1cf4793d0
consistency in antehandler (#9144) 2021-04-20 09:21:37 +00:00
Riccardo Montagnin 96fe999343
Set proper default command output (#8628)
* Set proper default command output

* Removed duplicated cmd.SetErr(cmd.ErrOrStderr()) and cmd.SetOut(cmd.OutOrStdout())

* Moved command initialization and added CHANGELOG

* fix: groom all uses of cmd.Print*

* Ran make format

Co-authored-by: Michael FIG <mfig@agoric.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-17 00:21:32 +00:00
Amaury b4fc48ca71
Add comment on x/auth hacky migration script (#9132)
* Add comment on x/auth hacky migration script

* QueryServer -> QueryRouter
2021-04-16 18:00:08 -04:00
Cyrus Goh 89cb9b0f8c
docs: uml hotfix (#9124)
* comment out ungenerated uml .svg in the md files

* generate svgs to docs/uml
* create docs/uml/svg
* move .punl to docs/uml/puml
* update uml path in md files

* docs: update relative path of uml svg in `x` md files

* docs: remove plantuml script from pre.sh

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-16 07:59:21 +00:00
technicallyty bc4c3be15c
add docs for gas consumption (#9118)
Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-15 09:09:01 +00:00
Cuong Manh Le ef69863f46
x/bank/types: fix AddressFromBalancesStore address length overflow (#9112)
addrLen is encoded in a byte, so it's an uint8. The code in
AddressFromBalancesStore cast it to int for bound checking, but wrongly uses "addrLen+1", which can be overflow.

To fix this, just cast addrLen once and use it in all places.

Found by fuzzing added in #9060.

Fixes #9111
2021-04-15 00:13:55 -07:00
Marko 8ac983fb28
remove unneeded exported files (#9097)
Co-authored-by: Marko Baricevic <markobaricevic@Fergalicious.fritz.box>
2021-04-12 08:17:02 +00:00
Sunny Aggarwal 4b778abf91 merged master 2021-04-10 19:23:58 -04:00
Sunny Aggarwal 10b2b08ece Merge branch 'master' into powerreduction_param 2021-04-10 16:26:50 -04:00
atheeshp 7a3a156b4f
feegrant filtered msgs (#8604)
* WIP: add filtered message

* updated `Accept` interface method

* fix tests

* add cli tests for filtered fee allowance

* fix tests

* review changes

* rename `filteredFeeAllowance` message

* review changes

* review changes

* review changes

* review changes

* review changes

* update errors

* remove validation

* fix conflicts

* add `ctx` to `Accept` method

* fix test

* add gas consumption

* review changes

* review changes

* revert

* review changes

* improve error handling

* fix test

* Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/feegrant-filtered-msgs

* review changes

* update gas

* update type

* review changes

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-09 16:49:24 +00:00
dependabot[bot] bb7b2a62cf
build(deps): bump github.com/otiai10/copy from 1.5.0 to 1.5.1 (#9077)
* build(deps): bump github.com/otiai10/copy from 1.5.0 to 1.5.1

Bumps [github.com/otiai10/copy](https://github.com/otiai10/copy) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/otiai10/copy/releases)
- [Commits](https://github.com/otiai10/copy/compare/v1.5.0...v1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

* fix lint

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
2021-04-09 14:09:25 +00:00
MD Aleem 8a376a41c9
x/authz charge gas for expensive authorizations (#8995)
* WIP

* Add consume gas

* update authz.go

* add build flag

* Update x/staking/types/authz.go

* Update x/staking/types/authz.go

* add tests docs

* review changes

* fix operations

* Update x/authz/types/msgs.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* review changes

* update gas cost

* review changes

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-09 12:33:27 +00:00
Alessio Treglia 6e26ee9805
bump tendermint core (#9081) 2021-04-08 20:22:00 +01:00
Gianguido Sora 93965e0bcc
Write back account changes after tracking delegation/undelegation for vesting accounts (#8865)
Delegations and undelegations calculations performed during
accounting operations for vesting accounts were correct but
were not written back to the account store.

closes: #8601
closes: #8812

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Frojdi Dymylja <frojdi.dymylja@gmail.com>
Co-authored-by: Adam Bozanich <adam.boz@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2021-04-08 16:20:29 +01:00
Sunny Aggarwal 8cf5fe0b9b add nolint to pb.go files 2021-04-07 20:07:52 -04:00
Sunny Aggarwal 04e483dd69 fixed migrations 2021-04-07 19:56:39 -04:00
Sunny Aggarwal 61b608f4bc Merge branch 'master' into powerreduction_param 2021-04-07 13:59:49 -04:00
Cuong Manh Le 3a5550a938
x/bank/types: fix AddressFromBalancesStore panics with invalid keys (#9061)
Currently, AddressFromBalancesStore uses the input key without any
validation, so an empty key or an invalid key length cause it panics.

This commit fixes the problem, by returning an error in case of invalid
key was passed.

Found by fuzzing added in #9060.

Fixed #9062
2021-04-07 16:20:38 +00:00
SaReN a3b3a670aa
Refactor auth cli tests (#9018)
* refactor cli tests

* add norace

* fix typos

* update docs

* go imports

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-07 10:50:16 +00:00
Sunny Aggarwal ca34808fdc merged master 2021-04-06 20:18:20 -04:00
Frojdi Dymylja 29ff333007
cosmos-reflection: extend to support writing by reflection clients (#8965)
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-04-07 00:33:54 +01:00
Sunny Aggarwal 05e2e45010 merged in master 2021-04-06 19:19:59 -04:00
SaReN 0effd3a9d3
Paginate supply queries (#8798)
* paginate grpc query

* fix lint

* update tests

* remove GetTotalSupply

* fix test

* remove GetTotalSupply

* add changelog

* update changelog

* update rosetta data

* update limit

* update genesis

* add max limit to query

* fix lint

* go imports

* Update types/query/pagination.go

* update supply

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-06 14:43:08 +00:00
SaReN 4b2fc3bd43
Store supply as Int bytes rather than string bytes (#9051)
* store supply as int bytes

* update migrate

* update migrate tests

* add error context

* fix lint

* update spec

* add changelog

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-04-06 14:01:57 +00:00
colin axnér 5247a557d5
revert 8909 (#8960)
* revert 8909

* remove entry from CHANGELOG

* fix test
2021-04-06 11:40:17 +00:00
Rikard Hjort c41baa9bc8
PlantUML diagrams (#8712)
* Overview of keepers in object capability model (OCM)

* Updates to the spec, making clarifications

* Create a sequence diagram of a (fresh) delegation

* Misc notes, not yet decided where to put them

* Description of the shares abstraction in validators

* Model all keeper dependencies and move the UML file to docs

* Move and rename delegation sequence diagram

* Move shares description

* Remove TODO

* Diagram touch-ups

* Add how consensus power is calculated

* remove temp file

* Diagram improvements

* Describe slashing in more detail

* Describe redelegation

* Describe unbonding

* Delegation updates

* Delegation updates

* Make a diagram describing overall transaction flow

* Add delegation flows for the events of tokens being bonded/unbonding/etc.

* Grammar fix

* Diagram updates: distinguish alts, remove numbering.

* Use groups instead of "func:" participants

* Remove unused keepers from dependency diagram

* Add title to unbonding diagram

* Move keeper dependencies

* small doc updates

* remove numbers on sequence diagram

* !!!WIP EndBlock

* Explain "Last"-prefix in storage

* Remove `panic` step (they are supposed to never happen)

* EndBlock sequence diagram (with TODOs)

* Add TODO

* More visible TODOs

* Remove numbering

* Complete EndBlock

* Remove numbering

* Remove TODOs and update title

* add title back

* remove endblock seq-diagram

* Make power index update conditional on not being jailed

* update title

* Move files to /docs

* Install PlantUML and compile images to png and txt

* Use transaction flow in documentation

* Use staking UML in staking docs

* Clarify uml with inline doc

* Add keeper deps diagram to docs

* Only produce SVG images

Co-authored-by: hjort <>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-06 09:50:56 +00:00
technicallyty ccdf896ed7
x/auth new test - multisig tx on simulate endpoint (#9038)
* merge master

* daily

* test fix / comments

* cleanup

* cleanup

* -remove unecessary balance check
-cleanup imports

* fixed issue

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
2021-04-05 17:04:22 +00:00