Skip to content

chore(emergency-pause): narrow networks.json to sophon/boba/rootstock for Phase 2b test#1829

Merged
lifi-hexagate-pauser merged 1 commit into
mainfrom
chore/emergency-pause-phase2b-narrow-networks
May 28, 2026
Merged

chore(emergency-pause): narrow networks.json to sophon/boba/rootstock for Phase 2b test#1829
lifi-hexagate-pauser merged 1 commit into
mainfrom
chore/emergency-pause-phase2b-narrow-networks

Conversation

@mirooon
Copy link
Copy Markdown
Contributor

@mirooon mirooon commented May 20, 2026

Which Linear task belongs to this PR?

N/A — test infrastructure, no Linear ticket.

Why did I implement it this way?

Phase 2b of the Hexagate → GitHub Actions production emergency-pause test plan requires running a real pause on 3 low-volume networks to verify that PRIV_KEY_PAUSER_WALLET holds the correct key. Narrowing networks.json to only sophon, boba, and rootstock scopes the pause workflow to those 3 networks, preventing accidental pausing of high-traffic chains during the test.

localanvil is kept alongside the 3 test networks so the deploy smoke-test workflow (which deploys to localanvil in CI) keeps working — emergency-pause scripts skip it on both filters (status != active, isTestnetNetwork).

This PR must be merged to main before the Phase 2b test fires (the production workflow checks out the repo at run time). A revert PR (#1833) is queued and ready to merge immediately after Phase 2b completes.

⚠️ DO NOT MERGE without the matching revert PR #1833 queued and ready. The window between this merge and the revert must be kept as short as possible.

See the full test plan: https://www.notion.so/361f0ff14ac780599741e7e4dec2d9cc

Checklist before requesting a review

  • I have performed a self-review of my code
  • This pull request is as small as possible and only tackles one problem
  • I have run /pr-ready — no actionable findings on the committed diff (config/networks.json only)
  • I have added tests that cover the functionality / test the bug
  • For new facets: N/A
  • I have updated any required documentation

Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)

  • N/A — config-only change, no contract calls or storage modifications
  • N/A — no privileged calls
  • N/A — no new contracts

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 96320b48-1bf2-42a0-b82e-f12022241e57

📥 Commits

Reviewing files that changed from the base of the PR and between d5b0b81 and f99db16.

📒 Files selected for processing (1)
  • config/networks.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/networks.json

Walkthrough

Reformats the gnosis entry in config/networks.json (whitespace only) and inserts/moves boba and rootstock chain objects, preserving their shown RPC/explorer/safe/multicall endpoints and deployment metadata.

Changes

Network Configuration

Layer / File(s) Summary
Reformat gnosis entry
config/networks.json
Whitespace/line formatting changes to the gnosis chain object without altering key/value content.
Insert/move boba and rootstock entries
config/networks.json
Adds or repositions boba and rootstock chain objects in the file; RPC/explorer endpoints, safe/multicall addresses, and deployment metadata are preserved as shown.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • lifinance/contracts#825: Both PRs modify config/networks.json entries for the gnosis network (and nearby boba/rootstock sections), so they are directly related at the config level.

Suggested labels

AuditNotRequired

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: narrowing networks.json to three specific networks for a Phase 2b emergency-pause test.
Description check ✅ Passed The description covers the Linear task, implementation rationale, and most checklist items. The author appropriately marked items as N/A for a config-only change and provided critical context about the test plan and revert PR.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/emergency-pause-phase2b-narrow-networks

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.

Copy link
Copy Markdown
Contributor

@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)
script/utils/diamondEMERGENCYPauseStagingGitHub.sh (1)

36-46: ⚡ Quick win

Use [[ ... ]] for all conditional expressions instead of [ ... ] to comply with bash script guidelines.

The retry and attempt-loop conditionals use single-bracket syntax. Per .cursor/rules/300-bash.mdc, all bash conditional expressions must use [[ ... ]]. Update lines 36, 41, 102, 109, 165, 172, 181, 196, 203, 238, and 245 to use double-bracket syntax for consistency and best practice.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@script/utils/diamondEMERGENCYPauseStagingGitHub.sh` around lines 36 - 46,
Replace all single-bracket conditionals with bash's double-bracket form in the
retry/attempt logic: change the while loop "while [ "$ATTEMPT" -le
"$RPC_MAX_ATTEMPTS" ]" and the subsequent if checks (including the "if
OUT=$(...); then" exit-check and the retry guard "if [ "$ATTEMPT" -lt
"$RPC_MAX_ATTEMPTS" ]") to use [[ ... ]] and preserve the same operators (e.g.,
[[ "$ATTEMPT" -le "$RPC_MAX_ATTEMPTS" ]], [[ "$ATTEMPT" -lt "$RPC_MAX_ATTEMPTS"
]]) and quoting of variables; apply the same [[ ... ]] replacement to the other
listed conditional sites (lines referenced in the review) so all conditionals
use [[ ... ]] consistently while leaving command substitutions, variable
assignments (OUT=...), sleep, echo, and ATTEMPT increment logic unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@script/utils/diamondEMERGENCYPauseStagingGitHub.sh`:
- Around line 104-107: Replace the loose 0x* address check with a strict 40-hex
char Ethereum address regex: change occurrences that test RESPONSE against 0x*
(the checks near the DIAMOND_IS_PAUSED_SELECTOR / "DiamondIsPaused" branches) to
use a bash regex match like [[ $RESPONSE =~ ^0x[0-9A-Fa-f]{40}$ ]] so only valid
0x-prefixed 40-hex-character addresses pass; apply this exact replacement in all
three affected sections (the blocks that currently check "$RESPONSE" == 0x*
around the DIAMOND_IS_PAUSED_SELECTOR checks).

---

Nitpick comments:
In `@script/utils/diamondEMERGENCYPauseStagingGitHub.sh`:
- Around line 36-46: Replace all single-bracket conditionals with bash's
double-bracket form in the retry/attempt logic: change the while loop "while [
"$ATTEMPT" -le "$RPC_MAX_ATTEMPTS" ]" and the subsequent if checks (including
the "if OUT=$(...); then" exit-check and the retry guard "if [ "$ATTEMPT" -lt
"$RPC_MAX_ATTEMPTS" ]") to use [[ ... ]] and preserve the same operators (e.g.,
[[ "$ATTEMPT" -le "$RPC_MAX_ATTEMPTS" ]], [[ "$ATTEMPT" -lt "$RPC_MAX_ATTEMPTS"
]]) and quoting of variables; apply the same [[ ... ]] replacement to the other
listed conditional sites (lines referenced in the review) so all conditionals
use [[ ... ]] consistently while leaving command substitutions, variable
assignments (OUT=...), sleep, echo, and ATTEMPT increment logic unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 684a74ef-d281-4cb1-a482-27efb1ff9898

📥 Commits

Reviewing files that changed from the base of the PR and between e49d918 and 12e209c.

📒 Files selected for processing (8)
  • config/networks.json
  • deployments/arbitrum.diamond.staging.json
  • deployments/arbitrum.staging.json
  • deployments/base.diamond.staging.json
  • deployments/base.staging.json
  • deployments/optimism.diamond.staging.json
  • deployments/optimism.staging.json
  • script/utils/diamondEMERGENCYPauseStagingGitHub.sh

Comment thread script/utils/diamondEMERGENCYPauseStagingGitHub.sh Outdated
@mirooon mirooon force-pushed the chore/emergency-pause-phase2b-narrow-networks branch from 12e209c to ba219ef Compare May 20, 2026 22:08
Copy link
Copy Markdown
Contributor

@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.

🧹 Nitpick comments (2)
config/networks.json (2)

7-7: ⚡ Quick win

Consider using EIP-55 checksummed addresses consistently.

The configuration uses a mix of lowercase and checksummed addresses. For example, wrappedNativeAddress entries use lowercase while multicallAddress entries use the checksummed format (0xcA11b...).

Using checksummed addresses throughout improves safety by enabling checksum validation and catching address typos.

♻️ Example of checksumming addresses

You can checksum addresses using a script or tool. For instance, the wrapped native addresses should be:

 "gnosis": {
   ...
-  "wrappedNativeAddress": "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",
+  "wrappedNativeAddress": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d",
   ...
 }

Note: Verify the correct checksummed format for each address using an EIP-55 checksum tool or web3 library before applying changes.

Also applies to: 27-27, 34-34, 47-47, 54-54

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/networks.json` at line 7, The config contains mixed-case and lowercase
Ethereum addresses (e.g., the wrappedNativeAddress values) which should be
normalized to EIP-55 checksummed addresses; update every address value (notably
keys like "wrappedNativeAddress" and any "multicallAddress" entries) by
replacing the lowercase forms with their EIP-55 checksummed equivalents computed
with a library such as ethers.utils.getAddress or web3.utils.toChecksumAddress,
and verify each replacement against a checksum tool before committing.

1-62: High-risk temporary network removal for production test - verify safeguards.

This PR removes all networks except gnosis, moonbeam, and rootstock to scope the Phase 2b emergency-pause test. While the PR title includes "[DO NOT MERGE]" and the objectives clearly state this is temporary, the following safeguards should be confirmed before proceeding:

  1. Revert PR readiness: Confirm the revert PR is prepared, reviewed, and ready to merge immediately after the test completes
  2. Deployment freeze: Ensure no other deployments to removed networks are scheduled during the test window
  3. Team coordination: Verify all team members are aware of the temporary config change and merge/revert timeline
  4. Workflow impact: Confirm all scripts and workflows that read config/networks.json have been identified and their behavior during the test window is understood
  5. Merge window: Document the exact merge and revert timeline to minimize exposure

The production workflow checking out the repo at runtime (as noted in the PR description) means this change takes effect immediately upon merge. Consider:

  • Using a feature flag or environment variable instead of modifying the config file directly
  • Implementing a separate config file specifically for the pause test
  • Adding a CI check that prevents accidental merges of PRs with "[DO NOT MERGE]" in the title

As per coding guidelines from .cursor/rules/002-architecture.mdc: "If any change affects critical invariants indirectly (e.g., which networks/workflows run), call out the impact explicitly."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/networks.json` around lines 1 - 62, This change temporarily removes
most entries from networks.json leaving only "gnosis", "moonbeam", and
"rootstock" — before merging, create and have reviewed a revert PR ready to
merge immediately after the test, replace the direct file mutation with an
environment-controlled toggle (e.g., an env var or feature flag that causes the
runtime loader to return the trimmed network list) or use a separate test-only
networks file to avoid repo-level changes, and add a CI gate that fails merges
when the PR title contains "[DO NOT MERGE]" (and verify all downstream scripts
that read the network keys "gnosis"/"moonbeam"/"rootstock" behave under the
toggle).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@config/networks.json`:
- Line 7: The config contains mixed-case and lowercase Ethereum addresses (e.g.,
the wrappedNativeAddress values) which should be normalized to EIP-55
checksummed addresses; update every address value (notably keys like
"wrappedNativeAddress" and any "multicallAddress" entries) by replacing the
lowercase forms with their EIP-55 checksummed equivalents computed with a
library such as ethers.utils.getAddress or web3.utils.toChecksumAddress, and
verify each replacement against a checksum tool before committing.
- Around line 1-62: This change temporarily removes most entries from
networks.json leaving only "gnosis", "moonbeam", and "rootstock" — before
merging, create and have reviewed a revert PR ready to merge immediately after
the test, replace the direct file mutation with an environment-controlled toggle
(e.g., an env var or feature flag that causes the runtime loader to return the
trimmed network list) or use a separate test-only networks file to avoid
repo-level changes, and add a CI gate that fails merges when the PR title
contains "[DO NOT MERGE]" (and verify all downstream scripts that read the
network keys "gnosis"/"moonbeam"/"rootstock" behave under the toggle).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a0acc1f9-248c-4784-bd71-4f760f13c04c

📥 Commits

Reviewing files that changed from the base of the PR and between 12e209c and ba219ef.

📒 Files selected for processing (1)
  • config/networks.json

@mirooon mirooon marked this pull request as ready for review May 20, 2026 22:12
@lifi-action-bot lifi-action-bot changed the title [DO NOT MERGE] chore(emergency-pause): narrow networks.json to gnosis/moonbeam/rootstock for Phase 2b test chore(emergency-pause): narrow networks.json to gnosis/moonbeam/rootstock for Phase 2b test May 20, 2026
@mirooon mirooon marked this pull request as draft May 20, 2026 22:28
@mirooon mirooon marked this pull request as ready for review May 20, 2026 22:34
@mirooon mirooon changed the title chore(emergency-pause): narrow networks.json to gnosis/moonbeam/rootstock for Phase 2b test [DO NOT MERGE] chore(emergency-pause): narrow networks.json to gnosis/moonbeam/rootstock for Phase 2b test May 20, 2026
@mirooon mirooon force-pushed the chore/emergency-pause-phase2b-narrow-networks branch from 9161314 to d5b0b81 Compare May 27, 2026 13:41
@lifi-action-bot lifi-action-bot changed the title [DO NOT MERGE] chore(emergency-pause): narrow networks.json to gnosis/moonbeam/rootstock for Phase 2b test chore(emergency-pause): narrow networks.json to gnosis/moonbeam/rootstock for Phase 2b test May 27, 2026
mirooon added a commit that referenced this pull request May 27, 2026
…ull networks.json

Restores `config/networks.json` to the full production network list after the
Phase 2b real-pause test completes. Reverts the narrowing applied in PR #1829.

Merge order: this PR must be merged AFTER PR #1829 has been merged and the
Phase 2b test has completed (pause confirmed + unpause executed on sophon, boba,
and rootstock).

DO NOT MERGE until Phase 2b is verified complete.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mirooon mirooon changed the title chore(emergency-pause): narrow networks.json to gnosis/moonbeam/rootstock for Phase 2b test [DO NOT MERGE] chore(emergency-pause): narrow networks.json to sophon/boba/rootstock for Phase 2b test May 27, 2026
Copy link
Copy Markdown
Contributor

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/networks.json`:
- Around line 22-61: The network set currently includes "boba" as active which
broadens the emergency-pause scope; update the networks.json so only "gnosis",
"moonbeam", "rootstock" (and "localanvil" for CI) are active for this run by
either removing or setting "status": "inactive" on any other network objects
(notably the "boba" object) and ensuring the "gnosis", "moonbeam", "rootstock",
and "localanvil" objects exist with "status": "active"; keep all other
properties unchanged for those retained entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 462ad8f2-9082-4b18-83bc-f28e9b79d219

📥 Commits

Reviewing files that changed from the base of the PR and between 9161314 and d5b0b81.

📒 Files selected for processing (1)
  • config/networks.json

Comment thread config/networks.json
… for Phase 2b

Temporary change for the Phase 2b real-pause track of the emergency-pause testing
plan. Restricts the pause workflow to 3 low-volume production networks so a live
pause+unpause cycle can be verified without impacting high-traffic chains.

localanvil is kept so the deploy smoke-test workflow (which deploys to localanvil
in CI) keeps working — emergency-pause scripts skip it on both filters
(status != active, isTestnetNetwork).

DO NOT MERGE — restore networks.json from main after Phase 2b testing completes
via revert PR #1833.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mirooon mirooon force-pushed the chore/emergency-pause-phase2b-narrow-networks branch from d5b0b81 to f99db16 Compare May 27, 2026 15:54
@lifi-action-bot lifi-action-bot changed the title [DO NOT MERGE] chore(emergency-pause): narrow networks.json to sophon/boba/rootstock for Phase 2b test chore(emergency-pause): narrow networks.json to sophon/boba/rootstock for Phase 2b test May 27, 2026
@lifi-hexagate-pauser lifi-hexagate-pauser merged commit a656e47 into main May 28, 2026
28 checks passed
@lifi-hexagate-pauser lifi-hexagate-pauser deleted the chore/emergency-pause-phase2b-narrow-networks branch May 28, 2026 08:14
0xDEnYO pushed a commit that referenced this pull request May 28, 2026
…ull networks.json (#1863)

Reverts the narrowing of config/networks.json applied in #1829
(commit f99db16), restoring the full network list. The Phase 2b
real-pause test on sophon/boba/rootstock has completed, so the
production emergency-pause workflow must operate across all active
networks again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants