Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: include rotate keys logic in abci #18236

Merged
merged 115 commits into from
Dec 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
b6b512a
feat: implement rotate cons key method in msg server
atheeshp Oct 20, 2023
7c7322a
fix tests
atheeshp Oct 24, 2023
9aef4f4
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 24, 2023
37675e6
fix tests
atheeshp Oct 24, 2023
a9be784
fix tests
atheeshp Oct 24, 2023
2a713b5
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 24, 2023
43923ce
go mod tidy
atheeshp Oct 24, 2023
d674890
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 24, 2023
c9f32a7
feat: include rotate keys logic in abci
atheeshp Oct 24, 2023
20f27b7
Merge branch 'main' into ap/add-msg-srvr-code
atheeshp Oct 25, 2023
a51cca3
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 25, 2023
cacc0d8
go mod
atheeshp Oct 25, 2023
e9231e4
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Oct 25, 2023
5086c5f
fix lint
atheeshp Oct 26, 2023
202e2ef
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 26, 2023
3b52332
review changes
atheeshp Oct 26, 2023
4843ae1
fix tests
atheeshp Oct 26, 2023
67e15e0
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 27, 2023
8ffaa71
code rabbit review changes
atheeshp Oct 27, 2023
c093905
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Oct 27, 2023
cce3c19
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 30, 2023
4a63bde
conflicts
atheeshp Oct 30, 2023
4350e5b
review changes
atheeshp Oct 30, 2023
bbcb932
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 30, 2023
7b2b9bd
fix tests
atheeshp Oct 31, 2023
6e8eb7f
review changes
atheeshp Oct 31, 2023
04f1cbe
Merge branch 'main' into ap/add-msg-srvr-code
atheeshp Oct 31, 2023
55496f9
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Oct 31, 2023
535d00f
review changes
atheeshp Oct 31, 2023
46ae281
review changes
atheeshp Oct 31, 2023
12274e9
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 31, 2023
b19d163
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Oct 31, 2023
e463855
go mod
atheeshp Oct 31, 2023
552e683
go mod
atheeshp Oct 31, 2023
2ea32bc
fix go mod
atheeshp Oct 31, 2023
fb3363f
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Oct 31, 2023
9976530
go mod
atheeshp Oct 31, 2023
f0113eb
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Nov 1, 2023
d4439ec
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Nov 2, 2023
87aebe8
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Nov 2, 2023
3a0f4da
review changes
atheeshp Nov 2, 2023
89ca04f
proto
atheeshp Nov 2, 2023
6d138b8
proto-gen
atheeshp Nov 2, 2023
49f1745
review changes
atheeshp Nov 2, 2023
4183c78
review changes
atheeshp Nov 2, 2023
327929f
proto-gen
atheeshp Nov 2, 2023
efb8022
review changes
atheeshp Nov 2, 2023
dfbb63a
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Nov 2, 2023
dd8c72c
review changes
atheeshp Nov 2, 2023
0359d96
review changes
atheeshp Nov 2, 2023
441f6ee
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Nov 3, 2023
f41fdf0
go mod tidy
atheeshp Nov 3, 2023
c7563f5
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Nov 6, 2023
44731ce
try fixing go mod
atheeshp Nov 6, 2023
8a00a07
fix go mod changes
atheeshp Nov 6, 2023
7ed213f
review change
atheeshp Nov 6, 2023
78c4eda
review changes
atheeshp Nov 6, 2023
b236334
review changes
atheeshp Nov 7, 2023
a4b06da
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Nov 7, 2023
cae4de4
clean comments
atheeshp Nov 7, 2023
1539aaa
review changes
atheeshp Nov 7, 2023
e30bece
Merge branch 'main' into ap/add-msg-srvr-code
atheeshp Nov 7, 2023
d4bf237
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Nov 7, 2023
20bf052
conflicts
atheeshp Nov 7, 2023
10f6e38
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Nov 7, 2023
d32c833
go mod tidy
atheeshp Nov 7, 2023
05e560a
review changes
atheeshp Nov 8, 2023
e27c72a
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-msg-s…
atheeshp Nov 8, 2023
aee5587
Merge branch 'ap/add-msg-srvr-code' of github.com:cosmos/cosmos-sdk i…
atheeshp Nov 8, 2023
06d7170
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Nov 15, 2023
d560884
conflicts
atheeshp Nov 15, 2023
17852c2
go mod
atheeshp Nov 15, 2023
9a7a82b
go mod
atheeshp Nov 15, 2023
f98c94c
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Nov 16, 2023
1a2a897
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Nov 17, 2023
1f04845
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Nov 20, 2023
82bc8f5
review changes
atheeshp Nov 21, 2023
03469a5
review changes
atheeshp Nov 21, 2023
a8544f0
nit
atheeshp Nov 21, 2023
ea22a3d
fix tests
atheeshp Nov 22, 2023
3756d84
fix tests
atheeshp Nov 22, 2023
91fe4f1
review changes
atheeshp Nov 22, 2023
5ed6003
add tests for rotation
atheeshp Nov 29, 2023
1191858
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Nov 29, 2023
75eb409
add extra test
atheeshp Nov 29, 2023
088255b
review changes
atheeshp Dec 1, 2023
c221c55
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 1, 2023
6b55e4b
review changes
atheeshp Dec 1, 2023
0f1011b
review changes
atheeshp Dec 1, 2023
cc2c0a1
review changes
atheeshp Dec 12, 2023
3d5c8b4
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 12, 2023
1ca3562
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 13, 2023
cddbc58
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 14, 2023
f362a93
review changes
atheeshp Dec 17, 2023
42979cb
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 17, 2023
fbd4e41
review changes
atheeshp Dec 17, 2023
9961cc5
fix test
atheeshp Dec 18, 2023
a8bab2f
lint
atheeshp Dec 19, 2023
159375e
test
atheeshp Dec 19, 2023
663c8ef
lint
atheeshp Dec 19, 2023
19bf12b
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 19, 2023
320af37
review changes
atheeshp Dec 20, 2023
fcabe10
lint
atheeshp Dec 20, 2023
5e4736a
review changes
atheeshp Dec 20, 2023
2eedad0
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 20, 2023
97c871d
remove unnecessary code
atheeshp Dec 20, 2023
8f219bd
add test to check validator identifier
atheeshp Dec 21, 2023
1b1f4b7
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 21, 2023
c742783
fix lint
atheeshp Dec 21, 2023
7a4419a
review changes
atheeshp Dec 21, 2023
075865b
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 21, 2023
98862ef
fix `GetValidatorByConsAddr`
atheeshp Dec 21, 2023
bc53191
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 21, 2023
693a7eb
review changes
atheeshp Dec 21, 2023
bd92cec
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/abci-and-…
atheeshp Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review changes
  • Loading branch information
atheeshp committed Nov 7, 2023
commit 1539aaae10d10a27d874005a32010d8bd0ac5e06
6 changes: 3 additions & 3 deletions x/staking/keeper/cons_pubkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (k Keeper) setConsPubKeyRotationHistory(
return err
}

return k.SetConsKeyQueue(ctx, queueTime, valAddr)
return k.setConsKeyQueue(ctx, queueTime, valAddr)
}

// exceedsMaxRotations returns true if the key rotations exceed the limit, currently we are limiting one rotation for unbonding period.
Expand All @@ -62,9 +62,9 @@ func (k Keeper) exceedsMaxRotations(ctx context.Context, valAddr sdk.ValAddress)
return count >= maxRotations, nil
}

// SetConsKeyQueue sets array of rotated validator addresses to a key of current block time + unbonding period
// setConsKeyQueue sets array of rotated validator addresses to a key of current block time + unbonding period
// this is to keep track of rotations made within the unbonding period
func (k Keeper) SetConsKeyQueue(ctx context.Context, ts time.Time, valAddr sdk.ValAddress) error {
func (k Keeper) setConsKeyQueue(ctx context.Context, ts time.Time, valAddr sdk.ValAddress) error {
queueRec, err := k.ValidatorConsensusKeyRotationRecordQueue.Get(ctx, ts)
if err != nil {
return err
Expand Down