filecoin-project/go-state-types

Impossible to carry non-utf8 market labels over API boundaries

Open

#179 opened on Mar 24, 2023

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Go (42 forks)auto 404
good first issue

Repository metrics

Stars
 (28 stars)
PR merge metrics
 (PR metrics pending)

Description

Because the JSON marshaller ignores the Bytes datamodel type, whenever one uses a non-utf8 ([]byte) label it is stripped off during RPC (JSON) transport

https://github.com/filecoin-project/go-state-types/blob/v0.10.0/builtin/v10/market/deal.go#L166-L168 + https://github.com/filecoin-project/go-state-types/blob/v0.10.0/builtin/v10/market/deal.go#L184-L187

@arajasek @magik6k Is this intentional? If not any objections I fix it?

Contributor guide