bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 36쪽 중 6쪽
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓ ▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓ ▐▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▐▓▓▓▓▓▌ ▐▓▓▓▓▓▓
▓▓▓▓▓▓▄▄▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓▄▄▄▄ ▓▓▓▓▓▓▄▄▄▄ ▐▓▓▓▓▓▌ ▐▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▀▀▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓▀▀▀▀ ▓▓▓▓▓▓▀▀▀▀ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
▓▓▓▓▓▓ ▀▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▐▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓ █▓▓▓▓▓▓▓▓▓ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓
Trust math, not hardware.
-----------------------------------------------------------------------------------
| Keep Client Node |
| |
| Version: Version: vX.X.X-XX (4d745f6d0) |
| |
| Operator: 0x_your_operator_address |
| |
| Port: 3919 |
| IPs : /ip4/111.222.333.444/tcp/3919/ipfs/redacted |
| |
| Contracts: |
| RandomBeacon : 0x5499f54b4A1CB4816eefCf78962040461be3D80b |
| WalletRegistry : 0x46d52E41C2F300BC82217Ce22b920c34995204eb |
| TokenStaking : 0x01B67b1194C75264d06F808A921228a95C765dd7 |
-----------------------------------------------------------------------------------
```
Congratulations, your node is up and running. 
# Updating Nodes
Update procedure for the tBTC v2 client depends on installation method
## Docker Installation
The following instructions assume your docker install followed [these](/tbtc-signer-nodes/tbtc-v2-node-setup/installation/docker-installation) installation instructions. 
{% tabs %}
{% tab title="Docker Install" %}
To update a tBTC node:
Pull the new image
```bash
docker pull keepnetwork/keep-client:latest
```
Restart the tBTC service
```bash
sudo systemctl restart tbtcv2
```
To free system resources, run
```bash
sudo docker container prune
```
```bash
sudo docker image prune
```
Examine logs to ensure the node started correctly. Find Docker instance identification; it'll be a random combination of words, e.g. `stinky_brownie`:
```bash
sudo docker ps
```
Use specific identification and substitute accordingly; specify a path and file name for the log file:
```bash
sudo docker logs stinky_brownie >& /path/to/output/file
```
Display the log file 
```bash
cat /path/to/output/file
```
Look for the following and take note of the version:
<pre><code><strong>
</strong>▓▓▌ ▓▓ ▐▓▓ ▓▓▓▓▓▓▓▓▓▓▌▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▌▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓ ▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓ ▐▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▐▓▓▓▓▓▌ ▐▓▓▓▓▓▓
▓▓▓▓▓▓▄▄▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓▄▄▄▄ ▓▓▓▓▓▓▄▄▄▄ ▐▓▓▓▓▓▌ ▐▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▀▀▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓▀▀▀▀ ▓▓▓▓▓▓▀▀▀▀ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
▓▓▓▓▓▓ ▀▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▐▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓ █▓▓▓▓▓▓▓▓▓ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓
Trust math, not hardware.
-----------------------------------------------------------------------------------
| Keep Client Node |
| |
| Version: vX.X.X-XX (4d745f6d0) |
| |
| Operator: 0x_your_operator_address |
| |
| Port: 3919 |
| IPs : /ip4/111.222.333.444/tcp/3919/ipfs/redacted |
| |
| Contracts: |
| RandomBeacon : 0x5499f54b4A1CB4816eefCf78962040461be3D80b |
| WalletRegistry : 0x46d52E41C2F300BC82217Ce22b920c34995204eb |
| TokenStaking : 0x01B67b1194C75264d06F808A921228a95C765dd7 |
-----------------------------------------------------------------------------------
</code></pre>
Alternatively, verify your client updated by visiting your status page:
```
http://111.222.333.444:9601/metrics
```
Compare the displayed version number to the version number you are expecting, i.e.:
```
client_info{version="vX.X.X-XX"}
```
{% endtab %}
{% tab title="Binary Install" %}
This install method requires downloading the latest version of the binary. Follow the installation steps provided [here](/tbtc-signer-nodes/tbtc-v2-node-setup/installation/binary-installation).
{% endtab %}
{% endtabs %}
# Advanced Options
Advanced configuration options and tBTC v2 client options
### [Logging](/tbtc-signer-nodes/tbtc-v2-node-setup/advanced-options/logging)
Configuration options for logging
### [Config File](/tbtc-signer-nodes/tbtc-v2-node-setup/advanced-options/config-file)
Application configuration can be stored in a file and passed to the application with the `--config` flag.
### [CLI Options](/tbtc-signer-nodes/tbtc-v2-node-setup/advanced-options/cli-options)
### [Client Info](/tbtc-signer-nodes/tbtc-v2-node-setup/advanced-options/client-info)
Client information exposed by the tBTC v2 client.
# Logging
Optional logging configuration for the tBTC v2 client.
### Configuration <a href="#configuration" id="configuration"></a>
Logging can be configured with environment variables. Please see sample settings:
```bash
LOG_LEVEL=DEBUG
IPFS_LOGGING_FMT=nocolor
GOLOG_FILE=/var/log/keep/keep.log
GOLOG_TRACING_FILE=/var/log/keep/trace.json
```
{% hint style="success" %}
LOG\_LEVEL option DEBUG will generate extensive output. Consider INFO instead.
{% endhint %}
{% hint style="info" %}
If you want to share your LibP2P address with others you can get it from the startup log. When sharing remember to substitute the `/ipv4/` address with the public facing IP of your client if you’re running on a private machine, or replace the entire `/ipv4/` segment with a DNS entry if you’re using a hostname.
{% endhint %}
# Config File
Use a config file to store client configuration.
Application configuration can be stored in a file and passed to the application with the `--config` flag.
Example:
```
./keep-client --config /path/to/your/config.toml start
```
Configuration files in formats TOML, YAML and JSON are supported.
Sample configuration file:
{% code overflow="wrap" %}
```toml
# This is a sample TOML configuration file for the Keep client.
[ethereum]
URL = "ws://127.0.0.1:8546"
KeyFile = "/Users/someuser/ethereum/data/keystore/UTC--2018-03-11T01-37-33.202765887Z--AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAA"
# Uncomment to override the defaults for transaction status monitoring.
# MiningCheckInterval is the interval in which transaction
# mining status is checked. If the transaction is not mined within this
# time, the gas price is increased and transaction is resubmitted.
#
# MiningCheckInterval = 60 # 60 sec (default value)
# MaxGasFeeCap specifies the maximum gas fee cap the client is
# willing to pay for the transaction to be mined. The offered transaction
# gas cost can not be higher than the max gas fee cap value. If the maximum
# allowed gas fee cap is reached, no further resubmission attempts are
# performed. This property should be set only for Ethereum. In case of
# legacy non-EIP-1559 transactions, this field works in the same way as
# `MaxGasPrice` property.
#
# MaxGasFeeCap = "500 Gwei" # 500 Gwei (default value)
# Uncomment to enable Ethereum node rate limiting. Both properties can be
# used together or separately.
#
# RequestsPerSecondLimit sets the maximum average number of requests
# per second which can be executed against the Ethereum node.
# All types of Ethereum node requests are rate-limited,
# including view function calls.
#
# RequestsPerSecondLimit = 150
# ConcurrencyLimit sets the maximum number of concurrent requests which
# can be executed against the Ethereum node at the same time.
# This limit affects all types of Ethereum node requests,
# including view function calls.
#
# ConcurrencyLimit = 30
# BalanceAlertThreshold defines a minimum value of the operator's account
# balance below which the client will start reporting errors in logs.
# A value can be provided in `wei`, `Gwei` or `ether`, e.g. `7.5 ether`,
# `7500000000 Gwei`.
#
# BalanceAlertThreshold = "0.5 ether" # 0.5 ether (default value)
[bitcoin.electrum]
# URL to the Electrum server in format: `scheme://hostname:port`.
# Should be uncommented only when using a custom Electrum server. Otherwise,
# one of the default embedded servers is selected randomly at startup.
# URL = "tcp://127.0.0.1:50001"
# Timeout for a single attempt of Electrum connection establishment.
# ConnectTimeout = "10s"
# Timeout for Electrum connection establishment retries.
# ConnectRetryTimeout = "1m"
# Timeout for a single attempt of Electrum protocol request.
# RequestTimeout = "30s"
# Timeout for Electrum protocol request retries.
# RequestRetryTimeout = "2m"
# Interval for connection keep alive requests.
# KeepAliveInterval = "5m"
[network]
Bootstrap = false
Peers = [
"/ip4/127.0.0.1/tcp/3919/ipfs/16Uiu2HAmFRJtCWfdXhZEZHWb4tUpH1QMMgzH1oiamCfUuK6NgqWX",
]
Port = 3920
# Uncomment to override the node's default addresses announced in the network
# AnnouncedAddresses = ["/dns4/example.com/tcp/3919", "/ip4/80.70.60.50/tcp/3919"]
# Uncomment to enable courtesy message dissemination for topics this node is
# not subscribed to. Messages will be forwarded to peers for the duration
# specified as a value in seconds.
# Message dissemination is disabled by default and should be enabled only
# on selected bootstrap nodes. It is not a good idea to enable dissemination
# on non-bootstrap node as it may clutter communication and eventually lead
# to blacklisting the node. The maximum allowed value is 90 seconds.
#
# DisseminationTime = 90
[storage]
Dir = "/my/secure/location"
# ClientInfo exposes metrics and diagnostics modules.
#
# Metrics collects and exposes information useful for external monitoring tools usually
# operating on time series data.
# All values exposed by metrics module are quantifiable or countable.
#
# The following metrics are available:
# - connected peers count
# - connected bootstraps count
# - eth client connectivity status
#
# Diagnostics module exposes the following information:
# - list of connected peers along with their network id and ethereum operator address
# - information about the client's network id and ethereum operator address
[clientInfo]
Port = 9601
# NetworkMetricsTick = 60
# EthereumMetricsTick = 600
# Uncomment to overwrite default values for TBTC config.
#
# [tbtc]
# PreParamsPoolSize = 3000
# PreParamsGenerationTimeout = "2m"
# PreParamsGenerationDelay = "10s"
# PreParamsGenerationConcurrency = 1
# KeyGenConcurrency = 1
# Developer options to work with locally deployed contracts
#
# [developer]
# TokenStakingAddress = "0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
# RandomBeaconAddress = "0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
# WalletRegistryAddress = "0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
# BridgeAddress = "0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
```
{% endcode %}
# CLI Options
Review available CLI Options below.
{% embed url="<https://github.com/keep-network/keep-core/blob/main/docs/resources/client-start-help>" %}
```
$ keep-client start --help
Starts the Keep Client in the foreground
Usage:
keep-client start [flags]
Flags:
--ethereum.url string WS connection URL for Ethereum client.
--ethereum.keyFile string The local filesystem path to Keep operator account keyfile.
--ethereum.miningCheckInterval duration The time interval in seconds in which transaction mining status is checked. If the transaction is not mined within this time, the gas price is increased and transaction is resubmitted. (default 1m0s)
--ethereum.maxGasFeeCap wei The maximum gas fee the client is willing to pay for the transaction to be mined. If reached, no resubmission attempts are performed. (default 500 gwei)
--ethereum.requestPerSecondLimit int Request per second limit for all types of Ethereum client requests. (default 150)
--ethereum.concurrencyLimit int The maximum number of concurrent requests which can be executed against Ethereum client. (default 30)
--ethereum.balanceAlertThreshold wei The minimum balance of operator account below which client starts reporting errors in logs. (default 500000000 gwei)
--bitcoin.electrum.url scheme://hostname:port URL to the Electrum server in format: scheme://hostname:port.
--bitcoin.electrum.connectTimeout duration Timeout for a single attempt of Electrum connection establishment. (default 10s)
--bitcoin.electrum.connectRetryTimeout duration Timeout for Electrum connection establishment retries. (default 1m0s)
--bitcoin.electrum.requestTimeout duration Timeout for a single attempt of Electrum protocol request. (default 30s)
--bitcoin.electrum.requestRetryTimeout duration Timeout for Electrum protocol request retries. (default 2m0s)
--bitcoin.electrum.keepAliveInterval duration Interval for connection keep alive requests. (default 5m0s)
--network.bootstrap Run the client in bootstrap mode.
--network.peers strings Addresses of the network bootstrap nodes.
-p, --network.port int Keep client listening port. (default 3919)
--network.announcedAddresses strings Overwrites the default Keep client address announced in the network. Should be used for NAT or when more advanced firewall rules are applied.
--network.disseminationTime int Specifies courtesy message dissemination time in seconds for topics the node is not subscribed to. Should be used only on selected bootstrap nodes. (0 = none)
--storage.dir string Location to store the Keep client key shares and other sensitive data.
--clientInfo.port int Client Info HTTP server listening port. (default 9601)
--clientInfo.networkMetricsTick duration Client Info network metrics check tick in seconds. (default 1m0s)
--clientInfo.ethereumMetricsTick duration Client info Ethereum metrics check tick in seconds. (default 10m0s)
--tbtc.preParamsPoolSize int tECDSA pre-parameters pool size. (default 1000)
--tbtc.preParamsGenerationTimeout duration tECDSA pre-parameters generation timeout. (default 2m0s)
--tbtc.preParamsGenerationDelay duration tECDSA pre-parameters generation delay. (default 10s)
--tbtc.preParamsGenerationConcurrency int tECDSA pre-parameters generation concurrency. (default 1)
--tbtc.keyGenerationConcurrency int tECDSA key generation concurrency. (default number of cores)
--developer.bridgeAddress string Address of the Bridge smart contract
--developer.lightRelayAddress string Address of the LightRelay smart contract
--developer.lightRelayMaintainerProxyAddress string Address of the LightRelayMaintainerProxy smart contract
--developer.randomBeaconAddress string Address of the RandomBeacon smart contract
--developer.tokenStakingAddress string Address of the TokenStaking smart contract
--developer.walletRegistryAddress string Address of the WalletRegistry smart contract
--developer.walletCoordinatorAddress string Address of the WalletCoordinator smart contract
Global Flags:
-c, --config string Path to the configuration file. Supported formats: TOML, YAML, JSON.
--developer Developer network
--testnet Testnet network
Environment variables:
KEEP_ETHEREUM_PASSWORD Password for Keep operator account keyfile decryption.
LOG_LEVEL Space-delimited set of log level directives; set to "help" for help.
```
# Client Info
Client information exposed by the tBTC v2 client.
The client exposes metrics and diagnostics on a configurable port (default: `9601`) under `/metrics` and `/diagnostics` resources.
The data can be consumed by Prometheus to monitor the state of a node.
### Metrics
The client exposes the following metrics:
* connected peers count,
* connected bootstraps count,
* Ethereum client connectivity status (if a simple read-only CALL can be executed).
Metrics are enabled once the client starts. It is possible to customize the port at which metrics endpoint is exposed as well as the frequency with which the metrics are collected.
Exposed metrics contain the value and timestamp at which they were collected.
Example metrics endpoint call result:
```
$ curl localhost:9601/metrics
# TYPE connected_peers_count gauge
connected_peers_count 108 1623235129569
# TYPE connected_bootstrap_count gauge
connected_bootstrap_count 10 1623235129569
# TYPE eth_connectivity gauge
eth_connectivity 1 1623235129789
```
### Diagnostics <a href="#diagnostics" id="diagnostics"></a>
The client exposes the following diagnostics:
* list of connected peers along with their network id and Ethereum operator address,
* information about the client’s network id and Ethereum operator address.
Diagnostics are enabled once the client starts. It is possible to customize the port at which diagnostics endpoint is exposed.
Example diagnostics endpoint call result:
```
$ curl localhost:9601/diagnostics
{
"client_info" {
"ethereum_address":"0xDcd4199e22d09248cA2583cBDD2759b2acD22381",
"network_id":"16Uiu2HAkzYFHsqbwt64ZztWWK1hyeLntRNqWMYFiZjaKu1PZgikN"
},
"connected_peers": [
{"ethereum_address":"0x3712C6fED51CECA83cA953f6FF3458f2339436b4","network_id":"16Uiu2HAkyYtzNoWuF3ULaA7RMfVAxvfQQ9YRvRT3TK4tXmuZtaWi"},
{"ethereum_address":"0x4bFa10B1538E8E765E995688D8EEc39C717B6797","network_id":"16Uiu2HAm9d4MG4LNrwkFmugD2pX7frm6ZmA4vE3EFAEjk7yaoeLd"},
{"ethereum_address":"0x650A9eD18Df873cad98C88dcaC8170531cAD2399","network_id":"16Uiu2HAkvjVWogUk2gq6VTNLQdFoSHXYpobJdZyuAYeoWD66e8BD"},
...
]
}
```
# Frequently Asked Questions
Find answers to some of the most commonly asked questions here.
### Errors in Logs or Console
Certain errors may be reported by your node. See a sample below:
{% code overflow="wrap" %}
```
2022-10-10T18:30:42.571Z WARN keep-beacon beacon/node.go:78 selecting group not possible: [cannot select group in the sortition pool: [got error [execution reverted: Sortition pool unlocked] while resolving original error [execution reverted: Sortition pool unlocked]]] {"seed": "0x29c60250c292e108e6abf4dcc76cb161d8ae8e803c4d4419eaff6e97f514b080"}
```
{% endcode %}
{% hint style="info" %}
This warning is normal and may happen. It will disappear and reappear periodically.
{% endhint %}
When the pool is locked, new operators cannot join but sortition (selecting operators from the pool) is possible. When the pool is unlocked, new operators can join but the sortition is not possible. Once the first set of Signers is registered, the pool will get locked for some time to allow the sortition. After some time, when another set of Signers are added, the pool will be unlocked again. 
# Sepolia Testnet
Here you'll find the [Sepolia testnet](https://dashboard.test.threshold.network/) version of the Threshold dapp. 
<figure><img src="https://2518393180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWosjlL4zUGUMlcMfuSAp%2Fuploads%2FxEt7NYHUQHWtbBi3T4Zw%2Fdashboard.jpg?alt=media&token=30db739e-9471-4200-8684-d7c8633d11aa" alt=""><figcaption><p>Sepolia Testnet - Threshold Dashboard</p></figcaption></figure>
# Testnet Node Setup
This page will show you how to launch a tBTC v2 node on the testnet.
{% hint style="danger" %}
This is a TESTNET guide document.
{% endhint %}
## Recommended Machine Types <a href="#recommended_machine_types" id="recommended_machine_types"></a>
{% hint style="info" %}
While it is possible to run the client on a local machine, this is not recommended.
{% endhint %}
Your operating environment will ultimately dictate what machine type to go with. This is particularly relevant if you’re running a containerized solution where multiple applications are sharing VM resources. The below types are sufficient for running one instance of the tBTC v2 Node.
The preferred OS is Ubuntu.
| VPS Provider | VPS Type |
| ------------ | -------------------------------------------- |
| AWS | c5.large |
| Azure | F2s v2 |
| Google Cloud | n2-highcpu-2 |
| Self-hosted | 2 vCPU / 2 GB RAM / 1 GiB Persistent Storage |
## **Ethereum API**
A Keep Node requires a connection to a WebSocket Ethereum API. You should obtain a WS API URL from a service provider (e.g., [Alchemy](https://www.alchemy.com/), [Infura](https://www.infura.io/), [Ankr](https://www.ankr.com/rpc-service/)) or run your own Ethereum node (e.g. [Geth](https://geth.ethereum.org/)).
The client requires an Ethereum Key File of an Operator Account to connect to the Ethereum chain. This account is created in a subsequent step using G프로젝트로 돌아가기