Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Change genesis.code encoding in chainspec to bytes. #4454

Closed
tomusdrw opened this issue Dec 19, 2019 · 3 comments
Closed

Change genesis.code encoding in chainspec to bytes. #4454

tomusdrw opened this issue Dec 19, 2019 · 3 comments
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@tomusdrw
Copy link
Contributor

Currently genesis.code inside chain spec JSON is encoded as raw Vec<u8> which results in a JSON array containing shitload of numbers, which by default when pretty-printed results in one number per line.

Instead we should encode code as hex (see Bytes wrapper) as it's way more compact, but to maintain backward compatibility we should support both formats when deserializing the chain spec.

CC @JoshOrndorff, I saw that on your seminar and thought that we could fix it :)

@tomusdrw tomusdrw added I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. M4-core Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder labels Dec 19, 2019
@bkchr
Copy link
Member

bkchr commented Dec 19, 2019

Wasn't this fixed by this: #4025 ?

@tomusdrw
Copy link
Contributor Author

@bkchr Good point, it's quite possible as that's what the title suggests. Let me confirm that and close that issue if that's the case.

@tomusdrw
Copy link
Contributor Author

Confirming it's already fixed in #4025.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
None yet
Development

No branches or pull requests

2 participants