Commit Graph

439 Commits

Author SHA1 Message Date
Julien Robert
5e7aae0db1
refactor(core,x/**): simplify core service api and embed environment in keepers (#20071) 2024-04-17 18:18:16 +00:00
Lucas Francisco López
2496cfdf51
feat: Conditionally emit metrics based on enablement (#19903)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2024-04-11 20:32:52 +00:00
Julien Robert
d54e940d50
refactor(x/staking): use sdk validator updates (#19788) 2024-03-28 13:48:52 +00:00
Facundo Medica
a82615bdf8
fix: Do not call Remove during Walk - part 2 (#19851) 2024-03-25 20:42:50 +00:00
Facundo Medica
ea7bdd1724
fix: Do not call Remove during Walk (#19833)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2024-03-24 18:56:24 +00:00
Chi Xiao Wen
bfa734ce8f
refactor(x/staking,genutil)!: use validatorUpdates (#19754)
Co-authored-by: chixiaoxiao <chixiaoxiao@gmail.com>
2024-03-19 19:48:56 +00:00
ocnc
a1bfe5d285
feat(x/staking): allow zero unbonding time (#19779) 2024-03-19 18:21:02 +00:00
Julián Toledano
65ab2530cc
refactor(x/staking)!: removes the use of Accounts String() method (#19742) 2024-03-19 09:20:42 +00:00
Chi Xiao Wen
db82004074
refactor(x/**)!: genesis return errors (#19740)
Co-authored-by: chixiaoxiao <chixiaoxiao@gmail.com>
2024-03-13 11:44:43 +00:00
Julián Toledano
25aea8af8a
refactor!: remove global config from x/auth and client (#19447) 2024-03-06 13:14:16 +00:00
mergify[bot]
84a1ee2232
fix(staking): fix impossible conditions (backport #19621) (#19624)
Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: sontrinh16 <trinhleson2000@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-03-04 11:00:46 +01:00
Julien Robert
e4d97090d8
test: move slash redelegation test to integration (#19581) 2024-02-28 10:09:38 +00:00
khanh
8585d538f1
Merge pull request from GHSA-86h5-xcpx-cfqc
* check undelegation after redelegation

* add comment

* using app v1

* set up test

* update test

* Update x/staking/keeper/slash.go

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

* use switch inside slashing logic

* update slash redelegation test

---------

Co-authored-by: Hieu Vu <72878483+hieuvubk@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-02-27 17:28:05 +01:00
Julien Robert
4b73e31b00
feat(x/staking): update validators min commission rate after MsgUpdateParams (#19537) 2024-02-23 17:17:01 +00:00
Joowon Yun
adc0f75f62
fix(x/staking): dust share (#18841)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
2024-02-20 16:40:17 +00:00
Marko
2dafb8780c
refactor(x/staking): migrate to use env (#19414)
Co-authored-by: Facundo <facundomedica@gmail.com>
2024-02-14 23:11:06 +00:00
Julien Robert
e15a0de251
feat(core): add migrations registering (#19370)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
2024-02-09 09:30:39 +00:00
Cosmos SDK
94c98691a6
chore: fix spelling errors (#19369)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-02-07 18:32:15 +00:00
Likhita Polavarapu
c3a2357d3e
refactor(x/staking): return errors on Hooks calls (#19277)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2024-02-02 09:38:10 +00:00
Aleksandr Bezobchuk
a69836b3b6
fix(x/staking): Refactor GetLastValidators (#19226) 2024-01-25 00:37:19 +00:00
atheeshp
2a95a4abdd
docs: add consensus pubkey docs (#19081)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: samricotta <37125168+samricotta@users.noreply.github.com>
2024-01-18 09:23:21 +00:00
atheeshp
b16aa35d14
test: add tests for cons pubkey rotation (#18965)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2024-01-09 04:56:14 +00:00
atheeshp
19e66a9dc8
feat: include rotate keys logic in abci (#18236) 2023-12-22 10:14:15 +00:00
Likhita Polavarapu
38f40c42f2
refactor: remove panic usage in keeper methods (#18636) 2023-12-12 09:51:23 +00:00
Cosmos SDK
8f0d5b15f0
chore: typos fixes by cosmos-sdk bot (#18689)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-12-11 13:03:19 +00:00
Julien Robert
8cfdabb2ed
ci: add misspell action (#18671) 2023-12-11 06:11:03 +00:00
Marko
a7ececc34d
refactor(staking): move delegation and validator interfaces to ./types (#18198)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2023-11-30 21:18:42 +00:00
Chenqun Lu
d3e662da1f
imp(staking): detect the length of the ed25519 pubkey in CreateValidator to prevent panic (#18506) 2023-11-27 09:41:17 +00:00
Julien Robert
3853e7ff70
ci: optimize linter script (#18480) 2023-11-16 12:57:32 +00:00
atheeshp
0f8c6c2c12
feat(x/staking): implement RotateConsPubKey method (#18188) 2023-11-15 06:59:50 +00:00
Emmanuel T Odeke
05261cc46e
refactor(x/auth): spin out go.mod (#18351) 2023-11-07 11:42:58 +00:00
Marko
2a6640d488
refactor(staking): add go.mod (#18257) 2023-10-26 07:39:34 +00:00
atheeshp
3a8f114327
feat: add required params for cons pubkey rotation (#18142) 2023-10-18 13:06:59 +00:00
atheeshp
8f8e242e78
feat: add proto for cons pubkey rotation (#18140) 2023-10-17 12:42:16 +00:00
Emmanuel T Odeke
13afd9389b
perf(x/staking/keeper): make Slash return early iff zero tokens to burn (#18049) 2023-10-16 14:50:08 +00:00
Emmanuel T Odeke
7d7d4907f4
fix(x/slashing/keeper): hoist non-changing addresses parsing out of redelegation loop (#18035) 2023-10-10 10:15:00 +00:00
Marko
b170ccc459
chore(staking): add delegator to events (#18006) 2023-10-09 11:27:41 +00:00
Emmanuel T Odeke
ddd26b5dfc
chore(x/staking/keeper): remove redundant code/returns (#17890) 2023-09-27 07:43:38 +00:00
Marko
9d07b8ca8e
refactor!: use context.Context in genesis api (#17885) 2023-09-26 16:03:41 +00:00
Marko
076ab3bf89
chore: remove staking and distr param dependence (#17834) 2023-09-22 07:56:06 +00:00
Marko
86ab9890b8
chore: amend validator to validators (#17809) 2023-09-19 12:34:13 +00:00
Marko
c05ff14a97
refactor(staking): change historicalinfo to contain minimal set of data (#17655)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-09-19 10:59:04 +00:00
atheeshp
28112706b7
refactor: migrate x/staking Params to use collections (#17778) 2023-09-18 16:06:42 +00:00
Marko
6615ff4f76
refactor!: deprecate blocktime on context (#17738) 2023-09-18 13:55:21 +00:00
Likhita Polavarapu
2085695078
refactor(x/staking): migrate RedelegationQueue to collections (#17486)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-09-08 17:10:33 +00:00
Likhita Polavarapu
e53830d58a
refactor(x/staking): Migrate ValidatorQueue to use Collections (#17562)
Co-authored-by: testinginprod <98415576+testinginprod@users.noreply.github.com>
Co-authored-by: unknown unknown <unknown@unknown>
2023-09-08 16:43:44 +00:00
Marko
81d9ce9af5
feat(x/bank): introduce msg burn to bank keeper (#17569)
Co-authored-by: likhita-809 <likhita@vitwit.com>
2023-09-08 15:59:04 +00:00
Oleg Kovalov
7ff1ae999a
chore: fix nolint comments (#17644) 2023-09-06 21:32:11 +00:00
Likhita Polavarapu
97661429e0
docs: Add k/v docs in structs using collections (#17609) 2023-09-04 22:24:19 +00:00
Likhita Polavarapu
eb853117a9
refactor(x/staking): Use gogotypes Int64Value instead of bytes for LastValidatorPower (#17604) 2023-09-01 21:28:17 +00:00
Likhita Polavarapu
3e07c80ebc
refactor(x/staking): Migrate LastValidatorPower to Collections (#17498) 2023-08-30 21:21:40 +00:00
Likhita Polavarapu
3ed40a925c
refactor(x/staking): Migrate UnbondingDelegationByValIndex to use collections (#17291)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
2023-08-30 09:21:10 +00:00
Likhita Polavarapu
6ed81a737c
refactor(x/staking): migrate UnbondingQueue to collections (#17481) 2023-08-29 07:15:22 +00:00
Likhita Polavarapu
70b3e85781
refactor(x/staking): Migrate Validators to use Collections (#17123) 2023-08-28 14:56:14 +00:00
Likhita Polavarapu
a734071c05
refactor(x/staking): Migrate UnbondingDelegation to collections (#17270) 2023-08-28 08:38:11 +00:00
David Terpay
bb0c866193
fix(baseapp): Utilizing voting power from VEs in ValidateVoteExtensions (#17518)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-08-25 17:52:35 +00:00
atheeshp
76a72ceb9d
refactor(x/staking): migrate RedelegationByValDstIndexKey key to collections (#17336) 2023-08-23 04:57:47 +00:00
atheeshp
222d28e179
refactor(x/staking): migrate RedelegationByValSrcIndexKey key to collections (#17332) 2023-08-22 07:00:23 +00:00
atheeshp
09db6997c5
refactor(x/staking): migrate redelegation key to use collections (#17315) 2023-08-17 10:32:10 +00:00
fx0x55
53f804df73
perf: use store has instead of get in HistoricalInfo (#17400) 2023-08-16 07:26:14 +00:00
Marko
e60c583d28
refactor: migrate away from using valBech32 globals (2/2) (#17157)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-08-14 08:04:24 +00:00
Marko
266edc0a93
refactor: remove staking infraction type dep from evidence and slashing (#17335)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-08-12 15:45:41 +00:00
atheeshp
f907a27d31
refactor(x/staking): migrate delegation key to collections (#17162) 2023-08-09 07:15:12 +00:00
Likhita Polavarapu
f04fefdc7a
refactor(x/staking): Migrate UnbondingIndex to use collections (#17288) 2023-08-08 10:27:19 +00:00
Facundo Medica
c3ae0b09d4
fix: ValidatorStore interface doesn't match StakingKeeper (#17164)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-08-03 22:53:05 +00:00
Likhita Polavarapu
92dffb5fa8
refactor(x/staking): Migrate UnbondingID to collections (#17256) 2023-08-03 12:50:16 +00:00
atheeshp
9443fc1051
refactor(x/staking): migrate ValidatorByConsAddr key to collections (#17260) 2023-08-03 11:31:14 +00:00
Likhita Polavarapu
a7977b8633
refactor(x/staking): migrate UnbondingType to collections (#17248) 2023-08-03 10:11:23 +00:00
atheeshp
257d3e5e7c
refactor(x/staking): migrate delegations by validator to use collections (#17155) 2023-07-28 08:46:12 +00:00
Marko
58855c6859
refactor: remove global valaddress bech32 codec calls (1/2) (#17098)
Co-authored-by: Devon Bear <itsdevbear@berachain.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-07-26 19:01:21 +00:00
atheeshp
c74e2887b0
refactor(x/staking): migrate historicalInfo to use collections (#17063) 2023-07-25 09:05:26 +00:00
Julien Robert
5442197d6b
chore: cherry-pick some inj changes (#17109) 2023-07-24 13:07:06 +00:00
Devon Bear
bf9f85a2d9
refactor(x/staking): Use ValidatorAddrCodec (#17095) 2023-07-23 21:31:16 +00:00
Likhita Polavarapu
535d711e7f
refactor(x/staking): migrate ValidatorUpdates to collections (#17062) 2023-07-20 06:49:40 +00:00
Marko
c23505b037
refactor(staking): use validator & address codecs in staking (#16958) 2023-07-19 11:01:32 +00:00
Likhita Polavarapu
1a986f015a
refactor: migrate LastTotalPower to use collections in x/staking (#17026) 2023-07-17 16:10:03 +00:00
Julien Robert
e0be2b80fc
feat(staking)!: add consensus and validator address codec in staking (#16959)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
2023-07-13 09:08:27 +00:00
Robert Zaremba
bc4ccab74b
refactor(types)!: remove IntProto and DecProto (#16918)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-07-12 22:16:28 +00:00
atheeshp
9b237c7189
chore(x/staking): audit changes (#16795)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-07-03 07:14:17 +00:00
Julien Robert
8c72f66396
refactor!: remove types/math aliases (#16798) 2023-06-30 17:09:03 +00:00
Julien Robert
ae39e8e631
build(deps): use hashicorp/go-metrics instead of armon/go-metrics (#16790) 2023-06-30 14:21:57 +00:00
Julien Robert
02b7607768
feat(auth,client/v2): add validator address codec (#16768) 2023-06-30 09:44:28 +00:00
Jacob Gadikian
8d4ff7a19a
style: bump golangci-lint (#16667) 2023-06-23 12:49:34 +00:00
Jacob Gadikian
6afece635c
style: add gci linter (#16605) 2023-06-22 15:35:51 +00:00
Facundo Medica
1be7d9805e
refactor(x/staking)!: KVStoreService, return errors and use context.Context (#16324)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-06-16 18:40:44 +00:00
atheeshp
dcac757a04
chore: remove x/gov module dependencies in x/staking (#16567) 2023-06-15 17:17:37 +00:00
Matt Kocubinski
fe458e0686
refactor(x/auth): rm dependency on x/staking (#16545) 2023-06-15 08:34:53 +00:00
Marko
c8ab555174
refactor(bech32): remove embedding of addresscodec (#16197) 2023-05-22 10:20:45 +00:00
MSalopek
b28c50fdd2
fix: call AfterUnbondingInitiated for new unbonding entries only (#16043) 2023-05-11 09:46:48 +00:00
Marko
044fe13789
refactor(math)!: remove aliases in math (#16040)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-05-07 17:25:59 +00:00
Likhita Polavarapu
672b1f9e15
test(x/staking): write integration tests (#15890) 2023-05-02 20:01:19 +00:00
samricotta
e77156858f
refactor(staking, slashing, signing, misc): remove aliases from types/math.go (#15902) 2023-04-25 08:55:17 +00:00
atheeshp
7b5602492c
refactor: add delegations by validator index (#15731)
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-04-24 14:14:09 +00:00
Likhita Polavarapu
7132a7624e
refactor(staking): add missing msgServer tests and move ValidateBasic() logic to msgServer (#15820) 2023-04-14 14:54:29 +00:00
Marko
8d6c23faa4
feat: add endblocker with valsetupdate type (#15829) 2023-04-14 09:41:29 +00:00
Andrey Petrovich
491cf3babe
refactor(staking)!: binary format for HistoricalInfoKey (#15701)
## Description

Closes: #11463



---

### 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-13 07:21:54 +00:00
Marko
7f0e05ebb9
refactor(staking): remove account address bech32 global (#15598) 2023-04-02 21:53:59 +02:00
Julien Robert
aeaa301506
feat: integration test helpers (#15556) 2023-03-31 18:02:15 +00:00
Jacob Gadikian
a9546bfad0
style: apply any / all automated lint fixes (#15644) 2023-03-31 13:48:41 +02:00
Marko
a5ad307ae6
refactor: migrate consensus to collections (#15553) 2023-03-28 20:41:12 +00:00