informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
615 stars 224 forks source link

Ensure compatibility of misbehaviour evidence JSON serialization with CometBFT v0.37.10 and v0.38.11 #1461

Open romac opened 3 months ago

romac commented 3 months ago

In CometBFT v0.37.10 and v0.38.11, the name of the fields of the DuplicateVoteEvidence and LightClientAttackEvidence structs when serialized to JSON have changed from PascalCase to snake_case.

As Hermes uses those structs to process and report misbehaviour evidence, we should make sure that we can still do so with those versions using snake_case, while keeping backward compatibility with chains running previous versions using UpperCamelCase.