If you've deployed an Avalanche L1, you can preserve and restore the state of your deployed Avalanche L1s.
In this section, you’ll learn how to pause and resume your deployed Avalanche L1 using GitHub Codespaces. This will allow you to preserve the state of your blockchains and easily restore them when you return to development.
With GitHub Codespaces, you can easily spin up and manage your Avalanche L1 blockchains. However, after a period of inactivity, Codespace instances will automatically pause, or you can stop them manually.
When you want to resume your work, start the Codespace instance again and follow these steps to restore your network.
By default, Codespaces will pause after 30 minutes of inactivity. You can extend this period to up to 4 hours to avoid frequent pauses during development.
To configure the timeout duration:
In the upper-right corner of any page on GitHub, click your profile photo, then click "Settings".
In the "Code, planning, and automation" section of the sidebar, click "Codespaces".
Under "Default idle timeout", enter the time that you want, then click Save. The time must be between 5 minutes and 240 minutes (4 hours).
This will help keep your blockchain running for longer periods without interruption.
If you're a paid user, be cautious about the costs associated with running long-running Codespaces. It's important to avoid undesired fees, especially if you're keeping instances alive for extended periods but also the resource usage. Memory, storage, traffic, and bandwidth usage can significantly impact costs if not managed properly.
You can manage these settings in GitHub:
In the upper-right corner of any page on GitHub, click your profile photo, then click "Settings".
In the "Access" section of the sidebar, click "Billing and Plans", and click "Spending Limits".
Set a budget or limitation on Codespace usage to prevent unexpected fees. Leaving it at $0.00 will avoid any extra expenses.