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

Allow reversed fields in Fee_excess JSON #10871

Merged
merged 2 commits into from
May 6, 2022

Conversation

psteckler
Copy link
Member

The Snark_work_received structured log in Snark_pool_diff was causing errors because the work field had JSON that could not be parsed. The parse failure was due to a reversal of the fields in the JSON for fee excesses.

I was unable to track down where that reversal occurred, perhaps it's something internal in the Yojson library. Fee_excess.to_yojson produces a particular field order, and the only instance I could find where we construct such JSON manually, the fields are in the right order.

The solution here is to allow of_yojson to accept either order of the fields, per Postel's Law.

Closes #10849. Verified that the unparseable JSON mentioned in that issue becomes parseable after this change.

@psteckler psteckler requested a review from a team as a code owner May 5, 2022 22:07
@psteckler psteckler added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label May 5, 2022
@psteckler psteckler merged commit a559c6c into compatible May 6, 2022
@psteckler psteckler deleted the fix/fee-excess-liberal-of-yojson branch May 6, 2022 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants