Skip to content

Proposal: Add Field Export Check in EDF Structure Registration to Align with Documentation #209

Closed
@chopdown

Description

@chopdown

According to the EDF documentation (https://docs.ergo.services/networking/network-transparency#edf-ergo-framework-data-format):
"All child elements in the registered structures must be public. If you need to encode/decode structures with private fields, you will need to implement a custom encoder/decoder for that data type."

However, based on my testing and code review (

ft := tov.Field(i).Type
), there appears to be no check for field.IsExported() in the current implementation. This leads to situations where structures containing private fields (which shouldn't be included in serialization/deserialization) will eventually throw errors during processing.

Should we add the corresponding exported field check to align with the documentation? This would help prevent unintended exposure of private fields and match the framework's design specifications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions