Skip to content

Update frontier pin to c28328d3#3695

Merged
librelois merged 6 commits intomasterfrom
manuel/update-frontier-pin
Mar 5, 2026
Merged

Update frontier pin to c28328d3#3695
librelois merged 6 commits intomasterfrom
manuel/update-frontier-pin

Conversation

@manuelmauro
Copy link
Contributor

Description

Updates the moonbeam-foundation/frontier pin on the moonbeam-polkadot-stable2506 branch from 22da39d0 (moonbeam-foundation/frontier@22da39d) to c28328d3
(moonbeam-foundation/frontier@c28328d).

Included frontier commits

  1. [Fix] Wait for chain head and eth "latest" in createAndFinalizeBlock() polkadot-evm/frontier#1855 — [Fix] Wait for chain head and eth "latest" in createAndFinalizeBlock()
    • Makes createAndFinalizeBlock() wait for the target block, fixing non-deterministic test behavior.
    • Refactors several ts-tests (test-contract-storage, test-selfdestruct, test-receipt-consistency, test-transaction-version) to be deterministic by replacing callback-based sequencing with explicit block
      sealing and receipt polling.
  2. Avoid eth_blockNumber returning 0x00 when mapping-sync lags polkadot-evm/frontier#1832 — Avoid eth_blockNumber returning 0x00 when mapping-sync lags
    • Adds a multi-layer exhaustive fallback in fc-db to recover the correct latest Ethereum block number when the mapping-sync persisted pointer becomes stale (e.g. after a reorg or sync lag).
    • Prevents the RPC from incorrectly returning 0x00 as the latest block.
  3. Validate transaction size frontier#254 — Validate transaction size
    • Adds RPC-level transaction size validation to eth_sendTransaction and eth_sendRawTransaction, rejecting transactions exceeding 128 KiB (matching geth's txMaxSize / reth's DEFAULT_MAX_TX_INPUT_BYTES).
    • Introduces TransactionRequest::encoded_length() for lightweight pre-check size estimation and validate_size() for enforcement.
    • Switches to the moonbeam-foundation/ethereum fork for tx-size helpers.
    • Includes minor clippy fixes in pallet-evm and fp-evm.

@manuelmauro manuelmauro self-assigned this Mar 5, 2026
@manuelmauro manuelmauro added B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D2-notlive PR doesn't change runtime code (so can't be audited) not-breaking Does not need to be mentioned in breaking changes labels Mar 5, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

📝 Walkthrough

Walkthrough

Adds two exported transaction-size constants to test helpers, updates eth-tx size tests to use them (and refines one test's error expectation), updates a README link, and adds "moka" to the license verification script's name list.

Changes

Cohort / File(s) Summary
Test helpers (constants)
test/helpers/constants.ts
Added exported constants TX_SLOT_BYTE_SIZE (32 KiB) and DEFAULT_MAX_TX_INPUT_BYTES (4 * TX_SLOT_BYTE_SIZE, 128 KiB) with doc comments and spec references.
Tests (eth tx size)
test/suites/dev/moonbase/test-eth-tx/test-eth-tx-size.ts
Replaced prior size calculations with DEFAULT_MAX_TX_INPUT_BYTES; simplified data construction in T01; updated T02 title, computes runtime tx size, and expects a specific "exceeds size limit" error message.
Docs
pallets/parachain-staking/README.md
Updated Unofficial Documentation link path from /parachain-staking-docs/ to /posts/parachain-staking.
Scripts
scripts/verify-licenses.sh
Added "moka" to the NAMES array used for license filtering.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • librelois
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update frontier pin to c28328d3' is directly related to the main objective of the pull request, which is updating the moonbeam-foundation/frontier dependency pin from commit 22da39d0 to c28328d3.
Description check ✅ Passed The description is directly related to the changeset, providing comprehensive details about the frontier pin update, the three included commits, and their specific improvements to transaction validation, block finalization, and RPC behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch manuel/update-frontier-pin

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 5, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 5, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 5, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 5, 2026
arturgontijo
arturgontijo previously approved these changes Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Coverage Report

@@                      Coverage Diff                       @@
##           master   manuel/update-frontier-pin      +/-   ##
==============================================================
+ Coverage   77.10%                       77.15%   +0.05%     
  Files         389                          389              
+ Lines       76972                        77169     +197     
==============================================================
+ Hits        59349                        59535     +186     
+ Misses      17623                        17634      +11     
Files Changed Coverage
/client/rpc/dev/src/lib.rs 50.00% (-44.87%) 🔽
/client/rpc/finality/src/lib.rs 100.00% (+16.95%) 🔼
/node/service/src/lib.rs 56.74% (-0.02%) 🔽
/pallets/moonbeam-foreign-assets/src/lib.rs 83.11% (+2.50%) 🔼
/pallets/moonbeam-foreign-assets/src/mock.rs 88.64% (-0.52%) 🔽

Coverage generated Thu Mar 5 12:25:10 UTC 2026

@arturgontijo arturgontijo dismissed stale reviews from coderabbitai[bot] and themself via 5ffd73e March 5, 2026 13:24
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/helpers/constants.ts (1)

19-25: Rename DEFAULT_MAX_TX_INPUT_BYTES to reflect full tx size, not input size.

Line 20 documents this as the full signed transaction RLP size, but the symbol name suggests calldata/input bytes. Renaming will reduce future boundary-test confusion.

♻️ Suggested rename (with compatibility alias)
-export const DEFAULT_MAX_TX_INPUT_BYTES = 4 * TX_SLOT_BYTE_SIZE;
+export const DEFAULT_MAX_TX_SIZE_BYTES = 4 * TX_SLOT_BYTE_SIZE;
+export const DEFAULT_MAX_TX_INPUT_BYTES = DEFAULT_MAX_TX_SIZE_BYTES;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/helpers/constants.ts` around lines 19 - 25, The constant
DEFAULT_MAX_TX_INPUT_BYTES is misnamed — it represents the full RLP-encoded
signed transaction size, not calldata/input only; rename the symbol to
DEFAULT_MAX_TX_SIZE_BYTES (or DEFAULT_MAX_SIGNED_TX_BYTES) and update its JSDoc
to match, keep the existing value expression referencing TX_SLOT_BYTE_SIZE, and
add a backward-compatible exported alias DEFAULT_MAX_TX_INPUT_BYTES =
DEFAULT_MAX_TX_SIZE_BYTES so callers keep working; search and update all
internal references/imports to use the new name while leaving the alias for
compatibility.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/suites/dev/moonbase/test-eth-tx/test-eth-tx-size.ts`:
- Line 18: The test currently constructs data using a hard-coded overhead
subtraction ("FF".repeat(DEFAULT_MAX_TX_INPUT_BYTES - 6474)) which couples the
test to a specific signed/encoded transaction size; change the test to compute
the available payload dynamically by first creating a representative signed
transaction (or using a helper like a new computeSignedTxOverhead function) to
measure its encoded size and then set data to "0x" +
"FF".repeat(DEFAULT_MAX_TX_INPUT_BYTES - measuredOverhead), replacing the magic
number 6474 and using DEFAULT_MAX_TX_INPUT_BYTES and the measuredOverhead
variable so the test remains correct if signing/encoding changes (update the
data assignment and add the measurement helper or inline measurement before
constructing data).

---

Nitpick comments:
In `@test/helpers/constants.ts`:
- Around line 19-25: The constant DEFAULT_MAX_TX_INPUT_BYTES is misnamed — it
represents the full RLP-encoded signed transaction size, not calldata/input
only; rename the symbol to DEFAULT_MAX_TX_SIZE_BYTES (or
DEFAULT_MAX_SIGNED_TX_BYTES) and update its JSDoc to match, keep the existing
value expression referencing TX_SLOT_BYTE_SIZE, and add a backward-compatible
exported alias DEFAULT_MAX_TX_INPUT_BYTES = DEFAULT_MAX_TX_SIZE_BYTES so callers
keep working; search and update all internal references/imports to use the new
name while leaving the alias for compatibility.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e7f8a5a6-4ae9-4246-99bd-80a5e7d6470b

📥 Commits

Reviewing files that changed from the base of the PR and between 81dfe9e and 5ffd73e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • test/helpers/constants.ts
  • test/suites/dev/moonbase/test-eth-tx/test-eth-tx-size.ts

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 5, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/verify-licenses.sh (1)

48-56: ⚠️ Potential issue | 🟠 Major

Avoid crate-name-wide bypass for license verification.

Adding moka to NAMES (Line 55) excludes all moka entries from checks, including future versions. That weakens the compliance guardrail beyond this PR’s immediate dependency state. Prefer a version-scoped exception (and rationale) instead of a global name bypass.

Proposed hardening
 NAMES=(
     "webpki"
     "webpki-roots"
     "webpki-root-certs"
     "rustls-webpki"
     "ring"
     "nimbus-consensus"
-    "moka"
 )
+PACKAGE_EXCEPTIONS=(
+    "moka@<exact-version>" # temporary; document why and remove when no longer needed
+)
+
+package_filter=""
+for pkg in "${PACKAGE_EXCEPTIONS[@]}"; do
+    name="${pkg%@*}"
+    version="${pkg#*@}"
+    package_filter+=" (.name != \"$name\" or .version != \"$version\") and"
+done
+
 names_filter=$(printf ' .name != "%s" and' "${NAMES[@]}")
 # "true" at the end is necessary to close the "and" conditional
-filter="${licenses_filter}${authors_filter}${names_filter} true"
+filter="${licenses_filter}${authors_filter}${names_filter}${package_filter} true"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/verify-licenses.sh` around lines 48 - 56, The NAMES array currently
contains a global exclusion "moka" which bypasses license checks for any moka
crate/version; remove the "moka" entry from the NAMES list and replace it with a
version-scoped exception mechanism: add a specific allowlist (e.g., ALLOWLIST or
VERSIONED_EXCEPTIONS) that stores entries like "moka@<allowed-version>" and
update the verification logic that reads NAMES to check for exact name@version
matches (or path+version) before skipping license verification; include a brief
comment explaining the rationale and record the allowed version and PR/rationale
for auditability, and ensure function/loop that originally iterates over NAMES
now consults the new versioned allowlist.
🧹 Nitpick comments (1)
pallets/parachain-staking/README.md (1)

19-20: Consolidate duplicated link targets with clearer labeling.

Line 19 and Line 20 now point to the same URL but describe it differently (“Unofficial Documentation” vs “(Outdated) Blog Post”). Please keep a single canonical label per URL, or point each label to distinct resources to avoid reader confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pallets/parachain-staking/README.md` around lines 19 - 20, Two markdown links
("Unofficial Documentation" and "(Outdated) Blog Post with Justification") point
to the exact same URL; consolidate by keeping a single canonical link label for
that URL or ensure each label points to a distinct resource. Edit the README to
either remove one of the duplicate lines (keep the preferred label, e.g.,
"Unofficial Documentation") or update the "(Outdated) Blog Post with
Justification" link target to the correct/archive URL; ensure link text clearly
reflects the resource (use the exact link texts to locate the entries).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@scripts/verify-licenses.sh`:
- Around line 48-56: The NAMES array currently contains a global exclusion
"moka" which bypasses license checks for any moka crate/version; remove the
"moka" entry from the NAMES list and replace it with a version-scoped exception
mechanism: add a specific allowlist (e.g., ALLOWLIST or VERSIONED_EXCEPTIONS)
that stores entries like "moka@<allowed-version>" and update the verification
logic that reads NAMES to check for exact name@version matches (or path+version)
before skipping license verification; include a brief comment explaining the
rationale and record the allowed version and PR/rationale for auditability, and
ensure function/loop that originally iterates over NAMES now consults the new
versioned allowlist.

---

Nitpick comments:
In `@pallets/parachain-staking/README.md`:
- Around line 19-20: Two markdown links ("Unofficial Documentation" and
"(Outdated) Blog Post with Justification") point to the exact same URL;
consolidate by keeping a single canonical link label for that URL or ensure each
label points to a distinct resource. Edit the README to either remove one of the
duplicate lines (keep the preferred label, e.g., "Unofficial Documentation") or
update the "(Outdated) Blog Post with Justification" link target to the
correct/archive URL; ensure link text clearly reflects the resource (use the
exact link texts to locate the entries).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 38c8771f-b04c-45b8-9098-fb4eb45c63d7

📥 Commits

Reviewing files that changed from the base of the PR and between 5ffd73e and 2381e06.

📒 Files selected for processing (2)
  • pallets/parachain-staking/README.md
  • scripts/verify-licenses.sh

@librelois librelois merged commit 236f189 into master Mar 5, 2026
56 of 97 checks passed
@librelois librelois deleted the manuel/update-frontier-pin branch March 5, 2026 14:58
@arturgontijo arturgontijo mentioned this pull request Mar 5, 2026
17 tasks
arturgontijo added a commit that referenced this pull request Mar 5, 2026
* Update frontier pin to c28328d3

* chore: 📌 properly upgrade pins

* chore: 📌 upgrade moonkit

* Update Cargo.lock

* Fix test D021203

* Fix check-links and licenses

---------

Co-authored-by: Artur Gontijo <arturgontijo@gmail.com>
@librelois librelois added the D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D2-notlive PR doesn't change runtime code (so can't be audited) D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. not-breaking Does not need to be mentioned in breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants