keep-network / keep-core

The smart contracts and reference client behind the Keep network
https://keep.network
MIT License
118 stars 73 forks source link

Kubernetes configuration for Keep Maintainer bot #3689

Closed nkuba closed 1 year ago

nkuba commented 1 year ago

In this PR we update the configuration of keep-client maintainer deployment running in keep-test and keep-prd.

Template

We define a template for running the keep-client in maintainer mode with all the available modules:

keep-prd

In keep-prd cluster we replaced the previously running Bitcoin difficulty maintainer with a new instance of all-in-one maintainer bot.

keep-test

In keep-test we have to adjust the setup to work correctly with the LightRelay contract.

Bitcoin Relay used by the tTBTC system on testnet environment is an optimized version of the Light Relay implemented by GoerliLightRelay contract. The reason the Light Relay had to be modified for testnet is that on Bitcoin testnet difficulty often drops to 1, which makes the blocks validation on such change impossible to the regular Light Relay contract.

The GoerliLightRelay version doesn't require a maintainer bot to submit block headers on difficulty change. It accepts ad-hoc difficulty alignment according to the tests needs.

For these reasons, we are running two instances of keep-maintainer.

The first instance keep-maintainer is connected to Bitcoin testnet and runs spv and walletCoordination modules.

The second instance keep-maintainer-staging is connected to Bitcoin mainnet and runs only bitcoinDifficulty module.

The test environment setup for the relay contract is subject to change in the coming weeks, so the configuration defined in this PR for the keep-test is expected to be modified then.