-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self hosting backend service instruction #91
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big effort, very nice work!
Suggest to add the following sections to all infra / services:
- Monitoring section. For the services, let's explain that they expose Prom metrics and they can be scraped. For the infra, we can suggest a Prom exporter to use. (refs: 1, 2)
- Hardware and Network requirements: We are often asked by teams how many resources does a server require, how should it be deployed etc. Suggest to add generic guidelines.
6db09aa
to
a2107eb
Compare
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-api.md
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-api.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-api.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-indexer.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/global-system-configuration.md
Outdated
Show resolved
Hide resolved
# Global System Configuration | ||
|
||
## Staking Parameters | ||
|
||
The Global Configuration includes a series of versioned governance parameters that greatly affect the behaviour of the system. Detailed information can be found [here](https://github.com/babylonchain/networks/tree/main/bbn-test-4/parameters). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we can copy the content here other than a reference?
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-indexer.md
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend that on markdown we have 80 character lines.
Thanks for the recommendation @vitsalis.
Is this format easier for you to follow? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@hiepmai-babylonchain yes, that's perfect. This is a good practice for markdown files as it is easier to review and edit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Small nits.
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/global-system-configuration.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/global-system-configuration.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-api.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A big set of comments. Up to you which ones you want to include.
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/global-system-configuration.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/global-system-configuration.md
Outdated
Show resolved
Hide resolved
|
||
### 6.1 Create systemd service definition | ||
|
||
Run the following command, replacing `your_username` with your actual username: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does username
refer to in this context? The user of the system?
Also, doesn't this only work with Linux? We should not that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's stated as Optional on the heading, should we just remove this section as it only works it Linux?
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-api.md
Show resolved
Hide resolved
### 1.2 Install the binary by running | ||
|
||
```bash | ||
cd staking-expiry-checker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we ask the user to decide on what version/release to use? Same for all other services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it in the first place but didn't include the version.
The reason is if we put specific version here, we will need to update the docs frequently. Otherwise, the version is not up-to-dated.
Alternatively, we could ask users to check the release page for updates. If we go this route, we'll need to indicate in the release notes whether a particular version is recommended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, although this is counter-intuitive for the user though. How can the user know which versions are compatible with each other?
.../user-guides/bitcoin-staking-testnet-4/backend-deployment/services/staking-expiry-checker.md
Show resolved
Hide resolved
|
||
### 4.1 Create systemd service definition | ||
|
||
Run the following command, replacing `your_username` with your actual username: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux only.
a1730db
to
205b8a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An additional round of comments after a quick look. Most major comment is that we refer to the system as the "Bitcoin Staking system" which might confuse users, as this is only the first phase, which includes a lock-only system. Additionally, it seems that some introductions and explanations of some terms are warranted.
To not delay the merge of this, no need to review again. Once my comments are resolved you can merge, and you can create some issues to track the improvements of the guide so that we can improve it in a more fine-grained manner instead of repeatedly reviewing a big PR.
|
||
![Overview of Bitcoin Staking backend deployment](images/phase-1-overview.png) | ||
|
||
The Babylon Bitcoin Staking system comprises of the following components: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not call this the "Bitcoin Staking system" as this might confuse a user that this system is all there is to Bitcoin Staking or a potential Babylon blockchain. This is the phase-1 lock only system. You can get an idea of how we typically describe the phase-1 lock-only system in this PR. We should also note that this system connects to a Bitcoin network.
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/deployment-overview.md
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/hardware-requirements.md
Outdated
Show resolved
Hide resolved
docs/user-guides/bitcoin-staking-testnet-4/backend-deployment/overview.md
Show resolved
Hide resolved
### 1.2 Install the binary by running | ||
|
||
```bash | ||
cd staking-expiry-checker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, although this is counter-intuitive for the user though. How can the user know which versions are compatible with each other?
The staking indexer is a tool that extracts BTC staking relevant data | ||
from the Bitcoin blockchain, ensures that it follows the pre-requisites | ||
for a valid staking transaction, and determines whether | ||
the transaction should be active or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's an active transaction? Have we defined this somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it from the staking-indexer README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to update to active stake
to match with the glossary
No description provided.