Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Orch blocklist CLI param #2839

Merged
merged 2 commits into from
Aug 10, 2023
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
3 changes: 2 additions & 1 deletion CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#### General

#### Broadcaster
- \#2837 Set a floor of 1.5s for accepted Orchestrator response times, regardless of segment length (@thomshutt)
- \#2837 Set a floor of 1.5s for accepted Orchestrator response times, regardless of segment length (@thomshutt)
- \#2839 Add Orchestrator blocklist CLI parameter (@mjh1)

#### Orchestrator

Expand Down
1 change: 1 addition & 0 deletions cmd/livepeer/livepeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func parseLivepeerConfig() starter.LivepeerConfig {
cfg.VerifierPath = flag.String("verifierPath", *cfg.VerifierPath, "Path to verifier shared volume")
cfg.LocalVerify = flag.Bool("localVerify", *cfg.LocalVerify, "Set to true to enable local verification i.e. pixel count and signature verification.")
cfg.HttpIngest = flag.Bool("httpIngest", *cfg.HttpIngest, "Set to true to enable HTTP ingest")
cfg.OrchBlacklist = flag.String("orchBlocklist", "", "Comma-separated list of blocklisted orchestrators")

// Transcoding:
cfg.Orchestrator = flag.Bool("orchestrator", *cfg.Orchestrator, "Set to true to be an orchestrator")
Expand Down
2 changes: 1 addition & 1 deletion cmd/livepeer/starter/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ func parseOrchBlacklist(b *string) []string {
if b == nil {
return []string{}
}
return strings.Split(*b, ",")
return strings.Split(strings.ToLower(*b), ",")
}

func validateURL(u string) (*url.URL, error) {
Expand Down
2 changes: 1 addition & 1 deletion discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (o *orchestratorPool) GetOrchestrators(ctx context.Context, numOrchestrator

isBlacklisted := func(info *net.OrchestratorInfo) bool {
for _, blacklisted := range o.orchBlacklist {
if strings.TrimPrefix(blacklisted, "0x") == hex.EncodeToString(info.Address) {
if strings.TrimPrefix(blacklisted, "0x") == strings.ToLower(hex.EncodeToString(info.Address)) {
return true
}
}
Expand Down