Skip to content

Commit c14daa5

Browse files
authored
Merge pull request #1463 from 0chain/feature/enterprise-blobber
Enterprise blobber
2 parents f3eb60b + ec707f3 commit c14daa5

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

code/go/0chain.net/blobbercore/config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ type Config struct {
156156
// AutomacitUpdate Whether to automatically update blobber updates to blockchain
157157
AutomaticUpdate bool
158158
BlobberUpdateInterval time.Duration
159+
160+
IsEnterprise bool
159161
}
160162

161163
/*Configuration of the system */
@@ -298,6 +300,8 @@ func ReadConfig(deploymentMode int) {
298300
Configuration.CommitLimitMonthly = viper.GetInt64("rate_limiters.commit_limit_monthly")
299301
Configuration.CommitLimitDaily = viper.GetInt64("rate_limiters.commit_limit_daily")
300302
Configuration.CommitZeroLimitDaily = viper.GetInt64("rate_limiters.commit_zero_limit_daily")
303+
304+
Configuration.IsEnterprise = viper.GetBool("is_enterprise")
301305
}
302306

303307
// StorageSCConfiguration will include all the required sc configs to operate blobber

code/go/0chain.net/blobbercore/handler/protocol.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ func getStorageNode() (*transaction.StorageNode, error) {
6666
sn.StakePoolSettings.NumDelegates = config.Configuration.NumDelegates
6767
sn.StakePoolSettings.ServiceCharge = config.Configuration.ServiceCharge
6868

69+
sn.IsEnterprise = config.Configuration.IsEnterprise
70+
6971
return sn, nil
7072
}
7173

code/go/0chain.net/core/transaction/entity.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ type StorageNode struct {
7272
Capacity int64 `json:"capacity"`
7373
PublicKey string `json:"-"`
7474
StakePoolSettings StakePoolSettings `json:"stake_pool_settings"`
75+
IsEnterprise bool `json:"is_enterprise"`
7576
}
7677

7778
type BlobberAllocation struct {

config/0chain_blobber.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ write_price: 0.025 # token / GB / time_unit for writing
1616
price_in_usd: false
1717
price_worker_in_hours: 12
1818

19+
is_enterprise: false
20+
1921
# update_allocations_interval used to refresh known allocation objects from SC
2022
update_allocations_interval: 60m
2123

0 commit comments

Comments
 (0)