Skip to content

Commit

Permalink
fix: fix bee config options (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandot authored Feb 15, 2023
1 parent 2704a60 commit 8ddc7ef
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 30 deletions.
4 changes: 0 additions & 4 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,10 @@ bee-configs:
debug-api-addr: ":1635"
debug-api-enable: true
full-node: true
gateway-mode: false
nat-addr: ""
mainnet: false
network-id: 12345
p2p-addr: ":1634"
p2p-quic-enable: false
p2p-ws-enable: false
password: "beekeeper"
payment-early-percent: 50
Expand All @@ -135,7 +133,6 @@ bee-configs:
staking-address: "0xc0332d319b73cfeed89511fe1a83add141bd6f12"
redistribution-address: "0x56e442f99cafd7c890c404c1f8c16d38a569e41a"
resolver-options: ""
standalone: false
chequebook-enable: true
swap-enable: true
swap-endpoint: "ws://geth-swap.geth-swap:8546"
Expand All @@ -145,7 +142,6 @@ bee-configs:
tracing-enabled: true
tracing-endpoint: "tempo-tempo-distributed-distributor.observability:6831"
tracing-service-name: "bee"
transaction: ""
verbosity: 5
welcome-message: "Welcome to the Swarm, you are Bee-ing connected!"
allow-private-cidrs: true
Expand Down
4 changes: 0 additions & 4 deletions config/local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,10 @@ bee-configs:
debug-api-addr: ":1635"
debug-api-enable: true
full-node: true
gateway-mode: false
mainnet: false
nat-addr: ""
network-id: 12345
p2p-addr: ":1634"
p2p-quic-enable: false
p2p-ws-enable: false
password: "beekeeper"
payment-early-percent: 50
Expand All @@ -186,14 +184,12 @@ bee-configs:
restricted: false
token-encryption-key: ""
admin-password: ""
standalone: false
chequebook-enable: true
swap-enable: true
swap-endpoint: "ws://geth-swap:8546"
swap-factory-address: "0x09ad42a7d020244920309ffa14ea376dd2d3b7d5"
swap-legacy-factory-addresses: "0x657241f4494a2f15ba75346e691d753a978c72df"
swap-initial-deposit: 500000000000000000
transaction: ""
verbosity: 5
welcome-message: "Welcome to the Swarm, this is a local cluster!"
warmup-time: 0s
Expand Down
4 changes: 0 additions & 4 deletions config/testnet-giant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ bee-configs:
debug-api-addr: ":1635"
debug-api-enable: true
full-node: true
gateway-mode: false
mainnet: false
nat-addr: ""
network-id: 10
p2p-addr: ":1634"
p2p-quic-enable: false
p2p-ws-enable: false
password: "beekeeper"
payment-early-percent: 50
Expand All @@ -104,7 +102,6 @@ bee-configs:
postage-stamp-address: ""
price-oracle-address: ""
resolver-options: "https://cloudflare-eth.com"
standalone: false
chequebook-enable: true
swap-enable: true
swap-endpoint: "ws://private-goerli-geth.private-goerli-geth:8546"
Expand All @@ -114,7 +111,6 @@ bee-configs:
tracing-enabled: false
tracing-endpoint: "tempo-tempo-distributed-distributor.observability:6831"
tracing-service-name: "bee"
transaction: ""
verbosity: 5
welcome-message: "Welcome to the giant!"
allow-private-cidrs: true
Expand Down
4 changes: 0 additions & 4 deletions config/testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,10 @@ bee-configs:
debug-api-addr: ":1635"
debug-api-enable: true
full-node: true
gateway-mode: false
nat-addr: ""
mainnet: false
network-id: 10
p2p-addr: ":1634"
p2p-quic-enable: false
p2p-ws-enable: false
password: "beekeeper"
payment-early-percent: 50
Expand All @@ -106,7 +104,6 @@ bee-configs:
postage-stamp-address: ""
price-oracle-address: ""
resolver-options: "https://cloudflare-eth.com"
standalone: false
chequebook-enable: true
swap-enable: true
swap-endpoint: "ws://private-goerli-geth.private-goerli-geth:8546"
Expand All @@ -116,7 +113,6 @@ bee-configs:
tracing-enabled: false
tracing-endpoint: "tempo-tempo-distributed-distributor.observability:6831"
tracing-service-name: "bee"
transaction: ""
verbosity: 5
welcome-message: "Welcome to the Testnet!"
allow-private-cidrs: true
Expand Down
4 changes: 0 additions & 4 deletions pkg/config/bee.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ type BeeConfig struct {
DebugAPIAddr *string `yaml:"debug-api-addr"`
DebugAPIEnable *bool `yaml:"debug-api-enable"`
FullNode *bool `yaml:"full-node"`
GatewayMode *bool `yaml:"gateway-mode"`
NATAddr *string `yaml:"nat-addr"`
Mainnet *bool `yaml:"mainnet"`
NetworkID *uint64 `yaml:"network-id"`
P2PAddr *string `yaml:"p2p-addr"`
P2PQUICEnable *bool `yaml:"p2p-quic-enable"`
P2PWSEnable *bool `yaml:"pwp-ws-enable"`
Password *string `yaml:"password"`
PaymentEarly *uint64 `yaml:"payment-early-percent"`
Expand All @@ -50,7 +48,6 @@ type BeeConfig struct {
Restricted *bool `yaml:"restricted"`
TokenEncryptionKey *string `yaml:"token-encryption-key"`
AdminPassword *string `yaml:"admin-password"`
Standalone *bool `yaml:"standalone"`
ChequebookEnable *bool `yaml:"chequebook-enable"`
SwapEnable *bool `yaml:"swap-enable"`
SwapEndpoint *string `yaml:"swap-endpoint"`
Expand All @@ -61,7 +58,6 @@ type BeeConfig struct {
TracingEnabled *bool `yaml:"tracing-enabled"`
TracingEndpoint *string `yaml:"tracing-endpoint"`
TracingServiceName *string `yaml:"tracing-service-name"`
Transaction *string `yaml:"transaction"`
Verbosity *uint64 `yaml:"verbosity"`
WelcomeMessage *string `yaml:"welcome-message"`
WarmupTime *time.Duration `yaml:"warmup-time"`
Expand Down
4 changes: 0 additions & 4 deletions pkg/orchestration/k8s/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ db-disable-seeks-compaction: {{.DbDisableSeeksCompaction}}
debug-api-addr: {{.DebugAPIAddr}}
debug-api-enable: {{.DebugAPIEnable}}
full-node: {{.FullNode}}
gateway-mode: {{.GatewayMode}}
mainnet: {{.Mainnet}}
nat-addr: {{.NATAddr}}
network-id: {{.NetworkID}}
p2p-addr: {{.P2PAddr}}
p2p-quic-enable: {{.P2PQUICEnable}}
p2p-ws-enable: {{.P2PWSEnable}}
password: {{.Password}}
payment-early-percent: {{.PaymentEarly}}
Expand All @@ -49,7 +47,6 @@ resolver-options: {{.ResolverOptions}}
restricted: {{.Restricted}}
token-encryption-key: {{.TokenEncryptionKey}}
admin-password: {{.AdminPassword}}
standalone: {{.Standalone}}
chequebook-enable: {{.ChequebookEnable}}
swap-enable: {{.SwapEnable}}
swap-endpoint: {{.SwapEndpoint}}
Expand All @@ -60,7 +57,6 @@ swap-initial-deposit: {{.SwapInitialDeposit}}
tracing-enable: {{.TracingEnabled}}
tracing-endpoint: {{.TracingEndpoint}}
tracing-service-name: {{.TracingServiceName}}
transaction: {{.Transaction}}
verbosity: {{.Verbosity}}
welcome-message: {{.WelcomeMessage}}
warmup-time: {{.WarmupTime}}
Expand Down
3 changes: 1 addition & 2 deletions pkg/orchestration/k8s/nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ func (g *NodeGroup) PregenerateSwarmKey(ctx context.Context, name string) (err e
return err
}

if n.Config().Transaction == "" && (!n.Config().SwapEnable || !n.Config().ChequebookEnable) {
if !n.Config().SwapEnable || !n.Config().ChequebookEnable {
var swarmKey string

if n.Config().ClefSignerEnable {
Expand Down Expand Up @@ -771,7 +771,6 @@ func (g *NodeGroup) PregenerateSwarmKey(ctx context.Context, name string) (err e
}

time.Sleep(10 * time.Second)
n.Config().Transaction = txHash
g.logger.Infof("overlay Ethereum address %s for node %s attested successfully: transaction: %s", key.Address, name, txHash)
}
return
Expand Down
4 changes: 0 additions & 4 deletions pkg/orchestration/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,10 @@ type Config struct {
DebugAPIAddr string // debug HTTP API listen address
DebugAPIEnable bool // enable debug HTTP API
FullNode bool // cause the node to start in full mode
GatewayMode bool // disable a set of sensitive features in the api
Mainnet bool // enable mainnet
NATAddr string // NAT exposed address
NetworkID uint64 // ID of the Swarm network
P2PAddr string // P2P listen address
P2PQUICEnable bool // enable P2P QUIC transport
P2PWSEnable bool // enable P2P WebSocket transport
Password string // password for decrypting keys
PaymentEarly uint64 // amount in BZZ below the peers payment threshold when we initiate settlement
Expand All @@ -116,7 +114,6 @@ type Config struct {
Restricted bool // start node in restricted mode
TokenEncryptionKey string // username for API authentication
AdminPassword string // password hash for API authentication
Standalone bool // whether we want the node to start with no listen addresses for p2p
ChequebookEnable bool // enable chequebook
SwapEnable bool // enable swap
SwapEndpoint string // swap ethereum blockchain endpoint
Expand All @@ -130,7 +127,6 @@ type Config struct {
TracingEnabled bool // enable tracing
TracingEndpoint string // endpoint to send tracing data
TracingServiceName string // service name identifier for tracing
Transaction string // proof-of-identity transaction hash
Verbosity uint64 // log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace
WelcomeMessage string // send a welcome message string during handshakes
WarmupTime time.Duration // warmup time pull/pushsync protocols
Expand Down

0 comments on commit 8ddc7ef

Please sign in to comment.