diff --git a/.changeset/add_support_for_rhp4.md b/.changeset/add_support_for_rhp4.md deleted file mode 100644 index eb1ad4a0..00000000 --- a/.changeset/add_support_for_rhp4.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -default: minor ---- - -# Add RHP4 support - -RHP4 is the next generation of renter-host protocol for the Sia storage network. It dramatically increases performance compared to RHP3, improves contract payouts, reduces collateral lockup, and enables features necessary for light clients. The new protocol will be available and activated starting at block height `513400` (March 10th, 2025). diff --git a/.changeset/attempt_to_upgrade_existing_configs_instead_of_exiting.md b/.changeset/attempt_to_upgrade_existing_configs_instead_of_exiting.md deleted file mode 100644 index 41db4015..00000000 --- a/.changeset/attempt_to_upgrade_existing_configs_instead_of_exiting.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: minor ---- - -# Attempt to upgrade existing configs instead of exiting diff --git a/.changeset/automate_changelog_generation.md b/.changeset/automate_changelog_generation.md deleted file mode 100644 index 070e0edc..00000000 --- a/.changeset/automate_changelog_generation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# Automate changelog generation diff --git a/.changeset/combined_mainnet_and_testnet_binaries.md b/.changeset/combined_mainnet_and_testnet_binaries.md deleted file mode 100644 index 385e330b..00000000 --- a/.changeset/combined_mainnet_and_testnet_binaries.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -default: major ---- - -# Combined Mainnet and Testnet Binaries - -This changes `hostd` to support multiple networks from a single binary. Instead of needing to download the Zen specific binary, users can switch networks through the YAML config or a CLI flag: `--network=zen`. - -This does have some broader implications. The environment variables and default ports have also been combined. Users running both Mainnet and Zen nodes will need to manually change ports in their config files. - -#### Removed Environment Variables -- `HOSTD_ZEN_SEED` -> `HOSTD_WALLET_SEED` -- `HOSTD_ZEN_API_PASSWORD` -> `HOSTD_API_PASSWORD` -- `HOSTD_ZEN_LOG_PATH` -> `HOSTD_LOG_FILE_PATH` \ No newline at end of file diff --git a/.changeset/fixed_a_major_speed_regression_when_uploading_data_on_larger_nodes.md b/.changeset/fixed_a_major_speed_regression_when_uploading_data_on_larger_nodes.md deleted file mode 100644 index 981fb1de..00000000 --- a/.changeset/fixed_a_major_speed_regression_when_uploading_data_on_larger_nodes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# Fixed a major speed regression when uploading data on larger nodes diff --git a/.changeset/fixed_a_panic_updating_metrics_when_a_contract_formation_is_reverted.md b/.changeset/fixed_a_panic_updating_metrics_when_a_contract_formation_is_reverted.md deleted file mode 100644 index b7923f4d..00000000 --- a/.changeset/fixed_a_panic_updating_metrics_when_a_contract_formation_is_reverted.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# Fixed a panic updating metrics when a contract formation is reverted diff --git a/.changeset/fixed_an_issue_with_price_pinning_not_updating_prices.md b/.changeset/fixed_an_issue_with_price_pinning_not_updating_prices.md deleted file mode 100644 index f49cbb24..00000000 --- a/.changeset/fixed_an_issue_with_price_pinning_not_updating_prices.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# Fixed an issue with price pinning not updating prices diff --git a/.changeset/move_rhp2_and_rhp3_settings_into_the_config_manager_to_be_consistent_with_rhp4.md b/.changeset/move_rhp2_and_rhp3_settings_into_the_config_manager_to_be_consistent_with_rhp4.md deleted file mode 100644 index 2a6b4757..00000000 --- a/.changeset/move_rhp2_and_rhp3_settings_into_the_config_manager_to_be_consistent_with_rhp4.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# Move RHP2 and RHP3 settings into the config manager to be consistent with RHP4 diff --git a/.changeset/refactor_sector_management.md b/.changeset/refactor_sector_management.md deleted file mode 100644 index c69638d2..00000000 --- a/.changeset/refactor_sector_management.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -default: minor ---- - -# Refactor Sector Management - -Improves sector lookups by 50% on average by removing the sector lock tables and moving reference pruning out of the hot path. \ No newline at end of file diff --git a/.changeset/remove_rhp_session_endpoints.md b/.changeset/remove_rhp_session_endpoints.md deleted file mode 100644 index cab0b559..00000000 --- a/.changeset/remove_rhp_session_endpoints.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: major ---- - -# Remove RHP Session endpoints diff --git a/.changeset/renamed_environment_variables.md b/.changeset/renamed_environment_variables.md deleted file mode 100644 index 9a41ef54..00000000 --- a/.changeset/renamed_environment_variables.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -default: major ---- - -# Renamed Environment Variables - -Some of the environment variable names have been renamed for better consistency between `renterd`, `walletd`, and `hostd`. If your install was using environment variables for configuration, they may need to be updated. The preferred way to configure `hostd` is a YAML config file. - -- `HOSTD_SEED` -> `HOSTD_WALLET_SEED` -- `HOSTD_LOG_FILE` -> `HOSTD_LOG_FILE_PATH` \ No newline at end of file diff --git a/.changeset/support_v2_hardfork.md b/.changeset/support_v2_hardfork.md deleted file mode 100644 index a2c20456..00000000 --- a/.changeset/support_v2_hardfork.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -default: major ---- - -# Support V2 Hardfork - -The V2 hardfork is scheduled to modernize Sia's consensus protocol, which has been untouched since Sia's mainnet launch back in 2014, and improve accessibility of the storage network. To ensure a smooth transition from V1, it will be executed in two phases. Additional documentation on upgrading will be released in the near future. - -#### V2 Highlights -- Drastically reduces blockchain size on disk -- Improves UTXO spend policies - including HTLC support for Atomic Swaps -- More efficient contract renewals - reducing lock up requirements for hosts and renters -- Improved transfer speeds - enables hot storage - -#### Phase 1 - Allow Height -- **Activation Height:** `513400` (March 10th, 2025) -- **New Features:** V2 transactions, contracts, and RHP4 -- **V1 Support:** Both V1 and V2 will be supported during this phase -- **Purpose:** This period gives time for integrators to transition from V1 to V2 -- **Requirements:** Users will need to update to support the hardfork before this block height - -#### Phase 2 - Require Height -- **Activation Height:** `526000` (June 6th, 2025) -- **New Features:** The consensus database can be trimmed to only store the Merkle proofs -- **V1 Support:** V1 will be disabled, including RHP2 and RHP3. Only V2 transactions will be accepted -- **Requirements:** Developers will need to update their apps to support V2 transactions and RHP4 before this block height diff --git a/.changeset/switch_docker_base_image_from_scratch_to_debianbookworm_slim.md b/.changeset/switch_docker_base_image_from_scratch_to_debianbookworm_slim.md deleted file mode 100644 index e19d2fc5..00000000 --- a/.changeset/switch_docker_base_image_from_scratch_to_debianbookworm_slim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: major ---- - -# Switched Docker base image from scratch to debian:bookworm-slim diff --git a/.changeset/switch_to_core_consensus.md b/.changeset/switch_to_core_consensus.md deleted file mode 100644 index b6105937..00000000 --- a/.changeset/switch_to_core_consensus.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -default: major ---- - -# Switch to `core` consensus - -Removes the last legacy code from `siad`. Switching between Mainnet and Testnet can now be done with a CLI flag e.g. `--network=zen`. This will require hosts to resync the blockchain. Refrain from upgrading if contracts are about to expire. diff --git a/.changeset/the_default_number_of_registry_entries_is_now_0_the_registry_is_deprecated_and_will_not_be_supported_after_the_v2_hardfork.md b/.changeset/the_default_number_of_registry_entries_is_now_0_the_registry_is_deprecated_and_will_not_be_supported_after_the_v2_hardfork.md deleted file mode 100644 index 73d9a30b..00000000 --- a/.changeset/the_default_number_of_registry_entries_is_now_0_the_registry_is_deprecated_and_will_not_be_supported_after_the_v2_hardfork.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# The default number of registry entries is now 0. The registry is deprecated and will not be supported after the V2 hardfork. diff --git a/.changeset/use_default_data_directories.md b/.changeset/use_default_data_directories.md deleted file mode 100644 index c98f7734..00000000 --- a/.changeset/use_default_data_directories.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -default: major ---- - -# Use standard locations for application data - -Uses standard locations for application data instead of the current directory. This brings `hostd` in line with other system services and makes it easier to manage application data. - -#### Linux, FreeBSD, OpenBSD -- Configuration: `/etc/hostd/hostd.yml` -- Data directory: `/var/lib/hostd` - -#### macOS -- Configuration: `~/Library/Application Support/hostd.yml` -- Data directory: `~/Library/Application Support/hostd` - -#### Windows -- Configuration: `%APPDATA%\SiaFoundation\hostd.yml` -- Data directory: `%APPDATA%\SiaFoundation\hostd` - -#### Docker -- Configuration: `/data/hostd.yml` -- Data directory: `/data` \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d67ef482..15e39918 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,96 @@ +## 2.0.0 (2025-01-13) + +### Breaking Changes + +- Remove RHP Session endpoints +- Switched Docker base image from scratch to debian:bookworm-slim + +#### Combined Mainnet and Testnet Binaries + +This changes `hostd` to support multiple networks from a single binary. Instead of needing to download the Zen specific binary, users can switch networks through the YAML config or a CLI flag: `--network=zen`. + +This does have some broader implications. The environment variables and default ports have also been combined. Users running both Mainnet and Zen nodes will need to manually change ports in their config files. + +##### Removed Environment Variables +- `HOSTD_ZEN_SEED` -> `HOSTD_WALLET_SEED` +- `HOSTD_ZEN_API_PASSWORD` -> `HOSTD_API_PASSWORD` +- `HOSTD_ZEN_LOG_PATH` -> `HOSTD_LOG_FILE_PATH` + +#### Renamed Environment Variables + +Some of the environment variable names have been renamed for better consistency between `renterd`, `walletd`, and `hostd`. If your install was using environment variables for configuration, they may need to be updated. The preferred way to configure `hostd` is a YAML config file. + +- `HOSTD_SEED` -> `HOSTD_WALLET_SEED` +- `HOSTD_LOG_FILE` -> `HOSTD_LOG_FILE_PATH` + +#### Support V2 Hardfork + +The V2 hardfork is scheduled to modernize Sia's consensus protocol, which has been untouched since Sia's mainnet launch back in 2014, and improve accessibility of the storage network. To ensure a smooth transition from V1, it will be executed in two phases. Additional documentation on upgrading will be released in the near future. + +##### V2 Highlights +- Drastically reduces blockchain size on disk +- Improves UTXO spend policies - including HTLC support for Atomic Swaps +- More efficient contract renewals - reducing lock up requirements for hosts and renters +- Improved transfer speeds - enables hot storage + +##### Phase 1 - Allow Height +- **Activation Height:** `513400` (March 10th, 2025) +- **New Features:** V2 transactions, contracts, and RHP4 +- **V1 Support:** Both V1 and V2 will be supported during this phase +- **Purpose:** This period gives time for integrators to transition from V1 to V2 +- **Requirements:** Users will need to update to support the hardfork before this block height + +##### Phase 2 - Require Height +- **Activation Height:** `526000` (June 6th, 2025) +- **New Features:** The consensus database can be trimmed to only store the Merkle proofs +- **V1 Support:** V1 will be disabled, including RHP2 and RHP3. Only V2 transactions will be accepted +- **Requirements:** Developers will need to update their apps to support V2 transactions and RHP4 before this block height + +#### Switch to `core` consensus + +Removes the last legacy code from `siad`. Switching between Mainnet and Testnet can now be done with a CLI flag e.g. `--network=zen`. This will require hosts to resync the blockchain. Refrain from upgrading if contracts are about to expire. + +#### Use standard locations for application data + +Uses standard locations for application data instead of the current directory. This brings `hostd` in line with other system services and makes it easier to manage application data. + +##### Linux, FreeBSD, OpenBSD +- Configuration: `/etc/hostd/hostd.yml` +- Data directory: `/var/lib/hostd` + +##### macOS +- Configuration: `~/Library/Application Support/hostd.yml` +- Data directory: `~/Library/Application Support/hostd` + +##### Windows +- Configuration: `%APPDATA%\SiaFoundation\hostd.yml` +- Data directory: `%APPDATA%\SiaFoundation\hostd` + +##### Docker +- Configuration: `/data/hostd.yml` +- Data directory: `/data` + +### Features + +- Attempt to upgrade existing configs instead of exiting + +#### Add RHP4 support + +RHP4 is the next generation of renter-host protocol for the Sia storage network. It dramatically increases performance compared to RHP3, improves contract payouts, reduces collateral lockup, and enables features necessary for light clients. The new protocol will be available and activated starting at block height `513400` (March 10th, 2025). + +#### Refactor Sector Management + +Improves sector lookups by 50% on average by removing the sector lock tables and moving reference pruning out of the hot path. + +### Fixes + +- Automate changelog generation +- Fixed a major speed regression when uploading data on larger nodes +- Fixed a panic updating metrics when a contract formation is reverted +- Fixed an issue with price pinning not updating prices +- Move RHP2 and RHP3 settings into the config manager to be consistent with RHP4 +- The default number of registry entries is now 0. The registry is deprecated and will not be supported after the V2 hardfork. + ## 1.1.2 ### Breaking changes diff --git a/go.mod b/go.mod index 2b023a77..5169296b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module go.sia.tech/hostd +module go.sia.tech/hostd // v2.0.0 go 1.23.1