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

[export hardcoded sync]: CHTs is invalid JSON #11415

Closed
niklasad1 opened this issue Jan 27, 2020 · 1 comment · Fixed by #11601
Closed

[export hardcoded sync]: CHTs is invalid JSON #11415

niklasad1 opened this issue Jan 27, 2020 · 1 comment · Fixed by #11601
Labels
P7-nicetohave 🐕 Issue is worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Milestone

Comments

@niklasad1
Copy link
Collaborator

niklasad1 commented Jan 27, 2020

When exporting the hardcoded sync the CHTs is formatted as a JSON array with a trailing comma which is not valid JSON that we currently is using for the chain specs

To illustrate this, we generate as follows:

[  
    "hash1",
    "hash2",
    "hash3",
]

But should be:

[  
    "hash1",
    "hash2",
    "hash3"
]

The reason for this is because we pretty debug print a vector which adds trailing comma, so in order to automate this process we need to do something else

@niklasad1 niklasad1 changed the title [export hardcoded sync]: prints trailing comma for Vec<H256> [export hardcoded sync]: prints trailing comma for CHTs Jan 27, 2020
@dvdplm dvdplm added the Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. label Jan 27, 2020
@niklasad1 niklasad1 added this to the 2.7 milestone Jan 28, 2020
@niklasad1 niklasad1 added P5-sometimesoon 🌲 Issue is worth doing soon. P7-nicetohave 🐕 Issue is worth doing eventually. and removed P5-sometimesoon 🌲 Issue is worth doing soon. labels Jan 28, 2020
@niklasad1
Copy link
Collaborator Author

niklasad1 commented Jan 29, 2020

As @ordian suggested it is probably best to switch to serde_json for this

@niklasad1 niklasad1 changed the title [export hardcoded sync]: prints trailing comma for CHTs [export hardcoded sync]: CHTs is invalid JSON Jan 29, 2020
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 4, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 4, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
marktoda added a commit to marktoda/openethereum that referenced this issue Apr 5, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes openethereum#11415
ordian pushed a commit that referenced this issue Apr 6, 2020
The exported hardcoded sync was previously generating invalid JSON, with
the CHT list ending in a trailing comma. In order to remedy this, this
commit uses serde_json to serialize the SpecHardcodedSync struct
into valid JSON.

Fixes #11415
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P7-nicetohave 🐕 Issue is worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants