Skip to content

Commit f9d370b

Browse files
committed
Bitcoin difficulty maintainer for keep-test
Here we update the configuration of bitcoin maintainer. We use the keep-maintainer template and run the `bitcoinDifficulty` module of the maintainer connected to mainnet Bitcoin network. This is expected to be a temporary solution that will be updated to overcome the limits of LightRelay and Bitcoin testnet integration mentioned in the README
1 parent 852f870 commit f9d370b

File tree

4 files changed

+64
-100
lines changed

4 files changed

+64
-100
lines changed

infrastructure/kube/keep-test/btc-difficulty/kustomization.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

infrastructure/kube/keep-test/btc-difficulty/maintainer-statefulset.yaml

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Keep Maintainer Staging Mainnet
2+
3+
Bitcoin Relay used by the tTBTC system on testnet environment is an optimized version
4+
of the Light Relay implemented by [GoerliLightRelay](https://github.com/keep-network/tbtc-v2/blob/main/solidity/contracts/test/GoerliLightRelay.sol)
5+
contract. The reason the Light Relay had to be modified for testnet is that on
6+
Bitcoin testnet difficulty often drops to `1`, which makes the blocks validation
7+
on such change impossible to the regular Light Relay contract.
8+
9+
The `GoerliLightRelay` version doesn't require a maintainer bot to submit block
10+
headers on difficulty change. It accepts ad-hoc difficulty alignment according to
11+
the tests needs.
12+
13+
The setup defined in this directory is meant for testing the bitcoin difficulty module
14+
of the maintainer bot with the Bitcoin mainnet blockchain state.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
resources:
2+
- ../../templates/keep-maintainer
3+
4+
namespace: default
5+
6+
# Regular testnet maintainer doesn't run bitcoinDifficulty module due to specifics
7+
# of LightRelay running on testnet (GoerliLightRelay). This setup is running
8+
# the `bitcoinDifficulty` module of maintainer connected to Bitcoin mainnet.
9+
nameSuffix: -staging
10+
11+
commonLabels:
12+
app: keep-maintainer-staging
13+
type: bitcoinDifficulty
14+
network: goerli
15+
16+
images:
17+
- name: keep-maintainer
18+
newName: gcr.io/keep-test-f3e0/keep-client
19+
newTag: latest
20+
21+
configMapGenerator:
22+
- name: keep-maintainer-config
23+
behavior: merge
24+
literals:
25+
- network=testnet
26+
- electrum-api-url=wss://electrumx-server.tbtc.network:8443
27+
files:
28+
- .secret/keep-maintainer-keyfile
29+
30+
secretGenerator:
31+
- name: keep-maintainer-eth-account-password
32+
files:
33+
- .secret/keep-maintainer-password
34+
35+
patches:
36+
- target:
37+
kind: StatefulSet
38+
name: keep-maintainer
39+
patch: |-
40+
- op: add
41+
path: /spec/template/spec/containers/0/args/-
42+
value: --bitcoinDifficulty
43+
- op: replace
44+
path: /spec/template/spec/containers/0/env/0/valueFrom/secretKeyRef/name
45+
value: eth-network-goerli
46+
47+
generatorOptions:
48+
disableNameSuffixHash: true
49+
annotations:
50+
note: generated

0 commit comments

Comments
 (0)