Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: culinaris #245

Merged
merged 6 commits into from
Jan 13, 2025
Merged

feat: culinaris #245

merged 6 commits into from
Jan 13, 2025

Conversation

ALPAC-4
Copy link
Collaborator

@ALPAC-4 ALPAC-4 commented Jan 13, 2025

Add culinaris chain

Summary by CodeRabbit

  • New Features

    • Created a new asset list configuration for the "culinaris" testnet.
    • Introduced a chain configuration file for the "culinaris" testnet.
  • Connectivity

    • Added new IBC channel connections for the culinaris-2 chain, including transfer and NFT transfer protocols.
  • Chores

    • Updated GitHub Actions workflow to specify a version for the JSON-Schema-Validator.
  • Bug Fixes

    • Updated JSON schema to ensure numeric values for minimum array item requirements.

Copy link

coderabbitai bot commented Jan 13, 2025

Walkthrough

This pull request introduces configuration files for the "culinaris" testnet, including a new assetlist.json and chain.json in the testnets/culinaris/ directory. Additionally, the testnets/initia/chain.json file is updated with two new IBC channel configurations for the culinaris-2 chain, specifically for transfer and NFT transfer ports. The GitHub Actions workflow is also updated to specify a particular version of the JSON-Schema-Validator.

Changes

File Change Summary
testnets/culinaris/assetlist.json New file created with schema reference, chain name "culinaris", and an assets array containing a native token description with various attributes.
testnets/culinaris/chain.json New comprehensive testnet configuration file with chain details, network properties, APIs, and metadata.
testnets/initia/chain.json Added two IBC channel entries for culinaris-2 chain (transfer and NFT transfer).
.github/workflows/validate_chainjson.yml Modified installation command for JSON-Schema-Validator to specify version 1.4.1.
chain.schema.json Updated minContains properties from string to numeric for several array types in the JSON schema.

Possibly related PRs

Poem

🐰 Hop, hop, a new testnet springs to life,
Culinaris emerges, cutting through the strife!
IBC channels dance, connections so bright,
A rabbit's config brings networks to light! 🌐
Testnets unite, with JSON's gentle might! 🚀


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80b752b and 782562c.

⛔ Files ignored due to path filters (1)
  • testnets/culinaris/images/logo.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • testnets/culinaris/assetlist.json (1 hunks)
  • testnets/culinaris/chain.json (1 hunks)
  • testnets/initia/chain.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • testnets/culinaris/assetlist.json
🧰 Additional context used
🪛 GitHub Actions: PR workflow
testnets/initia/chain.json

[error] Schema validation error: '1' is not of type 'integer'. The value should be an integer instead of a string.

testnets/culinaris/chain.json

[error] Schema validation error: '1' is not of type 'integer'. The value should be an integer instead of a string.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages: registry-initiation-1
🔇 Additional comments (4)
testnets/culinaris/chain.json (3)

4-5: Verify EVM chain ID uniqueness

The EVM chain ID (2906125577721809) should be unique across all chains to prevent replay attacks.

✅ Verification successful

EVM chain ID is unique

The EVM chain ID 2906125577721809 is unique across all chain configurations. No conflicts found with other chains.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for duplicate EVM chain IDs
rg -g '*.json' '"evm_chain_id":\s*2906125577721809' --type json

Length of output: 131


Script:

#!/bin/bash
# Search for any EVM chain IDs in different formats
echo "=== Searching for all EVM chain IDs ==="
rg -g '*.json' '"evm_chain_id":\s*[0-9x]+' --type json -A 1

echo -e "\n=== Searching for potential hex format ==="
rg -g '*.json' '"evm_chain_id":\s*"?0x' --type json

echo -e "\n=== Searching for scientific notation ==="
rg -g '*.json' '"evm_chain_id":\s*[0-9]+e[0-9]+' --type json

Length of output: 849

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] Schema validation error: '1' is not of type 'integer'. The value should be an integer instead of a string.


74-86: Verify IBC channel configuration consistency

The IBC channel configuration needs to be consistent with the connected chain (initiation-2).

✅ Verification successful

IBC channel configuration is consistent

The channel configuration in culinaris matches the network-wide standard pattern used across multiple chains connected to initiation-2, with channel-0 for token transfers (ics20-1) and channel-1 for NFT transfers (ics721-1).

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the channel IDs match on both chains
rg -g 'chain.json' '"channel-0".+"transfer".+"initiation-2"' --type json
rg -g 'chain.json' '"channel-1".+"nft-transfer".+"initiation-2"' --type json

Length of output: 149


Script:

#!/bin/bash
# Find all chain.json files
echo "=== Finding all chain.json files ==="
fd chain.json

# Search for initiation-2 chain ID in any JSON file
echo -e "\n=== Searching for initiation-2 chain ID ==="
rg -g '*.json' '"chain_id".*"initiation-2"' -C 5

Length of output: 9735

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] Schema validation error: '1' is not of type 'integer'. The value should be an integer instead of a string.


35-61: Verify API endpoints accessibility and security

The API endpoints use a consistent domain pattern but need verification:

  1. All endpoints should be accessible
  2. SSL certificates should be valid
  3. Rate limiting should be in place
🧰 Tools
🪛 GitHub Actions: PR workflow

[error] Schema validation error: '1' is not of type 'integer'. The value should be an integer instead of a string.

testnets/initia/chain.json (1)

Line range hint 1-94: Fix schema validation error

The pipeline reports: "'1' is not of type 'integer'". This indicates that a numeric field is being set as a string instead of an integer.

Please review all numeric fields and ensure they are not wrapped in quotes. Common fields to check: version numbers, chain IDs, and numeric configurations.

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] Schema validation error: '1' is not of type 'integer'. The value should be an integer instead of a string.

testnets/culinaris/chain.json Show resolved Hide resolved
testnets/culinaris/chain.json Outdated Show resolved Hide resolved
testnets/initia/chain.json Show resolved Hide resolved
Copy link

cloudflare-workers-and-pages bot commented Jan 13, 2025

Deploying registry-initiation-1 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7206434
Status: ✅  Deploy successful!
Preview URL: https://73d1a7bc.registry-initiation-1.pages.dev
Branch Preview URL: https://feat-culinaris.registry-initiation-1.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Jan 13, 2025

Deploying registry-devnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7206434
Status: ✅  Deploy successful!
Preview URL: https://ea11bfbb.registry-devnet.pages.dev
Branch Preview URL: https://feat-culinaris.registry-devnet.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Jan 13, 2025

Deploying registry-testnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7206434
Status: ✅  Deploy successful!
Preview URL: https://bedf9e9f.initia-registry-testnets.pages.dev
Branch Preview URL: https://feat-culinaris.initia-registry-testnets.pages.dev

View logs

Copy link

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 782562c and 1828a89.

⛔ Files ignored due to path filters (1)
  • testnets/culinaris/images/INIT.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • testnets/culinaris/assetlist.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages: registry-initiation-1
🔇 Additional comments (6)
testnets/culinaris/assetlist.json (6)

1-46: Overall structure looks good

The asset configuration follows proper JSON structure and includes all essential fields for the culinaris testnet token.


33-33: Empty CoinGecko ID is appropriate

The empty CoinGecko ID is correct for a testnet token.


9-11: Verify denomination security implications

Please ensure:

  1. The exponent configuration (0 and 6) aligns with the bridge contract expectations
  2. The base denomination hash is correctly derived and matches the bridge configuration

This is critical for preventing potential token conversion issues.

Also applies to: 13-15


7-16: Verify denomination hash format and consistency

The base denomination uses a hash format that should be verified:

  • Hash format: l2/83db4af0de8965c851672915eaa857f0911385f7d71f9da1decb2504d3d3ffdd
  • Exponent mapping: 0 for base, 6 for display (1 INIT = 1,000,000 base units)
✅ Verification successful

Hash format is valid and consistent across networks

The denomination hash format follows the established pattern used across all network configurations, with each network maintaining its unique l2-prefixed hash identifier.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other denomination configurations to verify consistency
rg -g '*.json' '"denom":\s*"l2/[a-f0-9]{64}"' --type json

Length of output: 1269


2-3: Verify schema file existence and validity

The referenced schema file needs to be verified to ensure proper asset configuration validation.

✅ Verification successful

Schema reference is valid and correctly configured

The schema file exists, is a valid JSON Schema, and the relative path "../../assetlist.schema.json" correctly points to it from the asset file location.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if schema file exists and is valid JSON
if [ -f "assetlist.schema.json" ]; then
    jq '.' assetlist.schema.json > /dev/null 2>&1
    if [ $? -eq 0 ]; then
        echo "Schema file exists and is valid JSON"
    else
        echo "Schema file exists but is not valid JSON"
    fi
else
    echo "Schema file not found"
fi

Length of output: 164


Script:

#!/bin/bash
# Check schema content and verify it's a JSON Schema
echo "=== Schema Content ==="
jq 'select(."$schema" | contains("json-schema.org"))' assetlist.schema.json

echo -e "\n=== Verify Relative Path ==="
# Get the actual path of the schema file relative to the asset file
realpath --relative-to="$(dirname testnets/culinaris/assetlist.json)" assetlist.schema.json

Length of output: 14951


19-30: Verify bridge configuration and token mapping

The trace configuration maps the token to the Initia mainnet:

  • Bridge ID: "314"
  • Source token: "uinit" on "initia" chain
✅ Verification successful

Bridge configuration verified and consistent

The bridge configuration in culinaris testnet is correctly set up with a unique bridge ID "314" and properly maps to the Initia native token (uinit). The configuration is consistent within its testnet environment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other bridge configurations to verify consistency
rg -g '*.json' '"bridge_id":\s*"314"' --type json -C 5

Length of output: 685


Script:

#!/bin/bash
# Search for other Initia chain configurations
rg -g '*.json' '"chain_name":\s*"initia"' --type json -C 5

Length of output: 16255

testnets/culinaris/assetlist.json Show resolved Hide resolved
Copy link

@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 (2)
.github/workflows/validate_chainjson.yml (1)

12-12: Consider documenting the reason for version pinning

While pinning to version 1.4.1 helps prevent breaking changes, it may miss security updates. Consider:

  1. Adding a comment explaining why this specific version is required
  2. Setting up dependabot to track security updates for this dependency
testnets/culinaris/chain.json (1)

28-37: Consider adding binary checksums

For security, consider adding SHA256/SHA512 checksums for the binary downloads to allow users to verify the integrity of downloaded files.

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] JSON schema validation failed: '1' is not of type 'integer'. The value should be an integer instead of a string.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1828a89 and d4196ea.

⛔ Files ignored due to path filters (1)
  • testnets/culinaris/images/INIT.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • .github/workflows/validate_chainjson.yml (1 hunks)
  • testnets/culinaris/chain.json (1 hunks)
🧰 Additional context used
📓 Learnings (1)
testnets/culinaris/chain.json (1)
Learnt from: ALPAC-4
PR: initia-labs/initia-registry#245
File: testnets/culinaris/chain.json:14-19
Timestamp: 2025-01-13T16:25:04.252Z
Learning: The culinaris testnet chain is designed to operate without staking tokens and fee tokens, as indicated by empty arrays in the configuration.
🪛 GitHub Actions: PR workflow
testnets/culinaris/chain.json

[error] JSON schema validation failed: '1' is not of type 'integer'. The value should be an integer instead of a string.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages: registry-initiation-1
🔇 Additional comments (4)
testnets/culinaris/chain.json (4)

4-5: Verify chain ID format consistency

The chain ID "culinaris-2" suggests this is the second version. Ensure this matches your versioning strategy and that any migration steps from culinaris-1 are documented if applicable.

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] JSON schema validation failed: '1' is not of type 'integer'. The value should be an integer instead of a string.


14-24: Confirm zero gas price configuration

The fee token configuration shows all gas prices set to 0. While this might be intentional for a testnet, it could potentially lead to spam attacks. Consider adding a minimal gas price for basic spam protection.

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] JSON schema validation failed: '1' is not of type 'integer'. The value should be an integer instead of a string.


43-69: Verify API endpoint accessibility

Please verify that all API endpoints are:

  1. Accessible and responding correctly
  2. Using valid SSL certificates
  3. Properly configured for CORS if needed
✅ Verification successful

API endpoints are properly configured

All endpoints are accessible with valid SSL certificates. The response codes are as expected for each protocol:

  • RPC endpoint responds with 200 OK
  • REST endpoint's 501 is normal without a path
  • JSON-RPC's 405 is expected (requires POST)
  • WebSocket's 400 is correct (requires WebSocket protocol)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify API endpoints accessibility and SSL certificates
for endpoint in \
  "https://maze-rpc-s2-b53886e8-ebca-41a5-8dd7-64884b25fb2c.public-think-factory.newmetric.xyz" \
  "https://maze-rest-s2-b53886e8-ebca-41a5-8dd7-64884b25fb2c.public-think-factory.newmetric.xyz" \
  "https://maze-jsonrpc-s2-b53886e8-ebca-41a5-8dd7-64884b25fb2c.public-think-factory.newmetric.xyz" \
  "https://maze-ws-s2-b53886e8-ebca-41a5-8dd7-64884b25fb2c.public-think-factory.newmetric.xyz"
do
  echo "Checking $endpoint"
  curl -sSf -o /dev/null -w "HTTP Status: %{http_code}\nSSL Verify: %{ssl_verify_result}\n" "$endpoint"
done

Length of output: 3454

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] JSON schema validation failed: '1' is not of type 'integer'. The value should be an integer instead of a string.


82-95: Verify IBC channel configurations

Please verify:

  1. The channel IDs match the configuration on the initiation-2 chain
  2. The versions are compatible with the connected chain
✅ Verification successful

IBC channel configurations are correct

The channel configurations in culinaris chain are consistent with the network-wide pattern:

  • channel-0 (transfer/ics20-1) for token transfers
  • channel-1 (nft-transfer/ics721-1) for NFT transfers
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for corresponding channel configurations in initiation-2 chain
rg -A 5 "channel-0|channel-1" | grep -B 2 -A 2 "initiation-2"

Length of output: 4575


Script:

#!/bin/bash
# Find and show initiation-2 chain configuration
fd initiation-2 --type f | grep chain.json
echo "---"
fd initiation-2 --type f --exec cat {} | grep -A 20 "ibc_channels"

Length of output: 128


Script:

#!/bin/bash
# Search for initiation-2 chain configuration
echo "=== Files containing initiation-2 ==="
rg -l "initiation-2" testnets/
echo -e "\n=== Chain configuration patterns ==="
rg -A 10 '"chain_id":\s*"initiation-2"' testnets/

Length of output: 10171

🧰 Tools
🪛 GitHub Actions: PR workflow

[error] JSON schema validation failed: '1' is not of type 'integer'. The value should be an integer instead of a string.

testnets/culinaris/chain.json Show resolved Hide resolved
Copy link

@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: 0

🧹 Nitpick comments (1)
chain.schema.json (1)

533-543: Consider enhancing the conditional validation for EVM endpoints.

When minitia.type is "minievm", both json-rpc and json-rpc-websocket arrays are required. Consider moving the minContains requirements into the conditional validation to make it more explicit.

  "then": {
    "required": ["evm_chain_id"],
    "properties": {
      "apis": {
-       "required": ["json-rpc", "json-rpc-websocket"]
+       "required": ["json-rpc", "json-rpc-websocket"],
+       "properties": {
+         "json-rpc": {
+           "minContains": 1
+         },
+         "json-rpc-websocket": {
+           "minContains": 1
+         }
+       }
      }
    }
  },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4196ea and d0d844f.

📒 Files selected for processing (1)
  • chain.schema.json (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages: registry-initiation-1
🔇 Additional comments (1)
chain.schema.json (1)

119-119: LGTM! Type corrections align with JSON Schema standards.

The changes correctly update minContains from string to numeric values, which is the proper type as per JSON Schema specification.

Also applies to: 495-495, 502-502, 533-533, 541-541

@ALPAC-4 ALPAC-4 merged commit ae5112a into main Jan 13, 2025
11 checks passed
@ALPAC-4 ALPAC-4 deleted the feat/culinaris branch January 13, 2025 17:03
@coderabbitai coderabbitai bot mentioned this pull request Jan 14, 2025
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