Commit Graph

79 Commits

Author SHA1 Message Date
Marko
37032fb948
chore: linting (#15813) 2023-04-12 12:36:42 +00:00
testinginprod
7ab0dfc494
refactor(bank): move bank balances to use collections (#15327) 2023-04-11 13:06:04 +00:00
Julien Robert
ee53930fc1
refactor(distribution): move ValidateBasic logic to msgServer (#15755) 2023-04-11 08:11:52 +00:00
Matt Kocubinski
f8e2d984b2
feat(x/tx): tx decoder (#15414)
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
2023-04-10 21:39:59 +00:00
Mark Rushakoff
4cb71ceb6e
style!: lint fixes for x/tx (#15748) 2023-04-10 17:55:06 +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
Julien Robert
c3b1b37e49
test: remove api that should not be used (#15678) 2023-04-03 21:57:11 +00:00
Matt Kocubinski
5e90819765
feat(x/tx): legacy amino json sign mode handler (#15515) 2023-04-03 16:13:45 -04:00
Julien Robert
aeaa301506
feat: integration test helpers (#15556) 2023-03-31 18:02:15 +00:00
Jacob Gadikian
8c182e7d77
style: lints for core, math, simapp, and tests (#15638) 2023-03-31 09:30:29 +02:00
Jacob Gadikian
b009a75eea
style: make lint-fix everything (#15631)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-30 17:27:39 +00:00
Marko
c1ea84d583
style: more linting (#15616) 2023-03-30 12:05:50 +00:00
Marko
1f2875d445
style: gofumpt linting (#15605) 2023-03-30 06:27:38 +00:00
Facundo Medica
d29e8eb4f6
refactor!: use KVStoreService in x/auth (#15520)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-03-27 18:57:02 +00:00
Julien Robert
460bd0ad26
refactor: remove unnecessary depinject usage (#15529) 2023-03-23 16:18:41 +00:00
dependabot[bot]
ae8bd416a3
build(deps): Bump cosmossdk.io/math from 1.0.0-rc.0 to 1.0.0 (#15532)
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>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-23 15:44:09 +00:00
Facundo Medica
370acbb659
style: gofumpt everything (#15518) 2023-03-22 20:20:46 +00:00
Matt Kocubinski
4db99fc1a5
fix(math): Dec marshal shouldn't have side effects (#15506)
## Description

Ref: https://github.com/cosmos/cosmos-sdk/issues/15170
Included in: #15515 

Required to resolve a discrepancy between the sign mode being implemented in #15170 and the existing legacy one.

When calling tx builder [SetMsgs](4a6a1e3cb8/x/auth/tx/builder.go (L208)) messages are coerced to an any type in [NewAnyWithValue](4a6a1e3cb8/codec/types/any.go (L61)). This marshals a message as proto bytes. If a message has cosmos.Dec typed fields, and they are set to nil, the will be set to 0 during seriazliation in the [Dec.Marshal](88909d6f2b/math/dec.go (L801)) implementation.

This side effect *changes* the output of a JSON marshal before and after the call to Dec.Marshal, as shown below.

```go
rates := &stakingtypes.CommissionRates{}
MarshalJson(rates)
// {"rate":"0","max_rate":"0","max_change_rate":"0"}

MarshalProto(rates)

MarshalJson(rates)
//{"rate":"0.000000000000000000","max_rate":"0.000000000000000000","max_change_rate":"0.000000000000000000"}
```

An integration is test is also committed asserting the (now fixed) behavior above.  Its asserts should be changed once a release of math is made and `/tests/go.mod` is updated.



---

### 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-03-22 19:48:36 +00:00
Julien Robert
6acd5cc26c
refactor(bank): update InputOutputCoins arguments (#15477) 2023-03-20 17:32:39 +00:00
Robert Zaremba
5612bb815b
docs: improve proto vesting docs about time attributes (#15474)
## Description

Added a little bit more comments to note about the meaning / type of the numeric time values.

When I'm creating the vesting accounts, I always have to  double check it, and end up looking at the code.
2023-03-20 16:40:19 +00:00
Marko
ac345ce694
refactor: evidence make equivocation private (#15420) 2023-03-17 17:20:32 +00:00
Amaury
e9478df161
refactor(x/tx): Move textual,aminojson to signing (#15278) 2023-03-06 18:17:24 +00:00
Mark Rushakoff
e33c5a7e49
test: fix flakiness due to duplicate denoms (#15223) 2023-03-01 16:22:48 +00:00
Matt Kocubinski
976ecd4c08
feat: protoreflect based amino json encoder (#14877) 2023-02-23 21:41:06 +00:00
Julien Robert
c17c3caab8
refactor: rename commands to match consensus engine name (#14956) 2023-02-08 20:09:28 +00:00
Julien Robert
a7ac29e3f4
chore: rename log pkg and add zerolog (#14955) 2023-02-08 11:32:22 +00:00
Marko
281017ae90
refactor: use cosmos-sdk/log throughout (#14909)
## Description

removes the dependency of tendermint/utils/log from countless locations. This is in effort of reducing Tendermint's lib usage in the sdk 

this is nonbreaking as the interface is the same. To eliminate tm/utils/log in the sdk we need a few more things. Once we have fully removed the tendermint logger, I would propose we break the interface and define our own for our use case, when we pass the logger to tendermint in the node.New() function we can wrap our logger for its use case 

---

### 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-02-07 10:54:48 +00:00
Julien Robert
80dd55f79b
refactor: rename to CometBFT (#14914) 2023-02-06 18:11:14 +00:00
Murali Krishna Komatireddy
ffde2b99da
feat: resolve IBC hash to human readable denom (#14894)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-02-06 11:48:29 +00:00
Julien Robert
41a3dfeced
refactor!: migrate Cosmos SDK to CometBFT (#14897) 2023-02-05 14:51:33 +01:00
Julien Robert
4251905d56
feat!: upstream expedited proposals (#14720) 2023-02-03 00:25:28 +01: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
Emil Georgiev
e9fbb01f3a
fix: replace IsEqual with Equal (#14739)
Co-authored-by: Marko <marko@baricevic.me>
Co-authored-by: Marko <marbar3778@yahoo.com>
Closes https://github.com/cosmos/cosmos-sdk/issues/3246
2023-01-24 09:50:34 +00:00
Likhita Polavarapu
09e3e55e24
refactor: make x/evidence a standalone module (#14724) 2023-01-24 10:01:26 +01:00
Murali Krishna Komatireddy
e3b37dc562
fix: return undelegate amount with MsgUndelegateResponse (#14590)
Closes https://github.com/cosmos/cosmos-sdk/issues/14153
2023-01-23 10:08:32 +00:00
Sai Kumar
a4cf8e8c6f
feat(cli): cancel gov proposal by proposer before voting period ends (#13010)
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Marko <marbar3778@yahoo.com>
Closes https://github.com/cosmos/cosmos-sdk/issues/11554
2023-01-20 13:07:09 +00:00
Likhita Polavarapu
fae3332d62
chore: Remove testify from testdata package (#14575) 2023-01-13 09:52:33 +01:00
Likhita Polavarapu
f590f290fc
chore: Replace testify with gotest.tools in bank integration tests (#14477)
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
2023-01-11 16:16:28 +01:00
Likhita Polavarapu
f7ead8cbd8
chore: Replace testify with gotest.tools in staking integration tests (#14504) 2023-01-11 14:20:20 +01: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
Likhita Polavarapu
d3cb26522a
chore: Replace testify with gotest.tools in gov integration tests (#14501) 2023-01-09 11:22:41 +01:00
Likhita Polavarapu
75014146e2
chore: Replace testify with gotest.tools in slashing integration tests (#14499) 2023-01-05 11:27:12 +00:00
Likhita Polavarapu
fcd544f4f2
chore: Replace testify with gotest.tools in distribution integration tests (#14495) 2023-01-05 11:06:07 +00:00
Likhita Polavarapu
8c6739abae
chore: Replace testify with gotest.tools in store tests (#14497) 2023-01-05 11:44:41 +01:00
Likhita Polavarapu
0a7bcd22cb
chore: Replace testify with gotest.tools in genutil integration tests (#14479) 2023-01-05 09:11:20 +00:00
Julien Robert
bca18ba2ea
fix(distribution): correct default for deprecated distribution params (#14462) 2023-01-02 17:54:49 +00:00
Jacob Gadikian
1bb0629846
chore: iavl-v0.20-alpha1 and cosmos-db (#14411)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2022-12-28 21:42:00 +01:00
Marko
08361d5ff8
refactor: add title, summary and proposer to proposal struct of gov (#14390) 2022-12-26 23:24:08 +00:00
Aleksandr Bezobchuk
11f1e8d74c
feat!: deposit to validator rewards pool (#14322) 2022-12-20 15:49:18 +00:00
Julien Robert
419de8de82
refactor: revert API breaking change on Slash (#14363) 2022-12-20 12:12:05 +01:00