ethersphere / bee

Bee is a Swarm client implemented in Go. It’s the basic building block for the Swarm network: a private; decentralized; and self-sustaining network for permissionless publishing and access to your (application) data.
https://www.ethswarm.org
BSD 3-Clause "New" or "Revised" License
1.45k stars 338 forks source link

Panic error when running "bee printconfig" #4646

Closed NoahMaizels closed 5 months ago

NoahMaizels commented 5 months ago

⚠️ Support requests in an issue-format will be closed immediately. For support, go to Swarm's Discord.

Context

Ran bee printconfig after upgrading node to 2.0, and got a panic error:

Summary

noah@noah-2:~$ bee printconfig
# bcrypt hash of the admin password to get the security token
admin-password: ""
# allow to advertise private CIDRs to the public network
allow-private-cidrs: false
# HTTP API listen address
api-addr: :1633
# chain block time
block-time: "15"
# rpc blockchain endpoint
blockchain-rpc-endpoint: ""
# initial nodes to connect to
bootnode: []
# cause the node to always accept incoming connections
bootnode-mode: false
# cache capacity in chunks, multiply by 4096 to get approximate capacity in bytes
cache-capacity: "1000000"
# enable forwarded content caching
cache-retrieval: true
# enable chequebook
chequebook-enable: true
# enable clef signer
clef-signer-enable: false
# clef signer endpoint
clef-signer-endpoint: ""
# blockchain address to use from clef signer
clef-signer-ethereum-address: ""
# config file (default is $HOME/.bee.yaml)
config: /home/noah/.bee.yaml
# origins with CORS headers enabled
cors-allowed-origins: []
# data directory
data-dir: /home/noah/.bee
# size of block cache of the database in bytes
db-block-cache-capacity: "33554432"
# disables db compactions triggered by seeks
db-disable-seeks-compaction: true
# number of open files allowed by database
db-open-files-limit: "200"
# size of the database write buffer in bytes
db-write-buffer-size: "33554432"
# debug HTTP API listen address
debug-api-addr: :1635
# enable debug HTTP API
debug-api-enable: false
# cause the node to start in full mode
full-node: false
# help for printconfig
help: false
# triggers connect to main net bootnodes.
mainnet: true
# NAT exposed address
nat-addr: ""
# suggester for target neighborhood
neighborhood-suggester: https://api.swarmscan.io/v1/network/neighborhoods/suggestion
# ID of the Swarm network
network-id: "1"
# P2P listen address
p2p-addr: :1634
# enable P2P WebSocket transport
p2p-ws-enable: false
# password for decrypting keys
password: ""
# path to a file that contains password for decrypting keys
password-file: ""
# percentage below the peers payment threshold when we initiate settlement
payment-early-percent: 50
# threshold in BZZ where you expect to get paid from your peers
payment-threshold: "13500000"
# excess debt above payment threshold in percentages where you disconnect from your peer
payment-tolerance-percent: 25
# postage stamp contract address
postage-stamp-address: ""
# postage stamp contract start block number
postage-stamp-start-block: "0"
# enable pprof mutex profile
pprof-mutex: false
# enable pprof block profile
pprof-profile: false
# price oracle contract address
price-oracle-address: ""
# redistribution contract address
redistribution-address: ""
# ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url
resolver-options: []
# enable permission check on the http APIs
restricted: false
# forces the node to resync postage contract data
resync: false
# staking contract address
staking-address: ""
# lru memory caching capacity in number of statestore entries
statestore-cache-capacity: "100000"
# protect nodes from getting kicked out on bootnode
static-nodes: []
# enable storage incentives feature
storage-incentives-enable: true
# gas price in wei to use for deployment and funding
swap-deployment-gas-price: ""
# enable swap
swap-enable: true
# swap blockchain endpoint
swap-endpoint: ""
# swap factory addresses
swap-factory-address: ""
# initial deposit if deploying a new chequebook
swap-initial-deposit: "0"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1251159]

goroutine 1 [running]:
github.com/ethersphere/bee/v2/cmd/bee/cmd.(*command).initConfigurateOptionsCmd.func1(0xc0001a6300?, {0x2773c40?, 0x4?, 0x15ad9fc?})
        github.com/ethersphere/bee/v2/cmd/bee/cmd/configurateoptions.go:39 +0x1f9
github.com/spf13/cobra.(*Command).execute(0xc00001b400, {0x2773c40, 0x0, 0x0})
        github.com/spf13/cobra@v1.5.0/command.go:872 +0x6aa
github.com/spf13/cobra.(*Command).ExecuteC(0xc000287400)
        github.com/spf13/cobra@v1.5.0/command.go:990 +0x38d
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.5.0/command.go:918
github.com/ethersphere/bee/v2/cmd/bee/cmd.(*command).Execute(...)
        github.com/ethersphere/bee/v2/cmd/bee/cmd/cmd.go:173
github.com/ethersphere/bee/v2/cmd/bee/cmd.Execute()
        github.com/ethersphere/bee/v2/cmd/bee/cmd/cmd.go:182 +0x33
main.main()
        github.com/ethersphere/bee/v2/cmd/bee/main.go:15 +0x13

Expected behavior

There should be no error when running printconfig.