Commit Graph

114 Commits

Author SHA1 Message Date
Mark Rushakoff
7a92fd0f1f
refactor: create TxConfig directly in simulations (#15749) 2023-04-08 00:40:24 +00:00
Marko
90e2a2ae89
style: linting (#15704)
## Description

closing in on completion of linting

---

### 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)
2023-04-06 23:25:23 +00:00
Jacob Gadikian
37ba88872d
style: enable strict gofumpt (#15579) 2023-03-28 18:59:21 +00:00
Julien Robert
460bd0ad26
refactor: remove unnecessary depinject usage (#15529) 2023-03-23 16:18:41 +00:00
Facundo Medica
14ba0248b8
feat: Implement RegisterServices for CoreAPI in module manager (#15133)
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-03-02 14:22:20 -03:00
Mark Rushakoff
261af6721b
test: use pointer receivers to avoid lock copies (#15217)
## Description
There were several test suite methods that had a value receiver, and which were being ignored for linting. Instead of ignoring the error, use pointer receivers to properly avoid lock copying.

And use a local copy of one loop variable in a possible closure.

---

### 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] 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~~
- [ ] ~~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 all author checklist items have been addressed
- [ ] confirmed that this PR does not change production code
2023-02-28 18:27:57 +00:00
Julien Robert
5d559dd265
feat!: use cosmossdk.io/log logger (#15011) 2023-02-27 21:36:22 +00:00
Facundo Medica
4a6a1e3cb8
refactor: fix lint issues + gofumpt (#15062) 2023-02-19 10:31:49 +00:00
Julien Robert
80dd55f79b
refactor: rename to CometBFT (#14914) 2023-02-06 18:11:14 +00:00
Julien Robert
41a3dfeced
refactor!: migrate Cosmos SDK to CometBFT (#14897) 2023-02-05 14:51:33 +01:00
Marko
6b256ce7c0
refactor: add logger package (#14872)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-02-01 23:42:15 +00:00
Facundo Medica
21021b8378
feat: Implement BeginBlock EndBlock for Core API modules (#14819)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-02-01 14:20:39 +00:00
Facundo Medica
deeb4bd362
feat!: return errors in module manager ABCI methods (#14847) 2023-01-31 19:17:04 +00:00
Julien Robert
d3c3194185
fix: add simulation tests for new param change (#14728) 2023-01-27 20:44:39 +00:00
Aaron Craelius
aceadb0b7e
feat: support core API genesis in module manager (#14582)
Co-authored-by: Facundo Medica <facundomedica@gmail.com>
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-01-27 17:14:56 +00:00
Likhita Polavarapu
7559d9ecd3
refactor: create go.mod for store (#14746)
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-01-25 13:31:56 +00:00
Marko
a2eb630906
refactor: remove sdk dep from store (#14603)
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
2023-01-13 17:43:09 +00:00
Noel Ukwa
c822836501
refactor: migrate calls from alias file to appropriate store/types (#14455)
Co-authored-by: Marko <marbar3778@yahoo.com>
Closes https://github.com/cosmos/cosmos-sdk/issues/14406
2023-01-10 15:31:06 +00:00
Rafael Tenfen
91a916ec1a
refactor: add option to set bondDenom on simulations (#14529)
## Description




- Add new property `BondDenom` to `SimulationState` struct in `types/module/simulation.go`
- Changed the `x/modules/simulation/genesis.go` mostly to use the new property

---

### 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/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [x] 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)
- [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)
2023-01-08 18:21:51 +00:00
Julien Robert
461cf87218
chore: loosen assertions in SetOrderInitGenesis and SetOrderExportGenesis (#14457) 2023-01-02 10:05:09 +01:00
Youngtaek Yoon
e18a0934ed
chore: loosen assertions in SetOrderBeginBlockers() and SetOrderEndBlockers() (#14415) 2022-12-29 06:43:37 +00:00
Julien Robert
6dfa0c9806
fix: fix race conditions from #14332 (#14402) 2022-12-26 16:32:48 +00:00
Julien Robert
419de8de82
refactor: revert API breaking change on Slash (#14363) 2022-12-20 12:12:05 +01:00
Aaron Craelius
59aa726525
refactor!: remove HasGenesisBasics from AppModuleBasic interfaces (#14333) 2022-12-19 22:21:30 +00:00
Reece Williams
de6ef1e98f
perf: Faster state export (#14332) 2022-12-19 16:16:32 +00:00
Jacob Gadikian
be8c5a09c2
chore: lint tests (#14268) 2022-12-18 23:48:31 +00:00
Julien Robert
99b5919194
refactor: types audit (#14283) 2022-12-13 15:41:57 +01:00
Aaron Craelius
ec27c5384b
refactor!: migrate to core appmodule.AppModule extension interfaces (#13794) 2022-11-14 21:23:55 +00:00
Julien Robert
facac1c5f8
refactor: split ExportGenesis into two functions to maintain backwards compatibility (#13448)
* split ExportGenesis into two functions to maintain backwards compatibility (#339)

* fix tests

Co-authored-by: Nicolas Lara <nicolaslara@gmail.com>
2022-10-04 22:42:58 +00:00
Julien Robert
92394f2917
feat!: specify module to export (#13437) 2022-10-04 10:06:30 +00:00
Marko
c221d7f1de
chore: minor cleanup of types (#13430) 2022-10-02 15:03:03 +02:00
Emmanuel T Odeke
abdf61e292
fix: all: remove map iteration non-determinism with keys + sorting (#13377) 2022-09-24 16:20:54 +00:00
Emmanuel T Odeke
9c2aef342d
chore: all: use golang.org/x/exp/maps.(Keys, Values) where necessary (#13349)
Uses golang.org/x/exp/maps.(Keys, Values) to sort out flagged
potential non-determinism issues due to map iteration which is
randomized in maps.

These were flagged by cosmos/gosec in

* https://github.com/cosmos/cosmos-sdk/security/code-scanning/724
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/725
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/726
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/727
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/728
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/729
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/782
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/813
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/814
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/816

which complained about potential non-determinism in
map iteration in which we only want appends in map iteration loops,
this change instead uses golang.org/x/exp/maps.Keys to retrieve
the keys then sort.Strings which simplifies the helper code.

This change fixes issues in:
* orm/model/ormdb: non-determinism in ExportJSON
* store/internal/proofs
* types/module
* x/auth/keeper
* x/bank
* x/genutil/client/cli

Fixes #13348
2022-09-21 02:08:13 +00:00
Julien Robert
6d0ef15b0a
refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
Matt Kocubinski
184235e1a8
refactor: create go.mod for simapp (#13130)
* Add go.mod for simapp

* creating dep check script

* new version of cosmos-sdk

* tests/ must be a module also if it is to test simapp

* maybe add a github action which should fail

* mv tests/mocks -> testutil/mock

* Refactor usages of tests/mocks

* update build command

* fix rosetta tests

* go mod tidy

* use cosmossdk.io/simapp

* Update sim entrypoints

* use simapp as a module

* go mod tidy

* Add replaced for vuln package

* fix vuln dep

* this CI run should fail

* this CI run should succeed

* use absolute path in makefile
2022-09-07 18:14:22 +00:00
Facundo Medica
797bd12af5
refactor!: Remove sdk.Router and refactor baseapp tests (#13005)
* test

* progress-ish

* progress

* progress

* make mocks

* progress

* test

* progress

* progress

* progress

* progress

* progress

* progress

* fix mock tests

* progress

* pretty much done, might need some tidying up

* lint

* re-enable blockgas test

* remove router

* gofumpt

* remove more references of Router

* fix

* remove unused code

* remove unused code

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-08-30 23:50:47 +02:00
atheeshp
9412bcd82a
feat: x/group tests to mocks (#12864)
## Description

Closes: #12763 



---

### 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-08-22 12:37:05 +00:00
Jacob Gadikian
0943a70215
chore: fix linting issues exposed by fixing golangci-lint (#12895)
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2022-08-11 22:00:24 +02:00
likhita-809
7496aa3d27
feat: Remove RandomizedParams from the AppModuleSimulation interface (#12846)
* remove RandomizedParams from AppModuleSimulation interface

* add changelog

* add upgrading doc

* nit fix

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-08-10 14:34:45 +02:00
Marko
3a097012b5
chore: remove legacy appmodule boiler plate (#12725)
* remove legacy appmodule boiler plate

* remove legacy code

* remove legacy gov rest routes

* remove staking querier

* fix legacy

* remove unused test

* add upgrading and changelog entry

* Update UPGRADING.md

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

* fix tests

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2022-07-28 13:18:14 +02:00
Matt Kocubinski
d4a9d4d321
refactor(testutil): remove dependency on simapp (#12624)
## Description

Closes: #12546 

Removes `simapp` as a dependency from `testutil/network` by abstracting `simapp` construction behind a factory fn (now in `simapp`), then requiring callers of `network.DefaultConfig` to pass in the factory fn directly.

This patch is an intermediate step to removing all dependencies on `simapp`.  Follow up work may include moving all of the tests using `network.DefaultConfig` updated here up to `simapp`, or possibly just the runners.



---

### 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-07-20 07:34:58 +00:00
Sishir Giri
b65f3fe070
feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces (#12603)
## Description
Most modules right now have a no-op for AppModule.BeginBlock and AppModule.EndBlock. We should move these methods off the AppModule interface so we have less deadcode, and instead move them to extension interfaces. 

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

Closes: #12462



---

### 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-07-19 17:19:23 +00:00
Aleksandr Bezobchuk
4675cb54f3
feat: deprecate x/params usage in x/mint (#12363) 2022-07-04 10:59:32 -04:00
Federico Kunze Küllmer
4e50756b55
fix(upgrades): perform no-op if 'from' and 'to' migration version are equal (#12174) 2022-06-08 10:24:21 -04:00
Dev Ojha
544afb65e2
refactor: Simplify SimulationManager setup (#12153) 2022-06-06 09:17:48 -04:00
Jacob Gadikian
55054282d2
chore: gofumpt (#11839)
* fumpt using main not master...

* be more descriptive

* fumpt

* fix nits

Co-authored-by: Julien Robert <julien@rbrt.fr>
2022-05-19 10:55:27 +02:00
Facundo Medica
78618dbfa0
fix: change SimulationState.InitialStake to sdkmath.Int (#11855)
* fix: change SimulationState.InitialStake to sdkmath.Int

* cl

* aleks' suggestion
2022-05-03 00:57:44 +02:00
Facundo Medica
9565600c89
fix: remove all RegisterRESTRoutes (#11797) 2022-04-27 12:23:34 -04:00
Michael Zhou
ce0361d714
fix: address confusing error message with SetOrder* functions (#11571) 2022-04-08 14:11:07 +00:00
Marko
66ca3e88aa
revert: Revert "feat: staking config (#10988)" (#11446)
* Revert "feat: staking config (#10988)"

This reverts commit 5e9656f363.

* remove docs
2022-03-24 12:26:25 +01:00