Skip to content

Conversation

@DaMandal0rian
Copy link
Contributor

@DaMandal0rian DaMandal0rian commented Jun 16, 2025

PR Type

Enhancement, Bug fix


Description

  • Update devnet docker tags and genesis hashes

  • Update mainnet snapshot docker tags

  • Adjust devnet instance types and counts

  • Ignore public IP changes in lifecycles


Changes walkthrough 📝

Relevant files
Configuration changes
main.tf
Update devnet docker tags and genesis hashes                         

resources/terraform/devnet/main.tf

  • Updated docker-tag to "test-mainnet-upgrade"
  • Changed genesis-hash to new snapshot
  • +11/-11 
    variables.tf
    Adjust devnet instance types and counts                                   

    resources/terraform/devnet/variables.tf

  • Downgraded instance types to m6a.xlarge
  • Adjusted instance_count for farmer and evm_bootstrap
  • +9/-9     
    main.tf
    Update mainnet docker tags                                                             

    resources/terraform/mainnet/main.tf

    • Bumped docker-tag to "mainnet-2025-jun-06"
    +8/-8     
    Bug fix
    instances.tf
    Ignore public IP changes in instance lifecycle                     

    templates/terraform/network-primitives/instances.tf

  • Added associate_public_ip_address to ignore_changes
  • Applied update across all AWS instance resources
  • +9/-9     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @DaMandal0rian DaMandal0rian changed the title Network changes Network changes for devnet and mainnet Jun 16, 2025
    @DaMandal0rian DaMandal0rian requested a review from vedhavyas June 16, 2025 12:42
    @github-actions
    Copy link

    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

    Docker Tag Duplication

    The same docker-tag literal is repeated across multiple node configurations; consider centralizing or parameterizing to avoid inconsistencies.

    docker-tag         = "test-mainnet-upgrade"
    reserved-only      = false
    prune              = false
    genesis-hash       = "296aab9fb53eeb37a1757b35ed4c4b6c6f903d6b996cf7cd908a753f6eb762d5"
    Instance Type Increase

    Bulk upgrade of instance types to m6a.xlarge may impact cost and compatibility; verify these sizes in all regions and budget.

      bootstrap        = "m6a.xlarge"
      rpc              = "m6a.xlarge"
      domain           = "m6a.xlarge"
      rpc-indexer      = "m6a.xlarge"
      auto-evm-indexer = "m6a.xlarge"
      farmer           = "c7a.2xlarge"
      evm_bootstrap    = "m6a.xlarge"
      autoid_bootstrap = "m6a.xlarge"
    }
    Lifecycle Ignore Scope

    Added associate_public_ip_address to ignore_changes; ensure this doesn’t mask unintended drift or connectivity issues.

      ignore_changes = [ami, ipv6_address_count, associate_public_ip_address]
    
    }

    @github-actions
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Parameterize docker tag

    Extract the hardcoded docker-tag into a variable to avoid mismatches across multiple
    module blocks. This reduces duplication and ensures all modules use the same tag.

    resources/terraform/devnet/main.tf [13]

    -docker-tag         = "test-mainnet-upgrade"
    +docker-tag         = var.docker_tag
    Suggestion importance[1-10]: 6

    __

    Why: Parameterizing the docker-tag reduces duplication across multiple blocks and improves maintainability by centralizing updates.

    Low
    Parameterize genesis hash

    Move the hardcoded genesis-hash into a variable so that any future updates only
    require changing it in one place. This avoids drift and potential copy‐paste errors.

    resources/terraform/devnet/main.tf [16]

    -genesis-hash       = "296aab9fb53eeb37a1757b35ed4c4b6c6f903d6b996cf7cd908a753f6eb762d5"
    +genesis-hash       = var.genesis_hash
    Suggestion importance[1-10]: 6

    __

    Why: Moving the genesis-hash to a variable avoids hard-coding and ensures a single source of truth for easier updates and consistency.

    Low
    Ignore private_ip drift

    Consider also including private_ip in ignore_changes to prevent Terraform from
    trying to reset it when the subnet or ENI changes. This helps avoid unnecessary
    resource replacements.

    resources/terraform/templates/network-primitives/instances.tf [40]

    -ignore_changes = [ami, ipv6_address_count, associate_public_ip_address]
    +ignore_changes = [ami, ipv6_address_count, associate_public_ip_address, private_ip]
    Suggestion importance[1-10]: 5

    __

    Why: Adding private_ip to ignore_changes helps prevent unnecessary resource replacements when IPs change, improving Terraform stability.

    Low
    Possible issue
    Restore farmer node count

    Verify that setting farmer count to zero is intentional, as this will disable all
    farmer nodes on devnet. If you still need a running farmer instance, consider
    restoring it to 1.

    resources/terraform/devnet/variables.tf [70]

    -farmer           = 0
    +farmer           = 1
    Suggestion importance[1-10]: 5

    __

    Why: This raises a valid concern about disabling all devnet farmer nodes; confirming intent prevents unintended downtime.

    Low

    regions = var.aws_region
    instance-count = var.instance_count["rpc-indexer"]
    docker-org = "autonomys"
    docker-tag = "mainnet-2025-jan-14"
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    Lets not update mainnet bootstrap nodes yet. We still want them on Jan-14 release

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    ok, done

    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    it is still showing me jun-06.

    Are these not boostrap nodes ?

    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    nvm. Got it

    @DaMandal0rian DaMandal0rian merged commit 9a0afff into main Jun 16, 2025
    @DaMandal0rian DaMandal0rian deleted the network-changes branch June 16, 2025 17:25
    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