Skip to content

Sync upstream v11.1.0 (merge conflicts)#71

Open
JOY (JOY) wants to merge 32 commits into
mainfrom
sync-upstream-v11.1.0
Open

Sync upstream v11.1.0 (merge conflicts)#71
JOY (JOY) wants to merge 32 commits into
mainfrom
sync-upstream-v11.1.0

Conversation

@JOY
Copy link
Copy Markdown

Upstream Sync - v11.1.0

Auto-merge with upstream v11.1.0 failed. Version/workflow conflicts were auto-resolved,
but the following files have code conflicts that need manual resolution:

docker-compose/envs/common-blockscout.env

To resolve:

  1. Check out this branch locally
  2. Resolve remaining conflicts
  3. Push and merge this PR
  4. Then create tag v11.1.0 to trigger Docker build

Upstream release notes

Alexander Kolotov (akolotov) and others added 30 commits May 8, 2026 18:45
Co-authored-by: Alexander Kolotov <alexander.kolotov@gmail.com>
Co-authored-by: Maxim Filonov <53992153+sl1depengwyn@users.noreply.github.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com>
…oints (blockscout#14227)

Co-authored-by: Alexander Kolotov <alexander.kolotov@gmail.com>
Co-authored-by: Maxim Filonov <53992153+sl1depengwyn@users.noreply.github.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com>
…ut#14251)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alexander Kolotov <alexander.kolotov@gmail.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikita Pozdniakov <nikitosing4@mail.ru>
Co-authored-by: Maxim Filonov <53992153+sl1depengwyn@users.noreply.github.com>
Co-authored-by: Qwerty5Uiop <alex000010@bk.ru>
Co-authored-by: Qwerty5Uiop <105209995+Qwerty5Uiop@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>
…#14350)

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>
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>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…CY (blockscout#14390)

Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive OpenAPI specification framework, including a new openapi-spec skill, detailed reference guides, and automated spec generation scripts. It also applies these standards to the AdvancedFilter and Arbitrum controllers by integrating OpenApiSpex and CastAndValidate. The review feedback identifies critical issues where existing pagination helpers in both controllers still use string keys; since CastAndValidate now casts parameters to atom keys, these helpers will fail to match or return empty cursors, breaking pagination. Additionally, a pattern match in AdvancedFilterController.paging_options/1 was flagged as too strict for optional query parameters.


next_page_params =
next_page |> next_page_params(advanced_filters, Map.take(params, ["items_count"]), false, &paging_params/1)
next_page |> next_page_params(advanced_filters, Map.take(params, [:items_count]), false, &paging_params/1)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The paging_params/1 callback (defined at line 608) needs to be updated to use atom keys. Since CastAndValidate is now active, the items in advanced_filters (which are passed to this callback by next_page_params/5) will have atom keys. The current implementation of paging_params/1 uses string keys ("block_number", etc.), which will result in an empty cursor and broken pagination links in the response.

Comment on lines 612 to 618
defp paging_options(%{
"block_number" => block_number_string,
"transaction_index" => transaction_index_string,
"internal_transaction_index" => internal_transaction_index_string,
"token_transfer_index" => token_transfer_index_string,
"token_transfer_batch_index" => token_transfer_batch_index_string
block_number: block_number_string,
transaction_index: transaction_index_string,
internal_transaction_index: internal_transaction_index_string,
token_transfer_index: token_transfer_index_string,
token_transfer_batch_index: token_transfer_batch_index_string
}) do
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The pattern match in paging_options/1 is too strict. It requires all five keys (block_number, transaction_index, etc.) to be present in the map. Since these are optional query parameters, CastAndValidate will only include the ones provided by the client. If any are missing, this clause will fail to match, causing the controller to fall back to default paging options (line 635) and ignore the user's cursor. Consider using Map.get/2 or individual assignments to handle optional parameters.

def messages(conn, %{"direction" => direction} = params) do
def messages(conn, %{direction: direction} = params) do
options =
params
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The paging_options/1 function (called here) needs to be updated to handle atom keys. With CastAndValidate active, params will contain atom keys (e.g., :id), but the implementation at line 588 still expects string keys ("id"). This will cause pagination options to be ignored for cross-chain messages.

"""
@spec batch_by_anytrust_da_info(Plug.Conn.t(), map()) :: Plug.Conn.t() | {:error, :not_found}
# For AnyTrust, data_key is the hash of the data itself
def batch_by_anytrust_da_info(conn, %{data_hash: data_hash} = params) do
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The batches/2 action (called indirectly via all_batches_by_data_availability_info) relies on paging_options/1 and paging_params/1 which still use string keys (lines 592 and 605). Since CastAndValidate is now active, these helpers must be updated to use atom keys (:number) to avoid breaking pagination for batches.

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.

5 participants