Skip to content

fix(sdk): add Regtest support to trusted context provider activation height#3464

Merged
QuantumExplorer merged 1 commit into
v3.1-devfrom
fix/trusted-context-provider-regtest-support
Apr 9, 2026
Merged

fix(sdk): add Regtest support to trusted context provider activation height#3464
QuantumExplorer merged 1 commit into
v3.1-devfrom
fix/trusted-context-provider-regtest-support

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

@QuantumExplorer QuantumExplorer commented Apr 9, 2026

Issue Being Fixed

Nightly "Packages functional tests" fail with:

Proof verification error: Context provider error: Unsupported network

Root Cause

get_platform_activation_height() in rs-sdk-trusted-context-provider/src/provider.rs only handles Mainnet, Testnet, and Devnet. The functional tests run on a local regtest network, which hits the _ wildcard and returns an error.

What was changed

Added Network::Regtest to the Devnet match arm with activation height 1 (same as Devnet — platform activates at genesis on local/test networks).

- Network::Devnet => Ok(1),        // Devnet activation height
+ Network::Devnet | Network::Regtest => Ok(1), // Devnet/Regtest activation height

Breaking Changes

None. Previously Regtest always errored; now it works.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed support for Regtest network in the SDK, which previously resulted in an error. Regtest now properly uses the same activation height as the development network.

…height

get_platform_activation_height() only handled Mainnet, Testnet, and
Devnet, returning "Unsupported network" for Regtest. This caused the
nightly functional tests to fail with "Context provider error:
Unsupported network" since they run on a local regtest network.

Add Regtest to the Devnet match arm with activation height 1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@QuantumExplorer QuantumExplorer requested a review from shumkov as a code owner April 9, 2026 07:17
@github-actions github-actions Bot added this to the v3.1.0 milestone Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7c64745-e935-4482-bff0-09dc35a0363a

📥 Commits

Reviewing files that changed from the base of the PR and between 153a02f and a0736f7.

📒 Files selected for processing (1)
  • packages/rs-sdk-trusted-context-provider/src/provider.rs

📝 Walkthrough

Walkthrough

The get_platform_activation_height function has been updated to treat Network::Regtest identically to Network::Devnet, returning an activation height of 1 instead of triggering an unsupported network error.

Changes

Cohort / File(s) Summary
Network Activation Height Configuration
packages/rs-sdk-trusted-context-provider/src/provider.rs
Updated get_platform_activation_height to handle Network::Regtest by returning Ok(1), matching Network::Devnet behavior instead of falling through to an unsupported network error.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A test net's friend now finds its place,
Regtest hops with Devnet's grace,
One activation height they share,
No more unsupported despair! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding Regtest support to the trusted context provider's activation height function.

✏️ 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 fix/trusted-context-provider-regtest-support

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.

@thepastaclaw
Copy link
Copy Markdown
Collaborator

thepastaclaw commented Apr 9, 2026

Review Gate

Commit: a0736f7c

  • Debounce: 1m ago (need 30m)

  • CI checks: checks still running (1 pending)

  • CodeRabbit review: comment found

  • Off-peak hours: off-peak (12:18 AM PT Thursday)

  • Run review now (check to override)

@QuantumExplorer QuantumExplorer merged commit f9b6063 into v3.1-dev Apr 9, 2026
14 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/trusted-context-provider-regtest-support branch April 9, 2026 07:25
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.

2 participants