Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
d933746
feat: add keyregistry
yusufozmis Apr 8, 2026
233fc25
fix: make config.yml compatible with the new implementation
yusufozmis Apr 8, 2026
1507a5f
feat: update keys msg implementation
yusufozmis Apr 14, 2026
4a2ebcd
refactor: rename keyupdatetype to actor type and use enumeration on …
yusufozmis Apr 15, 2026
1d13d80
chore: fix the naming of user maps
yusufozmis Apr 15, 2026
27a3236
fix: update keys checks if mina key previously registered to another …
yusufozmis Apr 19, 2026
603a19c
test: add tests for update keys
yusufozmis Apr 19, 2026
7028b89
refactor: use public keys as key value in user maps, instead of addre…
yusufozmis Apr 20, 2026
4766bf7
fix: remove consaddress problems and fix overall logic
yusufozmis Apr 22, 2026
e2ffb29
test: make tests compatible with the new logic
yusufozmis Apr 22, 2026
a10a671
"refactor: genesis now has all 4 maps, compatible with the state"
yusufozmis Apr 24, 2026
43c6fa1
fix: validator public keys are now ed25519, rather than secp256k1. di…
yusufozmis Apr 24, 2026
e87b183
fix: make config compatible with the new genesis structure
yusufozmis Apr 24, 2026
9aa9ad3
refactor: use bytes for signatures instead of string
yusufozmis Apr 24, 2026
f9532fb
chore: remove public validate functions for user/validator keypair st…
yusufozmis Apr 24, 2026
31acc25
chore: fix typo
yusufozmis Apr 24, 2026
da63547
chore: use ErrInvalidCreatorAddress instead of ErrInvalidSigner
yusufozmis Apr 24, 2026
d801054
chore: improved error messages and more consistent dependency use
yusufozmis Apr 24, 2026
e009fed
refactor: remove public map set functions and use registerkeys msg in…
yusufozmis Apr 24, 2026
845321c
refactor(keyregistry): rename keeper key params from address to pubkey
korayakpinar Apr 24, 2026
93c873f
feat(keyregistry): canonicalize genesis key pair state
korayakpinar Apr 27, 2026
2c3fa6b
feat(keyregistry): simulate key registration and updates
korayakpinar Apr 27, 2026
3354f10
f
yusufozmis May 1, 2026
6133bdd
feat: verify vote extension
yusufozmis Apr 10, 2026
d6ab839
feat: prepare proposal handler
yusufozmis Apr 13, 2026
477682f
feat: process proposal handler
yusufozmis Apr 13, 2026
380df9a
fix: return values fixed and used integer arithmetic instead of float
yusufozmis Apr 27, 2026
760c116
chore: rebased vote ext
yusufozmis May 1, 2026
9700dbc
feat: add a collection map to store vote extensions
yusufozmis Apr 27, 2026
5b3ed0d
refactor: remove local vote map and get votes from cometbft
yusufozmis Apr 27, 2026
62bd41a
refactor: move functions to helpers and make vote extension compatibl…
yusufozmis Apr 29, 2026
b7b0f63
fix: prepare/process proposals with blocks < 3 to remove the empty vo…
yusufozmis Apr 29, 2026
f32ea87
feat: enable vote extensions
yusufozmis Apr 29, 2026
011acd9
test: add tests for vote extension storage map
yusufozmis Apr 29, 2026
11526ff
feat: add a function to allow removing all votes from the vote storag…
yusufozmis Apr 29, 2026
19927ea
feat: add a field to abci handler to use vote persistence module func…
yusufozmis Apr 29, 2026
3d283d5
feat: implement pre blocker
yusufozmis Apr 29, 2026
9da0131
test: add a test for remove votes
yusufozmis Apr 29, 2026
cc01120
feat: vote persistence module added
yusufozmis May 1, 2026
dc06113
fix: define errors in vote persistence module to use in abci handler
yusufozmis Apr 29, 2026
749789a
fix: use get validator by cons add instead of get validator, and fix …
yusufozmis Apr 30, 2026
a450e4c
fix: seperate vote ext body construct functions
yusufozmis Apr 30, 2026
0a8d6f3
feat: implement vote extension body query
yusufozmis Apr 30, 2026
f2a1cbc
feat: implement a script to run the chain for vote extension to work …
yusufozmis Apr 30, 2026
4e34a4f
fix: prevent query requests for blocks bigger than the current block
yusufozmis Apr 30, 2026
44574a3
chore: add a helper to extract payload and simplify function signatur…
yusufozmis May 1, 2026
a11fd9e
chore: rename newvoteextensionhandler to newabcihandler and move it t…
yusufozmis May 1, 2026
ca6ea48
chore: add actions reduced root field to vote extension body
yusufozmis May 1, 2026
0313134
chore: create types folder and move constants and payload struct to t…
yusufozmis May 1, 2026
00b7587
chore: unify construct and reconstruct vote ext body functions, and r…
yusufozmis May 1, 2026
f0e94e8
fix: handle empty block error
yusufozmis May 1, 2026
3c29e68
fix: use vote storage map's clear method instead of remove
yusufozmis May 1, 2026
8023085
chore: remove validatorInfo struct and use cosmos sdk's validator struct
yusufozmis May 1, 2026
1938c0a
feat: add sorting by validator power to ensure each node gets the sam…
yusufozmis May 1, 2026
7eba14b
chore: build vote ext body with proto, and return that in query
yusufozmis May 1, 2026
519e5a8
fix: script was not refreshing based on code changes, fixed
yusufozmis May 1, 2026
d8c1629
refactor: use proto in payload and update the logic accordingly
yusufozmis May 1, 2026
f659b29
fix: the script now initializes chain with 2 validators, allowing to …
yusufozmis May 1, 2026
d2fe364
feat: implement signing/verifying vote extension bodies, using mina-s…
yusufozmis May 1, 2026
3b922cb
fix: start vote extension at height 3
yusufozmis May 1, 2026
1c1c759
chore: remove empty block error and let prepare/process proposals sta…
yusufozmis May 1, 2026
b53ebf3
chore: minor fixes on returned errors
yusufozmis May 1, 2026
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
24 changes: 24 additions & 0 deletions abci/extend_vote.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package vote_ext

import (
abci "github.com/cometbft/cometbft/abci/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (h *AbciHandler) ExtendVoteHandler() sdk.ExtendVoteHandler {
return func(ctx sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) {

if req.GetHeight() < 3 {
return &abci.ResponseExtendVote{VoteExtension: []byte{}}, nil
}

body, err := h.constructVoteExtBody(ctx, req.GetHeight())
if err != nil {
return nil, err
}

bz := h.secondaryKey.SignVoteExtBody(body)

return &abci.ResponseExtendVote{VoteExtension: bz}, nil
}
}
30 changes: 30 additions & 0 deletions abci/handler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package vote_ext

import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
"github.com/node101-io/mina-signer-go/keys"
keyregistrykeeper "github.com/node101-io/pulsar-chain/x/keyregistry/keeper"
votepersistence "github.com/node101-io/pulsar-chain/x/votepersistence/keeper"
)

type SecondaryKey struct {
SecretKey *keys.PrivateKey
PublicKey *keys.PublicKey
}

type AbciHandler struct {
secondaryKey SecondaryKey
stakingKeeper stakingkeeper.Keeper
keyregistryKeeper keyregistrykeeper.Keeper
votePersistenceKeeper votepersistence.Keeper
}

func NewABCIHandler(secondaryKey SecondaryKey, stakingKeeper stakingkeeper.Keeper,
keyregistryKeeper keyregistrykeeper.Keeper, votepersistenceKeeper votepersistence.Keeper) *AbciHandler {
return &AbciHandler{
secondaryKey: secondaryKey,
stakingKeeper: stakingKeeper,
keyregistryKeeper: keyregistryKeeper,
votePersistenceKeeper: votepersistenceKeeper,
}
}
Loading
Loading