Expand description
This crate contains all the Strategies for HOPRd. Strategies are vital for (partial) automation of ticket and HOPR channel operations during node runtime.
HOPRd can be configured to use any of the above strategies.
§Configuring strategies in HOPRd
There are two ways of configuring strategies in HOPRd: via CLI and via a YAML config file.
The configuration through CLI allows only fairly primitive single-strategy setting, through the defaultStrategy
parameter. It can be set to any of the above strategies, however, the strategy parameters are not further
configurable via the CLI and will always have their default values.
In addition, if the disableTicketAutoRedeem CLI argument is false, the default Auto Redeem strategy is added
to the strategy configured via the defaultStrategy argument (they execute together as Multi strategy).
For more complex strategy configurations, the YAML configuration method is recommended via the strategy YAML
section. In this case, the top-most strategy is always assumed to be Multi strategy:
strategy:
on_fail_continue: true
allow_recursive: true
execution_interval: 60
strategies:
- !AutoFunding
funding_amount: 20Modules§
- auto_
funding - Auto Funding Strategy
- auto_
redeeming - Auto Redeeming Strategy
- channel_
finalizer - errors
- strategy
- Multi Strategy
Enums§
- Strategy
- Lists all possible strategies with their respective configurations.
Functions§
- hopr_
default_ strategies - Default HOPR node strategies (in order).
- stream_
events_ to_ strategy_ with_ tick - Streams
ChainEvents,VerifiedTicketsandtickat regular time intervals as events into the givenstrategy.
Type Aliases§
- Strategy
Config - An alias for the strategy configuration type.