-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add light client compatible and change to json. #2916
feat: Add light client compatible and change to json. #2916
Conversation
1e11df7
to
99437fb
Compare
I have 2 points against this format.
|
This file will be used for https://neuron.magickbase.com/ and Neuron to load the compatibility of Neuron. I guess it's better to simply the load and analysis process. Additionally, this file will auto-update and then be checked by developers. For the auto-update, adding more lines is not a problem. |
I would like to know how to update the JSON file by a script, it may require going through the entire file. And the field |
To update the JSON file, it needs to load the value of the file and generate a new value by the update type and version. Then write the updated value to file by cover.
That's true, it introduces redundant data. But it will be easy to iterate all of the Neuron versions. So this redundant is acceptable to me. |
To add a new version of CKB, we should
However, updating the csv is simply as awk -v ckb=$ckb 'BEGIN{FS=OFS=","} {$2 = ($2 ~ /[0-9]+\.[0-9]{3}/) ? ckb OFS $2 : $2 OFS $2} 1' compatible.csv
Neuron versions can be iterated by |
Using CSV format can simplify the development cost of neuron compatibility data statistics, while using JSON format can simplify the development cost of developers who need to use neuron compatibility data. I prefer using JSON because the development cost of generating and updating JSON scripts is paid once, and the development cost of reading is very low. |
I'm convinced by the reason |
I'm convinced that complexity should be moved to the |
This is indeed a convenience provided for a specific scenario (compatibility traversal of full/light based on neuron version). |
Since this feature will block the implementation of Magickbase/websites#24, we need to advance it as soon as possible. I think we can first use the structure implemented by this PR but not directly expose it as a stable data source until we think its structure is stable. |
I guess after I remove the |
I would suggest removing the CSV along with adding the JSON, so there will be only one data source. Otherwise, another PR to remove the CSV is required before next release, or CSV and JSON should be updated simultaneously on next release. |
Neuron has not read the JSON file yet, I would remove the CSV file and read from JSON and add an updater in another PR. |
@Keith-CY How do you think? |
The sentence is ambiguous, but |
11fb9c0
to
e5239be
Compare
eb423b6
to
255ffd1
Compare
255ffd1
to
6d10107
Compare
6d10107
to
f8e4730
Compare
No description provided.