Skip to content

chore: backport release/3.x changes to master (3.0.3 + 3.0.4)#1446

Merged
JesseTheRobot merged 4 commits into
masterfrom
backport/release-3.x-to-master
Jun 11, 2026
Merged

chore: backport release/3.x changes to master (3.0.3 + 3.0.4)#1446
JesseTheRobot merged 4 commits into
masterfrom
backport/release-3.x-to-master

Conversation

@JesseTheRobot

@JesseTheRobot JesseTheRobot commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

Cherry-picks the four commits on release/3.x that were missing from master (clean cherry-picks, no conflicts — backported files are byte-identical to release/3.x):

This brings master's irys-chain version from 3.0.2 to 3.0.4, matching the released line.

Verification

  • cargo fmt --all — no changes
  • cargo clippy --workspace --tests --all-targets — clean
  • git diff origin/release/3.x HEAD -- <backported files> — empty

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Fixed potential underflow issues in rate-limiting checks when timestamps go backwards.
    • Improved request cleanup logic to handle edge cases with future timestamps.
  • Chores

    • Updated consensus configurations with hardfork activation parameters for mainnet and testnet.
    • Bumped irys-chain crate version.
  • Tests

    • Added unit tests for rate-limiting cleanup and timestamp edge cases.
    • Added tests to verify hardfork activation behavior boundaries.

JesseTheRobot and others added 4 commits June 11, 2026 09:23
… testnet borealis

- mainnet Aurora activates 2026-06-23T12:00:00+00:00 (min commitment tx version 2)
- mainnet Borealis activates 2026-06-30T12:00:00+00:00
- testnet Borealis activates 2026-06-10T12:00:00+00:00
- pin activation timestamps with regression tests on the presets
…th (#1445)

The DataRequestTracker stamps per-peer timestamps from the non-monotonic
wall clock (SystemTime) and computed elapsed times by unsigned
subtraction. When a stored timestamp lands after the captured "now" —
either a concurrent insert during DashMap iteration in cleanup, or a
backward wall-clock step — the subtraction underflows. With
overflow-checks = true in the release profile this is a hard panic,
observed killing mainnet-node-1 on 2026-06-10 via POST /gossip/pull_data.

Use saturating_sub at all four subtraction sites so an out-of-order
timestamp reads as elapsed 0 ("just happened"), which is the safe and
intended behavior at each call site. Adds regression tests that panic
on the unfixed code.
Release version 3.0.4
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 752c63fd-d555-4a04-b401-e07d49ad24f1

📥 Commits

Reviewing files that changed from the base of the PR and between 0971828 and a6b1a2d.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • crates/chain/Cargo.toml
  • crates/p2p/src/rate_limiting.rs
  • crates/types/src/config/consensus.rs

📝 Walkthrough

Walkthrough

This PR coordinates three independent updates: bumping the irys-chain crate version from 3.0.2 to 3.0.4, fixing rate-limiting timestamp arithmetic to use saturating_sub for future-timestamp safety, and pinning Aurora/Borealis hardfork activation timestamps in consensus mainnet and testnet configurations with corresponding boundary tests.

Changes

Chain version, rate-limiting robustness, and hardfork activation configuration

Layer / File(s) Summary
Chain crate version bump
crates/chain/Cargo.toml
Package version for irys-chain incremented from 3.0.2 to 3.0.4.
Rate-limiting timestamp arithmetic safety
crates/p2p/src/rate_limiting.rs
DataRequestRecord expiration and deduplication checks, as well as cleanup expired-entry age calculation and interval comparison, now use saturating_sub instead of unchecked subtraction to prevent underflow when system clock goes backward or timestamps are in the future. New unit tests verify cleanup and request checks do not panic or incorrectly evict/block entries when window_start or last_cleanup are ahead of current time.
Hardfork activation timestamps and boundary tests
crates/types/src/config/consensus.rs
ConsensusConfig::mainnet() enables Aurora and Borealis hardforks from ISO-8601 activation timestamps and sets Aurora's minimum_commitment_tx_version. ConsensusConfig::testnet() enables Borealis with a hardcoded activation timestamp. New test_mainnet_hardfork_activation_times asserts Aurora and Borealis configured times and verifies Aurora boundary behavior (inactive one second before, active at boundary). New test_testnet_borealis_activation_time asserts testnet Borealis value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Irys-xyz/irys#1445: Directly overlaps the rate-limiting saturating-arithmetic fix in crates/p2p/src/rate_limiting.rs.
  • Irys-xyz/irys#1109: Directly overlaps consensus hardfork configuration changes in crates/types/src/config/consensus.rs.
  • Irys-xyz/irys#1441: Related version-only bump of the irys-chain crate in crates/chain/Cargo.toml.

Suggested reviewers

  • DanMacDonald
  • glottologist
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: backporting four commits from release/3.x to master, including version bumps (3.0.3 and 3.0.4) and related fixes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backport/release-3.x-to-master

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

@JesseTheRobot JesseTheRobot merged commit 8dee75f into master Jun 11, 2026
21 checks passed
@JesseTheRobot JesseTheRobot deleted the backport/release-3.x-to-master branch June 11, 2026 09:42
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot mentioned this pull request Jun 15, 2026
3 tasks
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.

1 participant