fix: address potential panics, context leaks, and hash matching in oracle and txmonitor - #935
Open
Sahil-4555 wants to merge 4 commits into
Open
fix: address potential panics, context leaks, and hash matching in oracle and txmonitor#935Sahil-4555 wants to merge 4 commits into
Sahil-4555 wants to merge 4 commits into
Conversation
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.
What are we repairing and for what reason?
Gas Percentile Calculation (Protection From Division By Zero)
Batch Receipt Error Logs (Nil Pointer Safety)
Bid Options Evaluation (Fix Slice Aliasing & Memory Mutation)
append(slice[:i], slice[i+1:]...). In Go, this mutates the underlying array memory inside the loop, causing constraint indices to shift mid-loop and skip or miscalculate remaining bid constraints.Transaction Hash Prefixes Normalization (
0xMatching)0xprefix, but incoming commitment events split hashes that included0x. Because the string search failed, valid transactions did not pass the lookup check and were wrongly marked as missing—resulting in valid commitments being erroneously slashed!0xprefix before performing the map lookup.Propagation of Context Cancellation
context.Background()instead of the parent method's context. This completely disregarded caller timeouts and cancellation signals, resulting in dangling RPC calls and goroutine leaks.