parity-common icon indicating copy to clipboard operation
parity-common copied to clipboard

Support for BorshDeserialize and BorshSerialize

Open ivanceras opened this issue 2 years ago • 5 comments

Hi, is there any plan to support BorshSerialize and BorshDeserialize for the ethereum-types. I notice that borsh is used in NEAR and in Solana which provides compatibility with ethereum.

ivanceras avatar Apr 02 '22 12:04 ivanceras

Hey @ivanceras. If there's enough demand for it, we might consider adding this feature. However, that would mean tying any major releases to a breaking change to ethereum-types, which we'd like to avoid.

ordian avatar Apr 11 '22 16:04 ordian

Borsh support would be useful to hyperlane and eclipse.

@ordian to address your concern about avoiding being tied to breaking changes - given that borsh is still in 0.x, what do you think about feature gating borsh support behind an experimental-impl-borsh feature and documenting explicitly that there may be breaking changes to anything related to borsh?

sloboste avatar Dec 01 '22 18:12 sloboste

@sloboste hey, sorry for the long delay in reply. I think your suggestion is a reasonable workaround we can live with.

ordian avatar Feb 01 '23 19:02 ordian

@ordian would love to see https://github.com/paritytech/parity-common/pull/698 get merged with the feature gate :) are there any changes you'd like to see there?

tkporter avatar May 04 '23 08:05 tkporter

@tkporter yes, see point 2 in https://github.com/paritytech/parity-common/pull/698#issuecomment-1331827459. Instead of introducing a new crate with a regular macro, we could just use derive with a feature gate.

ordian avatar May 04 '23 08:05 ordian