You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it very obvious what is enabled and disabled (explicit enabled: true, not a mix of env vars magically turning something on)
Self documenting: structured objects, descriptive names, helpful comments that explain the use case
Avoid reusing the same variable in multiple features
Defaults are visible
All features are laid out, no README.md digging
Refactoring
Separate stamp management features. Currently auto-topup and auto-dilute both purchase stamps. In code, implement strategy pattern to clean up and separate concerns. I don't think mutually exclusive features should exist, nor should a feature do partially what the other feature does.
New features
Ceilings
Some situations should require user interaction, e.g. when a stamp grows in depth too much, or if an operation is too costly. E.g. the example config of stamp.global.maxCost: 1 BZZ
Selective or inclusive stamp management
Currently we only consider stamps valid if they match the configured amount and depth. IMO we should extend it to either allow all, or mark stamps with the label property, and manage those in all modes.
Units in config
e.g. 10s, 2m, 80%, 1BZZ
Test configuration
e.g. gateway-proxy -t (nginx) should validate and print in a human friendly way what the configuration is
Deploy configuration on first run
Have a default path for it
Can be specified by -c or --config for cloud deployment
Not mandatory, (re)created with defaults when it does not exist upon launching, so no setup required to "just start" the app
The text was updated successfully, but these errors were encountered:
# [Connection to the Bee node]bee:
api: http://localhost:1633debugApi: http://localhost:1635# [Server settings]server:
port: 3000# Required for the bzz.link feature.# TODO: #1 Explain bzz.link feature# TODO: #2 Do we really need it? Can't we just rely on subdomains?hostname: localhost# Require authentication header for all requests.# This effectively makes the gateway private.## May be left empty to disable authentication.authSecret: ''# Possible values: debug | info | warn | errorlogLevel: info# [Stamp management]# Periodically checks for valid stamps.## A stamp is considered valid, when it has enough TTL, capacity# and its amount and depth parameters match with this config.stamp:
# Run periodical automatic postage stamp management job this often.checkFrequency: 60s# Possible values: hardcoded | autobuy | autoextend# May be left empty to disable postage stamp management.mode: ''# [Hardcoded mode settings]hardcoded:
# Always use this batch IDbatchId: ''# [Autobuy mode settings]autobuy:
# If there are no valid stamps, purchase one with the following amount and depthamount: 20kdepth: 22# Trigger purchase when TTL is below this.ttlThreshold: 15m# Trigger purchase when usage is above this.usageThreshold: 70%# [Autoextend mode settings]autoextend:
# If there are no stamps to extend, purchase one with the following amount and depthdefaultAmount: 20kdefaultDepth: 22# Enable diluting the postage stamp to increase its depth and therefor capacityextendCapacity: true# Enable topping up the postage stamp to increase its amount and therefor TTLextendTtl: true# Extend stamp by this amountextendAmount: 20k# Trigger topup when TTL is below this.ttlThreshold: 15m# Trigger dilution when usage is above this.usageThreshold: 70%# [Content reupload]# Periodically checks reachability of locally pinned content.## Reuploads when cannot be reached over the network# Uses the Bee stewardship API.## May be used to ensure self-hosted content stays online.## TODO: "self-hosted" is probably a wrong term herecontentReupload:
enabled: falsereuploadFrequency: 6h# [Miscellaneous features]# Enables resolving CIDs in place of Swarm hashes.## e.g. http://bah5acgzaxtfhomziqdigaikb3cfnotehagiuzyprlr6w7uo7lhl3f6ngyq7a.localhost:3000# will convert the CID to Swarm hashcid: true# Enables resolving ENS domains in place of Swarm hashes.## e.g. http://swarm.localhost:3000 will find bzz:// content at swarm.ethens: true# Adds 'x-bee-node' HTTP header to all responses, which# exposes the hash of the Bee node overlay address.## Useful for identifying individual Bee nodes in a cluster# without exposing identity.exposeHashedIdentity: false# Removes swarm-pin HTTP header from requests, in order# to avoid filling up disk space by public requests.## Useful when running as a public gateway.removePinHeader: true
Configuration
Considerations:
enabled: true
, not a mix of env vars magically turning something on)Refactoring
Separate stamp management features. Currently auto-topup and auto-dilute both purchase stamps. In code, implement strategy pattern to clean up and separate concerns. I don't think mutually exclusive features should exist, nor should a feature do partially what the other feature does.
New features
Ceilings
Some situations should require user interaction, e.g. when a stamp grows in depth too much, or if an operation is too costly. E.g. the example config of
stamp.global.maxCost: 1 BZZ
Selective or inclusive stamp management
Currently we only consider stamps valid if they match the configured
amount
anddepth
. IMO we should extend it to either allow all, or mark stamps with thelabel
property, and manage those in all modes.Units in config
e.g.
10s
,2m
,80%
,1BZZ
Test configuration
e.g.
gateway-proxy -t
(nginx) should validate and print in a human friendly way what the configuration isDeploy configuration on first run
-c
or--config
for cloud deploymentThe text was updated successfully, but these errors were encountered: