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

fix: ignore unknown fields in rpc json response #2962

Merged
merged 12 commits into from
Sep 26, 2024
Merged

fix: ignore unknown fields in rpc json response #2962

merged 12 commits into from
Sep 26, 2024

Conversation

pompon0
Copy link
Contributor

@pompon0 pompon0 commented Sep 25, 2024

In some previous pr, I've added a field to json RPC response (consensusGlobalConfig) and it turned out to be incompatible due to the default parsing behavior: an error was returned when unknown fields were present. In general, for programmatic communications the recommended behaviour is to silently ignore unknown fields, so that adding new fields is compatible.

I've also weakened the restriction on accepting new consensus genesis by external nodes - when the unknown fields are silently dropped, it is possible that the node will perceive genesis with the same fork number differently after a binary update (because it receives more fields).

Cargo.lock Show resolved Hide resolved
@pompon0 pompon0 added this pull request to the merge queue Sep 26, 2024
Merged via the queue into main with commit 692ea73 Sep 26, 2024
41 checks passed
@pompon0 pompon0 deleted the gprusak-fix branch September 26, 2024 20:32
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.

2 participants