As part of the #5011, we should be able to store user-defined values for some of the settings parameters. Non-exhaustive list of examples:
FeeSchedule per Channel
FeeSchedule per TokenNetwork
- List of Matrix Services that the node should try to connect
- Minimum REI Balance for node operation
- Maximum Gas Price/Gas Limit
- Maximum fee to pay to PFS
- Transport Parameters
Specification
Some of these settings are related to the operation of the node and we can use the already-existing settings table on sqlite, which currently only stores the version record. There are however some parameters which can and should be specified per token network and/or channel, with the value specificed on settings.py only to be used as a default. So the proposal is to create the following tables:
CREATE TABLE token_network_settings (
chain_id int NOT NULL,
token_network_id VARCHAR[32] NOT NULL,
name VARCHAR[24],
value TEXT,
UNIQUE(chain_id, token_network_id, name)
);
Likewise for per-channel settings:
CREATE TABLE token_network_settings (
chain_id int NOT NULL,
token_network_id VARCHAR[32] NOT NULL,
channel_id VARCHAR[32] NOT NULL,
name VARCHAR[24],
value TEXT,
UNIQUE(chain_id, token_network_id, chain_id, name)
);
Backwards Compatibility
Previous versions should not be affected by these new tables.
As part of the #5011, we should be able to store user-defined values for some of the settings parameters. Non-exhaustive list of examples:
FeeScheduleperChannelFeeScheduleperTokenNetworkSpecification
Some of these settings are related to the operation of the node and we can use the already-existing
settingstable on sqlite, which currently only stores theversionrecord. There are however some parameters which can and should be specified per token network and/or channel, with the value specificed on settings.py only to be used as a default. So the proposal is to create the following tables:Likewise for per-channel settings:
Backwards Compatibility
Previous versions should not be affected by these new tables.