Skip to content
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

fixes crappy custom genesis and chain config parser #654

Merged
merged 1 commit into from
May 13, 2021

Conversation

jangko
Copy link
Contributor

@jangko jangko commented May 13, 2021

instead of using stdlib/json, now we switch to json_serialization
the result is much tidier code and more robust when parsing
optional fields.

fixes #635

instead of using stdlib/json, now we switch to json_serialization
the result is much tidier code and more robust when parsing
optional fields.

fixes #635
@jangko jangko merged commit f2491e6 into master May 13, 2021
@jangko jangko deleted the fix_customnetwork_parser branch May 13, 2021 11:02
jangko added a commit that referenced this pull request May 13, 2021
this changes is required due to recent #654.
custom genesis and chain config parser are fixed
and the genesis fields are grouped into "genesis"
field, similar with chain config fields,
they are grouped in "config" field.
jangko added a commit that referenced this pull request May 13, 2021
this changes is required due to recent #654.
custom genesis and chain config parser are fixed
and the genesis fields are grouped into "genesis"
field, similar with chain config fields,
they are grouped in "config" field.
@jlokier
Copy link
Contributor

jlokier commented May 14, 2021

Nice code. Very clear.

Smaller than the code it replaces too. Lots of deletions, often a good sign 🙂

Why does it fix so many Hive testcases. Was it just the #635 Forks can't be assigned out of order errors causing all those failures, or has the new code fixed other things as well?

Where did you get the new JSON testcase files? We have a lot of test files that are, in effect, like compiled binaries with no source code. (E.g. because of EVM bytecode, etc). So I often wonder where they came from, or how to generate them.

@jangko
Copy link
Contributor Author

jangko commented May 14, 2021

Why does it fix so many Hive testcases. Was it just the #635 Forks can't be assigned out of order errors causing all those failures, or has the new code fixed other things as well?

The old code although not produce Forks can't be assigned out of order, it will silently make wrong fork calculation. It also can't handle missing fork number very well.

The new code will handle any optional/missing fields. it will fill those missing fields with correct number to avoid wrong fork calculation.

Where did you get the new JSON testcase files?

I copy them from hive output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

investigate hive/ethereum/consensus error message Forks can't be assigned out of order
2 participants