Skip to content

Conversation

@DaMandal0rian
Copy link
Contributor

@DaMandal0rian DaMandal0rian commented Apr 8, 2025

PR Type

  • Enhancement

Description

  • Added new performance flags in domain compose script.

  • Increased rate-limit configuration values.

  • Updated Traefik routing rules for multiple hostnames.

  • Introduced dynamic operator-id and cache settings.


Changes walkthrough 📝

Relevant files
Enhancement
create_domain_node_compose_file.sh
Domain compose script: performance flags and routing rules

templates/scripts/create_domain_node_compose_file.sh

  • Introduced new script parameters for domain config.
  • Updated Traefik rules to support multiple hostnames.
  • Increased rate-limit average and burst values.
  • Added dynamic operator-id assignment and performance flags.
  • +25/-13 
    create_rpc_node_compose_file.sh
    RPC compose script: host rule update                                         

    templates/scripts/create_rpc_node_compose_file.sh

  • Revised Traefik host rule formatting.
  • Improved configuration for RPC service.
  • +1/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link

    github-actions bot commented Apr 8, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Routing Rule

    Review the new traefik routing rule expressions for logical grouping and proper host matching. Ensure that the use of multiple OR conditions (||) and the string interpolation with backticks work as intended.

    - "traefik.http.routers.archival-node.rule=Host(\`\${DOMAIN_PREFIX}-\${NODE_ID}.\${NETWORK_NAME}.subspace.network\`) || Host(\`\${DOMAIN_PREFIX}.\${NETWORK_NAME}.subspace.network\`) || Host(\`\${DOMAIN_PREFIX}-\${NODE_ID}.\${NETWORK_NAME}.autonomys.xyz\`) || Host(\`\${DOMAIN_PREFIX}.\${NETWORK_NAME}.autonomys.xyz\`) && Path(\`/ws\`)"
    Input Validation

    Verify that the new input parameters (such as reserved_only, node_count, etc.) are validated and handled appropriately to avoid unexpected issues if incorrect values are passed.

    reserved_only=${1}
    node_count=${2}
    current_node=${3}
    bootstrap_node_count=${4}
    dsn_bootstrap_node_count=${4}
    bootstrap_node_evm_count=${5}
    enable_domains=${6}
    domain_id=${7}

    @github-actions
    Copy link

    github-actions bot commented Apr 8, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Group host conditions

    Wrap the host conditions in parentheses so that the Path rule applies to all host
    definitions.

    templates/scripts/create_domain_node_compose_file.sh [105]

    -- "traefik.http.routers.archival-node.rule=Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.autonomys.xyz`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.autonomys.xyz`) && Path(`/ws`)"
    +- "traefik.http.routers.archival-node.rule=(Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.autonomys.xyz`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.autonomys.xyz`)) && Path(`/ws`)"
    Suggestion importance[1-10]: 5

    __

    Why: The suggestion correctly identifies a potential operator precedence issue and proposes adding grouping parentheses so that the Path rule applies as intended; however, the improvement is minor and not critical.

    Low
    Correct host grouping

    Apply grouping parentheses to the host conditions to ensure the Path constraint is
    consistently applied.

    templates/scripts/create_rpc_node_compose_file.sh [90]

    -- "traefik.http.routers.archival-node.rule=Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.autonomys.xyz`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.autonomys.xyz`) && Path(`/ws`)"
    +- "traefik.http.routers.archival-node.rule=(Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.subspace.network`) || Host(`${DOMAIN_PREFIX}-${NODE_ID}.${NETWORK_NAME}.autonomys.xyz`) || Host(`${DOMAIN_PREFIX}.${NETWORK_NAME}.autonomys.xyz`)) && Path(`/ws`)"
    Suggestion importance[1-10]: 5

    __

    Why: Similar to the first suggestion, it addresses the operator precedence risk by grouping host conditions; while it improves clarity and may prevent subtle bugs, it is a minor adjustment overall.

    Low

    @DaMandal0rian DaMandal0rian requested a review from vedhavyas April 8, 2025 08:54
    @DaMandal0rian DaMandal0rian merged commit 705a8ae into main Apr 8, 2025
    1 check passed
    @DaMandal0rian DaMandal0rian deleted the feat/evm-rpc-performance-flags branch April 8, 2025 11:24
    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.

    3 participants