Skip to content

Commit

Permalink
Merge pull request #352 from bnb-chain/develop
Browse files Browse the repository at this point in the history
release: draft release for v0.26.5
  • Loading branch information
unclezoro authored Jun 6, 2023
2 parents 3908999 + 33000bc commit 66fb452
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
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

0 comments on commit 66fb452

Please sign in to comment.