Skip to content

Update testnet Asimov to phase4 deployment - #130

Merged
MuncleUscles merged 2 commits into
mainfrom
chore/update-testnet-phase4-addresses
Feb 7, 2026
Merged

MuncleUscles merged 2 commits into
mainfrom
chore/update-testnet-phase4-addresses

Conversation

@MuncleUscles

@MuncleUscles MuncleUscles commented Feb 7, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Update RPC URL to zksync-os-testnet-genlayer.zksync.dev
  • Add WebSocket endpoint wss://zksync-os-testnet-alpha.zksync.dev/ws
  • Update contract addresses: ConsensusMain, ConsensusData, Staking (phase4 deployment)
  • Add smoke tests for chain config validation and live RPC connectivity

Test plan

  • All existing tests pass (20/20)
  • New smoke tests verify config values
  • New smoke tests confirm RPC connectivity and correct chain ID

Summary by CodeRabbit

Release Notes

  • New Features

    • Added WebSocket support for Testnet Asimov communication
    • Updated Testnet Asimov RPC endpoints and contract address configurations
  • Tests

    • Added smoke test suite to verify Testnet Asimov chain configuration, contract addresses, and RPC connectivity with 15-second timeouts

- RPC URL → zksync-os-testnet-genlayer.zksync.dev
- Add WSS endpoint
- Update ConsensusMain, ConsensusData, Staking addresses
- Add smoke tests for chain config and RPC connectivity
@coderabbitai

coderabbitai Bot commented Feb 7, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@MuncleUscles has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 59 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Updates testnet Asimov chain configuration with new JSON-RPC and WebSocket endpoints, updates three contract addresses, and introduces a smoke test suite to validate chain configuration and RPC connectivity.

Changes

Cohort / File(s) Summary
Testnet Asimov Configuration
src/chains/testnetAsimov.ts
Updated JSON-RPC endpoint URL, added WebSocket URL constant, and updated addresses for STAKING_CONTRACT, CONSENSUS_MAIN_CONTRACT, and CONSENSUS_DATA_CONTRACT. Chain export now includes webSocket in default RPC configuration.
Smoke Tests
tests/smoke.test.ts
New test suite validating testnet Asimov chain configuration (RPC URLs, WebSocket URL, contract addresses, chain ID) and RPC connectivity (chain ID retrieval, block number fetching via Viem client with 15s timeout).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 New endpoints spring forth with WebSocket's grace,
Contracts find their addresses in place,
Smoke tests flutter, checking all is right,
The chain hops onward through the testnet night! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description provides a clear summary and test plan but lacks several required template sections: it does not include 'What', 'Why', 'Decisions made', 'Checks', 'Reviewing tips', or 'User facing release notes' sections. Expand the description to follow the template structure by adding 'What', 'Why', 'Decisions made', and other required sections, while keeping the existing summary and test plan information.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: updating the testnet Asimov configuration to phase4 deployment, which aligns with the primary objectives of updating RPC URLs, WebSocket endpoints, and contract addresses.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/update-testnet-phase4-addresses

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 coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/chains/testnetAsimov.ts`:
- Around line 5-7: Remove the stale comment "// chains/localnet.ts" at the top
of the file so it no longer mislabels the file; leave the constants
TESTNET_JSON_RPC_URL and TESTNET_WS_URL intact (do not change their values)
ensuring only relevant comments remain above those constants.

In `@tests/smoke.test.ts`:
- Around line 18-28: The tests reference nullable properties directly; update
the assertions to use optional chaining like the existing stakingContract usage:
replace consensusMainContract.address with consensusMainContract?.address and
consensusDataContract.address with consensusDataContract?.address in the test
cases so the expressions are type-safe when those contract properties may be
null.
🧹 Nitpick comments (2)
tests/smoke.test.ts (2)

41-58: Live RPC tests will cause CI failures if the testnet is down.

These tests make real network calls and will fail whenever the testnet is unreachable, making CI flaky. Consider gating them behind an environment variable (e.g., RUN_SMOKE_TESTS) or moving them to a separate test script/config so they don't block the main test suite.


42-48: Client can be shared across tests in this describe block.

Both connectivity tests create identical public clients. Extract it to a beforeAll or shared variable to reduce duplication.

Comment on lines 5 to +7
// chains/localnet.ts
const TESTNET_JSON_RPC_URL = "https://genlayer-testnet.rpc.caldera.xyz/http";
const TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev";
const TESTNET_WS_URL = "wss://zksync-os-testnet-alpha.zksync.dev/ws";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n src/chains/testnetAsimov.ts | head -20

Repository: genlayerlabs/genlayer-js

Length of output: 884


🏁 Script executed:

# Check if there are other chain files to compare patterns
fd -t f "chains/.*\.ts$" src/

Repository: genlayerlabs/genlayer-js

Length of output: 50


🏁 Script executed:

# Search for similar RPC URL patterns in the codebase
rg "zksync-os-testnet" -A 2 -B 2

Repository: genlayerlabs/genlayer-js

Length of output: 1008


Remove stale comment on line 5.

Line 5 contains // chains/localnet.ts, which is a leftover comment that doesn't apply to this file. The mismatched hostnames between the HTTP endpoint (zksync-os-testnet-genlayer) and WebSocket endpoint (zksync-os-testnet-alpha) are intentional per the test suite in tests/smoke.test.ts.

🔧 Fix the stale comment
-// chains/localnet.ts
+// Testnet Asimov RPC endpoints
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// chains/localnet.ts
const TESTNET_JSON_RPC_URL = "https://genlayer-testnet.rpc.caldera.xyz/http";
const TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev";
const TESTNET_WS_URL = "wss://zksync-os-testnet-alpha.zksync.dev/ws";
// Testnet Asimov RPC endpoints
const TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev";
const TESTNET_WS_URL = "wss://zksync-os-testnet-alpha.zksync.dev/ws";
🤖 Prompt for AI Agents
In `@src/chains/testnetAsimov.ts` around lines 5 - 7, Remove the stale comment "//
chains/localnet.ts" at the top of the file so it no longer mislabels the file;
leave the constants TESTNET_JSON_RPC_URL and TESTNET_WS_URL intact (do not
change their values) ensuring only relevant comments remain above those
constants.

Comment thread tests/smoke.test.ts Resolved
@MuncleUscles
MuncleUscles merged commit 3e3016c into main Feb 7, 2026
2 checks passed
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