cosmos / ibc-rs

Rust implementation of the Inter-Blockchain Communication (IBC) protocol.
Apache License 2.0
181 stars 73 forks source link

Change visibility of domain types' fields to public #1228

Open seanchen1991 opened 1 month ago

seanchen1991 commented 1 month ago

Follow up issue to this discussion proposed by @soareschen.

Background

In summary, there is very little benefit to protecting domain type fields, especially since they all have auto-derive instances of serde::{Serialize, Deserialize}. It would only make sense to keep the fields private if we were hand-deriving the serialization logic, but with auto-derived instances, this leaves a backdoor open for vulnerabilities as far as validation of these domain type fields is concerned. So perhaps it makes sense to make all domain type fields public.

Proposal