Commit Graph

10228 Commits

Author SHA1 Message Date
dependabot[bot]
4cfc79ad4e
build(deps): Bump github.com/cosmos/cosmos-proto from 1.0.0-alpha8 to 1.0.0-beta.1 (#14122)
* build(deps): Bump github.com/cosmos/cosmos-proto

Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-alpha8 to 1.0.0-beta.1.
- [Release notes](https://github.com/cosmos/cosmos-proto/releases)
- [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-alpha8...v1.0.0-beta.1)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-proto
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* build(deps): Bump github.com/cosmos/cosmos-proto from 1.0.0-alpha8 to 1.0.0-beta.1 for all modules

* updates

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-01 17:33:41 +00:00
Amaury
fb4d964f7e
refactor: don't break SignModeHandler API (#14087)
* refactor: Make SignModeHandler update not API breaking

* changelog

* fix tests

* add comment

* Revert rosetta

* address reviews

* shorter name

* Fix test build
2022-12-01 16:20:10 +01:00
Likhita Polavarapu
37a9bc3bb6
refactor: x/evidence audit changes (#14092)
## Description

ref: #14063 



---

### 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/main/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/main/docs/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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)
2022-12-01 08:39:10 +00:00
Paul Weidner
b9e0a40770
chore: correct language for fee granter error (#14111)
## Description

Closes: #XXXX

Right now this error message contains the word "not" twice. I don't think we want the double negative here ;-)

Example:
```
regen1sk9nwk0w7kct04tsdscqvg5knn6kzz7yq59arx does not not allow to pay fees for regen1n9dpmra4d2gvu22jmxv7tenjy0mdymfg70hd48: basic allowance: fee limit exceeded
```



---

### 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/main/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/main/docs/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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)
2022-12-01 08:12:27 +00:00
Likhita Polavarapu
65a991389f
refactor: Add back removed empty checks in grpc from x/nft audit 2022-12-01 08:49:51 +01:00
Jacob Gadikian
679c5d6086
chore: run markdownlint on the whole repository (#14106) 2022-11-30 19:51:26 +00:00
Julián Toledano
6679ee0eea
fix: remove rosetta from server start (#14062)
* delete: rosetta from server start

* update: go.sum

* CHANGELOG

* update: changelog
2022-11-30 19:16:56 +00:00
Julien Robert
f96072d9a8
fix: do not shadow clientCtx in start.go (#14086) 2022-11-30 12:26:20 +00:00
atheeshp
e0875661b6
chore: (x/mint) improve code cov (#14066)
## Description

missed the test coverage in last audit.
ref: #13988 #13456 



---

### 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/main/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/main/docs/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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)
2022-11-30 11:32:40 +00:00
Amaury
4ebe3aa93c
fix(group)!: Don't re-tally proposals after VP end (#14071) 2022-11-30 11:01:17 +00:00
Julien Robert
e395e43f63
fix: fix issues found by sonarcloud (#14081)
Co-authored-by: Marko <marbar3778@yahoo.com>
2022-11-30 11:10:25 +01:00
atheeshp
4a9062122b
chore: (x/feegrant) add missing test scenarios (#14018)
* add missing test scenarios

* review changes
2022-11-30 07:46:01 +00:00
Likhita Polavarapu
ac6b19df21
refactor: x/nft audit changes (#14055)
## Description

ref: #13991 



---

### 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/main/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/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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)
2022-11-30 07:23:30 +00:00
Julien Robert
6239cdfddb
chore: clean-up deprecated function usage (#14078) 2022-11-30 01:10:50 +01:00
Marko
2e3d38f01c
refactor: move snapshotstore under store (#14048)
* Move snapshotstore under store

* add changelog entry

* fix build

* move snapshot proto package

* make proto-gen

* Update CHANGELOG.md

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

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2022-11-29 23:40:14 +00:00
Emmanuel T Odeke
3e85182baa
perf: math: optimize and test FormatInt + simplify LegacyNewDecFromStr (#14010)
Optimizes and tests FormatInt by removing inefficient string
concatenation but also making it so much clearer with how one would
express adding thousand separators in natural language. It uses
a combination of strings.Builder whose values can be grown

The performance improvement is stark in every dimension:

```shell
$ benchstat before.txt after3.txt
name                          old time/op    new time/op    delta
DecimalValueRendererFormat-8    4.48µs ± 1%    2.11µs ± 2%  -52.90%  (p=0.000 n=10+10)

name                          old alloc/op   new alloc/op   delta
DecimalValueRendererFormat-8    3.62kB ± 0%    0.78kB ± 0%  -78.59%  (p=0.000 n=10+10)

name                          old allocs/op  new allocs/op  delta
DecimalValueRendererFormat-8      83.0 ± 0%      28.0 ± 0%  -66.27%  (p=0.000 n=10+10)
```

While here, also simplified zero padding for LegacyNewDecFromStr
simply by using strings.Repeat instead of a convoluted
fmt.Sprintf+strconv.Itoa.

Fixes #14008
Fixes #14003

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-11-29 21:00:47 +00:00
Matt Kocubinski
8c6181aacf
reuse helper fn and add comment (#14075) 2022-11-29 20:37:31 +00:00
Marko
04f9ad24ab
chore: mark WrapSdkContext as deprecated (#14072)
* remove wrapping and mark wrapsdkContext as deprecated

* Update types/context.go

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

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-11-29 20:11:08 +00:00
Javier Su
730d6313f4
fix: remove unnecessary cms typecasting (#14054)
* fix: remove unnecessary cms typecasting

* Update baseapp/baseapp.go

Co-authored-by: Julien Robert <julien@rbrt.fr>

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marbar3778@yahoo.com>
2022-11-29 19:45:12 +00:00
Amaury
fffc9d07d5
refactor!: Add context arg to sign mode handler GetSignBytes (#13701)
* refactor!: Add context arg to sign mode handler `GetSignBytes`

* fix build

* fix tests

* Fix goling

* fix lint

* Fix lint

* Fix test

* Update CHANGELOG.md

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

* Fix tests

* Fix rosetta deps

* fix

* go mod tidy all

* go mod tidy

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2022-11-29 18:49:51 +00:00
Emmanuel T Odeke
5a1fa2ee02
fix: store/rootmulti: correctly dispatch exporter closing while in a loop (#14027) 2022-11-29 17:45:56 +00:00
Joe Abbey
2cf92caf45
Support for repeated (#13604) 2022-11-29 16:37:29 +00:00
Julien Robert
a176eb2646
chore: bump tendermint to 0.37.0-rc2 (#14067) 2022-11-29 15:43:45 +00:00
Facundo Medica
50b6f320ba
refactor: camelCase textual/cbor (#14068) 2022-11-29 14:34:40 +00:00
Julien Robert
cfd79fc39e
feat: add Genesis JSON migration for group (#14024) 2022-11-29 14:00:14 +00:00
Julien Robert
a1b09a0481
refactor: remove gogoproto stringer annotations (#14046) 2022-11-29 13:34:03 +00:00
Julián Toledano
8bb4521ff7
docs: Rosetta openapi specification (#14061)
* add: openapi documentation

* fix

* CHANGELOG
2022-11-29 13:10:01 +00:00
Marko
b25908b964
refactor: use go context instead of sdk.Context (#14050)
* rely on context.Context instead of homegrown

* changelog entry

* wrap before calling
2022-11-29 11:59:54 +00:00
Christophe Camel
721b1745df
chore: fix link to "building modules" doc (#14058) 2022-11-29 10:27:12 +01:00
Jeancarlo Barrios
1ac7d3236e
fix(baseapp): fix snapshot interval bug (#14049)
## Description
Fix for
Closes: #13766



---

### 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/main/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/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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)
2022-11-28 23:45:05 +00:00
Jim Larson
4fe7403f83
feat: deterministic CBOR encoding of textual rendering (#13697)
* feat: deterministic CBOR encoding of textual rendering

* refactor: cbor package to internal, test cases as json

* chore: silence spurious gosec warnings

* docs: review feedback
2022-11-28 17:34:46 +00:00
Aleksandr Bezobchuk
c6189bb630
refactor: cleanup store/streaming/constructor.go #14044 2022-11-28 15:43:49 +00:00
Marko
2e638125d6
chore: remove replace tag on ics23 (#14043)
* remove replace tag on ics23

* update all

* update simapp
2022-11-28 15:16:44 +00:00
Julien Robert
5ea5d91861
ci: allow to deploy docs manually (#14042) 2022-11-28 15:23:29 +01:00
Julien Robert
41f0ab15e6
refactor: remove gogoproto stringer annotations and MarshalYAML functions (#13850) 2022-11-28 12:56:00 +00:00
Julien Robert
68c1517046
test: fix TestSimAppExportAndBlockedAddrs for simapp v1 (#14036) 2022-11-28 11:37:13 +00:00
atheeshp
5567828674
chore: update docs (#14038) 2022-11-28 12:12:20 +01:00
Julien Robert
e5038d8d76
chore: bumps math and api deps (#14035)
* chore: bumps math and api deps

* updates
2022-11-27 23:11:25 +01:00
Julien Robert
6f329d70c6
docs: add docs about x/auth/tx (#14021)
* docs: add docs about `x/auth/tx`

* updates

* updates

* updates

* updates

* updates

* updates

* updates

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-11-27 20:30:23 +00:00
Marko
75a2f26a70
change image name (#14033) 2022-11-27 20:19:32 +01:00
Rano | Ranadeep
45cc1b03f0
fix: fix multi platform go build in docker push workflow (#13993)
* publish to ghcr

* build for target os and arch

* replace deprecated set-output

* fix insufficient scope error

* replace old code with docker metadata action

* disable default latest

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-11-27 13:00:57 +00:00
Elias Naur
60fdbd044f
ci: add workflow for reporting possible state-changing diffs (#13774)
The workflow uses the new github.com/orijtech/statediff tool that
builds a callgraph from a set of root methods and functions, and
checks whether a patch touches it.

Fixes #13518

Signed-off-by: Elias Naur <elias@orijtech.com>

Signed-off-by: Elias Naur <elias@orijtech.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2022-11-27 11:49:30 +00:00
Emmanuel T Odeke
ffb0e29179
fix: tools/cosmovisor: return on failing to remove existing symlink (#14032)
Fixes #14031
Fixes https://github.com/cosmos/cosmos-sdk/security/code-scanning/6794
2022-11-27 12:18:50 +01:00
Marko
67b2b34bc7
docs: appside mempool (#13875) 2022-11-25 22:07:57 +00:00
Facundo Medica
16c772d900
docs: (x/distribution) Fix docs for v0.47 (#14022) 2022-11-25 14:14:37 +00:00
dependabot[bot]
d1e5a443ca
build(deps): Bump github.com/cosmos/ledger-cosmos-go from 0.11.1 to 0.12.0 (#14012)
Bumps [github.com/cosmos/ledger-cosmos-go](https://github.com/cosmos/ledger-cosmos-go) from 0.11.1 to 0.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/cosmos/ledger-cosmos-go/releases">github.com/cosmos/ledger-cosmos-go's releases</a>.</em></p>
<blockquote>
<h2>Update deps</h2>
<ul>
<li>Update dependencies:</li>
<li>Depends on zondax/ledger-go instead of cosmos/ledger-go</li>
<li>Include updates from zondax/ledger-go and zondax/hid (fixing mac build issue)</li>
<li>Update copyrights</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a105dbb4ed"><code>a105dbb</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/34">#34</a> from cosmos/updates</li>
<li><a href="543eb77c2c"><code>543eb77</code></a> update deps</li>
<li><a href="d852bb596e"><code>d852bb5</code></a> update copyright</li>
<li><a href="036a277666"><code>036a277</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/25">#25</a> from cosmos/dependabot/go_modules/github.com/stretchr/...</li>
<li><a href="940cd3bd0d"><code>940cd3b</code></a> Bump github.com/stretchr/testify from 1.7.1 to 1.8.0</li>
<li><a href="e736b9afa7"><code>e736b9a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/26">#26</a> from Zondax/update/ledger-go</li>
<li><a href="998c2b9ed7"><code>998c2b9</code></a> update ledger-go to 0.12.2</li>
<li><a href="343ae35a1a"><code>343ae35</code></a> Bump github.com/stretchr/testify from 1.3.0 to 1.7.1 (<a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/20">#20</a>)</li>
<li><a href="af7b6f9472"><code>af7b6f9</code></a> migrate to github actions (<a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/19">#19</a>)</li>
<li><a href="9d8c40fbe7"><code>9d8c40f</code></a> all: use named returns for proper defers + fix fmt.Errorf misuse (<a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/18">#18</a>)</li>
<li>See full diff in <a href="https://github.com/cosmos/ledger-cosmos-go/compare/v0.11.1...v0.12.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cosmos/ledger-cosmos-go&package-manager=go_modules&previous-version=0.11.1&new-version=0.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
2022-11-25 12:03:05 +00:00
AdamKorcz
560ba867ff
fix: fix broken OSS-Fuzz build (#13889) 2022-11-25 06:55:35 +01:00
Likhita Polavarapu
a19eead691
refactor: x/crisis audit changes (#13990)
* wip: nits

* add tests for VerifyInvariant and increase codecov for keeper

* add genesis test

* cover all keeper code in tests

Co-authored-by: Julien Robert <julien@rbrt.fr>
2022-11-24 14:53:22 +00:00
Likhita Polavarapu
e260fc1c89
feat: Add tx encode and decode endpoints for amino txs (#13882)
* add proto changes

* make proto-gen

* wip: adds tests

* wip: tests

* remove consoles

* wip: fix something

* fix: encode amino tests

* add decode amino tests

* wip: address requested changes

* update proto inline docs

* address review comments

Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
2022-11-24 13:41:03 +00:00
Emmanuel T Odeke
00ad3ecedc
perf: crypto/types: use native slice index producing for loop in (*CompactBitArry).NumTrueBitsBefore (#14000)
Noticed while examining a bunch of profiles, that the for loop inside
(*CompactBitArry).NumTrueBitsBefore unnecessarily consumed a bunch of
time:
```shell
     7.55s      9.88s (flat, cum) 93.38% of Total
     240ms      250ms     88:func (bA *CompactBitArray) NumTrueBitsBefore(index int) int {
         .          .     89:	onesCount := 0
      70ms      340ms     90:	max := bA.Count()
      70ms       70ms     91:	if index > max {
         .          .     92:		index = max
         .          .     93:	}
         .          .     94:	// below we iterate over the bytes then over bits (in low endian) and count bits set to 1
     2.54s      2.76s     95:	for elem := 0; elem < len(bA.Elems); elem++ {
```

but we can use the native for loop that produces indices while iterating
over slices. Just by simply changing the form results in an improvement

```shell
     7.50s      9.95s (flat, cum) 94.94% of Total
     240ms      320ms     88:func (bA *CompactBitArray) NumTrueBitsBefore(index int) int {
         .          .     89:	onesCount := 0
     170ms      420ms     90:	max := bA.Count()
      90ms      100ms     91:	if index > max {
         .          .     92:		index = max
         .          .     93:	}
         .          .     94:	// below we iterate over the bytes then over bits (in low endian) and count bits set to 1
     1.49s      1.62s     95:	for elem := range bA.Elems {
```

and an improvement in CPU time

```shell
$ benchstat before.txt after.txt
name                     old time/op    new time/op    delta
NumTrueBitsBefore/new-8    13.3ns ± 1%    12.5ns ± 1%  -6.07%  (p=0.000 n=10+10)

name                     old alloc/op   new alloc/op   delta
NumTrueBitsBefore/new-8     0.00B          0.00B         ~     (all equal)

name                     old allocs/op  new allocs/op  delta
NumTrueBitsBefore/new-8      0.00           0.00         ~     (all equal)
```

Fixes #13999
2022-11-24 10:46:04 +00:00