Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Improve Swarm configuration - command-line flags, config file, env vars #1143

@nonsense

Description

@nonsense

Swarm configuration is a bit messy right now. We have to fix it.

  1. Help messages are confusing, for example:
   --keystore                                    Directory for the keystore (default = inside the datadir)
   --store.path value                            Path to leveldb chunk DB (default <$GETH_ENV_DIR>/swarm/bzz-<$BZZ_KEY>/chunks) [$SWARM_STORE_PATH]
   --store.size value                            Number of chunks (5M is roughly 20-25GB) (default 5000000) (default: 0) [$SWARM_STORE_CAPACITY]
   --store.cache.size value                      Number of recent chunks cached in memory (default 5000) (default: 0) [$SWARM_STORE_CACHE_CAPACITY]
   --bzznetworkid value               Network identifier (integer, default 3=swarm testnet) (default: 0) [$SWARM_NETWORK_ID]
   --sync-update-delay value          Duration for sync subscriptions update after no new peers are added (default 15s) (default: 0s) [$SWARM_ENV_SYNC_UPDATE_DELAY]
  1. Environment variables are not always picked up, or missing - (found a few with the unused tool). I think we should actually get rid of environment variables altogether.
cmd/swarm/config.go:77:2: const SWARM_ENV_BOOTNODES is unused (U1000)
cmd/swarm/config.go:78:2: const SWARM_ENV_PSS_ENABLE is unused (U1000)
  1. The config file <-> command line mapping is pretty weird, there are several settings that don't get picked up correctly... some settings don't get picked up, some are missing, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions