A tool to monitor both the Fuel and Ethereum chains and the bridge activities occuring between the two
├── fuel_watcher: handles a thread that watches the Fuel chain
│ ├── fuel_chain: reads basic data from the Fuel chain
│ ├── fungible_token_contract: handles monitoring events related to the bridge fungible token contracts
├── ethereum_watcher: handles a thread that watches the Ethereum chain
│ ├── ethereum_chain: reads basic data from the Ethereum chain
│ ├── state_contract: handles interacting with and monitoring events from the Fuel chain state contract
│ ├── portal_contract: handles interacting with and monitoring events from the Fuel message portal contract
│ ├── gateway_contract: handles interacting with and monitoring events from the ERC-20 gateway contract
├── ethereum_actions: handles interactions with the Ethereum chain (pausing contracts)
├── alerts: handles logging and pushing out info/alerts
├── config: reads configuration set in the watchtower_config.json file
An example config file can be found at watchtower_config.json.example. The following options are available for configuration.
fuel_graphql: <fuel chain graphql endpoint>
ethereum_rpc: <ethereum chain rpc endpoint>
ethereum_wallet_key: <optional private key for an ethereum wallet>
state_contract_address: <address of the fuel chain state contract>
portal_contract_address: <address of the fuel message portal contract>
gateway_contract_address: <address of the ERC20 gateway contract>
duplicate_alert_delay: <delay in seconds before pushing the same alert>
fuel_client_watcher: {
connection_alert: {
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
}
block_production_alert: {
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
}
portal_withdraw_alerts: [{
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
time_frame: <window of time to check for threshold>
amount: <threshold value which triggers the alert>
}
<aditional withdraw alert configs>
]
gateway_withdraw_alerts: [{
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
token_name: <name of token for reporting purposes>
token_address: <address of the fuel token to monitor>
time_frame: <window of time to check for threshold>
amount: <threshold value which triggers the alert>
}
<aditional withdraw alert configs>
]
}
ethereum_client_watcher: {
connection_alert: {
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
}
block_production_alert: {
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
max_block_time: <max seconds between blocks which triggers alert>
}
account_funds_alert: {
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
min_balance: <min balance which will trigger alert>
}
invalid_state_commit_alert: {
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
}
portal_deposit_alerts: [{
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
time_frame: <window of time to check for threshold>
amount: <threshold value which triggers the alert>
}
<aditional deposit alert configs>
]
gateway_deposit_alerts: [{
alert_level: <level of alert [None, Info, Warn, Error]>
alert_action: <(optional) action to take [None, PauseState, PauseGateway, PausePortal, PauseAll]>
token_name: <name of token for reporting purposes>
token_address: <address of the ethereum token to monitor>
time_frame: <window of time to check for threshold>
amount: <threshold value which triggers the alert>
}
<aditional deposit alert configs>
]
}
The alerts module is responsible for pushing alerts through to some monitoring service as well as logging data to a log file. Logging is configured in logging_config.yaml.
Download Details:
Author: FuelLabs
Official Github: https://github.com/FuelLabs/fuel-canary-watchtower
License: Apache-2.0 license