Skip to content
Merged
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
6 changes: 6 additions & 0 deletions code/go/0chain.net/blobber/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,11 @@ func setupConfig() {
}

transaction.MinConfirmation = config.Configuration.MinConfirmation

config.Configuration.Name = viper.GetString("name")
config.Configuration.WebsiteUrl = viper.GetString("website_url")
config.Configuration.LogoUrl = viper.GetString("logo_url")
config.Configuration.Description = viper.GetString("description")

fmt.Print(" [OK]\n")
}
9 changes: 9 additions & 0 deletions code/go/0chain.net/blobbercore/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ type Config struct {
MinSubmit int
// MinConfirmation minial confirmation from sharders
MinConfirmation int

// Name the name of blobber
Name string
// LogoUrl logo of blobber
LogoUrl string
// Description general information of blobber
Description string
// WebsiteUrl the website of blobber (if any)
WebsiteUrl string
}

/*Configuration of the system */
Expand Down
5 changes: 5 additions & 0 deletions code/go/0chain.net/blobbercore/handler/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ func getStorageNode() (*transaction.StorageNode, error) {
sn.StakePoolSettings.MaxStake = config.Configuration.MaxStake
sn.StakePoolSettings.NumDelegates = config.Configuration.NumDelegates
sn.StakePoolSettings.ServiceCharge = config.Configuration.ServiceCharge

sn.Information.Name = config.Configuration.Name
sn.Information.Description = config.Configuration.Description
sn.Information.WebsiteUrl = config.Configuration.WebsiteUrl
sn.Information.LogoUrl = config.Configuration.LogoUrl
return sn, nil
}

Expand Down
8 changes: 8 additions & 0 deletions code/go/0chain.net/core/transaction/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ type StorageNodeGeolocation struct {
Longitude float64 `json:"longitude"`
}

type Info struct {
Name string `json:"name"`
WebsiteUrl string `json:"website_url"`
LogoUrl string `json:"logo_url"`
Description string `json:"description"`
}

type StorageNode struct {
ID string `json:"id"`
BaseURL string `json:"url"`
Expand All @@ -81,6 +88,7 @@ type StorageNode struct {
Capacity int64 `json:"capacity"`
PublicKey string `json:"-"`
StakePoolSettings StakePoolSettings `json:"stake_pool_settings"`
Information Info `json:"info"`
}

type BlobberAllocation struct {
Expand Down
7 changes: 7 additions & 0 deletions config/0chain_blobber.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ logging:
level: "error"
console: true # printing log to console is only supported in development mode

info:
name: my_blobber
logo_url: https://google.com
description: this is my test blobber
website_url: https://google.com


# for testing
# 500 MB - 536870912
# 1 GB - 1073741824
Expand Down