Skip to content

YNU-122: support XRPL EVM network on clearnode#346

Merged
philanton merged 4 commits intomainfrom
feat/xrpl-evm-support
Sep 23, 2025
Merged

YNU-122: support XRPL EVM network on clearnode#346
philanton merged 4 commits intomainfrom
feat/xrpl-evm-support

Conversation

@philanton
Copy link
Contributor

@philanton philanton commented Sep 22, 2025

Summary by CodeRabbit

  • New Features

    • Added support for XRPL EVM Mainnet and Testnet networks.
  • Configuration

    • Added public env vars for XRPL EVM Mainnet/Testnet contract addresses and block-step; deprecated some previous WORLD_CHAIN/FLOW entries in prod.
    • Added secrets for XRPL EVM Mainnet/Testnet Infura URLs.
  • Chores

    • Added deployment metadata records for multiple contracts.
    • Updated build/config comments documenting XRPL EVM targets.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @philanton, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request extends the clearnode application's capabilities by integrating support for the XRPL EVM network. The changes involve updating core network configurations to recognize XRPL EVM Mainnet and Testnet, and setting up the necessary contract addresses and Infura endpoint secrets for the testnet environment. This enables clearnode to interact with the XRPL EVM ecosystem.

Highlights

  • XRPL EVM Network Support: Added support for both XRPL EVM Mainnet and Testnet by including their respective chain IDs in the knownNetworks map within config.go.
  • Configuration Updates: Configured essential contract addresses (Custody, Adjudicator, Balance Checker) for the XRPL EVM Testnet in clearnode.yaml.
  • Secret Management: Integrated the Infura URL for the XRPL EVM Testnet by adding a reference to a GCP secret in secrets.yaml.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 22, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds XRPL EVM mainnet/testnet chain IDs to known networks, introduces new Helm env vars and secret refs for prod and sandbox charts, adds multiple contract deployment metadata JSON artifacts, and updates a comment block in contract/foundry.toml. All changes are additive configuration and data artifacts.

Changes

Cohort / File(s) Summary
Sandbox chart envs
clearnode/chart/config/sandbox/clearnode.yaml
Adds extraEnvs entries: XRPL_EVM_TESTNET_CUSTODY_CONTRACT_ADDRESS, XRPL_EVM_TESTNET_ADJUDICATOR_ADDRESS, XRPL_EVM_TESTNET_BALANCE_CHECKER_ADDRESS, XRPL_EVM_TESTNET_BLOCK_STEP.
Sandbox chart secrets
clearnode/chart/config/sandbox/secrets.yaml
Adds secret entry XRPL_EVM_TESTNET_INFURA_URL under secretEnvs referencing a GCP secret (ref+gcpsecrets://...?...version=latest).
Prod chart envs
clearnode/chart/config/prod/clearnode.yaml
Adds extraEnvs entries for XRPL_EVM_MAINNET_* (CUSTODY_CONTRACT_ADDRESS, ADJUDICATOR_ADDRESS, BALANCE_CHECKER_ADDRESS, BLOCK_STEP) and comments out prior WORLD_CHAIN / FLOW entries.
Prod chart secrets
clearnode/chart/config/prod/secrets.yaml
Adds secret entry XRPL_EVM_MAINNET_INFURA_URL under secretEnvs referencing a GCP secret.
Config known networks
clearnode/config.go
Adds XRPL_EVM_MAINNET (chainId 1440000) and XRPL_EVM_TESTNET (chainId 1449000) to knownNetworks.
Contract deployment artifacts
contract/deployments/1440000/..., contract/deployments/1449000/...
Adds new deployment metadata JSON files for Custody, SimpleConsensus, and PremintERC20 on chains 1440000 and 1449000 (records include deployer, deployedTo, txHash, commit, timestamp, chainId, contractPath, constructorArgs, comment).
Foundry config comment
contract/foundry.toml
Updates explanatory comments and adds a commented XRPL EVM section noting evm_version = "Shanghai" (commented; no functional change).

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Operator
    participant Helm as Helm Chart (prod/sandbox)
    participant SecretMgr as GCP Secret Manager
    participant App as Application Config Loader
    participant Known as knownNetworks

    Operator->>Helm: deploy chart (includes extraEnvs + secret refs)
    Helm->>App: expose env vars (XRPL_EVM_..._CONTRACT_ADDRESS, BLOCK_STEP)
    SecretMgr->>App: provide secret refs (XRPL_EVM_*_INFURA_URL)
    Note right of App: reads envs + secret refs
    App->>Known: lookup network name (XRPL_EVM_MAINNET / XRPL_EVM_TESTNET)
    Known-->>App: return chainId (1440000 / 1449000)
    App-->>Operator: report initialized config (envs, secrets, chain IDs)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I nibble bytes and polish logs,
New chains arrive like morning clogs.
Carrots of envs and secrets neat,
Deployments stacked with timestamps sweet.
A rabbit hops — configuration complete. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "YNU-122: support XRPL EVM network on clearnode" is concise and accurately summarizes the primary intent of the changeset — adding XRPL EVM network support across configuration, Helm charts, and deployment artifacts. It includes the issue reference for traceability without extra noise or irrelevant detail. The phrasing is clear and specific enough for a reviewer scanning PR history to understand the main change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/xrpl-evm-support

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02a5039 and 864c876.

📒 Files selected for processing (1)
  • clearnode/chart/config/prod/secrets.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • clearnode/chart/config/prod/secrets.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and Publish (Clearnode)
  • GitHub Check: Test (Integration) / Test Integration

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@codecov
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for the XRPL EVM test network. It introduces configuration for the new network in the sandbox environment and adds the network's chain ID to the list of known networks. My review identified two critical issues: potentially incorrect contract addresses in the YAML configuration which appear to be copied from another network, and a likely incorrect chain ID for the XRPL EVM testnet in the Go configuration. Both issues will prevent the integration from functioning correctly and need to be addressed.

nksazonov and others added 2 commits September 22, 2025 17:53
* feat(foundry): add evm_version for xrpl evm

* docs(deployments): add xrpl evm deployments
Copy link
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)
clearnode/chart/config/prod/clearnode.yaml (1)

16-23: Confirm intent of disabling WORLD_CHAIN and FLOW in prod.

Commenting these out changes prod behavior; ensure services don’t assume these envs exist. Prefer a feature flag or env-scoped values file over ad-hoc comments.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9575850 and 02a5039.

📒 Files selected for processing (3)
  • clearnode/chart/config/prod/clearnode.yaml (2 hunks)
  • clearnode/chart/config/prod/secrets.yaml (1 hunks)
  • clearnode/chart/config/sandbox/clearnode.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • clearnode/chart/config/sandbox/clearnode.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build and Publish (Clearnode)
  • GitHub Check: Test (Integration) / Test Integration
  • GitHub Check: Analyze (go)
🔇 Additional comments (1)
clearnode/chart/config/prod/clearnode.yaml (1)

33-36: Confirm XRPL EVM mainnet addresses & block step

  • Custody and Adjudicator in clearnode/chart/config/prod/clearnode.yaml (lines 33–36) match chainId 1440000 deployment artifacts:
    • contract/deployments/1440000/Custody.sol/Custody/2025-09-22T14:26:13.json -> deployedTo: 0x6F71a38d919ad713D0AfE0eB712b95064Fc2616f
    • contract/deployments/1440000/SimpleConsensus.sol/SimpleConsensus/2025-09-22T14:27:22.json -> deployedTo: 0x14980dF216722f14c42CA7357b06dEa7eB408b10
  • Balance-checker address 0x714698e8fe7896bb84A46c0705944c4a48580819 was NOT found under contract/deployments/1440000 — add the deployment JSON path or confirm the correct address.
  • Confirm XRPL_EVM_MAINNET_BLOCK_STEP = 499 is intended for XRPL EVM (chainId 1440000); if not, update clearnode/chart/config/prod/clearnode.yaml:33-36.

@philanton
Copy link
Contributor Author

/gemini summary

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request significantly expands the clearnode application's blockchain compatibility by integrating support for the XRPL EVM network. This enables clearnode to interact with both the Mainnet and Testnet environments of XRPL EVM, involving comprehensive updates to network configurations, secret management, and deployment artifacts to ensure seamless operation.

Highlights

  • XRPL EVM Network Integration: Full support for XRPL EVM Mainnet and Testnet has been added to clearnode, including their respective chain IDs and contract configurations.
  • Configuration Updates: New public environment variables for XRPL EVM Mainnet/Testnet contract addresses and block-step have been introduced. Additionally, some older WORLD_CHAIN and FLOW entries in the production configuration were deprecated by being commented out.
  • Secret Management: Infura URLs for both XRPL EVM Mainnet and Testnet have been integrated as secrets, ensuring secure access to network endpoints.
  • Deployment Records: New deployment metadata records for Custody, SimpleConsensus, and PremintERC20 contracts have been added for the newly supported XRPL EVM networks.
Changelog
  • clearnode/chart/config/prod/clearnode.yaml
    • Deprecated WORLD_CHAIN and FLOW contract addresses and block step entries by commenting them out.
    • Added XRPL_EVM_MAINNET custody contract, adjudicator, balance checker addresses, and block step.
  • clearnode/chart/config/prod/secrets.yaml
    • Added XRPL_EVM_MAINNET_INFURA_URL secret reference.
  • clearnode/chart/config/sandbox/clearnode.yaml
    • Added XRPL_EVM_TESTNET custody contract, adjudicator, balance checker addresses, and block step.
  • clearnode/chart/config/sandbox/secrets.yaml
    • Added XRPL_EVM_TESTNET_INFURA_URL secret reference.
  • clearnode/config.go
    • Included XRPL_EVM_MAINNET (chainId 1440000) and XRPL_EVM_TESTNET (chainId 1449000) in the knownNetworks map.
  • contract/deployments/1440000/Custody.sol:Custody/2025-09-22T14:26:13.json
    • Added deployment record for Custody contract on XRPL EVM Mainnet.
  • contract/deployments/1440000/SimpleConsensus.sol:SimpleConsensus/2025-09-22T14:27:22.json
    • Added deployment record for SimpleConsensus contract on XRPL EVM Mainnet.
  • contract/deployments/1449000/Custody.sol:Custody/2025-09-22T12:58:51.json
    • Added deployment record for Custody contract on XRPL EVM Testnet.
  • contract/deployments/1449000/PremintERC20.sol:PremintERC20/2025-09-22T12:56:14.json
    • Added deployment record for PremintERC20 contract on XRPL EVM Testnet.
  • contract/deployments/1449000/SimpleConsensus.sol:SimpleConsensus/2025-09-22T12:59:32.json
    • Added deployment record for SimpleConsensus contract on XRPL EVM Testnet.
  • contract/foundry.toml
    • Updated comments to include a note for XRPL EVM compilation settings, suggesting evm_version = "shanghai".
Activity
  • Gemini Code Assist provided an initial summary of the PR's changes.
  • CodeRabbit offered a detailed walkthrough, estimated review effort, and a creative poem.
  • Codecov confirmed that all modified and coverable lines are covered by tests.
  • Gemini Code Assist raised critical concerns regarding potentially incorrect contract addresses and chain ID for the XRPL EVM Testnet.
  • CodeRabbit identified and suggested a fix for an issue where the XRPL_EVM_MAINNET_INFURA_URL in the production secrets was incorrectly pointing to a sandbox secret; this issue was subsequently addressed.
  • The author, philanton, requested a summary from Gemini.

@philanton philanton merged commit 17e77b1 into main Sep 23, 2025
12 checks passed
@philanton philanton deleted the feat/xrpl-evm-support branch September 23, 2025 12:16
gabrielantonyxaviour pushed a commit to gabrielantonyxaviour/nitrolite that referenced this pull request Sep 27, 2025
* **XRPL EVM Network Integration**: Full support for XRPL EVM Mainnet and Testnet has been added to clearnode, including their respective chain IDs and contract configurations.
* **Configuration Updates**: New public environment variables for XRPL EVM Mainnet/Testnet contract addresses and block-step have been introduced. Additionally, some older WORLD_CHAIN and FLOW entries in the production configuration were deprecated by being commented out.
* **Secret Management**: Infura URLs for both XRPL EVM Mainnet and Testnet have been integrated as secrets, ensuring secure access to network endpoints.
* **Deployment Records**: New deployment metadata records for Custody, SimpleConsensus, and PremintERC20 contracts have been added for the newly supported XRPL EVM networks.
gabrielantonyxaviour pushed a commit to gabrielantonyxaviour/nitrolite that referenced this pull request Sep 27, 2025
* **XRPL EVM Network Integration**: Full support for XRPL EVM Mainnet and Testnet has been added to clearnode, including their respective chain IDs and contract configurations.
* **Configuration Updates**: New public environment variables for XRPL EVM Mainnet/Testnet contract addresses and block-step have been introduced. Additionally, some older WORLD_CHAIN and FLOW entries in the production configuration were deprecated by being commented out.
* **Secret Management**: Infura URLs for both XRPL EVM Mainnet and Testnet have been integrated as secrets, ensuring secure access to network endpoints.
* **Deployment Records**: New deployment metadata records for Custody, SimpleConsensus, and PremintERC20 contracts have been added for the newly supported XRPL EVM networks.
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.

3 participants