Commit Graph

77 Commits

Author SHA1 Message Date
Alex | Cosmos Labs
12d63d04a5
chore: bump linter (#25537) 2025-11-03 11:30:03 -05:00
Alex | Cosmos Labs
ee19321c80
chore: bump linter (#25424) 2025-10-10 08:52:49 -04:00
Alex | Interchain Labs
727faf0484
refactor: bring cometbft back to v0.38.x family (#25285) 2025-08-29 15:58:04 -04:00
dependabot[bot]
ca3d0fea69
build(deps): Bump github.com/stretchr/testify from 1.10.0 to 1.11.1 in /store (#25288)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: aljo242 <alex@cosmoslabs.io>
2025-08-29 16:52:55 +00:00
viktorking7
6f6bc329d5
fix(typos): correct spelling and wording in Go code and Markdown (#25232)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
2025-08-21 15:54:43 -04:00
dependabot[bot]
4953d5bf2d
build(deps): Bump go.uber.org/mock from 0.5.2 to 0.6.0 in /simapp (#25201)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: aljo242 <alex@interchainlabs.io>
2025-08-19 18:36:55 +00:00
dmytroheknt
ec4ee1cb19
chore: polishing docs and comments: typo fixes for clarity (#25081)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
2025-08-04 15:35:53 +00:00
Gengar
a7678f91f4
fix: typos (#25029)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
2025-07-29 14:56:39 +00:00
Alex | Interchain Labs
354c6fb862
chore: ledger bump (#25036) 2025-07-29 10:20:30 -04:00
dependabot[bot]
f5e0eeff63
build(deps): Bump sigs.k8s.io/yaml from 1.4.0 to 1.5.0 in /math (#24918)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
2025-07-01 16:53:28 +00:00
Zachary Becker
fd170b5140
feat: Update Cosmos SDK to CometBFT v2 (#24837)
Co-authored-by: aljo242 <alex@interchainlabs.io>
2025-06-04 17:34:20 +00:00
Alex | Interchain Labs
36e90bb980
chore: fixes from diff review (#24595) 2025-04-28 22:38:57 +00:00
Alex | Interchain Labs
2c6117e820
refactor: remove Dec type (#24375) 2025-04-04 15:00:25 -04:00
Đông Liều
41e3e9d004
feat(math/Dec): Add comparison and utility APIs MinDec, MaxDec, Neg(), Abs(), GT(), GTE(), LT(), LTE() (#24343) 2025-04-02 17:28:10 +00:00
Tronica
bf679429c9
test: fix output formatting, typo corrections, and test case expectations in dec tests (#24325)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
2025-04-01 20:37:03 +00:00
Alex | Interchain Labs
3b7cd13d2a
chore: update deps to silence dependatbot (#24327) 2025-04-01 17:41:30 +00:00
Alex | Interchain Labs
005937547f
feat: create and test migration from LegacyDec->Dec (#24229) 2025-03-31 16:43:47 +00:00
Alex | Interchain Labs
edd47822b5
chore: prep math for v1.5.1 (#24185)
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
2025-03-29 01:12:55 +00:00
Alex | Interchain Labs
e85a5c0bc1
chore: use latest errors (#24184) 2025-03-29 00:44:32 +00:00
Alex | Interchain Labs
b7a20b81f6
chore: lint v2 (#24118) 2025-03-25 15:57:24 +00:00
riyueguang
6fc8d0dc64
refactor: use the built-in max/min to simplify the code (#24112)
Signed-off-by: riyueguang <rustruby@outlook.com>
2025-03-24 17:35:40 +00:00
Alex | Interchain Labs
a90a35149a
chore: deps (#23973) 2025-03-17 14:14:00 -04:00
Alex | Interchain Labs
8903e43a9e
chore: use go1.23 (#23897) 2025-03-05 14:17:59 -05:00
Alex | Interchain Labs
7df377415d
chore: update all for release/v0.53.x (#23750) 2025-02-25 16:02:07 -05:00
Tyler
edcb427a6e
chore: set math to main (#23697) 2025-02-14 07:05:23 -10:00
Alex | Interchain Labs
f5e8e517ab
chore: set up release/v0.53.x branch (#23660)
Co-authored-by: Zygimantas <5236121+Zygimantass@users.noreply.github.com>
Co-authored-by: Zygimantas <zygis@skip.build>
2025-02-12 15:48:20 -05:00
Alex | Interchain Labs
d9bc4bb317
chore: temp remove sonar cloud (#23677) 2025-02-12 10:15:28 -05:00
mergify[bot]
535567e231
fix: RelativePow now returns 1 when 0^0 (backport #18211) (#18216)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-10-23 13:45:21 +00:00
mergify[bot]
d9c53bfefc
refactor!: remove types/math aliases (backport #16798) (#16803)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-06-30 19:56:38 +02:00
Julien Robert
c452721442
style: add gci linter (#16758)
Co-authored-by: Jacob Gadikian <faddat@users.noreply.github.com>
2023-06-29 09:46:37 +00:00
dependabot[bot]
cac7e89e1d
build(deps): Bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#16354)
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>
2023-05-31 06:58:33 +00:00
Roman
a2e3711ce0
fix: legacy dec power mut zero exponent precision (#16266) 2023-05-24 00:05:59 +00:00
dependabot[bot]
89eee12fc8
build(deps): Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#16222)
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>
2023-05-19 06:44:38 +00:00
Julien Robert
90e3e69b95
chore: prepare math 1.0.1 (#16153) 2023-05-15 12:18:15 +00:00
Dev Ojha
fb8ff071ca
perf: Speedup Dec.Sqrt() (#16141) 2023-05-15 10:34:13 +00:00
gribanoid
96662df62f
fix(math): double method call (#15768)
## Description
The `init` method of the `Rand` struct was called twice: in the constructor and in the `init` function.
Closes: #XXXX



---

### 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-10 15:34:10 +00:00
Facundo Medica
43cfdfe618
fix(math): FormatInt returns error on empty string (#15714) 2023-04-06 14:10:30 +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
1f2875d445
style: gofumpt linting (#15605) 2023-03-30 06:27:38 +00:00
Matt Kocubinski
ba9d4df6d0
chore(math): fix changelog link (#15531)
Fixing a changelog link.
2023-03-23 14:49:21 +00:00
Matt Kocubinski
7204a5d4dd
chore: math v1.0.0 (#15530)
Update Changelog in preparation for tagging math/v1.0.0
2023-03-23 15:44:12 +01: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
46169d0bff
ci: add changelog reminder (#15459) 2023-03-21 14:44:24 +01:00
Jeancarlo Barrios
8aa0d035d8
test(math): added integer file to fix test (#15490) 2023-03-20 22:55:34 +00:00
Julien Robert
41c8529ff9
chore: bump cometbft to v0.37.0-rc3 (#15220) 2023-03-01 16:30:41 +01:00
Julien Robert
1273c05ada
test(math): fix FormatDec test (#15215) 2023-02-28 14:57:42 +00:00
dependabot[bot]
b1603227e5
build(deps): Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#15172)
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>
2023-02-27 19:49:52 +00:00
Marko
2b484a241f
feat: add rand funcs to math (#15043) 2023-02-18 18:39:46 +00:00
Julien Robert
88909d6f2b
fix(math): check for negative precision (#14922)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-02-06 17:55:10 +01:00