fix(network): validate + preserve eRPC overlay entries on set/reset#782
Merged
Merged
Conversation
#772 eRPC operator overlay hardening: - SetERPC/parseERPCOverlay now rejects network entries that would get an empty networkMergeKey (no evm.chainId or alias) and catches cheap type errors (evm not a map, chainId not numeric, alias not a string), so a bad overlay fails `erpc set` instead of persisting and duplicating/crash- looping eRPC on every merge. - ResetERPC/stripERPCOverlay now tracks provenance (erpc-overlay-provenance.yaml, written by captureERPCProvenance before the first merge of each overlay-owned key) so reset RESTORES chart-base/recorded entries an overlay replaced instead of deleting them outright, while still dropping entries the overlay purely added. Success message now reflects this. - StatusERPC best-effort reads the erpc-overlay-hash ConfigMap annotation and reports ClusterSync (in-sync/drifted/not-applied) so drift between the on-disk overlay and the live cluster is visible; `erpc status` CLI output surfaces it. - Fixed the RateLimiters doc comment (budgets merged by id, other keys replaced) to match mergeRateLimiters' actual shallow-replace behavior. Tests: reject-no-merge-key-network, reject-bad-chainId-type, reset-restores- replaced-base-entry (also verified it fails against the old drop-only strip), and drift-status table test. Claude-Session: https://claude.ai/code/session_014YjPMViNrZ7zBVgUQzwEKk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mediums from the PR #756 review of the new #772 eRPC overlay.
erpc setvalidates each network entry has a usable merge key before persisting (a bad overlay could crash-loop eRPC on every stack up while reporting success).erpc resetrestores chart-base/recorded entries the overlay had replaced instead of deleting them (which left chains unroutable).erpc statusreads the ConfigMap hash annotation to report in-sync/drifted. Ratelimiter merge doc corrected.https://claude.ai/code/session_014YjPMViNrZ7zBVgUQzwEKk