Skip to content

feat: gigahdx -fee processing support#1467

Draft
enthusiastmartin wants to merge 40 commits into
gigahdx-liquidationsfrom
fee-processor-impl
Draft

feat: gigahdx -fee processing support#1467
enthusiastmartin wants to merge 40 commits into
gigahdx-liquidationsfrom
fee-processor-impl

Conversation

@enthusiastmartin
Copy link
Copy Markdown
Member

No description provided.

dmoka and others added 26 commits May 13, 2026 11:17
Adds a new workflow that diffs `runtime/hydradx/src/weights/` against
master on every PR and posts a sticky comment summarising per-extrinsic
changes in ref_time, proof_size, and DB reads/writes. Changes exceeding
±10% are flagged so big regressions are hard to miss.

Two interchangeable diff implementations are included so we can pick the
preferred one to keep:

- `scripts/weight-diff/` — POSIX awk parser + bash orchestrator (no
  runtime deps beyond bash + awk on the runner).
- `scripts/weight-diff-py/weight_diff.py` — single-file Python reference
  with inline self-tests; produces byte-identical output.

The workflow runs on `ubuntu-latest` independently of the existing
`benchmark-check` job: it doesn't need the Rust toolchain or the
self-hosted runner, and shows up as the "Weight diff" check on each PR.

Refs #1393.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
DO NOT MERGE. Will be reverted once we confirm the weight-diff workflow
posts the expected sticky comment.

Covers the matrix:
- ref_time +120% / -15% / +3% / +106% / +42% / -7%
- proof_size +30% / 0 -> 1024 / +25%
- DB reads +1 (combined with proof change, and standalone)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replaces the four top-N sections (RefTime up/down, Proof Size, DB
reads/writes) with one section per affected pallet. Each section shows
all changed extrinsics in that pallet with five columns: Extrinsic,
RefTime, Proof Size, Reads, Writes. Cells render `—` when the metric
didn't change.

Pallet headers carry `⚠️` if any extrinsic in the pallet exceeds the
±10% threshold; pallets are ordered with warned ones first
(alphabetical), then non-warned (alphabetical). Banner now counts
pallets with significant changes rather than individual extrinsics.

Both the bash and Python implementations are updated; outputs remain
byte-identical and the Python self-tests still pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The cell-level warnings carry the signal; the duplicate emoji on the
section header was visual noise. Pallets with warnings still float to
the top of the report via the existing sort order.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Promotes the 10% threshold to a named DEFAULT_THRESHOLD constant at the
top of each script. Removes the --top flag, which became dead code when
the report was regrouped per pallet (top-N pagination no longer
applies).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removes the parallel bash + awk implementation now that we've settled
on the Python one. Renames `scripts/weight-diff-py/` to
`scripts/weight-diff/` (the `-py` suffix only existed to differentiate
from the bash directory) and updates the workflow to invoke
`python3 scripts/weight-diff/weight_diff.py`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The standalone weight-diff workflow runs on every PR push, but the
bot's "Update pallets weights" commit (made with GITHUB_TOKEN) cannot
retrigger workflows — so a full benchmark run otherwise leaves the
sticky comment stale. Add an inline weight-diff step set to the
benchmark-check job: it materialises master's weights, runs the same
Python diff, and posts to the same `weight-diff` sticky header, which
correctly overwrites the standalone workflow's last comment.

Only runs when benchmark_type == 'full' so quick-mode PR runs are not
affected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

Crate versions that have not been updated:

  • runtime-integration-tests: v1.86.0
  • hydradx-adapters: v1.13.1
  • hydradx-traits: v4.9.0

New crates:

  • pallet-fee-processor: v0.1.0

Crate versions that have been updated:

  • pallet-referrals: v1.5.0 -> v1.6.0
  • hydradx-runtime: v422.0.0 -> v425.0.0

Runtime version has been increased.

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.

3 participants