Skip to content
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

Operator balance monitoring #2111

Merged
merged 18 commits into from
Nov 18, 2020
Merged

Operator balance monitoring #2111

merged 18 commits into from
Nov 18, 2020

Conversation

lukasz-zimnoch
Copy link
Member

@lukasz-zimnoch lukasz-zimnoch commented Oct 6, 2020

Closes #2163
Closes #2171
Refs: keep-network/keep-ecdsa#551
Depends on: keep-network/keep-common#51
Depends on: keep-network/keep-common#59

Here we implement a simple balance monitor and enable it for the operator account balance. The monitoring routine checks the balance every 10 minutes and display a log error in case the balance falls below a threshold value passed from the config file.

Implemented an ethereum balance monitor
which introduces the possibility of checking
the ethereum balance for an address and displaying
an error in case the balance falls below the
given alert threshold.
Updated in order to get `BalanceAlertThreshold`
property introduced by that version.
Enable the monitoring process for operator's
account balance with an alert threshold
passed from the config file.
@pdyraga pdyraga added this to the v1.4.0 milestone Nov 16, 2020
configs/config.toml.SAMPLE Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
configs/config.toml.SAMPLE Outdated Show resolved Hide resolved
configs/config.toml.SAMPLE Outdated Show resolved Hide resolved
pkg/chain/chain.go Outdated Show resolved Hide resolved
pkg/chain/local/local.go Outdated Show resolved Hide resolved
pkg/chain/ethereum/ethereum.go Outdated Show resolved Hide resolved
pkg/chain/ethereum/balance_monitor.go Show resolved Hide resolved
@lukasz-zimnoch
Copy link
Member Author

@pdyraga ready for the next round.

@pdyraga
Copy link
Member

pdyraga commented Nov 18, 2020

We need to add an exception to install.sh. BalanceAlertThreshold property in config.toml is converted into a float:

2020-11-18T14:07:17.271+0100	FATAL	keep-main	error reading config file: unable to decode .toml file [/Users/piotr/go/src/github.com/keep-network/keep-core/configs/config.local.2.toml] error [toml: cannot load TOML value of type float64 into a Go integer]

@lukasz-zimnoch
Copy link
Member Author

BalanceAlertThreshold

Done

@pdyraga pdyraga merged commit aa4f687 into master Nov 18, 2020
@pdyraga pdyraga deleted the operator-balance-monitoring branch November 18, 2020 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include mining waiter and block counter in rate limitter Operator balance monitoring
2 participants