Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmd/beekeeper/cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,16 +396,21 @@ func setupNodeOptions(node config.ClusterNode, bConfig *orchestration.Config) or
}

const (
fundAttempts = 2
fundAttempts = 3
fundRetryDelay = 15 * time.Second
)

// fund tops the given addresses up to the configured minimum amounts, retrying
// once so that a transient RPC error does not abort the cluster setup.
// so that a transient RPC error does not abort the cluster setup.
//
// node-funder reads balances from the latest mined block and returns as soon as
// a transfer is broadcast, so a retry that runs before the previous transfer is
// mined funds the address twice. Keep the delay above the block time.
//
// A failed send can leave a later transfer queued behind a nonce gap. The retry
// that fills the gap then rebuilds that queued transfer byte for byte, and geth
// rejects it as "already known" although it gets mined. The extra attempt only
// sees the settled balances and sends nothing.
func fund(
ctx context.Context,
fundAddresses []string,
Expand Down
25 changes: 21 additions & 4 deletions config/testnet-bee-playground.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clusters:
api-insecure-tls: true
api-scheme: http
funding:
eth: 1
eth: 5
bzz: 100.0
node-groups:
bootnode:
Expand All @@ -25,15 +25,15 @@ clusters:
mode: node
bee-config: geth-playground
config: ng-bee-playground
count: 8
count: 16

# node-groups defines node groups that can be registered in the cluster
# node-groups may inherit it's configuration from already defined node-group and override specific fields from it
node-groups:
ng-bee-playground:
_inherit: default
persistence-enabled: true
image: ethersphere/bee:latest
persistence-enabled: false
image: akram951/bee:feat-per-bin-sync-rate-4000
ingress-class: "nginx-oss"
ingress-annotations:
nginx.org/client-max-body-size: "10g"
Expand All @@ -57,6 +57,7 @@ bee-configs:
network-id: 12345
p2p-addr: :1634
password: "beekeeper"
payment-threshold: 108000000
storage-incentives-enable: true
swap-enable: true
verbosity: 5
Expand Down Expand Up @@ -200,3 +201,19 @@ checks:
duration: 12h
timeout: 13h
type: smoke
pg-storage-radius:
options:
reserve-capacity: 4000
target-fill-percent: 1.03
chunks-per-upload: 512
postage-depth: 22
postage-amount: 2073600000
postage-label: storage-radius
upload-timeout: 30m
upload-wave-pause: 5s
poll-interval: 2s
min-radius-wait: 5m
dilute-depth: 32
dilute-wait: 45m
timeout: 80m
type: storage-radius
2 changes: 2 additions & 0 deletions pkg/bee/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type Client struct {
Status *StatusService
Stewardship *StewardshipService
Tags *TagsService
DebugStore *DebugStoreService
}

// NewClient constructs a new Client.
Expand Down Expand Up @@ -108,6 +109,7 @@ func newClient(apiURL *url.URL, httpClient *http.Client) (c *Client) {
c.Status = (*StatusService)(&c.service)
c.Stewardship = (*StewardshipService)(&c.service)
c.Tags = (*TagsService)(&c.service)
c.DebugStore = (*DebugStoreService)(&c.service)

return c
}
Expand Down
42 changes: 40 additions & 2 deletions pkg/bee/api/debugstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,49 @@ import (
type DebugStoreService service

// DebugStore represents DebugStore's response
type DebugStore map[string]int
type DebugStore struct {
Upload UploadStat `json:"upload"`
Pinning PinningStat `json:"pinning"`
Cache CacheStat `json:"cache"`
Reserve ReserveStat `json:"reserve"`
ChunkStore ChunkStoreStat `json:"chunkStore"`
}

// UploadStat reports the upload store, which holds chunks the pusher has not yet
// delivered to the network. PendingUpload is that undelivered backlog.
type UploadStat struct {
TotalUploaded int `json:"totalUploaded"`
TotalSynced int `json:"totalSynced"`
PendingUpload int `json:"pendingUpload"`
}

type PinningStat struct {
TotalCollections int `json:"totalCollections"`
TotalChunks int `json:"totalChunks"`
}

type CacheStat struct {
Size int `json:"size"`
Capacity int `json:"capacity"`
}

type ReserveStat struct {
SizeWithinRadius int `json:"sizeWithinRadius"`
TotalSize int `json:"totalSize"`
Capacity int `json:"capacity"`
LastBinIDs []uint64 `json:"lastBinIDs"`
Epoch uint64 `json:"epoch"`
}

type ChunkStoreStat struct {
TotalChunks int `json:"totalChunks"`
SharedSlots int `json:"sharedSlots"`
ReferenceCount int `json:"referenceCount"`
}

// GetDebugStore gets db indices
func (d *DebugStoreService) GetDebugStore(ctx context.Context) (DebugStore, error) {
resp := make(DebugStore)
var resp DebugStore
err := d.client.requestJSON(ctx, http.MethodGet, "/debugstore", nil, &resp)
return resp, err
}
1 change: 1 addition & 0 deletions pkg/bee/api/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type StatusResponse struct {
IsReachable bool `json:"isReachable"`
LastSyncedBlock uint64 `json:"lastSyncedBlock"`
CommittedDepth uint8 `json:"committedDepth"`
IsWarmingUp bool `json:"isWarmingUp"`
}

// Ping pings given node
Expand Down
Loading
Loading