Repository navigation
Conversation
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…cout#14654) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4761) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#14764) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedToo many files! This PR contains 199 files, which is 99 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (199)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces significant performance optimizations and feature enhancements, including incremental counter consolidation for addresses and tokens, a distributed cache propagator to prevent indexer stalls, support for OP Stack Upgrade 20 (Super Root games), and optimized participant preloading to reduce database queries. Feedback on these changes highlights several critical issues that must be addressed to prevent compilation and runtime failures: a compilation error in NullRoundHeight due to calling a private function in BlockNumberHelper, a missing alias for QueryHelper in CurrentTokenBalances, and potential runtime crashes in the Refresher and ScamAddresses caches if their configuration intervals are undefined and return nil.
| # the farthest fetched one are unknown, so they are looked up once the fetched ones are exhausted. | ||
| defp skip_null_rounds(number, direction, null_rounds, farthest_fetched) do | ||
| neighbor = BlockNumberHelper.move_by_one(number, direction) | ||
|
|
||
| cond do | ||
| MapSet.member?(null_rounds, neighbor) -> skip_null_rounds(neighbor, direction, null_rounds, farthest_fetched) | ||
| beyond?(neighbor, farthest_fetched, direction) -> neighbor_block_number(number, direction) | ||
| true -> neighbor | ||
| end |
There was a problem hiding this comment.
The function BlockNumberHelper.move_by_one/2 is defined as a private function (defp) in BlockNumberHelper and cannot be called from the NullRoundHeight module. This will cause a compilation error. We should define a local move_by_one/2 helper function within NullRoundHeight to resolve this.
defp skip_null_rounds(number, direction, null_rounds, farthest_fetched) do
neighbor = move_by_one(number, direction)
cond do
MapSet.member?(null_rounds, neighbor) -> skip_null_rounds(neighbor, direction, null_rounds, farthest_fetched)
beyond?(neighbor, farthest_fetched, direction) -> neighbor_block_number(number, direction)
true -> neighbor
end
end
defp move_by_one(number, :previous), do: max(number - 1, 0)
defp move_by_one(number, :next), do: number + 1
|
|
||
| query = | ||
| from(ctb in CurrentTokenBalance, | ||
| where: ^QueryHelper.tuple_in([:address_hash, :token_contract_address_hash], ids), |
There was a problem hiding this comment.
| defp update_interval do | ||
| Application.get_env(:explorer, __MODULE__)[:update_interval] | ||
| end |
There was a problem hiding this comment.
If the :update_interval configuration is missing or nil, update_interval/0 will return nil. Passing nil to Process.send_after/3 will raise an ArgumentError and crash the GenServer. Provide a sensible default fallback value (e.g., :timer.minutes(1)).
defp update_interval do
Application.get_env(:explorer, __MODULE__, [])[:update_interval] || :timer.minutes(1)
end
| defp update_interval do | ||
| config()[:update_interval] | ||
| end | ||
|
|
||
| defp max_size do | ||
| config()[:max_size] | ||
| end |
There was a problem hiding this comment.
If the configuration is missing or nil, update_interval/0 and max_size/0 will return nil. A nil update interval will cause Process.send_after/3 to raise an ArgumentError and crash the GenServer. Additionally, comparing estimated_size > nil is implicitly false in Elixir, which could lead to unexpected behavior. Provide sensible default fallbacks for both functions.
defp update_interval do
config()[:update_interval] || :timer.minutes(5)
end
defp max_size do
config()[:max_size] || 200_000
end
3fa63e0 to
1e9f363
Compare
1e9f363 to
4c2f0d5
Compare
Upstream Sync - v11.3.3
Auto-merge with upstream
v11.3.3failed. Version/workflow conflicts were auto-resolved,but the following files have code conflicts that need manual resolution:
To resolve:
v11.3.3to trigger Docker buildUpstream release notes