Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
07fe301
wip updates
magik6k Apr 11, 2025
0626b09
remove lassie
magik6k Apr 11, 2025
f0b9ce2
fix external offload ptr handling
magik6k Apr 23, 2025
58d7f82
optional external offload
magik6k Apr 23, 2025
1b95411
Config manager
magik6k Apr 24, 2025
8162ecb
move s3 config
magik6k Apr 25, 2025
cd578bd
builtin http support
magik6k Apr 25, 2025
527fc41
fix upload in gwcfg
magik6k Apr 26, 2025
5ce1ad0
fix builtin server startup
magik6k Apr 27, 2025
25b2ca9
fix it some more
magik6k Apr 27, 2025
8f1aadf
listen on the correct addr
magik6k Apr 27, 2025
2261aca
skip full checks in car server
magik6k Apr 27, 2025
b32785b
allow some concurrent uploads
magik6k Apr 27, 2025
836904f
fix build
magik6k Apr 27, 2025
2f5aa09
set retries to a sufficiently high value
magik6k Apr 27, 2025
9827649
allow later retstarts
magik6k Apr 27, 2025
0009633
fix build
magik6k Apr 27, 2025
6d98ec8
make external modules first class
magik6k Apr 29, 2025
caee900
fix localweb config check
magik6k Apr 29, 2025
207fcb7
make sure http cardata dir is created
magik6k Apr 29, 2025
2a33b0c
fix reject deal message
magik6k Apr 29, 2025
07ba062
simple car server
magik6k Apr 29, 2025
c303156
better more deal debug log
magik6k Apr 29, 2025
bf49b35
always set tx type to http when looking for providers
magik6k Apr 29, 2025
de4aeb5
Fix makeCarRequest
magik6k Apr 29, 2025
057e2a8
Merge remote-tracking branch 'origin/chore/lotus25' into agw/unstable
magik6k Apr 29, 2025
a3f2804
Merge remote-tracking branch 'origin/chore/lotus25' into agw/unstable
magik6k Apr 29, 2025
c20af97
update to recent lotus
magik6k Apr 29, 2025
f9de1d3
default crawler on
magik6k Apr 30, 2025
7bdc480
don't panic in CrawlState RPC
magik6k Apr 30, 2025
1f1856b
Don't crash webui with disabled libp2p nodes
magik6k Apr 30, 2025
08e6a3c
fix crawl default in the config
magik6k Apr 30, 2025
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/build.sh
/deploy.sh
kuri
ritool
gwcfg
settings.env
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all: kuboribs gwcfg

kuboribs:
go build -o kuri ./integrations/kuri/cmd/kuri
.PHONY: kuboribs

gwcfg:
go build -o gwcfg ./integrations/gwcfg/main.go
.PHONY: gwcfg
clean:
rm -f kuri gwcfg
44 changes: 24 additions & 20 deletions configuration/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,34 @@ var log = logging.Logger("ribs:config")
type LocalwebConfig struct {
Path string `envconfig:"EXTERNAL_LOCALWEB_PATH"`
Url string `envconfig:"EXTERNAL_LOCALWEB_URL"`

BuiltinServer bool `envconfig:"EXTERNAL_LOCALWEB_BUILTIN_SERVER" default:"true"`
ServerPort string `envconfig:"EXTERNAL_LOCALWEB_SERVER_PORT" default:"8443"`
ServerTLS bool `envconfig:"EXTERNAL_LOCALWEB_SERVER_TLS" default:"true"`

MaxConcurrentUploadsPerDeal int `envconfig:"EXTERNAL_LOCALWEB_MAX_CONCURRENT_UPLOADS_PER_DEAL" default:"15"`
}

type S3Config struct {
Endpoint string `envconfig:"EXTERNAL_S3_ENDPOINT"`
Region string `envconfig:"EXTERNAL_S3_REGION"`
AccessKey string `envconfig:"EXTERNAL_S3_ACCESS_KEY"`
SecretKey string `envconfig:"EXTERNAL_S3_SECRET_KEY"`
Token string `envconfig:"EXTERNAL_S3_TOKEN"`
Bucket string `envconfig:"EXTERNAL_S3_BUCKET"`
BucketUrl string `envconfig:"EXTERNAL_S3_BUCKET_URL"`
}

type ExternalConfig struct {
Localweb LocalwebConfig
S3 S3Config
}

type S3Config struct {
Endpoint string `envconfig:"S3_ENDPOINT"`
Region string `envconfig:"S3_REGION"`
AccessKey string `envconfig:"S3_ACCESS_KEY"`
SecretKey string `envconfig:"S3_SECRET_KEY"`
Token string `envconfig:"S3_TOKEN"`
Bucket string `envconfig:"S3_BUCKET"`
BucketUrl string `envconfig:"S3_BUCKET_URL"`
}

type CidGravityConfig struct {
ApiToken string `envconfig:"CIDGRAVITY_API_TOKEN"`
ApiEndpointGetProviders string `envconfig:"CIDGRAVITY_API_ENDPOINT_GBAP" default:"https://service.cidgravity.com/private/v1/get-best-available-providers"`
ApiEndpointGetDeals string `envconfig:"CIDGRAVITY_API_ENDPOINT_GBAP" default:"https://service.cidgravity.com/private/v1/get-on-chain-deals"`
ApiEndpointGetDeals string `envconfig:"CIDGRAVITY_API_ENDPOINT_GOCD" default:"https://service.cidgravity.com/private/v1/get-on-chain-deals"`
MaxConns int64 `envconfig:"CIDGRAVITY_MAX_CONNECTIONS" default:"4"`
AltClients []string `envconfig:"CIDGRAVITY_ALT_CLIENTS"`
AltTokens map[string]string
Expand All @@ -51,7 +60,7 @@ type RibsConfig struct {
DealCheckInterval time.Duration `envconfig:"RIBS_DEAL_CHECK_INTERVAL" default:"30s"`
DealCanSendCommand string `envconfig:"RIBS_DEAL_CAN_SEND_COMMAND" default:""`
MongoDBUri string `envconfig:"RIBS_MONGODB_URI"`
RunSpCrawler bool `envconfig:"RIBS_RUN_SP_CRAWLER" default:false`
RunSpCrawler bool `envconfig:"RIBS_RUN_SP_CRAWLER" default:"true"`
}
type DealConfig struct {
StartTime uint `envconfig:"RIBS_DEAL_START_TIME" default:"96"` // hours
Expand All @@ -66,8 +75,6 @@ type WalletConfig struct {
}

type Config struct {
Loaded bool
S3 S3Config
External ExternalConfig
CidGravity CidGravityConfig
Ribs RibsConfig
Expand All @@ -79,15 +86,13 @@ type Config struct {
var config Config

func GetConfig() *Config {
if !config.Loaded {
err := LoadConfig()
if err != nil {
panic(err)
}
}
return &config
}

func init() {
LoadConfig()
}

func LoadConfig() error {
// neew to initialize those types so they are not nil
config.Wallet.MinMarketBalance = types.NewInt(0)
Expand Down Expand Up @@ -140,7 +145,6 @@ func LoadConfig() error {
}
}

config.Loaded = true
log.Debugw("Loaded config", "config", config)
return nil
}
Loading