Skip to content

Commit

Permalink
Merge pull request #165 from ethersphere/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
NoahMaizels authored May 17, 2024
2 parents ccadb52 + 072300f commit 01bdf53
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
33 changes: 17 additions & 16 deletions content/foundation/posts/bee-v2.1.0-pre-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,47 @@ _template = "post"
slug="bee-2-1-pre-release"
+++


## Bee Version 2.1 Launches in Two Weeks

The Bee 2.1 release is right around the corner, and is scheduled to go live on Tuesday, May 28th, 2024. This release brings with it several changes aimed at improving node performance and at making the Bee client more streamlined and easy to work with. Below are outlined the changes coming in the 2.1 release, along with any steps you as a node operator or Swarm developer need to take in order to prepare.
The Bee 2.1 release is right around the corner, scheduled to go live on Tuesday, May 28th, 2024. This release brings with it several changes aimed at improving node performance and making the Bee client more streamlined and easier to work with. Below, we outline the changes coming in the 2.1 release, along with the steps you, as a node operator or Swarm developer, need to take in order to prepare.

{{< admonition warning >}}
Because Bee version 2.1 contains breaking changes, all node operators should make sure to update their nodes immediately following the release to avoid disruptions to their operations.
Because Bee version 2.1 contains breaking changes, all node operators should update their nodes immediately following the release to avoid disruptions to their operations.

Make sure to continue reading the rest of this article as it contains other steps which all node operators must take following the 2.1 release to avoid disruptions to their operations.
{{< /admonition >}}

## Reserve Repair Command

This release includes fixes to the localstore which prevent corrupted chunks from appearing in node reserves. However, these changes will not repair corrupted chunks which are currently present in a node's reserve. In order to repair corrupted chunks, the 2.1 release includes the new `db reserve-repair` command which will scan a node's reserves and fix any corrupted chunks. All node operators should make sure to run this command immediately following the 2.1 update on all their nodes.
This release includes fixes to the localstore that prevent corrupted chunks from appearing in node reserves. However, these changes will not repair corrupted chunks already present in a node's reserve. To address this, the 2.1 release introduces the new `db repair-reserve` command, which will scan a node's reserves and fix any corrupted chunks. All node operators should make sure to run this command immediately following the 2.1 update on all their nodes.

{{< admonition warning >}}
Make sure to run the `db reserve-repair` immediately following the 2.1 upgrade. Running the command will repair corrupted chunks in your nodes' reserves and is expected to reduce freeze rates.
Make sure to run the `db repair-reserve` immediately following the 2.1 upgrade. Running the command will repair corrupted chunks in your nodes' reserves and is expected to reduce freeze rates.

Also make sure to run the command one by one rather than concurrently for nodes which are running on the same physical disk, since running the command concurrently on multiple nodes could lead to drastic slowdowns.
{{< /admonition >}}

## Phasing Out of the Debug API

The Bee client has long had two APIs used for interaction with the Bee client, the main Bee API along and the Debug API. The two APIs share many of the same endpoints with the same functionality, with several exclusive to one or the other API.
The Bee client has historically utilised two APIs: the main Bee API and the Debug API, which share many of the same endpoints but also have unique functionalities.

In order to streamline future client development and simplify node operation, ***the two APIs will be merged into the Bee API, and the Debug API will be removed entirely over the following two releases (2.1 and 2.2).⚠️***

The Debug API will be phased out and all of its exclusive endpoints will integrated into the Bee API.
The Debug API will be phased out and all of its exclusive endpoints will be integrated into the Bee API.

The removal of the Debug API will take part in two phases:

#### ***Phase 1 - Bee 2.1:***

In the 2.1 release, all Debug API exclusive endpoints will be integrated into the Bee API and the Debug API will be marked as deprecated. This will give node operators and Swarm developers time to remove the Debug API from their setup and move over entirely to the Bee API.
In the 2.1 release, all exclusive endpoints of the Debug API will be integrated into the Bee API, and the Debug API will be marked as deprecated. This will give node operators and Swarm developers time to remove the Debug API from their setup and move over entirely to the Bee API.

#### ***Phase 2 - Bee 2.2:***

In the 2.2 release ***the Debug API will be entirely removed from the Bee client.⚠️***
In the 2.2 release, ***the Debug API will be entirely removed from the Bee client.⚠️***

{{< admonition warning >}}
Node operators and Swarm developers should use the period between the 2.1 and 2.2 to remove the Debug API from their setups and move over entirely to the Bee API in order to avoid any disruptions to their operations.
Node operators and Swarm developers should use the period between the 2.1 and 2.2 releases to remove the Debug API from their setups and move over entirely to the Bee API in order to avoid any disruptions to their operations.
{{< /admonition >}}

### Changes to the `--restricted` Option For Bee 2.1
Expand All @@ -58,9 +59,9 @@ Node operators and Swarm developers should use the period between the 2.1 and 2.
The `--restricted` option and API authentication feature will be removed entirely in Bee version 2.2.
{{< /admonition >}}

Along with the merging of the Debug API into the Bee API, changes are being made to the `--restricted` option. Currently the `--restricted` option is used together with the `/auth` endpoint to control access to [business related endpoints](https://docs.ethswarm.org/docs/bee/working-with-bee/security/) on the Bee API (it does not apply to the Debug API). The business related endpoints are not available by default without using the `--restricted` option and setting up authentication with the `/auth` endpoint.
Along with the merging of the Debug API into the Bee API, changes are being made to the `--restricted` option. Currently, the `--restricted` option is used together with the `/auth` endpoint to control access to [business related endpoints](https://docs.ethswarm.org/docs/bee/working-with-bee/security/) on the Bee API (it does not apply to the Debug API). The business related endpoints are not available by default without using the `--restricted` option and setting up authentication with the `/auth` endpoint.

In the 2.1 release, the `--restricted` option will be off by default, and all endpoints except for the authentication related `/auth` and `/refresh` endpoints will be available and unrestricted. If a node is started with the `--restricted` option turned on, the `/auth` and `/refresh` endpoints will be made available, and the business endpoints will be restricted and require the security token generated from the `/auth` endpoint to be accessed.
In the 2.1 release, the `--restricted` option will be off by default, and all endpoints except for the authentication related `/auth` and `/refresh` endpoints will be available and unrestricted. If a node is started with the `--restricted` option turned on, the `/auth` and `/refresh` endpoints will be available, and the business endpoints will be restricted, requiring a security token generated from the `/auth` endpoint to access.


Available only when a node is spawned with the `--restricted` option:
Expand Down Expand Up @@ -110,7 +111,7 @@ Available by default, can be restricted and protected with basic authentication
- /status/peers (GET)
- /rchash/{depth}/{anchor1}/{anchor2} (GET)

All other endpoints have no restrictions and are always available.
All other endpoints are unrestricted and are always available.


## Localstore Transaction Refactor
Expand All @@ -119,15 +120,15 @@ The current implementation of localstore transactions (which are responsible for

The benefits of this change include:

* LevelDB batch transactions allow for transactions to be bundled together in batches rather than executed one by one, which improves efficiency and decreases the potential for errors.
* By relying on LevelDB batch transactions, the continued maintenance of a custom transaction implementation is no longer required.
* LevelDB batch transactions allow for transactions to be bundled together in batches rather than executing them one by one. This not only improves efficiency but also reduces the potential for errors.
* By relying on LevelDB batch transactions, the continued maintenance of a custom transaction implementation is no longer required.

This change will improve overall node performance and stability for node operators and Swarm developers.

## Freezing Quota Feature

There is currently a relatively high probability of getting frozen even for nodes which are honestly participating in the redistribution game. The localstore changes described above have the potential to reduce freezing rates by improving the consistency of nodes' reserves. As an additional measure to reduce freeze rates, a freezing quota feature has been added to the newest smart contract which will be disabled at the launch of Bee version 2.1. Dependent on how this release affects freezing rates, the freezing quota will be enabled to further reduce freezing rates.
Currently, there is a relatively high probability of nodes getting frozen, even for those honestly participating in the redistribution game. The localstore changes described above are expected to reduce freeze rates by improving the consistency of nodes' reserves. As an additional measure to reduce freeze rates, a freezing quota feature has been added to the newest smart contract, which will be initially disabled at the launch of Bee version 2.1. Based on the impact observed on freezing rates post-release, the freezing quota may be enabled to further decrease freeze occurrences.

## Stay Tuned

Don't forget to start preparing early for the 2.1 release, and stay tuned for additional updates over the next two weeks. Make sure you're [following us on Twitter](https://twitter.com/ethswarm) for all the most up to date information, and that you've [joined us on Discord](https://discord.gg/uX8ekKcwRu) to keep up with all the latest community discussions.
Don't forget to start preparing early for the 2.1 release, and stay tuned for additional updates over the next two weeks. Make sure you're [following us on Twitter](https://twitter.com/ethswarm) for the most up-to-date information, and that you've [joined us on Discord](https://discord.gg/uX8ekKcwRu) to participate in all the latest community discussions.
5 changes: 4 additions & 1 deletion themes/swarm-blog/assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,9 @@ aside ul a:hover {
}

.content a {
font-weight: 500;
--tw-text-opacity: 1;
color: rgb(0 0 0 / var(--tw-text-opacity));
text-decoration-line: underline;
}

Expand Down Expand Up @@ -2297,8 +2300,8 @@ aside ul a:hover {
}

.pagefind-ui__results {
margin-bottom: 2.5rem;
margin-top: 3rem;
margin-bottom: 2.5rem;
}

.pagefind-ui__results > :not([hidden]) ~ :not([hidden]) {
Expand Down
20 changes: 10 additions & 10 deletions themes/swarm-blog/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
}

.content a {
@apply underline;
@apply font-medium text-black underline;
}

.content a:hover {
Expand All @@ -130,7 +130,7 @@
}

.content blockquote {
@apply font-serif-quote text-2xl leading-normal;
@apply text-2xl leading-normal font-serif-quote;
}

.content blockquote * {
Expand Down Expand Up @@ -196,27 +196,27 @@
}

.content pre {
@apply overflow-x-auto rounded-md bg-gray-100 px-3 py-3 text-sm;
@apply px-3 py-3 overflow-x-auto text-sm bg-gray-100 rounded-md;
}

.content pre code {
@apply rounded-none bg-transparent p-0 px-0 py-0 font-normal;
@apply p-0 px-0 py-0 font-normal bg-transparent rounded-none;
}

.content code {
@apply rounded-md bg-gray-100 px-1.5 py-0.5 font-mono text-[0.9em] font-bold;
}

.content table {
@apply w-full table-auto text-base;
@apply w-full text-base table-auto;
}

.content table th {
@apply border border-gray-400 bg-gray-100 p-2 text-left font-bold;
@apply p-2 font-bold text-left bg-gray-100 border border-gray-400;
}

.content table td {
@apply border-gray-400/50 px-2 py-1;
@apply px-2 py-1 border-gray-400/50;
}

.footnotes ol {
Expand All @@ -231,7 +231,7 @@

/* Pagefind UI */
.pagefind-ui__search-input {
@apply relative w-full border border-gray-500 py-2 pl-12 pr-4 text-lg text-gray-900 outline-gray-900;
@apply relative w-full py-2 pl-12 pr-4 text-lg text-gray-900 border border-gray-500 outline-gray-900;
background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath d='m20.64 18.9-4.28-4.28a7.4 7.4 0 1 0-1.74 1.74l4.28 4.28a1.23 1.23 0 1 0 1.74-1.74ZM4.63 10.36a5.73 5.73 0 1 1 11.46 0 5.73 5.73 0 0 1-11.46 0Z' fill='%23626262' /%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: 8px center;
Expand All @@ -242,11 +242,11 @@
}

.pagefind-ui__results {
@apply md:mt-22 md:space-y-22 mb-10 mt-12 space-y-10 pl-0;
@apply pl-0 mt-12 mb-10 space-y-10 md:mt-22 md:space-y-22;
}

.pagefind-ui__result-image {
@apply aspect-video object-cover;
@apply object-cover aspect-video;
}

.pagefind-ui__result-inner {
Expand Down

0 comments on commit 01bdf53

Please sign in to comment.