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

release: draft release for v0.26.5 #352

Merged
merged 5 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

##v0.26.5
* [cli] [\#348] (https://github.com/bnb-chain/bnc-cosmos-sdk/pull/348) fix: support querying history about malicious vote slash
* [cli] [\#350] (https://github.com/bnb-chain/bnc-cosmos-sdk/pull/350) fix: reading pubkey from ledger panic

##v0.26.4
* [fix] [\#345] (https://github.com/bnb-chain/bnc-cosmos-sdk/pull/345) fix: fix validator unmarshal failed issue

Expand Down
4 changes: 2 additions & 2 deletions crypto/ledger_secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ func (pkl PrivKeyLedgerSecp256k1) pubkeyLedgerSecp256k1() (pub tmcrypto.PubKey,
return nil, fmt.Errorf("error fetching public key: %v", err)
}

var pk tmsecp256k1.PubKeySecp256k1

// re-serialize in the 33-byte compressed format
cmp, err := btcec.ParsePubKey(key[:])
if err != nil {
return nil, fmt.Errorf("error parsing public key: %v", err)
}

pk := make(tmsecp256k1.PubKeySecp256k1, tmsecp256k1.PubKeySize)
copy(pk[:], cmp.SerializeCompressed())

return pk, nil
Expand Down
6 changes: 4 additions & 2 deletions x/slashing/client/cli/query_sidechain.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func GetCmdQuerySideChainSlashRecord(storeName string, cdc *codec.Codec) *cobra.
return nil
},
}
cmd.Flags().String(FlagInfractionType, "", "infraction type, 'DoubleSign;Downtime'")
cmd.Flags().String(FlagInfractionType, "", "infraction type, 'DoubleSign;Downtime;MaliciousVote'")
cmd.Flags().Int64(FlagInfractionHeight, 0, "infraction height")
cmd.Flags().String(FlagSideChainId, "", "chain-id of the side chain the validator belongs to")
cmd.MarkFlagRequired(FlagInfractionType)
Expand Down Expand Up @@ -264,7 +264,7 @@ func GetCmdQuerySideChainSlashRecords(cdc *codec.Codec) *cobra.Command {
},
}

cmd.Flags().String(FlagInfractionType, "", "infraction type, 'DoubleSign;Downtime'")
cmd.Flags().String(FlagInfractionType, "", "infraction type, 'DoubleSign;Downtime;MaliciousVote'")
cmd.Flags().String(FlagSideChainId, "", "chain-id of the side chain the validator belongs to")
return cmd
}
Expand All @@ -290,6 +290,8 @@ func convertInfractionType(infractionTypeS string) (byte, error) {
res = slashing.DoubleSign
} else if infractionTypeS == "Downtime" {
res = slashing.Downtime
} else if infractionTypeS == "MaliciousVote" {
res = slashing.MaliciousVote
} else {
return 0, errors.New("unknown infraction type")
}
Expand Down
2 changes: 2 additions & 0 deletions x/slashing/slash_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func (r SlashRecord) HumanReadableString() (string, error) {
infraType = "DoubleSign"
} else if r.InfractionType == 1 {
infraType = "Downtime"
} else if r.InfractionType == 2 {
infraType = "MaliciousVote"
}

var consAddr string
Expand Down