From 78f0b697599f652dce5d61f976bc28f0b7a23124 Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Wed, 7 Aug 2024 23:35:09 +0200 Subject: [PATCH] Revert "chore: merge master into ai-video (#3103)" This reverts commit c2da0bd8bbd70361cd676aacbe08a3b5f6097801. --- .github/workflows/build.yaml | 2 +- .gitignore | 3 - CHANGELOG.md | 130 +- Makefile | 12 +- VERSION | 2 +- cmd/devtool/devtool.go | 2 +- cmd/livepeer/livepeer.go | 15 +- cmd/livepeer/starter/starter.go | 705 ++-- cmd/livepeer/starter/starter_test.go | 92 +- cmd/livepeer_cli/wizard.go | 2 +- cmd/livepeer_cli/wizard_broadcast.go | 22 +- cmd/livepeer_cli/wizard_stats.go | 34 +- cmd/livepeer_cli/wizard_transcoder.go | 49 +- common/types.go | 2 +- core/ai.go | 40 +- core/autoconvertedprice.go | 139 - core/autoconvertedprice_test.go | 258 -- core/capabilities.go | 116 +- core/capabilities_test.go | 187 - core/core_test.go | 4 +- core/livepeernode.go | 40 +- core/livepeernode_test.go | 38 +- core/orch_test.go | 63 +- core/orchestrator.go | 8 +- ..._RoundTrip_Net-20240729130524-3824236.fail | 828 ----- core/transcoder_test.go | 4 +- discovery/db_discovery.go | 14 +- discovery/discovery_test.go | 34 +- .../chainlink/AggregatorV3Interface.abi | 1 - .../chainlink/AggregatorV3Interface.go | 394 --- .../chainlink/AggregatorV3Interface.sol | 36 - eth/pricefeed.go | 78 - eth/pricefeed_test.go | 51 - eth/roundinitializer.go | 95 +- eth/roundinitializer_test.go | 112 +- eth/watchers/pricefeedwatcher.go | 234 -- eth/watchers/pricefeedwatcher_test.go | 249 -- go.mod | 56 +- go.sum | 224 +- install_ffmpeg.sh | 231 +- monitor/census.go | 26 +- net/lp_rpc.pb.go | 3143 ++++++++++------- net/lp_rpc.proto | 13 +- net/lp_rpc_grpc.pb.go | 122 +- net/redeemer.pb.go | 1 + pm/recipient.go | 2 +- pm/sender.go | 2 +- pm/stub.go | 2 +- server/ai_session.go | 7 +- server/broadcast.go | 22 +- server/handlers.go | 109 +- server/handlers_test.go | 35 +- server/mediaserver.go | 65 +- server/mediaserver_test.go | 118 +- server/push_test.go | 2 +- server/rpc.go | 3 +- server/rpc_test.go | 35 +- server/segment_rpc.go | 20 +- server/segment_rpc_test.go | 9 +- server/selection.go | 9 +- server/selection_algorithm.go | 51 +- server/selection_algorithm_test.go | 122 +- server/selection_test.go | 8 +- test/e2e/e2e.go | 2 +- tools.go | 9 - 65 files changed, 3139 insertions(+), 5404 deletions(-) delete mode 100644 core/autoconvertedprice.go delete mode 100644 core/autoconvertedprice_test.go delete mode 100644 core/testdata/rapid/TestCapability_RoundTrip_Net/TestCapability_RoundTrip_Net-20240729130524-3824236.fail delete mode 100644 eth/contracts/chainlink/AggregatorV3Interface.abi delete mode 100644 eth/contracts/chainlink/AggregatorV3Interface.go delete mode 100644 eth/contracts/chainlink/AggregatorV3Interface.sol delete mode 100644 eth/pricefeed.go delete mode 100644 eth/pricefeed_test.go delete mode 100644 eth/watchers/pricefeedwatcher.go delete mode 100644 eth/watchers/pricefeedwatcher_test.go delete mode 100644 tools.go diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b7b8b5609a..022d397b8a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -158,7 +158,7 @@ jobs: target: - GOOS: darwin GOARCH: amd64 - runner: macos-14-large + runner: macos-latest - GOOS: darwin GOARCH: arm64 diff --git a/.gitignore b/.gitignore index 9d493d245f..ec5f509ad1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,7 @@ *.dll *.so *.dylib - -# IDE files *.vscode -*.code-workspace # Test binary, build with `go test -c` *.test diff --git a/CHANGELOG.md b/CHANGELOG.md index fb3c5d8036..8bebd6eff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,133 +1,5 @@ # Changelog -## v0.7.6 - -- [#3055](https://github.com/livepeer/go-livepeer/pull/3055) census: Rename broadcaster metrics to gateway metrics -- [#3053](https://github.com/livepeer/go-livepeer/pull/3053) cli: add `-gateway` flag and deprecate `-broadcaster` flag. -- [#3056](https://github.com/livepeer/go-livepeer/pull/3056) cli: add `-pricePerGateway` flag and deprecate `-pricePerBroadcaster` flag. -- [#3060](https://github.com/livepeer/go-livepeer/pull/3060) refactor: rename internal references from Broadcaster to Gateway - -### Breaking Changes 🚨🚨 - -### Features ⚒ - -#### General - -#### Broadcaster - -#### Orchestrator - -#### Transcoder - -### Bug Fixes 🐞 - -#### CLI - -#### General - -#### Broadcaster - -#### Orchestrator - -#### Transcoder - -## v0.7.5 - -### Breaking Changes 🚨🚨 - -### Features ⚒ - -#### General - -- [#3050](https://github.com/livepeer/go-livepeer/pull/3050) Create option to filter Os by min livepeer version used (@leszko) -- [#3029](https://github.com/livepeer/go-livepeer/pull/3029) Initialize round by any B/O who has the initializeRound flag set to true (@leszko) -- [#3040](https://github.com/livepeer/go-livepeer/pull/3040) Fix function names (@kevincatty) - -#### Broadcaster - -- [#2995](https://github.com/livepeer/go-livepeer/pull/2995) server: Allow Os price to increase up to 2x mid-session (@victorges) -- [#2999](https://github.com/livepeer/go-livepeer/pull/2999) server,discovery: Allow B to use any O in case none match maxPrice (@victorges) - -#### Orchestrator - -#### Transcoder - -### Bug Fixes 🐞 - -#### CLI - -#### General - -#### Broadcaster - -- [#2994](https://github.com/livepeer/go-livepeer/pull/2994) server: Skip redundant maxPrice check in ongoing session (@victorges) - -#### Orchestrator - -- [#3001](https://github.com/livepeer/go-livepeer/pull/3001) Fix transcoding price metrics (@leszko) - -#### Transcoder - -- [#3003](https://github.com/livepeer/go-livepeer/pull/3003) Fix issue in the transcoding layer for WebRTC input (@j0sh) - -## v0.7.4 - -### Breaking Changes 🚨🚨 - -### Features ⚒ - -#### General - -- [#2989](https://github.com/livepeer/go-livepeer/pull/2989) Revert "Update ffmpeg version" (@thomshutt) - -#### Broadcaster - -#### Orchestrator - -#### Transcoder - -### Bug Fixes 🐞 - -#### CLI - -#### General - -#### Broadcaster - -#### Orchestrator - -#### Transcoder - -## v0.7.3 - -### Breaking Changes 🚨🚨 - -### Features ⚒ - -#### General - -- [#2978](https://github.com/livepeer/go-livepeer/pull/2978) Update CUDA version from 11.x to 12.x (@leszko) -- [#2973](https://github.com/livepeer/go-livepeer/pull/2973) Update ffmpeg version (@thomshutt) -- [#2981](https://github.com/livepeer/go-livepeer/pull/2981) Add support for prices in custom currencies like USD (@victorges) - -#### Broadcaster - -#### Orchestrator - -#### Transcoder - -### Bug Fixes 🐞 - -#### CLI - -#### General - -#### Broadcaster - -#### Orchestrator - -#### Transcoder - ## v0.7.2 ### Breaking Changes 🚨🚨 @@ -690,7 +562,7 @@ Additional highlights of this release: - Support for EIP-1559 (otherwise known as type 2) Ethereum transactions which results in more predictable transaction confirmation times, reduces the chance of stuck pending transactions and avoids overpaying in gas fees. If you are interested in additional details on the implications of EIP-1559 transactions refer to this [resource](https://hackmd.io/@timbeiko/1559-resources). - An improvement in ticket parameter generation for orchestrators to prevent short lived gas price spikes on the Ethereum network from disrupting streams. - The node will automatically detect if the GPU enters an unrecoverable state and crash. The reason for crashing upon detecting an unrecoverable GPU state is that no transcoding will - be possible in this scenario until the node is restarted. We recommend node operators to setup a process for monitoring if their node is still up and starting the node if it has crashed. For reference, a bash script similar to [this one](https://gist.github.com/jailuthra/03c3d65d0bbff457cae8f9a14b4c04b7) can be used to automate restarts of the node in the event of a crash. +be possible in this scenario until the node is restarted. We recommend node operators to setup a process for monitoring if their node is still up and starting the node if it has crashed. For reference, a bash script similar to [this one](https://gist.github.com/jailuthra/03c3d65d0bbff457cae8f9a14b4c04b7) can be used to automate restarts of the node in the event of a crash. Thanks to everyone that submitted bug reports and assisted in testing! diff --git a/Makefile b/Makefile index d57d7ffc96..54ca0c6e99 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,8 @@ SHELL=/bin/bash GO_BUILD_DIR?="./" MOCKGEN=go run github.com/golang/mock/mockgen -ABIGEN=go run github.com/ethereum/go-ethereum/cmd/abigen -all: net/lp_rpc.pb.go net/redeemer.pb.go net/redeemer_mock.pb.go core/test_segment.go eth/contracts/chainlink/AggregatorV3Interface.go livepeer livepeer_cli livepeer_router livepeer_bench +all: net/lp_rpc.pb.go net/redeemer.pb.go net/redeemer_mock.pb.go core/test_segment.go livepeer livepeer_cli livepeer_router livepeer_bench net/lp_rpc.pb.go: net/lp_rpc.proto protoc -I=. --go_out=. --go-grpc_out=. $^ @@ -19,15 +18,6 @@ net/redeemer_mock.pb.go net/redeemer_grpc_mock.pb.go: net/redeemer.pb.go net/red core/test_segment.go: core/test_segment.sh core/test_segment.go -eth/contracts/chainlink/AggregatorV3Interface.go: - solc --version | grep 0.7.6+commit.7338295f - @set -ex; \ - for sol_file in eth/contracts/chainlink/*.sol; do \ - contract_name=$$(basename "$$sol_file" .sol); \ - solc --abi --optimize --overwrite -o $$(dirname "$$sol_file") $$sol_file; \ - $(ABIGEN) --abi=$${sol_file%.sol}.abi --pkg=chainlink --type=$$contract_name --out=$${sol_file%.sol}.go; \ - done - version=$(shell cat VERSION) ldflags := -X github.com/livepeer/go-livepeer/core.LivepeerVersion=$(shell ./print_version.sh) diff --git a/VERSION b/VERSION index 4d01880a7f..d5cc44d1d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.6 \ No newline at end of file +0.7.2 \ No newline at end of file diff --git a/cmd/devtool/devtool.go b/cmd/devtool/devtool.go index 61e9774fe6..7052ed0326 100644 --- a/cmd/devtool/devtool.go +++ b/cmd/devtool/devtool.go @@ -95,7 +95,7 @@ func main() { if !goodToGo { fmt.Println(` Usage: go run cmd/devtool/devtool.go setup broadcaster|transcoder [nodeIndex] - It will create initialize eth account (on private testnet) to be used for broadcaster or transcoder + It will create initilize eth account (on private testnet) to be used for broadcaster or transcoder and will create shell script (run_broadcaster_ETHACC.sh or run_transcoder_ETHACC.sh) to run it. Node index indicates how much to offset node's port. Orchestrator node's index by default is 1. For example: diff --git a/cmd/livepeer/livepeer.go b/cmd/livepeer/livepeer.go index 2653e55a6c..99c6259853 100755 --- a/cmd/livepeer/livepeer.go +++ b/cmd/livepeer/livepeer.go @@ -127,14 +127,13 @@ func parseLivepeerConfig() starter.LivepeerConfig { cfg.OrchAddr = flag.String("orchAddr", *cfg.OrchAddr, "Comma-separated list of orchestrators to connect to") cfg.OrchWebhookURL = flag.String("orchWebhookUrl", *cfg.OrchWebhookURL, "Orchestrator discovery callback URL") cfg.OrchBlacklist = flag.String("orchBlocklist", "", "Comma-separated list of blocklisted orchestrators") - cfg.OrchMinLivepeerVersion = flag.String("orchMinLivepeerVersion", *cfg.OrchMinLivepeerVersion, "Minimal go-livepeer version orchestrator should have to be selected") cfg.SelectRandWeight = flag.Float64("selectRandFreq", *cfg.SelectRandWeight, "Weight of the random factor in the orchestrator selection algorithm") cfg.SelectStakeWeight = flag.Float64("selectStakeWeight", *cfg.SelectStakeWeight, "Weight of the stake factor in the orchestrator selection algorithm") cfg.SelectPriceWeight = flag.Float64("selectPriceWeight", *cfg.SelectPriceWeight, "Weight of the price factor in the orchestrator selection algorithm") cfg.SelectPriceExpFactor = flag.Float64("selectPriceExpFactor", *cfg.SelectPriceExpFactor, "Expresses how significant a small change of price is for the selection algorithm; default 100") cfg.OrchPerfStatsURL = flag.String("orchPerfStatsUrl", *cfg.OrchPerfStatsURL, "URL of Orchestrator Performance Stream Tester") cfg.Region = flag.String("region", *cfg.Region, "Region in which a broadcaster is deployed; used to select the region while using the orchestrator's performance stats") - cfg.MaxPricePerUnit = flag.String("maxPricePerUnit", *cfg.MaxPricePerUnit, "The maximum transcoding price per 'pixelsPerUnit' a broadcaster is willing to accept. If not set explicitly, broadcaster is willing to accept ANY price. Can be specified in wei or a custom currency in the format (e.g. 0.50USD). When using a custom currency, a corresponding price feed must be configured with -priceFeedAddr") + cfg.MaxPricePerUnit = flag.Int("maxPricePerUnit", *cfg.MaxPricePerUnit, "The maximum transcoding price (in wei) per 'pixelsPerUnit' a broadcaster is willing to accept. If not set explicitly, broadcaster is willing to accept ANY price") cfg.MinPerfScore = flag.Float64("minPerfScore", *cfg.MinPerfScore, "The minimum orchestrator's performance score a broadcaster is willing to accept") // Transcoding: @@ -170,7 +169,6 @@ func parseLivepeerConfig() starter.LivepeerConfig { cfg.MaxGasPrice = flag.Int("maxGasPrice", *cfg.MaxGasPrice, "Maximum gas price (priority fee + base fee) for ETH transactions in wei, 40 Gwei = 40000000000") cfg.EthController = flag.String("ethController", *cfg.EthController, "Protocol smart contract address") cfg.InitializeRound = flag.Bool("initializeRound", *cfg.InitializeRound, "Set to true if running as a transcoder and the node should automatically initialize new rounds") - cfg.InitializeRoundMaxDelay = flag.Duration("initializeRoundMaxDelay", *cfg.InitializeRoundMaxDelay, "Maximum delay to wait before initializing a round") cfg.TicketEV = flag.String("ticketEV", *cfg.TicketEV, "The expected value for PM tickets") cfg.MaxFaceValue = flag.String("maxFaceValue", *cfg.MaxFaceValue, "set max ticket face value in WEI") // Broadcaster max acceptable ticket EV @@ -180,13 +178,12 @@ func parseLivepeerConfig() starter.LivepeerConfig { // Broadcaster deposit multiplier to determine max acceptable ticket faceValue cfg.DepositMultiplier = flag.Int("depositMultiplier", *cfg.DepositMultiplier, "The deposit multiplier used to determine max acceptable faceValue for PM tickets") // Orchestrator base pricing info - cfg.PricePerUnit = flag.String("pricePerUnit", "0", "The price per 'pixelsPerUnit' amount pixels. Can be specified in wei or a custom currency in the format (e.g. 0.50USD). When using a custom currency, a corresponding price feed must be configured with -priceFeedAddr") - // Unit of pixels for both O's pricePerUnit and B's maxPricePerUnit - cfg.PixelsPerUnit = flag.String("pixelsPerUnit", *cfg.PixelsPerUnit, "Amount of pixels per unit. Set to '> 1' to have smaller price granularity than 1 wei / pixel") - cfg.PriceFeedAddr = flag.String("priceFeedAddr", *cfg.PriceFeedAddr, "ETH address of the Chainlink price feed contract. Used for custom currencies conversion on -pricePerUnit or -maxPricePerUnit") + cfg.PricePerUnit = flag.Int("pricePerUnit", 0, "The price per 'pixelsPerUnit' amount pixels") + // Unit of pixels for both O's basePriceInfo and B's MaxBroadcastPrice + cfg.PixelsPerUnit = flag.Int("pixelsPerUnit", *cfg.PixelsPerUnit, "Amount of pixels per unit. Set to '> 1' to have smaller price granularity than 1 wei / pixel") cfg.AutoAdjustPrice = flag.Bool("autoAdjustPrice", *cfg.AutoAdjustPrice, "Enable/disable automatic price adjustments based on the overhead for redeeming tickets") - cfg.PricePerGateway = flag.String("pricePerGateway", *cfg.PricePerGateway, `json list of price per gateway or path to json config file. Example: {"gateways":[{"ethaddress":"address1","priceperunit":0.5,"currency":"USD","pixelsperunit":1000000000000},{"ethaddress":"address2","priceperunit":0.3,"currency":"USD","pixelsperunit":1000000000000}]}`) - cfg.PricePerBroadcaster = flag.String("pricePerBroadcaster", *cfg.PricePerBroadcaster, `json list of price per broadcaster or path to json config file. Example: {"broadcasters":[{"ethaddress":"address1","priceperunit":0.5,"currency":"USD","pixelsperunit":1000000000000},{"ethaddress":"address2","priceperunit":0.3,"currency":"USD","pixelsperunit":1000000000000}]}`) + cfg.PricePerGateway = flag.String("pricePerGateway", *cfg.PricePerGateway, `json list of price per gateway or path to json config file. Example: {"gateways":[{"ethaddress":"address1","priceperunit":1000,"pixelsperunit":1},{"ethaddress":"address2","priceperunit":1200,"pixelsperunit":1}]}`) + cfg.PricePerBroadcaster = flag.String("pricePerBroadcaster", *cfg.PricePerBroadcaster, `json list of price per broadcaster or path to json config file. Example: {"broadcasters":[{"ethaddress":"address1","priceperunit":1000,"pixelsperunit":1},{"ethaddress":"address2","priceperunit":1200,"pixelsperunit":1}]}`) // Interval to poll for blocks cfg.BlockPollingInterval = flag.Int("blockPollingInterval", *cfg.BlockPollingInterval, "Interval in seconds at which different blockchain event services poll for blocks") // Redemption service diff --git a/cmd/livepeer/starter/starter.go b/cmd/livepeer/starter/starter.go index 5354820abe..7568f1f13e 100755 --- a/cmd/livepeer/starter/starter.go +++ b/cmd/livepeer/starter/starter.go @@ -16,7 +16,6 @@ import ( "os/user" "path" "path/filepath" - "regexp" "strconv" "strings" "time" @@ -35,7 +34,6 @@ import ( "github.com/livepeer/go-livepeer/eth" "github.com/livepeer/go-livepeer/eth/blockwatch" "github.com/livepeer/go-livepeer/eth/watchers" - "github.com/livepeer/go-livepeer/monitor" lpmon "github.com/livepeer/go-livepeer/monitor" "github.com/livepeer/go-livepeer/pm" "github.com/livepeer/go-livepeer/server" @@ -78,84 +76,81 @@ const ( ) type LivepeerConfig struct { - Network *string - RtmpAddr *string - CliAddr *string - HttpAddr *string - ServiceAddr *string - OrchAddr *string - VerifierURL *string - EthController *string - VerifierPath *string - LocalVerify *bool - HttpIngest *bool - Orchestrator *bool - Transcoder *bool - AIWorker *bool - Gateway *bool - Broadcaster *bool - OrchSecret *string - TranscodingOptions *string - AIModels *string - MaxAttempts *int - SelectRandWeight *float64 - SelectStakeWeight *float64 - SelectPriceWeight *float64 - SelectPriceExpFactor *float64 - OrchPerfStatsURL *string - Region *string - MaxPricePerUnit *string - MinPerfScore *float64 - MaxSessions *string - CurrentManifest *bool - Nvidia *string - Netint *string - TestTranscoder *bool - EthAcctAddr *string - EthPassword *string - EthKeystorePath *string - EthOrchAddr *string - EthUrl *string - TxTimeout *time.Duration - MaxTxReplacements *int - GasLimit *int - MinGasPrice *int64 - MaxGasPrice *int - InitializeRound *bool - InitializeRoundMaxDelay *time.Duration - TicketEV *string - MaxFaceValue *string - MaxTicketEV *string - MaxTotalEV *string - DepositMultiplier *int - PricePerUnit *string - PixelsPerUnit *string - PriceFeedAddr *string - AutoAdjustPrice *bool - PricePerGateway *string - PricePerBroadcaster *string - BlockPollingInterval *int - Redeemer *bool - RedeemerAddr *string - Reward *bool - Monitor *bool - MetricsPerStream *bool - MetricsExposeClientIP *bool - MetadataQueueUri *string - MetadataAmqpExchange *string - MetadataPublishTimeout *time.Duration - Datadir *string - AIModelsDir *string - Objectstore *string - Recordstore *string - FVfailGsBucket *string - FVfailGsKey *string - AuthWebhookURL *string - OrchWebhookURL *string - OrchBlacklist *string - OrchMinLivepeerVersion *string - TestOrchAvail *bool - AIRunnerImage *string + Network *string + RtmpAddr *string + CliAddr *string + HttpAddr *string + ServiceAddr *string + OrchAddr *string + VerifierURL *string + EthController *string + VerifierPath *string + LocalVerify *bool + HttpIngest *bool + Orchestrator *bool + Transcoder *bool + AIWorker *bool + Gateway *bool + Broadcaster *bool + OrchSecret *string + TranscodingOptions *string + AIModels *string + MaxAttempts *int + SelectRandWeight *float64 + SelectStakeWeight *float64 + SelectPriceWeight *float64 + SelectPriceExpFactor *float64 + OrchPerfStatsURL *string + Region *string + MaxPricePerUnit *int + MinPerfScore *float64 + MaxSessions *string + CurrentManifest *bool + Nvidia *string + Netint *string + TestTranscoder *bool + EthAcctAddr *string + EthPassword *string + EthKeystorePath *string + EthOrchAddr *string + EthUrl *string + TxTimeout *time.Duration + MaxTxReplacements *int + GasLimit *int + MinGasPrice *int64 + MaxGasPrice *int + InitializeRound *bool + TicketEV *string + MaxFaceValue *string + MaxTicketEV *string + MaxTotalEV *string + DepositMultiplier *int + PricePerUnit *int + PixelsPerUnit *int + AutoAdjustPrice *bool + PricePerGateway *string + PricePerBroadcaster *string + BlockPollingInterval *int + Redeemer *bool + RedeemerAddr *string + Reward *bool + Monitor *bool + MetricsPerStream *bool + MetricsExposeClientIP *bool + MetadataQueueUri *string + MetadataAmqpExchange *string + MetadataPublishTimeout *time.Duration + Datadir *string + AIModelsDir *string + Objectstore *string + Recordstore *string + FVfailGsBucket *string + FVfailGsKey *string + AuthWebhookURL *string + OrchWebhookURL *string + OrchBlacklist *string + TestOrchAvail *bool + AIRunnerImage *string } // DefaultLivepeerConfig creates LivepeerConfig exactly the same as when no flags are passed to the livepeer process. @@ -209,15 +204,13 @@ func DefaultLivepeerConfig() LivepeerConfig { defaultMaxGasPrice := 0 defaultEthController := "" defaultInitializeRound := false - defaultInitializeRoundMaxDelay := 30 * time.Second defaultTicketEV := "8000000000" defaultMaxFaceValue := "0" defaultMaxTicketEV := "3000000000000" defaultMaxTotalEV := "20000000000000" defaultDepositMultiplier := 1 - defaultMaxPricePerUnit := "0" - defaultPixelsPerUnit := "1" - defaultPriceFeedAddr := "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612" // ETH / USD price feed address on Arbitrum Mainnet + defaultMaxPricePerUnit := 0 + defaultPixelsPerUnit := 1 defaultAutoAdjustPrice := true defaultPricePerGateway := "" defaultPricePerBroadcaster := "" @@ -249,7 +242,6 @@ func DefaultLivepeerConfig() LivepeerConfig { // API defaultAuthWebhookURL := "" defaultOrchWebhookURL := "" - defaultMinLivepeerVersion := "" // Flags defaultTestOrchAvail := true @@ -293,38 +285,36 @@ func DefaultLivepeerConfig() LivepeerConfig { AIRunnerImage: &defaultAIRunnerImage, // Onchain: - EthAcctAddr: &defaultEthAcctAddr, - EthPassword: &defaultEthPassword, - EthKeystorePath: &defaultEthKeystorePath, - EthOrchAddr: &defaultEthOrchAddr, - EthUrl: &defaultEthUrl, - TxTimeout: &defaultTxTimeout, - MaxTxReplacements: &defaultMaxTxReplacements, - GasLimit: &defaultGasLimit, - MaxGasPrice: &defaultMaxGasPrice, - EthController: &defaultEthController, - InitializeRound: &defaultInitializeRound, - InitializeRoundMaxDelay: &defaultInitializeRoundMaxDelay, - TicketEV: &defaultTicketEV, - MaxFaceValue: &defaultMaxFaceValue, - MaxTicketEV: &defaultMaxTicketEV, - MaxTotalEV: &defaultMaxTotalEV, - DepositMultiplier: &defaultDepositMultiplier, - MaxPricePerUnit: &defaultMaxPricePerUnit, - PixelsPerUnit: &defaultPixelsPerUnit, - PriceFeedAddr: &defaultPriceFeedAddr, - AutoAdjustPrice: &defaultAutoAdjustPrice, - PricePerGateway: &defaultPricePerGateway, - PricePerBroadcaster: &defaultPricePerBroadcaster, - BlockPollingInterval: &defaultBlockPollingInterval, - Redeemer: &defaultRedeemer, - RedeemerAddr: &defaultRedeemerAddr, - Monitor: &defaultMonitor, - MetricsPerStream: &defaultMetricsPerStream, - MetricsExposeClientIP: &defaultMetricsExposeClientIP, - MetadataQueueUri: &defaultMetadataQueueUri, - MetadataAmqpExchange: &defaultMetadataAmqpExchange, - MetadataPublishTimeout: &defaultMetadataPublishTimeout, + EthAcctAddr: &defaultEthAcctAddr, + EthPassword: &defaultEthPassword, + EthKeystorePath: &defaultEthKeystorePath, + EthOrchAddr: &defaultEthOrchAddr, + EthUrl: &defaultEthUrl, + TxTimeout: &defaultTxTimeout, + MaxTxReplacements: &defaultMaxTxReplacements, + GasLimit: &defaultGasLimit, + MaxGasPrice: &defaultMaxGasPrice, + EthController: &defaultEthController, + InitializeRound: &defaultInitializeRound, + TicketEV: &defaultTicketEV, + MaxFaceValue: &defaultMaxFaceValue, + MaxTicketEV: &defaultMaxTicketEV, + MaxTotalEV: &defaultMaxTotalEV, + DepositMultiplier: &defaultDepositMultiplier, + MaxPricePerUnit: &defaultMaxPricePerUnit, + PixelsPerUnit: &defaultPixelsPerUnit, + AutoAdjustPrice: &defaultAutoAdjustPrice, + PricePerGateway: &defaultPricePerGateway, + PricePerBroadcaster: &defaultPricePerBroadcaster, + BlockPollingInterval: &defaultBlockPollingInterval, + Redeemer: &defaultRedeemer, + RedeemerAddr: &defaultRedeemerAddr, + Monitor: &defaultMonitor, + MetricsPerStream: &defaultMetricsPerStream, + MetricsExposeClientIP: &defaultMetricsExposeClientIP, + MetadataQueueUri: &defaultMetadataQueueUri, + MetadataAmqpExchange: &defaultMetadataAmqpExchange, + MetadataPublishTimeout: &defaultMetadataPublishTimeout, // Ingest: HttpIngest: &defaultHttpIngest, @@ -345,9 +335,6 @@ func DefaultLivepeerConfig() LivepeerConfig { AuthWebhookURL: &defaultAuthWebhookURL, OrchWebhookURL: &defaultOrchWebhookURL, - // Versioning constraints - OrchMinLivepeerVersion: &defaultMinLivepeerVersion, - // Flags TestOrchAvail: &defaultTestOrchAvail, } @@ -517,6 +504,152 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { } } + var aiCaps []core.Capability + constraints := make(map[core.Capability]*core.Constraints) + + if *cfg.AIWorker { + gpus := []string{} + if *cfg.Nvidia != "" { + var err error + gpus, err = common.ParseAccelDevices(*cfg.Nvidia, ffmpeg.Nvidia) + if err != nil { + glog.Errorf("Error parsing -nvidia for devices: %v", err) + return + } + } + + modelsDir := *cfg.AIModelsDir + if modelsDir == "" { + var err error + modelsDir, err = filepath.Abs(path.Join(*cfg.Datadir, "models")) + if err != nil { + glog.Error("Error creating absolute path for models dir: %v", modelsDir) + return + } + } + + if err := os.MkdirAll(modelsDir, 0755); err != nil { + glog.Error("Error creating models dir %v", modelsDir) + return + } + + n.AIWorker, err = worker.NewWorker(*cfg.AIRunnerImage, gpus, modelsDir) + if err != nil { + glog.Errorf("Error starting AI worker: %v", err) + return + } + + if *cfg.AIModels != "" { + configs, err := core.ParseAIModelConfigs(*cfg.AIModels) + if err != nil { + glog.Errorf("Error parsing -aiModels: %v", err) + return + } + + for _, config := range configs { + modelConstraint := &core.ModelConstraint{Warm: config.Warm} + + // If the config contains a URL we call Warm() anyway because AIWorker will just register + // the endpoint for an external container + if config.Warm || config.URL != "" { + endpoint := worker.RunnerEndpoint{URL: config.URL, Token: config.Token} + if err := n.AIWorker.Warm(ctx, config.Pipeline, config.ModelID, endpoint, config.OptimizationFlags); err != nil { + glog.Errorf("Error AI worker warming %v container: %v", config.Pipeline, err) + return + } + } + + // Show warning if people set OptimizationFlags but not Warm. + if len(config.OptimizationFlags) > 0 && !config.Warm { + glog.Warningf("Model %v has 'optimization_flags' set without 'warm'. Optimization flags are currently only used for warm containers.", config.ModelID) + } + + switch config.Pipeline { + case "text-to-image": + _, ok := constraints[core.Capability_TextToImage] + if !ok { + aiCaps = append(aiCaps, core.Capability_TextToImage) + constraints[core.Capability_TextToImage] = &core.Constraints{ + Models: make(map[string]*core.ModelConstraint), + } + } + + constraints[core.Capability_TextToImage].Models[config.ModelID] = modelConstraint + + n.SetBasePriceForCap("default", core.Capability_TextToImage, config.ModelID, big.NewRat(config.PricePerUnit, config.PixelsPerUnit)) + case "image-to-image": + _, ok := constraints[core.Capability_ImageToImage] + if !ok { + aiCaps = append(aiCaps, core.Capability_ImageToImage) + constraints[core.Capability_ImageToImage] = &core.Constraints{ + Models: make(map[string]*core.ModelConstraint), + } + } + + constraints[core.Capability_ImageToImage].Models[config.ModelID] = modelConstraint + + n.SetBasePriceForCap("default", core.Capability_ImageToImage, config.ModelID, big.NewRat(config.PricePerUnit, config.PixelsPerUnit)) + case "image-to-video": + _, ok := constraints[core.Capability_ImageToVideo] + if !ok { + aiCaps = append(aiCaps, core.Capability_ImageToVideo) + constraints[core.Capability_ImageToVideo] = &core.Constraints{ + Models: make(map[string]*core.ModelConstraint), + } + } + + constraints[core.Capability_ImageToVideo].Models[config.ModelID] = modelConstraint + + n.SetBasePriceForCap("default", core.Capability_ImageToVideo, config.ModelID, big.NewRat(config.PricePerUnit, config.PixelsPerUnit)) + case "upscale": + _, ok := constraints[core.Capability_Upscale] + if !ok { + aiCaps = append(aiCaps, core.Capability_Upscale) + constraints[core.Capability_Upscale] = &core.Constraints{ + Models: make(map[string]*core.ModelConstraint), + } + } + + constraints[core.Capability_Upscale].Models[config.ModelID] = modelConstraint + + n.SetBasePriceForCap("default", core.Capability_Upscale, config.ModelID, big.NewRat(config.PricePerUnit, config.PixelsPerUnit)) + case "audio-to-text": + _, ok := constraints[core.Capability_AudioToText] + if !ok { + aiCaps = append(aiCaps, core.Capability_AudioToText) + constraints[core.Capability_AudioToText] = &core.Constraints{ + Models: make(map[string]*core.ModelConstraint), + } + } + + constraints[core.Capability_AudioToText].Models[config.ModelID] = modelConstraint + + n.SetBasePriceForCap("default", core.Capability_AudioToText, config.ModelID, big.NewRat(config.PricePerUnit, config.PixelsPerUnit)) + } + + if len(aiCaps) > 0 { + capability := aiCaps[len(aiCaps)-1] + price := n.GetBasePriceForCap("default", capability, config.ModelID) + glog.V(6).Infof("Capability %s (ID: %v) advertised with model constraint %s at price %d per %d unit", config.Pipeline, capability, config.ModelID, price.Num(), price.Denom()) + } + } + } else { + glog.Error("The '-aiModels' flag was set, but no model configuration was provided. Please specify the model configuration using the '-aiModels' flag.") + return + } + + defer func() { + ctx, cancel := context.WithTimeout(context.Background(), aiWorkerContainerStopTimeout) + defer cancel() + if err := n.AIWorker.Stop(ctx); err != nil { + glog.Errorf("Error stopping AI worker containers: %v", err) + return + } + + glog.Infof("Stopped AI worker containers") + }() + } + if *cfg.Redeemer { n.NodeType = core.RedeemerNode } else if *cfg.Orchestrator { @@ -574,6 +707,7 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { glog.Error(err) return } + } else { n.SelectionAlgorithm, err = createSelectionAlgorithm(cfg) if err != nil { @@ -753,13 +887,6 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { go serviceRegistryWatcher.Watch() defer serviceRegistryWatcher.Stop() - core.PriceFeedWatcher, err = watchers.NewPriceFeedWatcher(backend, *cfg.PriceFeedAddr) - // The price feed watch loop is started on demand on first subscribe. - if err != nil { - glog.Errorf("Failed to set up price feed watcher: %v", err) - return - } - n.Balances = core.NewAddressBalances(cleanupInterval) defer n.Balances.StopCleanup() @@ -781,36 +908,16 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { if *cfg.Orchestrator { // Set price per pixel base info - pixelsPerUnit, ok := new(big.Rat).SetString(*cfg.PixelsPerUnit) - if !ok || !pixelsPerUnit.IsInt() { - panic(fmt.Errorf("-pixelsPerUnit must be a valid integer, provided %v", *cfg.PixelsPerUnit)) - } - if pixelsPerUnit.Sign() <= 0 { - // Can't divide by 0 - panic(fmt.Errorf("-pixelsPerUnit must be > 0, provided %v", *cfg.PixelsPerUnit)) - } if cfg.PricePerUnit == nil && !*cfg.AIWorker { // Prevent orchestrators from unknowingly providing free transcoding panic(fmt.Errorf("-pricePerUnit must be set")) } else if cfg.PricePerUnit != nil { - pricePerUnit, currency, err := parsePricePerUnit(*cfg.PricePerUnit) - if err != nil { - panic(fmt.Errorf("-pricePerUnit must be a valid integer with an optional currency, provided %v", *cfg.PricePerUnit)) - } else if pricePerUnit.Sign() < 0 { - panic(fmt.Errorf("-pricePerUnit must be >= 0, provided %s", pricePerUnit)) + if *cfg.PricePerUnit < 0 { + panic(fmt.Errorf("-pricePerUnit must be >= 0, provided %d", *cfg.PricePerUnit)) } - pricePerPixel := new(big.Rat).Quo(pricePerUnit, pixelsPerUnit) - autoPrice, err := core.NewAutoConvertedPrice(currency, pricePerPixel, func(price *big.Rat) { - unit := "pixel" - if *cfg.AIWorker { - unit = "compute unit" - } - glog.Infof("Price: %v wei per %s\n", price.FloatString(3), unit) - }) - if err != nil { - panic(fmt.Errorf("Error converting price: %v", err)) - } - n.SetBasePrice("default", autoPrice) + + n.SetBasePrice("default", big.NewRat(int64(*cfg.PricePerUnit), int64(*cfg.PixelsPerUnit))) + glog.Infof("Price: %d wei for %d pixels\n ", *cfg.PricePerUnit, *cfg.PixelsPerUnit) } if *cfg.PricePerBroadcaster != "" { @@ -819,15 +926,9 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { } gatewayPrices := getGatewayPrices(*cfg.PricePerGateway) for _, p := range gatewayPrices { - p := p - pricePerPixel := new(big.Rat).Quo(p.PricePerUnit, p.PixelsPerUnit) - autoPrice, err := core.NewAutoConvertedPrice(p.Currency, pricePerPixel, func(price *big.Rat) { - glog.Infof("Price: %v wei per pixel for gateway %v", price.FloatString(3), p.EthAddress) - }) - if err != nil { - panic(fmt.Errorf("Error converting price for gateway %s: %v", p.EthAddress, err)) - } - n.SetBasePrice(p.EthAddress, autoPrice) + price := big.NewRat(p.PricePerUnit, p.PixelsPerUnit) + n.SetBasePrice(p.EthAddress, price) + glog.Infof("Price: %v set for broadcaster %v", price.RatString(), p.EthAddress) } n.AutoSessionLimit = *cfg.MaxSessions == "auto" @@ -924,30 +1025,12 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { n.Sender = pm.NewSender(n.Eth, timeWatcher, senderWatcher, maxEV, maxTotalEV, *cfg.DepositMultiplier) - pixelsPerUnit, ok := new(big.Rat).SetString(*cfg.PixelsPerUnit) - if !ok || !pixelsPerUnit.IsInt() { - panic(fmt.Errorf("-pixelsPerUnit must be a valid integer, provided %v", *cfg.PixelsPerUnit)) - } - if pixelsPerUnit.Sign() <= 0 { + if *cfg.PixelsPerUnit <= 0 { // Can't divide by 0 - panic(fmt.Errorf("-pixelsPerUnit must be > 0, provided %v", *cfg.PixelsPerUnit)) - } - maxPricePerUnit, currency, err := parsePricePerUnit(*cfg.MaxPricePerUnit) - if err != nil { - panic(fmt.Errorf("The maximum price per unit must be a valid integer with an optional currency, provided %v instead\n", *cfg.MaxPricePerUnit)) + panic(fmt.Errorf("The amount of pixels per unit must be greater than 0, provided %d instead\n", *cfg.PixelsPerUnit)) } - if maxPricePerUnit.Sign() > 0 { - pricePerPixel := new(big.Rat).Quo(maxPricePerUnit, pixelsPerUnit) - autoPrice, err := core.NewAutoConvertedPrice(currency, pricePerPixel, func(price *big.Rat) { - if monitor.Enabled { - monitor.MaxTranscodingPrice(price) - } - glog.Infof("Maximum transcoding price: %v wei per pixel\n ", price.FloatString(3)) - }) - if err != nil { - panic(fmt.Errorf("Error converting price: %v", err)) - } - server.BroadcastCfg.SetMaxPrice(autoPrice) + if *cfg.MaxPricePerUnit > 0 { + server.BroadcastCfg.SetMaxPrice(big.NewRat(int64(*cfg.MaxPricePerUnit), int64(*cfg.PixelsPerUnit))) } else { glog.Infof("Maximum transcoding price per pixel is not greater than 0: %v, broadcaster is currently set to accept ANY price.\n", *cfg.MaxPricePerUnit) glog.Infoln("To update the broadcaster's maximum acceptable transcoding price per pixel, use the CLI or restart the broadcaster with the appropriate 'maxPricePerUnit' and 'pixelsPerUnit' values") @@ -1020,7 +1103,7 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { if *cfg.InitializeRound { // Start round initializer // The node will only initialize rounds if it in the upcoming active set for the round - initializer := eth.NewRoundInitializer(n.Eth, timeWatcher, *cfg.InitializeRoundMaxDelay) + initializer := eth.NewRoundInitializer(n.Eth, timeWatcher) go func() { if err := initializer.Start(); err != nil { serviceErr <- err @@ -1060,201 +1143,6 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { }() } - var aiCaps []core.Capability - capabilityConstraints := make(map[core.Capability]*core.PerCapabilityConstraints) - - if *cfg.AIWorker { - gpus := []string{} - if *cfg.Nvidia != "" { - var err error - gpus, err = common.ParseAccelDevices(*cfg.Nvidia, ffmpeg.Nvidia) - if err != nil { - glog.Errorf("Error parsing -nvidia for devices: %v", err) - return - } - } - - modelsDir := *cfg.AIModelsDir - if modelsDir == "" { - var err error - modelsDir, err = filepath.Abs(path.Join(*cfg.Datadir, "models")) - if err != nil { - glog.Error("Error creating absolute path for models dir: %v", modelsDir) - return - } - } - - if err := os.MkdirAll(modelsDir, 0755); err != nil { - glog.Error("Error creating models dir %v", modelsDir) - return - } - - n.AIWorker, err = worker.NewWorker(*cfg.AIRunnerImage, gpus, modelsDir) - if err != nil { - glog.Errorf("Error starting AI worker: %v", err) - return - } - - // Get base pixels per unit. - pixelsPerUnitBase, ok := new(big.Rat).SetString(*cfg.PixelsPerUnit) - if !ok || !pixelsPerUnitBase.IsInt() { - panic(fmt.Errorf("-pixelsPerUnit must be a valid integer, provided %v", *cfg.PixelsPerUnit)) - } - if !ok || pixelsPerUnitBase.Sign() <= 0 { - // Can't divide by 0 - panic(fmt.Errorf("-pixelsPerUnit must be > 0, provided %v", *cfg.PixelsPerUnit)) - } - - if *cfg.AIModels != "" { - configs, err := core.ParseAIModelConfigs(*cfg.AIModels) - if err != nil { - glog.Errorf("Error parsing -aiModels: %v", err) - return - } - - for _, config := range configs { - modelConstraint := &core.ModelConstraint{Warm: config.Warm} - - var autoPrice *core.AutoConvertedPrice - if *cfg.Network != "offchain" { - pixelsPerUnit := config.PixelsPerUnit.Rat - if config.PixelsPerUnit.Rat == nil { - pixelsPerUnit = pixelsPerUnitBase - } else { - if !pixelsPerUnit.IsInt() || pixelsPerUnit.Sign() <= 0 { - panic(fmt.Errorf("'pixelsPerUnit' value specified for model '%v' in pipeline '%v' must be a valid positive integer, provided %v", config.ModelID, config.Pipeline, config.PixelsPerUnit)) - } - } - pricePerUnit := config.PricePerUnit.Rat - if err != nil { - panic(fmt.Errorf("'pricePerUnit' value specified for model '%v' in pipeline '%v' must be a valid integer with an optional currency, provided %v", config.ModelID, config.Pipeline, config.PricePerUnit)) - } else if pricePerUnit.Sign() < 0 { - panic(fmt.Errorf("'pricePerUnit' value specified for model '%v' in pipeline '%v' must be >= 0, provided %v", config.ModelID, config.Pipeline, config.PricePerUnit)) - } - pricePerPixel := new(big.Rat).Quo(pricePerUnit, pixelsPerUnit) - - autoPrice, err = core.NewAutoConvertedPrice(config.Currency, pricePerPixel, nil) - if err != nil { - panic(fmt.Errorf("error converting price: %v", err)) - } - } - - // If the config contains a URL we call Warm() anyway because AIWorker will just register - // the endpoint for an external container - if config.Warm || config.URL != "" { - endpoint := worker.RunnerEndpoint{URL: config.URL, Token: config.Token} - if err := n.AIWorker.Warm(ctx, config.Pipeline, config.ModelID, endpoint, config.OptimizationFlags); err != nil { - glog.Errorf("Error AI worker warming %v container: %v", config.Pipeline, err) - return - } - } - - // Show warning if people set OptimizationFlags but not Warm. - if len(config.OptimizationFlags) > 0 && !config.Warm { - glog.Warningf("Model %v has 'optimization_flags' set without 'warm'. Optimization flags are currently only used for warm containers.", config.ModelID) - } - - switch config.Pipeline { - case "text-to-image": - _, ok := capabilityConstraints[core.Capability_TextToImage] - if !ok { - aiCaps = append(aiCaps, core.Capability_TextToImage) - capabilityConstraints[core.Capability_TextToImage] = &core.PerCapabilityConstraints{ - Models: make(map[string]*core.ModelConstraint), - } - } - - capabilityConstraints[core.Capability_TextToImage].Models[config.ModelID] = modelConstraint - - if *cfg.Network != "offchain" { - n.SetBasePriceForCap("default", core.Capability_TextToImage, config.ModelID, autoPrice) - } - case "image-to-image": - _, ok := capabilityConstraints[core.Capability_ImageToImage] - if !ok { - aiCaps = append(aiCaps, core.Capability_ImageToImage) - capabilityConstraints[core.Capability_ImageToImage] = &core.PerCapabilityConstraints{ - Models: make(map[string]*core.ModelConstraint), - } - } - - capabilityConstraints[core.Capability_ImageToImage].Models[config.ModelID] = modelConstraint - - if *cfg.Network != "offchain" { - n.SetBasePriceForCap("default", core.Capability_ImageToImage, config.ModelID, autoPrice) - } - case "image-to-video": - _, ok := capabilityConstraints[core.Capability_ImageToVideo] - if !ok { - aiCaps = append(aiCaps, core.Capability_ImageToVideo) - capabilityConstraints[core.Capability_ImageToVideo] = &core.PerCapabilityConstraints{ - Models: make(map[string]*core.ModelConstraint), - } - } - - capabilityConstraints[core.Capability_ImageToVideo].Models[config.ModelID] = modelConstraint - - if *cfg.Network != "offchain" { - n.SetBasePriceForCap("default", core.Capability_ImageToVideo, config.ModelID, autoPrice) - } - case "upscale": - _, ok := capabilityConstraints[core.Capability_Upscale] - if !ok { - aiCaps = append(aiCaps, core.Capability_Upscale) - capabilityConstraints[core.Capability_Upscale] = &core.PerCapabilityConstraints{ - Models: make(map[string]*core.ModelConstraint), - } - } - - capabilityConstraints[core.Capability_Upscale].Models[config.ModelID] = modelConstraint - - if *cfg.Network != "offchain" { - n.SetBasePriceForCap("default", core.Capability_Upscale, config.ModelID, autoPrice) - } - case "audio-to-text": - _, ok := capabilityConstraints[core.Capability_AudioToText] - if !ok { - aiCaps = append(aiCaps, core.Capability_AudioToText) - capabilityConstraints[core.Capability_AudioToText] = &core.PerCapabilityConstraints{ - Models: make(map[string]*core.ModelConstraint), - } - } - - capabilityConstraints[core.Capability_AudioToText].Models[config.ModelID] = modelConstraint - - if *cfg.Network != "offchain" { - n.SetBasePriceForCap("default", core.Capability_AudioToText, config.ModelID, autoPrice) - } - } - - if len(aiCaps) > 0 { - capability := aiCaps[len(aiCaps)-1] - price := n.GetBasePriceForCap("default", capability, config.ModelID) - if *cfg.Network != "offchain" { - pricePerUnit := price.Num().Int64() / price.Denom().Int64() - glog.V(6).Infof("Capability %s (ID: %v) advertised with model constraint %s at price %d wei per compute unit", config.Pipeline, capability, config.ModelID, pricePerUnit) - } else { - glog.V(6).Infof("Capability %s (ID: %v) advertised with model constraint %s", config.Pipeline, capability, config.ModelID) - } - } - } - } else { - glog.Error("The '-aiModels' flag was set, but no model configuration was provided. Please specify the model configuration using the '-aiModels' flag.") - return - } - - defer func() { - ctx, cancel := context.WithTimeout(context.Background(), aiWorkerContainerStopTimeout) - defer cancel() - if err := n.AIWorker.Stop(ctx); err != nil { - glog.Errorf("Error stopping AI worker containers: %v", err) - return - } - - glog.Infof("Stopped AI worker containers") - }() - } - if *cfg.Objectstore != "" { prepared, err := drivers.PrepareOSURL(*cfg.Objectstore) if err != nil { @@ -1405,10 +1293,7 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) { *cfg.CliAddr = defaultAddr(*cfg.CliAddr, "127.0.0.1", TranscoderCliPort) } - n.Capabilities = core.NewCapabilitiesWithConstraints(append(transcoderCaps, aiCaps...), core.MandatoryOCapabilities(), core.Constraints{}, capabilityConstraints) - if cfg.OrchMinLivepeerVersion != nil { - n.Capabilities.SetMinVersionConstraint(*cfg.OrchMinLivepeerVersion) - } + n.Capabilities = core.NewCapabilitiesWithConstraints(append(transcoderCaps, aiCaps...), core.MandatoryOCapabilities(), constraints) if drivers.NodeStorage == nil { // base URI will be empty for broadcasters; that's OK @@ -1711,10 +1596,9 @@ func checkOrStoreChainID(dbh *common.DB, chainID *big.Int) error { } type GatewayPrice struct { - EthAddress string - PricePerUnit *big.Rat - Currency string - PixelsPerUnit *big.Rat + EthAddress string `json:"ethaddress"` + PricePerUnit int64 `json:"priceperunit"` + PixelsPerUnit int64 `json:"pixelsperunit"` } func getGatewayPrices(gatewayPrices string) []GatewayPrice { @@ -1723,20 +1607,18 @@ func getGatewayPrices(gatewayPrices string) []GatewayPrice { } // Format of gatewayPrices json - // {"gateways":[{"ethaddress":"address1","priceperunit":0.5,"currency":"USD","pixelsperunit":1}, {"ethaddress":"address2","priceperunit":0.3,"currency":"USD","pixelsperunit":3}]} + // {"gateways":[{"ethaddress":"address1","priceperunit":1000,"pixelsperunit":1}, {"ethaddress":"address2","priceperunit":2000,"pixelsperunit":3}]} var pricesSet struct { Gateways []struct { - EthAddress string `json:"ethaddress"` - PixelsPerUnit core.JSONRat `json:"pixelsperunit"` - PricePerUnit core.JSONRat `json:"priceperunit"` - Currency string `json:"currency"` + EthAddress string `json:"ethaddress"` + PixelsPerUnit json.RawMessage `json:"pixelsperunit"` + PricePerUnit json.RawMessage `json:"priceperunit"` } `json:"gateways"` // TODO: Keep the old name for backwards compatibility, remove in the future Broadcasters []struct { - EthAddress string `json:"ethaddress"` - PixelsPerUnit core.JSONRat `json:"pixelsperunit"` - PricePerUnit core.JSONRat `json:"priceperunit"` - Currency string `json:"currency"` + EthAddress string `json:"ethaddress"` + PixelsPerUnit json.RawMessage `json:"pixelsperunit"` + PricePerUnit json.RawMessage `json:"priceperunit"` } `json:"broadcasters"` } pricesFileContent, _ := common.ReadFromFile(gatewayPrices) @@ -1757,11 +1639,20 @@ func getGatewayPrices(gatewayPrices string) []GatewayPrice { prices := make([]GatewayPrice, len(allGateways)) for i, p := range allGateways { + pixelsPerUnit, err := strconv.ParseInt(string(p.PixelsPerUnit), 10, 64) + if err != nil { + glog.Errorf("Pixels per unit could not be parsed for gateway %v. must be a valid number, provided %s", p.EthAddress, p.PixelsPerUnit) + continue + } + pricePerUnit, err := strconv.ParseInt(string(p.PricePerUnit), 10, 64) + if err != nil { + glog.Errorf("Price per unit could not be parsed for gateway %v. must be a valid number, provided %s", p.EthAddress, p.PricePerUnit) + continue + } prices[i] = GatewayPrice{ EthAddress: p.EthAddress, - Currency: p.Currency, - PricePerUnit: p.PricePerUnit.Rat, - PixelsPerUnit: p.PixelsPerUnit.Rat, + PricePerUnit: pricePerUnit, + PixelsPerUnit: pixelsPerUnit, } } @@ -1817,22 +1708,6 @@ func parseEthKeystorePath(ethKeystorePath string) (keystorePath, error) { return keystore, nil } -func parsePricePerUnit(pricePerUnitStr string) (*big.Rat, string, error) { - pricePerUnitRex := regexp.MustCompile(`^(\d+(\.\d+)?)([A-z][A-z0-9]*)?$`) - match := pricePerUnitRex.FindStringSubmatch(pricePerUnitStr) - if match == nil { - return nil, "", fmt.Errorf("price must be in the format of , provided %v", pricePerUnitStr) - } - price, currency := match[1], match[3] - - pricePerUnit, ok := new(big.Rat).SetString(price) - if !ok { - return nil, "", fmt.Errorf("price must be a valid number, provided %v", match[1]) - } - - return pricePerUnit, currency, nil -} - func refreshOrchPerfScoreLoop(ctx context.Context, region string, orchPerfScoreURL string, score *common.PerfScore) { for { refreshOrchPerfScore(region, orchPerfScoreURL, score) diff --git a/cmd/livepeer/starter/starter_test.go b/cmd/livepeer/starter/starter_test.go index 60df927897..e72e64c0be 100644 --- a/cmd/livepeer/starter/starter_test.go +++ b/cmd/livepeer/starter/starter_test.go @@ -102,8 +102,8 @@ func TestParseGetGatewayPrices(t *testing.T) { assert.NotNil(prices) assert.Equal(2, len(prices)) - price1 := new(big.Rat).Quo(prices[0].PricePerUnit, prices[0].PixelsPerUnit) - price2 := new(big.Rat).Quo(prices[1].PricePerUnit, prices[1].PixelsPerUnit) + price1 := big.NewRat(prices[0].PricePerUnit, prices[0].PixelsPerUnit) + price2 := big.NewRat(prices[1].PricePerUnit, prices[1].PixelsPerUnit) assert.Equal(big.NewRat(1000, 1), price1) assert.Equal(big.NewRat(2000, 3), price2) } @@ -302,91 +302,3 @@ func TestUpdatePerfScore(t *testing.T) { } require.Equal(t, expScores, scores.Scores) } - -func TestParsePricePerUnit(t *testing.T) { - tests := []struct { - name string - pricePerUnitStr string - expectedPrice *big.Rat - expectedCurrency string - expectError bool - }{ - { - name: "Valid input with integer price", - pricePerUnitStr: "100USD", - expectedPrice: big.NewRat(100, 1), - expectedCurrency: "USD", - expectError: false, - }, - { - name: "Valid input with fractional price", - pricePerUnitStr: "0.13USD", - expectedPrice: big.NewRat(13, 100), - expectedCurrency: "USD", - expectError: false, - }, - { - name: "Valid input with decimal price", - pricePerUnitStr: "99.99EUR", - expectedPrice: big.NewRat(9999, 100), - expectedCurrency: "EUR", - expectError: false, - }, - { - name: "Lower case currency", - pricePerUnitStr: "99.99eur", - expectedPrice: big.NewRat(9999, 100), - expectedCurrency: "eur", - expectError: false, - }, - { - name: "Currency with numbers", - pricePerUnitStr: "420DOG3", - expectedPrice: big.NewRat(420, 1), - expectedCurrency: "DOG3", - expectError: false, - }, - { - name: "No specified currency, empty currency", - pricePerUnitStr: "100", - expectedPrice: big.NewRat(100, 1), - expectedCurrency: "", - expectError: false, - }, - { - name: "Explicit wei currency", - pricePerUnitStr: "100wei", - expectedPrice: big.NewRat(100, 1), - expectedCurrency: "wei", - expectError: false, - }, - { - name: "Invalid number", - pricePerUnitStr: "abcUSD", - expectedPrice: nil, - expectedCurrency: "", - expectError: true, - }, - { - name: "Negative price", - pricePerUnitStr: "-100USD", - expectedPrice: nil, - expectedCurrency: "", - expectError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - price, currency, err := parsePricePerUnit(tt.pricePerUnitStr) - - if tt.expectError { - assert.Error(t, err) - } else { - require.NoError(t, err) - assert.True(t, tt.expectedPrice.Cmp(price) == 0) - assert.Equal(t, tt.expectedCurrency, currency) - } - }) - } -} diff --git a/cmd/livepeer_cli/wizard.go b/cmd/livepeer_cli/wizard.go index 27ba130174..01801e4fd6 100644 --- a/cmd/livepeer_cli/wizard.go +++ b/cmd/livepeer_cli/wizard.go @@ -76,7 +76,7 @@ func (w *wizard) readStringAndValidate(validate func(in string) (string, error)) } } -// readStringYesOrNo reads a single line from stdin, trims spaces and +// readStringYesOrNot reads a single line from stdin, trims spaces and // checks that the string is either y or n func (w *wizard) readStringYesOrNo() string { return w.readStringAndValidate(func(in string) (string, error) { diff --git a/cmd/livepeer_cli/wizard_broadcast.go b/cmd/livepeer_cli/wizard_broadcast.go index 8f2c59e917..b7967b0dd6 100644 --- a/cmd/livepeer_cli/wizard_broadcast.go +++ b/cmd/livepeer_cli/wizard_broadcast.go @@ -57,14 +57,10 @@ func (w *wizard) setBroadcastConfig() { fmt.Printf("eg. 1 wei / 10 pixels = 0,1 wei per pixel \n") fmt.Printf("\n") fmt.Printf("Enter amount of pixels that make up a single unit (default: 1 pixel) - ") - // Read numbers as strings not to lose precision and support big numbers - pixelsPerUnit := w.readDefaultString("1") + pixelsPerUnit := w.readDefaultInt(1) fmt.Printf("\n") - fmt.Printf("Enter the currency for the price per unit (default: Wei) - ") - currency := w.readDefaultString("Wei") - fmt.Printf("\n") - fmt.Printf("Enter the maximum price to pay for %s pixels in %s (default: 0) - ", pixelsPerUnit, currency) - maxPricePerUnit := w.readDefaultString("0") + fmt.Printf("Enter the maximum price to pay for %d pixels in Wei (required) - ", pixelsPerUnit) + maxPricePerUnit := w.readDefaultInt(0) opts := w.allTranscodingOptions() if opts == nil { @@ -81,18 +77,12 @@ func (w *wizard) setBroadcastConfig() { } val := url.Values{ - "pixelsPerUnit": {fmt.Sprintf("%v", pixelsPerUnit)}, - "currency": {fmt.Sprintf("%v", currency)}, - "maxPricePerUnit": {fmt.Sprintf("%v", maxPricePerUnit)}, + "pixelsPerUnit": {fmt.Sprintf("%v", strconv.Itoa(pixelsPerUnit))}, + "maxPricePerUnit": {fmt.Sprintf("%v", strconv.Itoa(maxPricePerUnit))}, "transcodingOptions": {fmt.Sprintf("%v", transOpts)}, } - result, ok := httpPostWithParams(fmt.Sprintf("http://%v:%v/setBroadcastConfig", w.host, w.httpPort), val) - if !ok { - fmt.Printf("Error applying configuration: %s\n", result) - } else { - fmt.Printf("Configuration applied successfully\n") - } + httpPostWithParams(fmt.Sprintf("http://%v:%v/setBroadcastConfig", w.host, w.httpPort), val) } func (w *wizard) idListToVideoProfileList(idList string, opts map[int]string) (string, error) { diff --git a/cmd/livepeer_cli/wizard_stats.go b/cmd/livepeer_cli/wizard_stats.go index bea3b07908..c7049e0129 100644 --- a/cmd/livepeer_cli/wizard_stats.go +++ b/cmd/livepeer_cli/wizard_stats.go @@ -171,10 +171,14 @@ func (w *wizard) broadcastStats() { } price, transcodingOptions := w.getBroadcastConfig() + priceString := "n/a" + if price != nil { + priceString = fmt.Sprintf("%v wei / %v pixels", price.Num().Int64(), price.Denom().Int64()) + } table := tablewriter.NewWriter(os.Stdout) data := [][]string{ - {"Max Price Per Pixel", formatPricePerPixel(price)}, + {"Max Price Per Pixel", priceString}, {"Broadcast Transcoding Options", transcodingOptions}, {"Deposit", eth.FormatUnits(sender.Deposit, "ETH")}, {"Reserve", eth.FormatUnits(sender.Reserve.FundsRemaining, "ETH")}, @@ -215,6 +219,10 @@ func (w *wizard) orchestratorStats() { fmt.Println("+------------------+") table := tablewriter.NewWriter(os.Stdout) + basePrice := "n/a" + if priceInfo != nil { + basePrice = fmt.Sprintf("%v wei / %v pixels", priceInfo.Num(), priceInfo.Denom()) + } data := [][]string{ {"Status", t.Status}, {"Active", strconv.FormatBool(t.Active)}, @@ -223,7 +231,7 @@ func (w *wizard) orchestratorStats() { {"Reward Cut (%)", eth.FormatPerc(t.RewardCut)}, {"Fee Cut (%)", eth.FormatPerc(flipPerc(t.FeeShare))}, {"Last Reward Round", t.LastRewardRound.String()}, - {"Base price per pixel", formatPricePerPixel(priceInfo)}, + {"Base price per pixel", basePrice}, {"Base price for broadcasters", b_prices}, } @@ -484,9 +492,7 @@ func (w *wizard) getBroadcasterPrices() (string, error) { return "", err } - var status struct { - BroadcasterPrices map[string]*big.Rat `json:"BroadcasterPrices"` - } + var status map[string]interface{} err = json.Unmarshal(result, &status) if err != nil { return "", err @@ -494,21 +500,13 @@ func (w *wizard) getBroadcasterPrices() (string, error) { prices := new(bytes.Buffer) - for b, p := range status.BroadcasterPrices { - if b != "default" { - fmt.Fprintf(prices, "%s: %s\n", b, formatPricePerPixel(p)) + if broadcasterPrices, ok := status["BroadcasterPrices"]; ok { + for b, p := range broadcasterPrices.(map[string]interface{}) { + if b != "default" { + fmt.Fprintf(prices, "%s: %s per pixel\n", b, p) + } } } return prices.String(), nil } - -func formatPricePerPixel(price *big.Rat) string { - if price == nil { - return "n/a" - } - if price.IsInt() { - return fmt.Sprintf("%v wei/pixel", price.RatString()) - } - return fmt.Sprintf("%v wei/pixel (%v/%v)", price.FloatString(3), price.Num(), price.Denom()) -} diff --git a/cmd/livepeer_cli/wizard_transcoder.go b/cmd/livepeer_cli/wizard_transcoder.go index 2416aadbd0..b25644a744 100644 --- a/cmd/livepeer_cli/wizard_transcoder.go +++ b/cmd/livepeer_cli/wizard_transcoder.go @@ -43,7 +43,13 @@ func myHostPort() string { return "https://" + ip + ":" + defaultRPCPort } -func (w *wizard) promptOrchestratorConfig() (blockRewardCut, feeCut float64, pricePerUnit, currency, pixelsPerUnit, serviceURI string) { +func (w *wizard) promptOrchestratorConfig() (float64, float64, int, int, string) { + var ( + blockRewardCut float64 + feeCut float64 + addr string + ) + orch, _, err := w.getOrchestratorInfo() if err != nil || orch == nil { fmt.Println("unable to get current reward cut and fee cut") @@ -62,23 +68,17 @@ func (w *wizard) promptOrchestratorConfig() (blockRewardCut, feeCut float64, pri fmt.Println("eg. 1 wei / 10 pixels = 0,1 wei per pixel") fmt.Println() fmt.Printf("Enter amount of pixels that make up a single unit (default: 1 pixel) ") - // Read numbers as strings not to lose precision and support big numbers - pixelsPerUnit = w.readDefaultString("1") - fmt.Println() - fmt.Printf("Enter the currency for the price per unit (default: Wei) ") - currency = w.readDefaultString("Wei") - fmt.Println() - fmt.Printf("Enter the price for %s pixels in %s (default: 0) ", pixelsPerUnit, currency) - pricePerUnit = w.readDefaultString("0") + pixelsPerUnit := w.readDefaultInt(1) + fmt.Printf("Enter the price for %d pixels in Wei (required) ", pixelsPerUnit) + pricePerUnit := w.readDefaultInt(0) - var addr string if orch.ServiceURI == "" { addr = myHostPort() } else { addr = orch.ServiceURI } fmt.Printf("Enter the public host:port of node (default: %v)", addr) - serviceURI = w.readStringAndValidate(func(in string) (string, error) { + serviceURI := w.readStringAndValidate(func(in string) (string, error) { if "" == in { in = addr } @@ -92,7 +92,7 @@ func (w *wizard) promptOrchestratorConfig() (blockRewardCut, feeCut float64, pri return in, nil }) - return blockRewardCut, 100 - feeCut, pricePerUnit, currency, pixelsPerUnit, serviceURI + return blockRewardCut, 100 - feeCut, pricePerUnit, pixelsPerUnit, serviceURI } func (w *wizard) activateOrchestrator() { @@ -196,14 +196,13 @@ func (w *wizard) setOrchestratorConfig() { } func (w *wizard) getOrchestratorConfigFormValues() url.Values { - blockRewardCut, feeShare, pricePerUnit, currency, pixelsPerUnit, serviceURI := w.promptOrchestratorConfig() + blockRewardCut, feeShare, pricePerUnit, pixelsPerUnit, serviceURI := w.promptOrchestratorConfig() return url.Values{ "blockRewardCut": {fmt.Sprintf("%v", blockRewardCut)}, "feeShare": {fmt.Sprintf("%v", feeShare)}, - "pricePerUnit": {fmt.Sprintf("%v", pricePerUnit)}, - "currency": {fmt.Sprintf("%v", currency)}, - "pixelsPerUnit": {fmt.Sprintf("%v", pixelsPerUnit)}, + "pricePerUnit": {fmt.Sprintf("%v", strconv.Itoa(pricePerUnit))}, + "pixelsPerUnit": {fmt.Sprintf("%v", strconv.Itoa(pixelsPerUnit))}, "serviceURI": {fmt.Sprintf("%v", serviceURI)}, } } @@ -320,22 +319,18 @@ func (w *wizard) setPriceForBroadcaster() { return in, nil }) - fmt.Println("Enter pixels per unit (default: 1 pixel)") - // Read numbers as strings not to lose precision and support big numbers - pixels := w.readDefaultString("1") - fmt.Println("Enter currency for the price per unit (default: Wei)") - currency := w.readDefaultString("Wei") - fmt.Println("Enter price per unit (default: 0)") - price := w.readDefaultString("0") + fmt.Println("Enter price per unit:") + price := w.readDefaultInt(0) + fmt.Println("Enter pixels per unit:") + pixels := w.readDefaultInt(1) data := url.Values{ - "pricePerUnit": {fmt.Sprintf("%v", price)}, - "currency": {fmt.Sprintf("%v", currency)}, - "pixelsPerUnit": {fmt.Sprintf("%v", pixels)}, + "pricePerUnit": {fmt.Sprintf("%v", strconv.Itoa(price))}, + "pixelsPerUnit": {fmt.Sprintf("%v", strconv.Itoa(pixels))}, "broadcasterEthAddr": {fmt.Sprintf("%v", ethaddr)}, } result, ok := httpPostWithParams(fmt.Sprintf("http://%v:%v/setPriceForBroadcaster", w.host, w.httpPort), data) if ok { - fmt.Printf("Price for broadcaster %v set to %v %v per %v pixels", ethaddr, price, currency, pixels) + fmt.Printf("Price for broadcaster %v set to %v gwei per %v pixels", ethaddr, price, pixels) return } else { fmt.Printf("Error setting price for broadcaster: %v", result) diff --git a/common/types.go b/common/types.go index dcb258add2..3e98003041 100644 --- a/common/types.go +++ b/common/types.go @@ -106,7 +106,7 @@ type OrchestratorPool interface { } type SelectionAlgorithm interface { - Select(ctx context.Context, addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, maxPrice *big.Rat, prices map[ethcommon.Address]*big.Rat, perfScores map[ethcommon.Address]float64) ethcommon.Address + Select(addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, prices map[ethcommon.Address]float64, perfScores map[ethcommon.Address]float64) ethcommon.Address } type PerfScore struct { diff --git a/core/ai.go b/core/ai.go index 9ac86a3073..772712e97c 100644 --- a/core/ai.go +++ b/core/ai.go @@ -4,8 +4,6 @@ import ( "context" "encoding/json" "errors" - "fmt" - "math/big" "os" "regexp" "strconv" @@ -25,34 +23,34 @@ type AI interface { HasCapacity(pipeline, modelID string) bool } -// Custom type to parse a big.Rat from a JSON number. -type JSONRat struct{ *big.Rat } - -func (s *JSONRat) UnmarshalJSON(data []byte) error { - rat, ok := new(big.Rat).SetString(string(data)) - if !ok { - return fmt.Errorf("value is not a number: %s", data) - } - *s = JSONRat{rat} - return nil -} - -func (s JSONRat) String() string { - return s.FloatString(2) -} - type AIModelConfig struct { Pipeline string `json:"pipeline"` ModelID string `json:"model_id"` URL string `json:"url,omitempty"` Token string `json:"token,omitempty"` Warm bool `json:"warm,omitempty"` - PricePerUnit JSONRat `json:"price_per_unit,omitempty"` - PixelsPerUnit JSONRat `json:"pixels_per_unit,omitempty"` - Currency string `json:"currency,omitempty"` + PricePerUnit int64 `json:"price_per_unit,omitempty"` + PixelsPerUnit int64 `json:"pixels_per_unit,omitempty"` OptimizationFlags worker.OptimizationFlags `json:"optimization_flags,omitempty"` } +func (config *AIModelConfig) UnmarshalJSON(data []byte) error { + // Custom type to avoid recursive calls to UnmarshalJSON + type AIModelConfigAlias AIModelConfig + // Set default values for fields + defaultConfig := &AIModelConfigAlias{ + PixelsPerUnit: 1, + } + + if err := json.Unmarshal(data, defaultConfig); err != nil { + return err + } + + *config = AIModelConfig(*defaultConfig) + + return nil +} + func ParseAIModelConfigs(config string) ([]AIModelConfig, error) { var configs []AIModelConfig diff --git a/core/autoconvertedprice.go b/core/autoconvertedprice.go deleted file mode 100644 index b248937db1..0000000000 --- a/core/autoconvertedprice.go +++ /dev/null @@ -1,139 +0,0 @@ -package core - -import ( - "context" - "fmt" - "math/big" - "strings" - "sync" - - "github.com/livepeer/go-livepeer/eth" - "github.com/livepeer/go-livepeer/eth/watchers" -) - -// PriceFeedWatcher is a global instance of a PriceFeedWatcher. It must be -// initialized before creating an AutoConvertedPrice instance. -var PriceFeedWatcher watchers.PriceFeedWatcher - -// Number of wei in 1 ETH -var weiPerETH = big.NewRat(1e18, 1) - -// AutoConvertedPrice represents a price that is automatically converted to wei -// based on the current price of ETH in a given currency. It uses the static -// PriceFeedWatcher that must be configured before creating an instance. -type AutoConvertedPrice struct { - cancelSubscription func() - onUpdate func(*big.Rat) - basePrice *big.Rat - - mu sync.RWMutex - current *big.Rat -} - -// NewFixedPrice creates a new AutoConvertedPrice with a fixed price in wei. -func NewFixedPrice(price *big.Rat) *AutoConvertedPrice { - return &AutoConvertedPrice{current: price} -} - -// NewAutoConvertedPrice creates a new AutoConvertedPrice instance with the given -// currency and base price. The onUpdate function is optional and gets called -// whenever the price is updated (also with the initial price). The Stop function -// must be called to free resources when the price is no longer needed. -func NewAutoConvertedPrice(currency string, basePrice *big.Rat, onUpdate func(*big.Rat)) (*AutoConvertedPrice, error) { - if onUpdate == nil { - onUpdate = func(*big.Rat) {} - } - - // Default currency (wei/eth) doesn't need the conversion loop - if lcurr := strings.ToLower(currency); lcurr == "" || lcurr == "wei" || lcurr == "eth" { - price := basePrice - if lcurr == "eth" { - price = new(big.Rat).Mul(basePrice, weiPerETH) - } - onUpdate(price) - return NewFixedPrice(price), nil - } - - if PriceFeedWatcher == nil { - return nil, fmt.Errorf("PriceFeedWatcher is not initialized") - } - - base, quote, err := PriceFeedWatcher.Currencies() - if err != nil { - return nil, fmt.Errorf("error getting price feed currencies: %v", err) - } - base, quote, currency = strings.ToUpper(base), strings.ToUpper(quote), strings.ToUpper(currency) - if base != "ETH" && quote != "ETH" { - return nil, fmt.Errorf("price feed does not have ETH as a currency (%v/%v)", base, quote) - } - if base != currency && quote != currency { - return nil, fmt.Errorf("price feed does not have %v as a currency (%v/%v)", currency, base, quote) - } - - currencyPrice, err := PriceFeedWatcher.Current() - if err != nil { - return nil, fmt.Errorf("error getting current price data: %v", err) - } - - ctx, cancel := context.WithCancel(context.Background()) - price := &AutoConvertedPrice{ - cancelSubscription: cancel, - onUpdate: onUpdate, - basePrice: basePrice, - current: new(big.Rat).Mul(basePrice, currencyToWeiMultiplier(currencyPrice, base)), - } - // Trigger the initial update with the current price - onUpdate(price.current) - - price.startAutoConvertLoop(ctx, base) - - return price, nil -} - -// Value returns the current price in wei. -func (a *AutoConvertedPrice) Value() *big.Rat { - a.mu.RLock() - defer a.mu.RUnlock() - return a.current -} - -// Stop unsubscribes from the price feed and frees resources from the -// auto-conversion loop. -func (a *AutoConvertedPrice) Stop() { - a.mu.Lock() - defer a.mu.Unlock() - if a.cancelSubscription != nil { - a.cancelSubscription() - a.cancelSubscription = nil - } -} - -func (a *AutoConvertedPrice) startAutoConvertLoop(ctx context.Context, baseCurrency string) { - priceUpdated := make(chan eth.PriceData, 1) - PriceFeedWatcher.Subscribe(ctx, priceUpdated) - go func() { - for { - select { - case <-ctx.Done(): - return - case currencyPrice := <-priceUpdated: - a.mu.Lock() - a.current = new(big.Rat).Mul(a.basePrice, currencyToWeiMultiplier(currencyPrice, baseCurrency)) - a.mu.Unlock() - - a.onUpdate(a.current) - } - } - }() -} - -// currencyToWeiMultiplier calculates the multiplier to convert the value -// specified in the custom currency to wei. -func currencyToWeiMultiplier(data eth.PriceData, baseCurrency string) *big.Rat { - ethMultipler := data.Price - if baseCurrency == "ETH" { - // Invert the multiplier if the quote is in the form ETH / X - ethMultipler = new(big.Rat).Inv(ethMultipler) - } - return new(big.Rat).Mul(ethMultipler, weiPerETH) -} diff --git a/core/autoconvertedprice_test.go b/core/autoconvertedprice_test.go deleted file mode 100644 index 54db6cfde0..0000000000 --- a/core/autoconvertedprice_test.go +++ /dev/null @@ -1,258 +0,0 @@ -package core - -import ( - "context" - "math/big" - "testing" - "time" - - "github.com/livepeer/go-livepeer/eth" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" -) - -func TestNewAutoConvertedPrice(t *testing.T) { - t.Run("PriceFeedWatcher not initialized", func(t *testing.T) { - _, err := NewAutoConvertedPrice("USD", big.NewRat(1, 1), nil) - require.Error(t, err) - }) - - watcherMock := NewPriceFeedWatcherMock(t) - PriceFeedWatcher = watcherMock - watcherMock.On("Currencies").Return("ETH", "USD", nil) - - t.Run("Fixed price for wei", func(t *testing.T) { - price, err := NewAutoConvertedPrice("wei", big.NewRat(1, 1), nil) - require.NoError(t, err) - require.Equal(t, big.NewRat(1, 1), price.Value()) - require.Nil(t, price.cancelSubscription) - }) - - t.Run("Auto-converted price for ETH", func(t *testing.T) { - price, err := NewAutoConvertedPrice("ETH", big.NewRat(2, 1), nil) - require.NoError(t, err) - require.Equal(t, big.NewRat(2e18, 1), price.Value()) // 2 ETH in wei - require.Nil(t, price.cancelSubscription) - }) - - t.Run("Auto-converted price for USD", func(t *testing.T) { - watcherMock.On("Current").Return(eth.PriceData{Price: big.NewRat(100, 1)}, nil) - watcherMock.On("Subscribe", mock.Anything, mock.Anything).Once() - price, err := NewAutoConvertedPrice("USD", big.NewRat(2, 1), nil) - require.NoError(t, err) - require.Equal(t, big.NewRat(2e16, 1), price.Value()) // 2 USD * 1/100 ETH/USD - require.NotNil(t, price.cancelSubscription) - price.Stop() - }) - - t.Run("Currency not supported by feed", func(t *testing.T) { - _, err := NewAutoConvertedPrice("GBP", big.NewRat(1, 1), nil) - require.Error(t, err) - }) - - t.Run("Currency ETH not supported by feed", func(t *testing.T) { - // set up a new mock to change the currencies returned - watcherMock := NewPriceFeedWatcherMock(t) - PriceFeedWatcher = watcherMock - watcherMock.On("Currencies").Return("wei", "USD", nil) - - _, err := NewAutoConvertedPrice("USD", big.NewRat(1, 1), nil) - require.Error(t, err) - }) - - t.Run("Auto-converted price for inverted quote", func(t *testing.T) { - // set up a new mock to change the currencies returned - watcherMock := NewPriceFeedWatcherMock(t) - PriceFeedWatcher = watcherMock - watcherMock.On("Currencies").Return("USD", "ETH", nil) - watcherMock.On("Current").Return(eth.PriceData{Price: big.NewRat(1, 420)}, nil) - watcherMock.On("Subscribe", mock.Anything, mock.Anything).Once() - price, err := NewAutoConvertedPrice("USD", big.NewRat(66, 1), nil) - require.NoError(t, err) - require.Equal(t, big.NewRat(11e17, 7), price.Value()) // 66 USD * 1/420 ETH/USD - require.NotNil(t, price.cancelSubscription) - price.Stop() - }) -} - -func TestAutoConvertedPrice_Update(t *testing.T) { - require := require.New(t) - watcherMock := NewPriceFeedWatcherMock(t) - PriceFeedWatcher = watcherMock - - watcherMock.On("Currencies").Return("ETH", "USD", nil) - watcherMock.On("Current").Return(eth.PriceData{Price: big.NewRat(3000, 1)}, nil) - - priceUpdatedChan := make(chan *big.Rat, 1) - onUpdate := func(price *big.Rat) { - priceUpdatedChan <- price - } - - var sink chan<- eth.PriceData - watcherMock.On("Subscribe", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - sink = args.Get(1).(chan<- eth.PriceData) - }).Once() - - price, err := NewAutoConvertedPrice("USD", big.NewRat(50, 1), onUpdate) - require.NoError(err) - require.NotNil(t, price.cancelSubscription) - defer price.Stop() - watcherMock.AssertExpectations(t) - - require.Equal(big.NewRat(5e16, 3), price.Value()) // 50 USD * 1/3000 ETH/USD - require.Equal(big.NewRat(5e16, 3), <-priceUpdatedChan) // initial update must be sent - - // Simulate a price update - sink <- eth.PriceData{Price: big.NewRat(6000, 1)} - - select { - case updatedPrice := <-priceUpdatedChan: - require.Equal(big.NewRat(5e16, 6), updatedPrice) // 50 USD * 1/6000 USD/ETH - require.Equal(big.NewRat(5e16, 6), price.Value()) // must also udpate current value - case <-time.After(time.Second): - t.Fatal("Expected price update not received") - } -} - -func TestAutoConvertedPrice_Stop(t *testing.T) { - require := require.New(t) - watcherMock := NewPriceFeedWatcherMock(t) - PriceFeedWatcher = watcherMock - - watcherMock.On("Currencies").Return("ETH", "USD", nil) - watcherMock.On("Current").Return(eth.PriceData{Price: big.NewRat(100, 1)}, nil) - - var subsCtx context.Context - watcherMock.On("Subscribe", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - subsCtx = args.Get(0).(context.Context) - }).Once() - - price, err := NewAutoConvertedPrice("USD", big.NewRat(50, 1), nil) - require.NoError(err) - require.NotNil(t, price.cancelSubscription) - - price.Stop() - require.Nil(price.cancelSubscription) - require.Error(subsCtx.Err()) -} - -func TestCurrencyToWeiMultiplier(t *testing.T) { - tests := []struct { - name string - data eth.PriceData - baseCurrency string - expectedWei *big.Rat - }{ - { - name: "Base currency is ETH", - data: eth.PriceData{Price: big.NewRat(500, 1)}, // 500 USD per ETH - baseCurrency: "ETH", - expectedWei: big.NewRat(1e18, 500), // (1 / 500 USD/ETH) * 1e18 wei/ETH - }, - { - name: "Base currency is not ETH", - data: eth.PriceData{Price: big.NewRat(1, 2000)}, // 1/2000 ETH per USD - baseCurrency: "USD", - expectedWei: big.NewRat(5e14, 1), // (1 * 1/2000 ETH/USD) * 1e18 wei/ETH - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - result := currencyToWeiMultiplier(tt.data, tt.baseCurrency) - assert.Equal(t, 0, tt.expectedWei.Cmp(result)) - }) - } -} - -// Auto-generated code from here down. -// -// Code generated by mockery v2.42.1. DO NOT EDIT. - -// PriceFeedWatcherMock is an autogenerated mock type for the PriceFeedWatcher type -type PriceFeedWatcherMock struct { - mock.Mock -} - -// Currencies provides a mock function with given fields: -func (_m *PriceFeedWatcherMock) Currencies() (string, string, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Currencies") - } - - var r0 string - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func() (string, string, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func() string); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func() error); ok { - r2 = rf() - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// Current provides a mock function with given fields: -func (_m *PriceFeedWatcherMock) Current() (eth.PriceData, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Current") - } - - var r0 eth.PriceData - var r1 error - if rf, ok := ret.Get(0).(func() (eth.PriceData, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() eth.PriceData); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(eth.PriceData) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Subscribe provides a mock function with given fields: ctx, sink -func (_m *PriceFeedWatcherMock) Subscribe(ctx context.Context, sink chan<- eth.PriceData) { - _m.Called(ctx, sink) -} - -// NewPriceFeedWatcherMock creates a new instance of PriceFeedWatcherMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPriceFeedWatcherMock(t interface { - mock.TestingT - Cleanup(func()) -}) *PriceFeedWatcherMock { - mock := &PriceFeedWatcherMock{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/capabilities.go b/core/capabilities.go index 237790e3c8..12eb7bbc6d 100644 --- a/core/capabilities.go +++ b/core/capabilities.go @@ -3,10 +3,9 @@ package core import ( "errors" "fmt" + "sync" - "github.com/Masterminds/semver/v3" - "github.com/golang/glog" "github.com/livepeer/go-livepeer/net" "github.com/livepeer/go-tools/drivers" "github.com/livepeer/lpms/ffmpeg" @@ -21,21 +20,16 @@ type ModelConstraint struct { type Capability int type CapabilityString []uint64 type Constraints struct { - minVersion string -} -type PerCapabilityConstraints struct { // Models contains a *ModelConstraint for each supported model ID Models ModelConstraints } -type CapabilityConstraints map[Capability]*PerCapabilityConstraints +type CapabilityConstraints map[Capability]*Constraints type Capabilities struct { - bitstring CapabilityString - mandatories CapabilityString - version string - constraints Constraints - capabilityConstraints CapabilityConstraints - capacities map[Capability]int - mutex sync.Mutex + bitstring CapabilityString + mandatories CapabilityString + constraints CapabilityConstraints + capacities map[Capability]int + mutex sync.Mutex } type CapabilityTest struct { inVideoData []byte @@ -255,7 +249,7 @@ func (c1 CapabilityConstraints) CompatibleWith(c2 CapabilityConstraints) bool { return true } -func (c1 *PerCapabilityConstraints) CompatibleWith(c2 *PerCapabilityConstraints) bool { +func (c1 *Constraints) CompatibleWith(c2 *Constraints) bool { return c1.Models.CompatibleWith(c2.Models) } @@ -384,51 +378,6 @@ func JobCapabilities(params *StreamParameters, segPar *SegmentParameters) (*Capa return &Capabilities{bitstring: NewCapabilityString(capList)}, nil } -func (bcast *Capabilities) LivepeerVersionCompatibleWith(orch *net.Capabilities) bool { - if bcast == nil || orch == nil || bcast.constraints.minVersion == "" { - // should not happen, but just in case, return true by default - return true - } - if orch.Version == "" || orch.Version == "undefined" { - // Orchestrator/Transcoder version is not set, so it's incompatible - return false - } - - minVer, err := semver.NewVersion(bcast.constraints.minVersion) - if err != nil { - glog.Warningf("error while parsing minVersion: %v", err) - return true - } - ver, err := semver.NewVersion(orch.Version) - if err != nil { - glog.Warningf("error while parsing version: %v", err) - return false - } - - // // Ignore prerelease versions as in go-livepeer we actually define post-release suffixes - // minVerNoSuffix, _ := minVer.SetPrerelease("") - // verNoSuffix, _ := ver.SetPrerelease("") - - // return !verNoSuffix.LessThan(&minVerNoSuffix) - - // TODO: Remove AI-specific cases below when merging into master. - // NOTE: This logic was added to allow the version suffix (i.e. v0.7.6-ai.1) to be - // used correctly during the version constraint filtering. - minVerHasSuffix := minVer.Prerelease() != "" - verHasSuffix := ver.Prerelease() != "" - if !minVerHasSuffix || !verHasSuffix { - minVerNoSuffix, _ := minVer.SetPrerelease("") - verNoSuffix, _ := ver.SetPrerelease("") - minVer = &minVerNoSuffix - ver = &verNoSuffix - } - if minVer.Equal(ver) && minVerHasSuffix && !verHasSuffix { - return false - } - - return !ver.LessThan(minVer) -} - func (bcast *Capabilities) CompatibleWith(orch *net.Capabilities) bool { // Ensure bcast and orch are compatible with one another. @@ -438,9 +387,6 @@ func (bcast *Capabilities) CompatibleWith(orch *net.Capabilities) bool { // cf. common.CapabilityComparator return false } - if !bcast.LivepeerVersionCompatibleWith(orch) { - return false - } // For now, check this: // ( orch.mandatories AND bcast.bitstring ) == orch.mandatories && @@ -453,8 +399,8 @@ func (bcast *Capabilities) CompatibleWith(orch *net.Capabilities) bool { return false } - orchCapabilityConstraints := CapabilitiesFromNetCapabilities(orch).capabilityConstraints - if !bcast.capabilityConstraints.CompatibleWith(orchCapabilityConstraints) { + orchConstraints := CapabilitiesFromNetCapabilities(orch).constraints + if !bcast.constraints.CompatibleWith(orchConstraints) { return false } @@ -467,19 +413,19 @@ func (c *Capabilities) ToNetCapabilities() *net.Capabilities { } c.mutex.Lock() defer c.mutex.Unlock() - netCaps := &net.Capabilities{Bitstring: c.bitstring, Mandatories: c.mandatories, Version: c.version, Capacities: make(map[uint32]uint32), Constraints: &net.Capabilities_Constraints{MinVersion: c.constraints.minVersion}, CapabilityConstraints: make(map[uint32]*net.Capabilities_CapabilityConstraints)} + netCaps := &net.Capabilities{Bitstring: c.bitstring, Mandatories: c.mandatories, Capacities: make(map[uint32]uint32), Constraints: make(map[uint32]*net.Capabilities_Constraints)} for capability, capacity := range c.capacities { netCaps.Capacities[uint32(capability)] = uint32(capacity) } - for capability, constraints := range c.capabilityConstraints { - models := make(map[string]*net.Capabilities_CapabilityConstraints_ModelConstraint) + for capability, constraints := range c.constraints { + models := make(map[string]*net.Capabilities_Constraints_ModelConstraint) for modelID, modelConstraint := range constraints.Models { - models[modelID] = &net.Capabilities_CapabilityConstraints_ModelConstraint{ + models[modelID] = &net.Capabilities_Constraints_ModelConstraint{ Warm: modelConstraint.Warm, } } - netCaps.CapabilityConstraints[uint32(capability)] = &net.Capabilities_CapabilityConstraints{ + netCaps.Constraints[uint32(capability)] = &net.Capabilities_Constraints{ Models: models, } } @@ -491,12 +437,10 @@ func CapabilitiesFromNetCapabilities(caps *net.Capabilities) *Capabilities { return nil } coreCaps := &Capabilities{ - bitstring: caps.Bitstring, - mandatories: caps.Mandatories, - capacities: make(map[Capability]int), - version: caps.Version, - constraints: Constraints{minVersion: caps.Constraints.GetMinVersion()}, - capabilityConstraints: make(CapabilityConstraints), + bitstring: caps.Bitstring, + mandatories: caps.Mandatories, + capacities: make(map[Capability]int), + constraints: make(map[Capability]*Constraints), } if caps.Capacities == nil || len(caps.Capacities) == 0 { // build capacities map if not present (struct received from previous versions) @@ -514,13 +458,13 @@ func CapabilitiesFromNetCapabilities(caps *net.Capabilities) *Capabilities { } } - for capabilityInt, constraints := range caps.CapabilityConstraints { + for capabilityInt, constraints := range caps.Constraints { models := make(map[string]*ModelConstraint) for modelID, modelConstraint := range constraints.Models { models[modelID] = &ModelConstraint{Warm: modelConstraint.Warm} } - coreCaps.capabilityConstraints[Capability(capabilityInt)] = &PerCapabilityConstraints{ + coreCaps.constraints[Capability(capabilityInt)] = &Constraints{ Models: models, } } @@ -529,7 +473,7 @@ func CapabilitiesFromNetCapabilities(caps *net.Capabilities) *Capabilities { } func NewCapabilities(caps []Capability, m []Capability) *Capabilities { - c := &Capabilities{capacities: make(map[Capability]int), version: LivepeerVersion, capabilityConstraints: make(CapabilityConstraints)} + c := &Capabilities{capacities: make(map[Capability]int)} if len(caps) > 0 { c.bitstring = NewCapabilityString(caps) // initialize capacities to 1 by default, mandatory capabilities doesn't have capacities @@ -543,10 +487,9 @@ func NewCapabilities(caps []Capability, m []Capability) *Capabilities { return c } -func NewCapabilitiesWithConstraints(caps []Capability, m []Capability, constraints Constraints, capabilityConstraints CapabilityConstraints) *Capabilities { +func NewCapabilitiesWithConstraints(caps []Capability, m []Capability, constraints CapabilityConstraints) *Capabilities { c := NewCapabilities(caps, m) c.constraints = constraints - c.capabilityConstraints = capabilityConstraints return c } @@ -722,16 +665,3 @@ func (bcast *Capabilities) LegacyOnly() bool { } return bcast.bitstring.CompatibleWith(legacyCapabilityString) } - -func (bcast *Capabilities) SetMinVersionConstraint(minVersionConstraint string) { - if bcast != nil { - bcast.constraints.minVersion = minVersionConstraint - } -} - -func (bcast *Capabilities) MinVersionConstraint() string { - if bcast != nil { - return bcast.constraints.minVersion - } - return "" -} diff --git a/core/capabilities_test.go b/core/capabilities_test.go index 89e3d62102..4f29c6c610 100644 --- a/core/capabilities_test.go +++ b/core/capabilities_test.go @@ -331,65 +331,6 @@ func TestCapability_CompatibleWithNetCap(t *testing.T) { orch = NewCapabilities(nil, nil) bcast = NewCapabilities(nil, []Capability{1}) assert.True(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // broadcaster is not compatible with orchestrator - old O's version - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.4.1" - orch.version = "0.4.0" - assert.False(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // broadcaster is compatible with orchestrator - the same version - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.4.1" - orch.version = "0.4.1" - assert.True(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // TODO: Remove AI-specific cases below when merging into master. - // NOTE: Additional logic was added to the `LivepeerVersionCompatibleWith` method in - // capabilities.go to achieve this behavior. - // AI broadcaster is compatible with AI orchestrator - higher ai suffix - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.7.2" - orch.version = "0.7.2-ai.1" - assert.True(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // AI broadcaster is not compatible with AI orchestrator - no ai suffix - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.7.2-ai.1" - orch.version = "0.7.2" - assert.False(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // AI broadcaster is not compatible with AI orchestrator - lower ai suffix - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.7.2-ai.2" - orch.version = "0.7.2-ai.1" - assert.False(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // AI broadcaster is not compatible with AI orchestrator - lower major version - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.7.2-ai.2" - orch.version = "0.7.1-ai.1" - assert.False(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // AI broadcaster is compatible with AI orchestrator - higher ai suffix - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.7.2-ai.1" - orch.version = "0.7.2-ai.2" - assert.True(bcast.CompatibleWith(orch.ToNetCapabilities())) - - // AI broadcaster is compatible with AI orchestrator- higher major version - orch = NewCapabilities(nil, nil) - bcast = NewCapabilities(nil, nil) - bcast.constraints.minVersion = "0.7.2-ai.2" - orch.version = "0.7.3-ai.1" - assert.True(bcast.CompatibleWith(orch.ToNetCapabilities())) } func TestCapability_RoundTrip_Net(t *testing.T) { @@ -542,131 +483,3 @@ func TestCapabilities_LegacyCheck(t *testing.T) { assert.Len(legacyCapabilities, legacyLen) // sanity check no modifications } - -func TestLiveeerVersionCompatibleWith(t *testing.T) { - tests := []struct { - name string - broadcasterMinVersion string - transcoderVersion string - expected bool - }{ - { - name: "broadcaster required version is the same as the transcoder version", - broadcasterMinVersion: "0.4.1", - transcoderVersion: "0.4.1", - expected: true, - }, - { - name: "broadcaster required version is less than the transcoder version", - broadcasterMinVersion: "0.4.0", - transcoderVersion: "0.4.1", - expected: true, - }, - { - name: "broadcaster required version is more than the transcoder version", - broadcasterMinVersion: "0.4.2", - transcoderVersion: "0.4.1", - expected: false, - }, - { - name: "broadcaster required version is the same as the transcoder dirty version", - broadcasterMinVersion: "0.4.1", - transcoderVersion: "0.4.1-b3278dce-dirty", - expected: true, - }, - { - name: "broadcaster required version is before the transcoder dirty version", - broadcasterMinVersion: "0.4.0", - transcoderVersion: "0.4.1-b3278dce-dirty", - expected: true, - }, - { - name: "broadcaster required version is after the transcoder dirty version", - broadcasterMinVersion: "0.4.2", - transcoderVersion: "0.4.1-b3278dce-dirty", - expected: false, - }, - { - name: "broadcaster required version is empty", - broadcasterMinVersion: "", - transcoderVersion: "0.4.1", - expected: true, - }, - { - name: "both versions are undefined", - broadcasterMinVersion: "", - transcoderVersion: "", - expected: true, - }, - { - name: "transcoder version is empty", - broadcasterMinVersion: "0.4.0", - transcoderVersion: "", - expected: false, - }, - { - name: "transcoder version is undefined", - broadcasterMinVersion: "0.4.0", - transcoderVersion: "undefined", - expected: false, - }, - { - name: "unparsable broadcaster's min version", - broadcasterMinVersion: "nonparsablesemversion", - transcoderVersion: "0.4.1", - expected: true, - }, - { - name: "unparsable transcoder's version", - broadcasterMinVersion: "0.4.1", - transcoderVersion: "nonparsablesemversion", - expected: false, - }, - // TODO: Remove AI-specific cases below when merging into master. - // NOTE: Additional logic was added to the `LivepeerVersionCompatibleWith` method in - // capabilities.go to achieve this behavior. - { - name: "AI broadcaster required version has no AI suffix", - broadcasterMinVersion: "0.7.2", - transcoderVersion: "0.7.2-ai.1", - expected: true, - }, - { - name: "AI transcoder version has no AI suffix", - broadcasterMinVersion: "0.7.2-ai.1", - transcoderVersion: "0.7.2", - expected: false, - }, - { - name: "AI broadcaster required version AI suffix is higher than AI transcoder AI suffix", - broadcasterMinVersion: "0.7.2-ai.2", - transcoderVersion: "0.7.2-ai.1", - expected: false, - }, - { - name: "AI broadcaster required major version is higher than AI transcoder major version", - broadcasterMinVersion: "0.7.2-ai.2", - transcoderVersion: "0.7.2-ai.1", - expected: false, - }, - { - name: "AI broadcaster required version AI suffix is lower than AI transcoder AI suffix", - broadcasterMinVersion: "0.7.2-ai.1", - transcoderVersion: "0.7.2-ai.2", - expected: true, - }, - { - name: "AI broadcaster required major version is lower than AI transcoder major version", - broadcasterMinVersion: "0.7.2-ai.1", - transcoderVersion: "0.7.3-ai.1", - expected: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - bCapabilities := &Capabilities{constraints: Constraints{minVersion: tt.broadcasterMinVersion}} - tCapabilities := &Capabilities{version: tt.transcoderVersion} - assert.Equal(t, tt.expected, bCapabilities.LivepeerVersionCompatibleWith(tCapabilities.ToNetCapabilities())) - }) - } -} diff --git a/core/core_test.go b/core/core_test.go index 5346e2a3d3..671c56c916 100644 --- a/core/core_test.go +++ b/core/core_test.go @@ -78,10 +78,10 @@ func TestTranscode(t *testing.T) { } // Check transcode result - if Over1Pct(len(tr.TranscodeData.Segments[0].Data), 273352) { // 144p + if Over1Pct(len(tr.TranscodeData.Segments[0].Data), 218268) { // 144p t.Error("Unexpected transcode result ", len(tr.TranscodeData.Segments[0].Data)) } - if Over1Pct(len(tr.TranscodeData.Segments[1].Data), 378068) { // 240p + if Over1Pct(len(tr.TranscodeData.Segments[1].Data), 302868) { // 240p t.Error("Unexpected transcode result ", len(tr.TranscodeData.Segments[1].Data)) } diff --git a/core/livepeernode.go b/core/livepeernode.go index 0d726ce652..e94c50af23 100644 --- a/core/livepeernode.go +++ b/core/livepeernode.go @@ -64,20 +64,20 @@ func (t NodeType) String() string { } type CapabilityPriceMenu struct { - modelPrices map[string]*AutoConvertedPrice + modelPrices map[string]*big.Rat } func NewCapabilityPriceMenu() CapabilityPriceMenu { return CapabilityPriceMenu{ - modelPrices: make(map[string]*AutoConvertedPrice), + modelPrices: make(map[string]*big.Rat), } } -func (m CapabilityPriceMenu) SetPriceForModelID(modelID string, price *AutoConvertedPrice) { +func (m CapabilityPriceMenu) SetPriceForModelID(modelID string, price *big.Rat) { m.modelPrices[modelID] = price } -func (m CapabilityPriceMenu) PriceForModelID(modelID string) *AutoConvertedPrice { +func (m CapabilityPriceMenu) PriceForModelID(modelID string) *big.Rat { return m.modelPrices[modelID] } @@ -87,7 +87,7 @@ func NewCapabilityPrices() CapabilityPrices { return make(map[Capability]CapabilityPriceMenu) } -func (cp CapabilityPrices) SetPriceForModelID(cap Capability, modelID string, price *AutoConvertedPrice) { +func (cp CapabilityPrices) SetPriceForModelID(cap Capability, modelID string, price *big.Rat) { menu, ok := cp[cap] if !ok { menu = NewCapabilityPriceMenu() @@ -97,7 +97,7 @@ func (cp CapabilityPrices) SetPriceForModelID(cap Capability, modelID string, pr menu.SetPriceForModelID(modelID, price) } -func (cp CapabilityPrices) PriceForModelID(cap Capability, modelID string) *AutoConvertedPrice { +func (cp CapabilityPrices) PriceForModelID(cap Capability, modelID string) *big.Rat { menu, ok := cp[cap] if !ok { return nil @@ -139,7 +139,7 @@ type LivepeerNode struct { StorageConfigs map[string]*transcodeConfig storageMutex *sync.RWMutex // Transcoder private fields - priceInfo map[string]*AutoConvertedPrice + priceInfo map[string]*big.Rat priceInfoForCaps map[string]CapabilityPrices serviceURI url.URL segmentMutex *sync.RWMutex @@ -155,8 +155,8 @@ func NewLivepeerNode(e eth.LivepeerEthClient, wd string, dbh *common.DB) (*Livep AutoAdjustPrice: true, SegmentChans: make(map[ManifestID]SegmentChan), segmentMutex: &sync.RWMutex{}, - Capabilities: &Capabilities{capacities: map[Capability]int{}, version: LivepeerVersion}, - priceInfo: make(map[string]*AutoConvertedPrice), + Capabilities: &Capabilities{capacities: map[Capability]int{}}, + priceInfo: make(map[string]*big.Rat), priceInfoForCaps: make(map[string]CapabilityPrices), StorageConfigs: make(map[string]*transcodeConfig), storageMutex: &sync.RWMutex{}, @@ -176,16 +176,12 @@ func (n *LivepeerNode) SetServiceURI(newUrl *url.URL) { } // SetBasePrice sets the base price for an orchestrator on the node -func (n *LivepeerNode) SetBasePrice(b_eth_addr string, price *AutoConvertedPrice) { +func (n *LivepeerNode) SetBasePrice(b_eth_addr string, price *big.Rat) { addr := strings.ToLower(b_eth_addr) n.mu.Lock() defer n.mu.Unlock() - prevPrice := n.priceInfo[addr] n.priceInfo[addr] = price - if prevPrice != nil { - prevPrice.Stop() - } } // GetBasePrice gets the base price for an orchestrator @@ -194,25 +190,17 @@ func (n *LivepeerNode) GetBasePrice(b_eth_addr string) *big.Rat { n.mu.RLock() defer n.mu.RUnlock() - price := n.priceInfo[addr] - if price == nil { - return nil - } - return price.Value() + return n.priceInfo[addr] } func (n *LivepeerNode) GetBasePrices() map[string]*big.Rat { n.mu.RLock() defer n.mu.RUnlock() - prices := make(map[string]*big.Rat) - for addr, price := range n.priceInfo { - prices[addr] = price.Value() - } - return prices + return n.priceInfo } -func (n *LivepeerNode) SetBasePriceForCap(b_eth_addr string, cap Capability, modelID string, price *AutoConvertedPrice) { +func (n *LivepeerNode) SetBasePriceForCap(b_eth_addr string, cap Capability, modelID string, price *big.Rat) { addr := strings.ToLower(b_eth_addr) n.mu.Lock() defer n.mu.Unlock() @@ -236,7 +224,7 @@ func (n *LivepeerNode) GetBasePriceForCap(b_eth_addr string, cap Capability, mod return nil } - return prices.PriceForModelID(cap, modelID).Value() + return prices.PriceForModelID(cap, modelID) } // SetMaxFaceValue sets the faceValue upper limit for tickets received diff --git a/core/livepeernode_test.go b/core/livepeernode_test.go index d943086ba4..259992f892 100644 --- a/core/livepeernode_test.go +++ b/core/livepeernode_test.go @@ -162,8 +162,8 @@ func TestSetAndGetBasePrice(t *testing.T) { price := big.NewRat(1, 1) - n.SetBasePrice("default", NewFixedPrice(price)) - assert.Zero(n.priceInfo["default"].Value().Cmp(price)) + n.SetBasePrice("default", price) + assert.Zero(n.priceInfo["default"].Cmp(price)) assert.Zero(n.GetBasePrice("default").Cmp(price)) assert.Zero(n.GetBasePrices()["default"].Cmp(price)) @@ -172,36 +172,10 @@ func TestSetAndGetBasePrice(t *testing.T) { price1 := big.NewRat(2, 1) price2 := big.NewRat(3, 1) - n.SetBasePrice(addr1, NewFixedPrice(price1)) - n.SetBasePrice(addr2, NewFixedPrice(price2)) - assert.Zero(n.priceInfo[addr1].Value().Cmp(price1)) - assert.Zero(n.priceInfo[addr2].Value().Cmp(price2)) + n.SetBasePrice(addr1, price1) + n.SetBasePrice(addr2, price2) + assert.Zero(n.priceInfo[addr1].Cmp(price1)) + assert.Zero(n.priceInfo[addr2].Cmp(price2)) assert.Zero(n.GetBasePrices()[addr1].Cmp(price1)) assert.Zero(n.GetBasePrices()[addr2].Cmp(price2)) } - -func TestSetAndGetCapabilityPrices(t *testing.T) { - require := require.New(t) - assert := assert.New(t) - - n, err := NewLivepeerNode(nil, "", nil) - require.Nil(err) - - price := big.NewRat(1, 1) - - n.SetBasePriceForCap("default", Capability_TextToImage, "default", NewFixedPrice(price)) - assert.Zero(n.priceInfoForCaps["default"].PriceForModelID(Capability_TextToImage, "default").Value().Cmp(price)) - assert.Zero(n.GetBasePriceForCap("default", Capability_TextToImage, "default").Cmp(price)) - - addr1 := "0x0000000000000000000000000000000000000000" - addr2 := "0x1000000000000000000000000000000000000000" - price1 := big.NewRat(2, 1) - price2 := big.NewRat(3, 1) - - n.SetBasePriceForCap(addr1, Capability_TextToImage, "default", NewFixedPrice(price1)) - n.SetBasePriceForCap(addr2, Capability_ImageToImage, "default", NewFixedPrice(price2)) - assert.Zero(n.priceInfoForCaps[addr1].PriceForModelID(Capability_TextToImage, "default").Value().Cmp(price1)) - assert.Zero(n.priceInfoForCaps[addr2].PriceForModelID(Capability_ImageToImage, "default").Value().Cmp(price2)) - assert.Zero(n.GetBasePriceForCap(addr1, Capability_TextToImage, "default").Cmp(price1)) - assert.Zero(n.GetBasePriceForCap(addr2, Capability_ImageToImage, "default").Cmp(price2)) -} diff --git a/core/orch_test.go b/core/orch_test.go index 72aa9cb8bb..981661433d 100644 --- a/core/orch_test.go +++ b/core/orch_test.go @@ -245,10 +245,7 @@ func TestSelectTranscoder(t *testing.T) { strm := &StubTranscoderServer{manager: m, WithholdResults: false} strm2 := &StubTranscoderServer{manager: m} - LivepeerVersion = "0.4.1" capabilities := NewCapabilities(DefaultCapabilities(), []Capability{}) - LivepeerVersion = "undefined" - richCapabilities := NewCapabilities(append(DefaultCapabilities(), Capability_HEVC_Encode), []Capability{}) allCapabilities := NewCapabilities(append(DefaultCapabilities(), OptionalCapabilities()...), []Capability{}) @@ -262,7 +259,7 @@ func TestSelectTranscoder(t *testing.T) { go func() { m.Manage(strm, 1, capabilities.ToNetCapabilities()) }() time.Sleep(1 * time.Millisecond) // allow time for first stream to register go func() { m.Manage(strm2, 1, richCapabilities.ToNetCapabilities()); wg.Done() }() - time.Sleep(1 * time.Millisecond) // allow time for second stream to register e for third stream to register + time.Sleep(1 * time.Millisecond) // allow time for second stream to register assert.NotNil(m.liveTranscoders[strm]) assert.NotNil(m.liveTranscoders[strm2]) @@ -344,20 +341,6 @@ func TestSelectTranscoder(t *testing.T) { assert.Equal(1, t1.load) m.completeStreamSession(testSessionId) assert.Equal(0, t1.load) - - // assert one transcoder with the correct Livepeer version is selected - minVersionCapabilities := NewCapabilities(DefaultCapabilities(), []Capability{}) - minVersionCapabilities.SetMinVersionConstraint("0.4.0") - currentTranscoder, err = m.selectTranscoder(testSessionId, minVersionCapabilities) - assert.Nil(err) - m.completeStreamSession(testSessionId) - - // assert no transcoders available for min version higher than any transcoder - minVersionHighCapabilities := NewCapabilities(DefaultCapabilities(), []Capability{}) - minVersionHighCapabilities.SetMinVersionConstraint("0.4.2") - currentTranscoder, err = m.selectTranscoder(testSessionId, minVersionHighCapabilities) - assert.NotNil(err) - m.completeStreamSession(testSessionId) } func TestCompleteStreamSession(t *testing.T) { @@ -721,7 +704,7 @@ func TestProcessPayment_GivenRecipientError_ReturnsNil(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) recipient.On("TxCostMultiplier", mock.Anything).Return(big.NewRat(1, 1), nil) recipient.On("ReceiveTicket", mock.Anything, mock.Anything, mock.Anything).Return("", false, nil) @@ -802,7 +785,7 @@ func TestProcessPayment_ActiveOrchestrator(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) // orchestrator inactive -> error err := orch.ProcessPayment(context.Background(), defaultPayment(t), ManifestID("some manifest")) @@ -873,7 +856,7 @@ func TestProcessPayment_GivenLosingTicket_DoesNotRedeem(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) recipient.On("TxCostMultiplier", mock.Anything).Return(big.NewRat(1, 1), nil) recipient.On("ReceiveTicket", mock.Anything, mock.Anything, mock.Anything).Return("some sessionID", false, nil) @@ -905,7 +888,7 @@ func TestProcessPayment_GivenWinningTicket_RedeemError(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestID := ManifestID("some manifest") sessionID := "some sessionID" @@ -945,7 +928,7 @@ func TestProcessPayment_GivenWinningTicket_Redeems(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestID := ManifestID("some manifest") sessionID := "some sessionID" @@ -985,7 +968,7 @@ func TestProcessPayment_GivenMultipleWinningTickets_RedeemsAll(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestID := ManifestID("some manifest") sessionID := "some sessionID" @@ -1055,7 +1038,7 @@ func TestProcessPayment_GivenConcurrentWinningTickets_RedeemsAll(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestIDs := make([]string, 5) @@ -1114,7 +1097,7 @@ func TestProcessPayment_GivenReceiveTicketError_ReturnsError(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestID := ManifestID("some manifest") @@ -1182,7 +1165,7 @@ func TestProcessPayment_PaymentError_DoesNotIncreaseCreditBalance(t *testing.T) } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestID := ManifestID("some manifest") paymentError := errors.New("ReceiveTicket error") @@ -1244,7 +1227,7 @@ func TestSufficientBalance_IsSufficient_ReturnsTrue(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestID := ManifestID("some manifest") @@ -1282,7 +1265,7 @@ func TestSufficientBalance_IsNotSufficient_ReturnsFalse(t *testing.T) { } orch := NewOrchestrator(n, rm) orch.address = addr - orch.node.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + orch.node.SetBasePrice("default", big.NewRat(0, 1)) manifestID := ManifestID("some manifest") @@ -1324,7 +1307,7 @@ func TestSufficientBalance_OffChainMode_ReturnsTrue(t *testing.T) { func TestTicketParams(t *testing.T) { n, _ := NewLivepeerNode(nil, "", nil) - n.priceInfo["default"] = NewFixedPrice(big.NewRat(1, 1)) + n.priceInfo["default"] = big.NewRat(1, 1) priceInfo := &net.PriceInfo{PricePerUnit: 1, PixelsPerUnit: 1} recipient := new(pm.MockRecipient) n.Recipient = recipient @@ -1405,7 +1388,7 @@ func TestPriceInfo(t *testing.T) { expPricePerPixel := big.NewRat(101, 100) n, _ := NewLivepeerNode(nil, "", nil) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) recipient := new(pm.MockRecipient) n.Recipient = recipient @@ -1423,7 +1406,7 @@ func TestPriceInfo(t *testing.T) { // basePrice = 10/1, txMultiplier = 100/1 => expPricePerPixel = 1010/100 basePrice = big.NewRat(10, 1) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) orch = NewOrchestrator(n, nil) expPricePerPixel = big.NewRat(1010, 100) @@ -1438,7 +1421,7 @@ func TestPriceInfo(t *testing.T) { // basePrice = 1/10, txMultiplier = 100 => expPricePerPixel = 101/1000 basePrice = big.NewRat(1, 10) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) orch = NewOrchestrator(n, nil) expPricePerPixel = big.NewRat(101, 1000) @@ -1452,7 +1435,7 @@ func TestPriceInfo(t *testing.T) { assert.Equal(priceInfo.PixelsPerUnit, expPrice.Denom().Int64()) // basePrice = 25/10 , txMultiplier = 100 => expPricePerPixel = 2525/1000 basePrice = big.NewRat(25, 10) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) orch = NewOrchestrator(n, nil) expPricePerPixel = big.NewRat(2525, 1000) @@ -1468,7 +1451,7 @@ func TestPriceInfo(t *testing.T) { // basePrice = 10/1 , txMultiplier = 100/10 => expPricePerPixel = 11 basePrice = big.NewRat(10, 1) txMultiplier = big.NewRat(100, 10) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) recipient = new(pm.MockRecipient) n.Recipient = recipient recipient.On("TxCostMultiplier", mock.Anything).Return(txMultiplier, nil) @@ -1487,7 +1470,7 @@ func TestPriceInfo(t *testing.T) { // basePrice = 10/1 , txMultiplier = 1/10 => expPricePerPixel = 110 basePrice = big.NewRat(10, 1) txMultiplier = big.NewRat(1, 10) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) recipient = new(pm.MockRecipient) n.Recipient = recipient recipient.On("TxCostMultiplier", mock.Anything).Return(txMultiplier, nil) @@ -1506,7 +1489,7 @@ func TestPriceInfo(t *testing.T) { // basePrice = 10, txMultiplier = 1 => expPricePerPixel = 20 basePrice = big.NewRat(10, 1) txMultiplier = big.NewRat(1, 1) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) recipient = new(pm.MockRecipient) n.Recipient = recipient recipient.On("TxCostMultiplier", mock.Anything).Return(txMultiplier, nil) @@ -1523,7 +1506,7 @@ func TestPriceInfo(t *testing.T) { assert.Equal(priceInfo.PixelsPerUnit, expPrice.Denom().Int64()) // basePrice = 0 => expPricePerPixel = 0 - n.SetBasePrice("default", NewFixedPrice(big.NewRat(0, 1))) + n.SetBasePrice("default", big.NewRat(0, 1)) orch = NewOrchestrator(n, nil) priceInfo, err = orch.PriceInfo(ethcommon.Address{}, "") @@ -1533,7 +1516,7 @@ func TestPriceInfo(t *testing.T) { // test no overflows basePrice = big.NewRat(25000, 1) - n.SetBasePrice("default", NewFixedPrice(basePrice)) + n.SetBasePrice("default", basePrice) faceValue, _ := new(big.Int).SetString("22245599237119512", 10) txCost := new(big.Int).Mul(big.NewInt(100000), big.NewInt(7500000000)) txMultiplier = new(big.Rat).SetFrac(faceValue, txCost) // 926899968213313/31250000000000 @@ -1589,7 +1572,7 @@ func TestPriceInfo_TxMultiplierError_ReturnsError(t *testing.T) { expError := errors.New("TxMultiplier Error") n, _ := NewLivepeerNode(nil, "", nil) - n.SetBasePrice("default", NewFixedPrice(big.NewRat(1, 1))) + n.SetBasePrice("default", big.NewRat(1, 1)) recipient := new(pm.MockRecipient) n.Recipient = recipient recipient.On("TxCostMultiplier", mock.Anything).Return(nil, expError) diff --git a/core/orchestrator.go b/core/orchestrator.go index 70975ff3a6..4ceea94bba 100644 --- a/core/orchestrator.go +++ b/core/orchestrator.go @@ -350,7 +350,7 @@ func (orch *orchestrator) priceInfo(sender ethcommon.Address, manifestID Manifes for cap := range caps.Capacities { // If the capability does not have constraints (and thus any model constraints) skip it // because we only price a capability together with a model ID right now - constraints, ok := caps.CapabilityConstraints[cap] + constraints, ok := caps.Constraints[cap] if !ok { continue } @@ -1263,9 +1263,7 @@ func (rtm *RemoteTranscoderManager) selectTranscoder(sessionId string, caps *Cap findCompatibleTranscoder := func(rtm *RemoteTranscoderManager) int { for i := len(rtm.remoteTranscoders) - 1; i >= 0; i-- { // no capabilities = default capabilities, all transcoders must support them - if caps == nil || - (caps.bitstring.CompatibleWith(rtm.remoteTranscoders[i].capabilities.bitstring) && - caps.LivepeerVersionCompatibleWith(rtm.remoteTranscoders[i].capabilities.ToNetCapabilities())) { + if caps == nil || caps.bitstring.CompatibleWith(rtm.remoteTranscoders[i].capabilities.bitstring) { return i } } @@ -1317,7 +1315,7 @@ func (node *RemoteTranscoderManager) EndTranscodingSession(sessionId string) { panic("shouldn't be called on RemoteTranscoderManager") } -// completeStreamSession end a stream session for a remote transcoder and decrements its load +// completeStreamSessions end a stream session for a remote transcoder and decrements its load // caller should hold the mutex lock func (rtm *RemoteTranscoderManager) completeStreamSession(sessionId string) { t, ok := rtm.streamSessions[sessionId] diff --git a/core/testdata/rapid/TestCapability_RoundTrip_Net/TestCapability_RoundTrip_Net-20240729130524-3824236.fail b/core/testdata/rapid/TestCapability_RoundTrip_Net/TestCapability_RoundTrip_Net-20240729130524-3824236.fail deleted file mode 100644 index bfa48715a7..0000000000 --- a/core/testdata/rapid/TestCapability_RoundTrip_Net/TestCapability_RoundTrip_Net-20240729130524-3824236.fail +++ /dev/null @@ -1,828 +0,0 @@ -# 2024/07/29 13:05:24.695037 [TestCapability_RoundTrip_Net] [rapid] draw capLen: 54 -# 2024/07/29 13:05:24.695039 [TestCapability_RoundTrip_Net] [rapid] draw cap: 464 -# 2024/07/29 13:05:24.695040 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695040 [TestCapability_RoundTrip_Net] [rapid] draw cap: 461 -# 2024/07/29 13:05:24.695041 [TestCapability_RoundTrip_Net] [rapid] draw cap: 509 -# 2024/07/29 13:05:24.695041 [TestCapability_RoundTrip_Net] [rapid] draw cap: 429 -# 2024/07/29 13:05:24.695042 [TestCapability_RoundTrip_Net] [rapid] draw cap: 39 -# 2024/07/29 13:05:24.695042 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695043 [TestCapability_RoundTrip_Net] [rapid] draw cap: 9 -# 2024/07/29 13:05:24.695043 [TestCapability_RoundTrip_Net] [rapid] draw cap: 291 -# 2024/07/29 13:05:24.695044 [TestCapability_RoundTrip_Net] [rapid] draw cap: 4 -# 2024/07/29 13:05:24.695045 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695045 [TestCapability_RoundTrip_Net] [rapid] draw cap: 27 -# 2024/07/29 13:05:24.695045 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695046 [TestCapability_RoundTrip_Net] [rapid] draw cap: 214 -# 2024/07/29 13:05:24.695046 [TestCapability_RoundTrip_Net] [rapid] draw cap: 192 -# 2024/07/29 13:05:24.695047 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695047 [TestCapability_RoundTrip_Net] [rapid] draw cap: 484 -# 2024/07/29 13:05:24.695047 [TestCapability_RoundTrip_Net] [rapid] draw cap: 165 -# 2024/07/29 13:05:24.695048 [TestCapability_RoundTrip_Net] [rapid] draw cap: 177 -# 2024/07/29 13:05:24.695049 [TestCapability_RoundTrip_Net] [rapid] draw cap: 213 -# 2024/07/29 13:05:24.695049 [TestCapability_RoundTrip_Net] [rapid] draw cap: 18 -# 2024/07/29 13:05:24.695050 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695050 [TestCapability_RoundTrip_Net] [rapid] draw cap: 9 -# 2024/07/29 13:05:24.695050 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695051 [TestCapability_RoundTrip_Net] [rapid] draw cap: 12 -# 2024/07/29 13:05:24.695051 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695051 [TestCapability_RoundTrip_Net] [rapid] draw cap: 437 -# 2024/07/29 13:05:24.695052 [TestCapability_RoundTrip_Net] [rapid] draw cap: 11 -# 2024/07/29 13:05:24.695052 [TestCapability_RoundTrip_Net] [rapid] draw cap: 39 -# 2024/07/29 13:05:24.695052 [TestCapability_RoundTrip_Net] [rapid] draw cap: 30 -# 2024/07/29 13:05:24.695053 [TestCapability_RoundTrip_Net] [rapid] draw cap: 12 -# 2024/07/29 13:05:24.695053 [TestCapability_RoundTrip_Net] [rapid] draw cap: 325 -# 2024/07/29 13:05:24.695053 [TestCapability_RoundTrip_Net] [rapid] draw cap: 204 -# 2024/07/29 13:05:24.695054 [TestCapability_RoundTrip_Net] [rapid] draw cap: 13 -# 2024/07/29 13:05:24.695054 [TestCapability_RoundTrip_Net] [rapid] draw cap: 403 -# 2024/07/29 13:05:24.695055 [TestCapability_RoundTrip_Net] [rapid] draw cap: 498 -# 2024/07/29 13:05:24.695055 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695056 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695057 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695058 [TestCapability_RoundTrip_Net] [rapid] draw cap: 136 -# 2024/07/29 13:05:24.695058 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695058 [TestCapability_RoundTrip_Net] [rapid] draw cap: 169 -# 2024/07/29 13:05:24.695059 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695059 [TestCapability_RoundTrip_Net] [rapid] draw cap: 62 -# 2024/07/29 13:05:24.695059 [TestCapability_RoundTrip_Net] [rapid] draw cap: 181 -# 2024/07/29 13:05:24.695060 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695060 [TestCapability_RoundTrip_Net] [rapid] draw cap: 6 -# 2024/07/29 13:05:24.695061 [TestCapability_RoundTrip_Net] [rapid] draw cap: 12 -# 2024/07/29 13:05:24.695061 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695062 [TestCapability_RoundTrip_Net] [rapid] draw cap: 177 -# 2024/07/29 13:05:24.695062 [TestCapability_RoundTrip_Net] [rapid] draw cap: 7 -# 2024/07/29 13:05:24.695063 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695064 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695064 [TestCapability_RoundTrip_Net] [rapid] draw cap: 400 -# 2024/07/29 13:05:24.695065 [TestCapability_RoundTrip_Net] [rapid] draw capLen: 42 -# 2024/07/29 13:05:24.695066 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695067 [TestCapability_RoundTrip_Net] [rapid] draw cap: 6 -# 2024/07/29 13:05:24.695068 [TestCapability_RoundTrip_Net] [rapid] draw cap: 368 -# 2024/07/29 13:05:24.695069 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695069 [TestCapability_RoundTrip_Net] [rapid] draw cap: 10 -# 2024/07/29 13:05:24.695070 [TestCapability_RoundTrip_Net] [rapid] draw cap: 235 -# 2024/07/29 13:05:24.695071 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695071 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695071 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695072 [TestCapability_RoundTrip_Net] [rapid] draw cap: 8 -# 2024/07/29 13:05:24.695072 [TestCapability_RoundTrip_Net] [rapid] draw cap: 263 -# 2024/07/29 13:05:24.695072 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695073 [TestCapability_RoundTrip_Net] [rapid] draw cap: 107 -# 2024/07/29 13:05:24.695073 [TestCapability_RoundTrip_Net] [rapid] draw cap: 301 -# 2024/07/29 13:05:24.695074 [TestCapability_RoundTrip_Net] [rapid] draw cap: 13 -# 2024/07/29 13:05:24.695074 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695074 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695075 [TestCapability_RoundTrip_Net] [rapid] draw cap: 11 -# 2024/07/29 13:05:24.695075 [TestCapability_RoundTrip_Net] [rapid] draw cap: 289 -# 2024/07/29 13:05:24.695076 [TestCapability_RoundTrip_Net] [rapid] draw cap: 19 -# 2024/07/29 13:05:24.695076 [TestCapability_RoundTrip_Net] [rapid] draw cap: 68 -# 2024/07/29 13:05:24.695077 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695079 [TestCapability_RoundTrip_Net] [rapid] draw cap: 102 -# 2024/07/29 13:05:24.695079 [TestCapability_RoundTrip_Net] [rapid] draw cap: 10 -# 2024/07/29 13:05:24.695079 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695080 [TestCapability_RoundTrip_Net] [rapid] draw cap: 6 -# 2024/07/29 13:05:24.695080 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695080 [TestCapability_RoundTrip_Net] [rapid] draw cap: 14 -# 2024/07/29 13:05:24.695081 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695081 [TestCapability_RoundTrip_Net] [rapid] draw cap: 15 -# 2024/07/29 13:05:24.695081 [TestCapability_RoundTrip_Net] [rapid] draw cap: 54 -# 2024/07/29 13:05:24.695082 [TestCapability_RoundTrip_Net] [rapid] draw cap: 7 -# 2024/07/29 13:05:24.695082 [TestCapability_RoundTrip_Net] [rapid] draw cap: 94 -# 2024/07/29 13:05:24.695083 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695084 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695084 [TestCapability_RoundTrip_Net] [rapid] draw cap: 5 -# 2024/07/29 13:05:24.695084 [TestCapability_RoundTrip_Net] [rapid] draw cap: 206 -# 2024/07/29 13:05:24.695085 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695085 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695086 [TestCapability_RoundTrip_Net] [rapid] draw cap: 78 -# 2024/07/29 13:05:24.695086 [TestCapability_RoundTrip_Net] [rapid] draw cap: 11 -# 2024/07/29 13:05:24.695086 [TestCapability_RoundTrip_Net] [rapid] draw cap: 457 -# 2024/07/29 13:05:24.695203 [TestCapability_RoundTrip_Net] -# Error Trace: /home/ricks/development/livepeer/ai/go-livepeer/core/capabilities_test.go:371 -# /home/ricks/go/pkg/mod/pgregory.net/rapid@v1.1.0/engine.go:368 -# /home/ricks/go/pkg/mod/pgregory.net/rapid@v1.1.0/engine.go:377 -# /home/ricks/go/pkg/mod/pgregory.net/rapid@v1.1.0/engine.go:203 -# /home/ricks/go/pkg/mod/pgregory.net/rapid@v1.1.0/engine.go:118 -# /home/ricks/development/livepeer/ai/go-livepeer/core/capabilities_test.go:356 -# Error: Not equal: -# expected: &core.Capabilities{bitstring:core.CapabilityString{0x4000008048043adf, 0x0, 0x22022000000100, 0x601001, 0x800000000, 0x20, 0x20200000090000, 0x2004001000012000, 0x1}, mandatories:core.CapabilityString{0x4000000008edef, 0x84040004010, 0x0, 0x80000004000, 0x200200000080, 0x1000000000000, 0x0, 0x200, 0x1}, version:"undefined", constraints:core.Constraints{minVersion:""}, capabilityConstraints:core.CapabilityConstraints(nil), capacities:map[core.Capability]int{0:1, 1:1, 2:1, 3:1, 4:1, 6:1, 7:1, 9:1, 11:1, 12:1, 13:1, 18:1, 27:1, 30:1, 39:1, 62:1, 136:1, 165:1, 169:1, 177:1, 181:1, 192:1, 204:1, 213:1, 214:1, 291:1, 325:1, 400:1, 403:1, 429:1, 437:1, 461:1, 464:1, 484:1, 498:1, 509:1, 512:1}, mutex:sync.Mutex{state:0, sema:0x0}} -# actual : &core.Capabilities{bitstring:core.CapabilityString{0x4000008048043adf, 0x0, 0x22022000000100, 0x601001, 0x800000000, 0x20, 0x20200000090000, 0x2004001000012000, 0x1}, mandatories:core.CapabilityString{0x4000000008edef, 0x84040004010, 0x0, 0x80000004000, 0x200200000080, 0x1000000000000, 0x0, 0x200, 0x1}, version:"undefined", constraints:core.Constraints{minVersion:""}, capabilityConstraints:core.CapabilityConstraints{}, capacities:map[core.Capability]int{0:1, 1:1, 2:1, 3:1, 4:1, 6:1, 7:1, 9:1, 11:1, 12:1, 13:1, 18:1, 27:1, 30:1, 39:1, 62:1, 136:1, 165:1, 169:1, 177:1, 181:1, 192:1, 204:1, 213:1, 214:1, 291:1, 325:1, 400:1, 403:1, 429:1, 437:1, 461:1, 464:1, 484:1, 498:1, 509:1, 512:1}, mutex:sync.Mutex{state:0, sema:0x0}} -# -# Diff: -# --- Expected -# +++ Actual -# @@ -27,3 +27,4 @@ -# }, -# - capabilityConstraints: (core.CapabilityConstraints) , -# + capabilityConstraints: (core.CapabilityConstraints) { -# + }, -# capacities: (map[core.Capability]int) (len=37) { -# Test: TestCapability_RoundTrip_Net -# 2024/07/29 13:05:24.695205 [TestCapability_RoundTrip_Net] [rapid] draw capLen: 0 -# 2024/07/29 13:05:24.695206 [TestCapability_RoundTrip_Net] [rapid] draw capLen: 88 -# 2024/07/29 13:05:24.695207 [TestCapability_RoundTrip_Net] [rapid] draw cap: 4 -# 2024/07/29 13:05:24.695207 [TestCapability_RoundTrip_Net] [rapid] draw cap: 8 -# 2024/07/29 13:05:24.695208 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695208 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695208 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695209 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695210 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695210 [TestCapability_RoundTrip_Net] [rapid] draw cap: 79 -# 2024/07/29 13:05:24.695210 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695211 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695211 [TestCapability_RoundTrip_Net] [rapid] draw cap: 453 -# 2024/07/29 13:05:24.695212 [TestCapability_RoundTrip_Net] [rapid] draw cap: 232 -# 2024/07/29 13:05:24.695212 [TestCapability_RoundTrip_Net] [rapid] draw cap: 8 -# 2024/07/29 13:05:24.695212 [TestCapability_RoundTrip_Net] [rapid] draw cap: 10 -# 2024/07/29 13:05:24.695213 [TestCapability_RoundTrip_Net] [rapid] draw cap: 239 -# 2024/07/29 13:05:24.695214 [TestCapability_RoundTrip_Net] [rapid] draw cap: 20 -# 2024/07/29 13:05:24.695214 [TestCapability_RoundTrip_Net] [rapid] draw cap: 5 -# 2024/07/29 13:05:24.695215 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695216 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695217 [TestCapability_RoundTrip_Net] [rapid] draw cap: 265 -# 2024/07/29 13:05:24.695217 [TestCapability_RoundTrip_Net] [rapid] draw cap: 150 -# 2024/07/29 13:05:24.695218 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695219 [TestCapability_RoundTrip_Net] [rapid] draw cap: 234 -# 2024/07/29 13:05:24.695219 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695223 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695223 [TestCapability_RoundTrip_Net] [rapid] draw cap: 62 -# 2024/07/29 13:05:24.695223 [TestCapability_RoundTrip_Net] [rapid] draw cap: 5 -# 2024/07/29 13:05:24.695224 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695224 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695224 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695225 [TestCapability_RoundTrip_Net] [rapid] draw cap: 17 -# 2024/07/29 13:05:24.695225 [TestCapability_RoundTrip_Net] [rapid] draw cap: 5 -# 2024/07/29 13:05:24.695226 [TestCapability_RoundTrip_Net] [rapid] draw cap: 75 -# 2024/07/29 13:05:24.695226 [TestCapability_RoundTrip_Net] [rapid] draw cap: 310 -# 2024/07/29 13:05:24.695226 [TestCapability_RoundTrip_Net] [rapid] draw cap: 172 -# 2024/07/29 13:05:24.695227 [TestCapability_RoundTrip_Net] [rapid] draw cap: 24 -# 2024/07/29 13:05:24.695227 [TestCapability_RoundTrip_Net] [rapid] draw cap: 88 -# 2024/07/29 13:05:24.695228 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695228 [TestCapability_RoundTrip_Net] [rapid] draw cap: 446 -# 2024/07/29 13:05:24.695228 [TestCapability_RoundTrip_Net] [rapid] draw cap: 7 -# 2024/07/29 13:05:24.695229 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695229 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695229 [TestCapability_RoundTrip_Net] [rapid] draw cap: 114 -# 2024/07/29 13:05:24.695230 [TestCapability_RoundTrip_Net] [rapid] draw cap: 6 -# 2024/07/29 13:05:24.695230 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695230 [TestCapability_RoundTrip_Net] [rapid] draw cap: 426 -# 2024/07/29 13:05:24.695231 [TestCapability_RoundTrip_Net] [rapid] draw cap: 13 -# 2024/07/29 13:05:24.695232 [TestCapability_RoundTrip_Net] [rapid] draw cap: 13 -# 2024/07/29 13:05:24.695232 [TestCapability_RoundTrip_Net] [rapid] draw cap: 6 -# 2024/07/29 13:05:24.695233 [TestCapability_RoundTrip_Net] [rapid] draw cap: 29 -# 2024/07/29 13:05:24.695233 [TestCapability_RoundTrip_Net] [rapid] draw cap: 130 -# 2024/07/29 13:05:24.695233 [TestCapability_RoundTrip_Net] [rapid] draw cap: 15 -# 2024/07/29 13:05:24.695234 [TestCapability_RoundTrip_Net] [rapid] draw cap: 196 -# 2024/07/29 13:05:24.695234 [TestCapability_RoundTrip_Net] [rapid] draw cap: 478 -# 2024/07/29 13:05:24.695234 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695235 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695235 [TestCapability_RoundTrip_Net] [rapid] draw cap: 10 -# 2024/07/29 13:05:24.695236 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695236 [TestCapability_RoundTrip_Net] [rapid] draw cap: 406 -# 2024/07/29 13:05:24.695236 [TestCapability_RoundTrip_Net] [rapid] draw cap: 145 -# 2024/07/29 13:05:24.695237 [TestCapability_RoundTrip_Net] [rapid] draw cap: 241 -# 2024/07/29 13:05:24.695237 [TestCapability_RoundTrip_Net] [rapid] draw cap: 0 -# 2024/07/29 13:05:24.695237 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695238 [TestCapability_RoundTrip_Net] [rapid] draw cap: 5 -# 2024/07/29 13:05:24.695238 [TestCapability_RoundTrip_Net] [rapid] draw cap: 229 -# 2024/07/29 13:05:24.695239 [TestCapability_RoundTrip_Net] [rapid] draw cap: 47 -# 2024/07/29 13:05:24.695239 [TestCapability_RoundTrip_Net] [rapid] draw cap: 512 -# 2024/07/29 13:05:24.695240 [TestCapability_RoundTrip_Net] [rapid] draw cap: 5 -# 2024/07/29 13:05:24.695240 [TestCapability_RoundTrip_Net] [rapid] draw cap: 270 -# 2024/07/29 13:05:24.695241 [TestCapability_RoundTrip_Net] [rapid] draw cap: 148 -# 2024/07/29 13:05:24.695241 [TestCapability_RoundTrip_Net] [rapid] draw cap: 292 -# 2024/07/29 13:05:24.695241 [TestCapability_RoundTrip_Net] [rapid] draw cap: 146 -# 2024/07/29 13:05:24.695242 [TestCapability_RoundTrip_Net] [rapid] draw cap: 411 -# 2024/07/29 13:05:24.695242 [TestCapability_RoundTrip_Net] [rapid] draw cap: 49 -# 2024/07/29 13:05:24.695242 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695243 [TestCapability_RoundTrip_Net] [rapid] draw cap: 132 -# 2024/07/29 13:05:24.695243 [TestCapability_RoundTrip_Net] [rapid] draw cap: 9 -# 2024/07/29 13:05:24.695243 [TestCapability_RoundTrip_Net] [rapid] draw cap: 193 -# 2024/07/29 13:05:24.695244 [TestCapability_RoundTrip_Net] [rapid] draw cap: 510 -# 2024/07/29 13:05:24.695244 [TestCapability_RoundTrip_Net] [rapid] draw cap: 3 -# 2024/07/29 13:05:24.695245 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695245 [TestCapability_RoundTrip_Net] [rapid] draw cap: 22 -# 2024/07/29 13:05:24.695245 [TestCapability_RoundTrip_Net] [rapid] draw cap: 2 -# 2024/07/29 13:05:24.695246 [TestCapability_RoundTrip_Net] [rapid] draw cap: 136 -# 2024/07/29 13:05:24.695246 [TestCapability_RoundTrip_Net] [rapid] draw cap: 408 -# 2024/07/29 13:05:24.695246 [TestCapability_RoundTrip_Net] [rapid] draw cap: 11 -# 2024/07/29 13:05:24.695247 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# 2024/07/29 13:05:24.695247 [TestCapability_RoundTrip_Net] [rapid] draw cap: 1 -# -v0.4.8#8355047278167994326 -0x1ffe553afdc0f7 -0xf45b3a3026fb1 -0x36 -0x19e8d3757890a9 -0x1ece3789377bd6 -0x254 -0x205 -0x1d0 -0xc696ee1730946 -0xa5bfc6000ae4 -0x1 -0x1e767e042e2f9d -0x176d810cfc0f2b -0x267 -0x1cd -0x2a57c0b86b7d2 -0x1e916bccdef442 -0x1fd -0xcf6dc68c6ae6f -0x17398c89c02dec -0x1ad -0x131c5a873b987b -0x157a8063db5cc8 -0x27 -0x1987e962a4ed1 -0x12edc22943d81 -0x0 -0x163376461fd54d -0x9ce4ce56c30ba -0x9 -0x1e5486cb3b6174 -0x16c0f7f21eb8cb -0x123 -0xf0a4d4dd1e518 -0x1ac2347bba71a3 -0x4 -0x169e45fe17b9c4 -0x5c8baba4436ce -0x1 -0x1fa586fec7e96b -0x120720f4f21290 -0x1b -0x4fb6259a712e2 -0x37f35a9300112 -0x3 -0x1935b725e9e96 -0x187a601d1528ca -0xd6 -0x7913ebe9dc13a -0x142e0f585b2dac -0xc0 -0x196f40656a41ec -0x3af286f273a5d -0x0 -0x1a2c3ac100cc8e -0x1a36899482617e -0x3a3 -0x1e4 -0x1b6b16ee1d7b0 -0x1cbffa9417a94e -0xa5 -0x6edec3d67143c -0x127c8c567c73c4 -0xb1 -0x188f8cfc3194f8 -0x15a4da498b416b -0xd5 -0x1ac94151d50f1b -0x1cbdfcfdc9aba8 -0x12 -0x4424d7c0cfd27 -0xc2c679bb08e83 -0x3 -0x13a41a68b5e7b5 -0xe824a9c93fb79 -0x9 -0x104eae942c2d3a -0x8401f4f6add60 -0x2 -0x1a85ae65d696b5 -0xd9a97b75d45a0 -0xc -0x1dcdacf4d1f538 -0x5b79db0b9ce2e -0x1 -0x105690b2cc5155 -0x160e817f276ba9 -0x1b5 -0x1aef64c8f37d26 -0xaf0d1bd20e7f0 -0xb -0x124d67659fe95 -0xef30a4d402397 -0x27 -0xea3815f25e942 -0xd3dd513625b5f -0x1e -0xa34a45d0353c0 -0x181b4b8c96b635 -0x2cf -0x390 -0xc -0x1249d6d7171e3e -0x18466e9bb7d281 -0x3c9 -0x358 -0x145 -0x99299469331c0 -0x1225c985e1f9d7 -0xcc -0x8ae4b0b2d445c -0xa0005e7ee8688 -0xd -0x156193b8049849 -0x1beecbb840472f -0x3c1 -0x318 -0x2ab -0x193 -0x14816d4d091040 -0x1e18e4ad3afb90 -0x312 -0x1f2 -0x16d98afc38a5eb -0x1ffb0857cf3f4e -0xffffffffffffffff -0x63bc8e9d1b67c -0x670439aa47cba -0x3 -0x7d862db5053c3 -0x908d39c551ddc -0x0 -0x1e5beb91ed0b7 -0x11cff49a778ef7 -0x88 -0xc149b27cdeaff -0x5ae64d015a7f1 -0x2 -0x3f1601a4584c9 -0x12b7466721c2e3 -0xa9 -0x141e20558b5b71 -0x1b482d7eb0eab -0x1 -0xfe9be41b1a7d1 -0x11fbe041d5e3a2 -0x3e -0xc05c575caa3e2 -0x12fd3f55f92749 -0xb5 -0xfef307a80649c -0x694d773b6e563 -0x0 -0x1284e54af89718 -0x8f1a506967360 -0x6 -0x1eecbbac2653a2 -0xafb39c58bdb30 -0xc -0x1397764b96e3d7 -0x1fcf6c00def779 -0xffffffffffffffff -0xd943ace824438 -0x1234ba12e2b5d9 -0xb1 -0xc079ec12eaad5 -0x7e0bf0514df4a -0x7 -0x151b5694ff1a29 -0x3699052aae4ed -0x0 -0x160ee2a3299343 -0x94725373b3b5e -0x0 -0x19762e14c2a5a5 -0x1d3d3495650207 -0x190 -0x16cfffcbf32568 -0xe62e37e3841db -0x2a -0x11079c4e5b4840 -0x54fc022a5fc28 -0x0 -0x12cb7927ef68c -0xab6a464b9bb44 -0x6 -0x1396451ba612f3 -0x15955083a4f426 -0x2c4 -0x3c2 -0x170 -0x8ad02f4160198 -0x1f2e292b02fc83 -0xffffffffffffffff -0x947f2842e50d6 -0xeaa1a5622e3a4 -0xa -0x1a1704c8278973 -0x12a05ed66f4c0a -0xeb -0x1114fdc6207cd2 -0x3bb4cfcac042b -0x1 -0x1b3b74b3d01456 -0x531f320b2531b -0x1 -0x197e4b75069d1c -0x4d8176640b92e -0x3 -0x1b012144f0fa51 -0x10fae59448f46a -0x8 -0x10539663fa4035 -0x164c0b334cded1 -0x37c -0x107 -0x125a9a06e7bba5 -0xb9b43c76717b -0x1 -0x1cf2aeb6603cb3 -0x149038ed5d9d11 -0x6b -0xf173ebe9135e5 -0x1811a49e35de09 -0x12d -0xb813b577702a -0xafe2049d3f562 -0xd -0x1ba2b7b064c255 -0x20607cec5b805 -0x1 -0x16c2154199ef32 -0x23f3c71d80c9b -0x1 -0x1106d63649cf19 -0xa2b99bca8e7ac -0xb -0xa6d34ffecd0a5 -0x159f02878e5f6d -0x2ea -0x2ba -0x31b -0x121 -0x17762d304d229e -0x1ae07bc79e4410 -0x13 -0x16520166b2318f -0x18b9eed5884993 -0x39e -0x44 -0x156a3d2e785604 -0x6de195e62fd9c -0x1 -0x357a4cb6e9746 -0x1ec3aa7ce66580 -0x2cd -0x66 -0x17ac30ce8ec31b -0x9497852492b84 -0xa -0x18ac792a689485 -0x3266d37f6731d -0x0 -0x158865b1697fc3 -0xb5ea2b426535e -0x6 -0x1db03d2d540db2 -0x48084744eebcc -0x1 -0xf03b281d81e80 -0x10b4af861d654f -0xe -0x1b54ecc34b53e2 -0x6106d8d99c88d -0x3 -0xb165bcd6cecde -0xf3ff59d242ab5 -0xf -0x340e867d1532d -0x1130568709d9e7 -0x36 -0x12d1ffb3754d5b -0xa84458eda2d0e -0x7 -0x1a64f2673adbc7 -0x18822fb55da60d -0x30c -0x230 -0x393 -0x5e -0x1249caf2fa4cc7 -0x1090841a6a3c7 -0x1 -0xbbab3008bcd4b -0x5e0cf2416db3c -0x1 -0x1ae89840ef2766 -0x8c200ba4313b8 -0x5 -0x1fee6a270f448d -0x11d30f6fb09a46 -0xce -0xe8381b8eda998 -0x1f1e4a7c6aa3ec -0xffffffffffffffff -0xf6462d88f7320 -0x49d09a27bb9f3 -0x2 -0x416e964435cca -0x1e1ff6f6b79794 -0x367 -0x2a1 -0x4e -0x2c8f3bf759265 -0xc76dc2ff2479b -0xb -0x1b474ddd26012d -0x18213ba0d029a5 -0x2c7 -0x21e -0x3cd -0x2ed -0x1c9 -0x12eeb282e67311 -0x70f801cad570 -0x0 -0xe7431464d3755 -0x1033f1de5f67a0 -0x58 -0x1535a55a6d00d -0xeec21f4e4462d -0x4 -0x74c5911718c5f -0xcde3a5429d3bf -0x8 -0x11b45fdd094ebb -0x1f167cee04ae61 -0xffffffffffffffff -0x17a28518b52445 -0x3321f47533362 -0x0 -0xdd01a125c4a4a -0x6a89a8d9ab90b -0x3 -0xe1049754f4420 -0x94c9cca847000 -0x2 -0x163568c0c286a3 -0x320875f898519 -0x1 -0xd65f1429c43f8 -0x19d7d707113edd -0x20f -0x2c9 -0x4f -0x860cd5aab781b -0x39b3c9375f97d -0x0 -0x2333e3d7ca98d -0x17a6d7616fae5 -0x0 -0x1be31c31fa1b65 -0x1e9cf0eff97714 -0x3b2 -0x1c5 -0x228d962252c1 -0x1da1342813d162 -0xe8 -0xcb52be9526514 -0xbe7715933fd26 -0x8 -0x8f1a4b72402b3 -0xd29274e087de2 -0xa -0x16eaf729826089 -0x18c0985d643ec9 -0x3eb -0x3af -0xef -0x771448beb2b60 -0xca48c76e6a43b -0x14 -0x12e8d395659fca -0x6962f0ecdd7eb -0x5 -0x1b5b9a7947347f -0x111eac80e7a6a -0x0 -0xa2f9593345b1a -0x23ab2574ece76 -0x0 -0x52bdb9f49038 -0x13c1e91774246c -0x109 -0x11678fb01f0e94 -0x1eed50c572ce61 -0x276 -0x96 -0x85293dd2b81d9 -0x46f5a55a32f21 -0x2 -0x8ea156b2403b8 -0x130c376c244b7a -0xea -0x593dbf28c8642 -0x48fb750754798 -0x0 -0x218b6e19d2ce7 -0x28667e2348614 -0x0 -0xb47c81a484822 -0xe7763abc2530e -0x3e -0x11621e6432f25e -0xb6e51a3c7540d -0x5 -0x15a8205db3e4cf -0x1f528a70225267 -0xffffffffffffffff -0x7f1a01494e0e2 -0x64a97840199f5 -0x0 -0xe8a7648610a60 -0x7814e573acea1 -0x2 -0x9f52042f72a1f -0xceeb054adc0f0 -0x11 -0x1f8e17539ad7cf -0x726edc3a875f6 -0x5 -0x14704edc0975f7 -0x118b2f49f75478 -0x4b -0x1bc318c2f02b8e -0x158d0ef586448e -0x2a1 -0x381 -0x136 -0x10bd503772dde5 -0x11f23f5e7b3f97 -0xac -0x184032fc1d0289 -0x112711dd817d83 -0x18 -0x273b20abf615c -0x1a1f72d887b0c2 -0x221 -0x58 -0x75447e86e9506 -0x1f5077c5158403 -0xffffffffffffffff -0x1484c44b895db2 -0x1a7a4cd63fe6fd -0x2d8 -0x3a7 -0x1be -0x49d80aad06826 -0xb75b3c47ca70b -0x7 -0x17b50ef6547c08 -0x61a34e6ccfe60 -0x3 -0x17c0e7eed36e10 -0x6a094e5ea11f2 -0x3 -0xe6e5d341e0f9f -0x18519b4701487e -0x3fb -0x72 -0xf64409ba1a52b -0x7c54c8de9c737 -0x6 -0x3bd3309d85dfa -0xd7c26e0c06e7f -0x2 -0x10a3874da0fe24 -0x17ee1a5fd6e736 -0x367 -0x25e -0x1aa -0xedea7935cd0ab -0xbce43cf730e22 -0xd -0x189100661f2b80 -0xbf03d117400cd -0xd -0x1940aba500afec -0xf0331a24e3663 -0x6 -0xbf51d6f2c634e -0x135a22a6c9173a -0x1d -0x6082f4e73edc4 -0x1e76c6b2e83524 -0x82 -0x23d8833c0cfd1 -0xad6c5e891d077 -0xf -0x1395753897997a -0x12a341871f9b19 -0xc4 -0x1af8256ea1b399 -0x1e023f88c2f3d1 -0x21f -0x1de -0x15e381df69a2fb -0x36dbfaad03710 -0x0 -0x1636516372e7b1 -0x2f1ee347aed69 -0x1 -0xb3da16c4564fc -0xc3cbf6936777d -0xa -0xa747baaa63b10 -0x5fd09cf3fd7ae -0x3 -0x841b987647c93 -0x14ee7c5e1c4aec -0x378 -0x310 -0x196 -0x86138cb44b38e -0x11ce7c42224c97 -0x91 -0x199672e5f8fe30 -0x19f254a45c1ad8 -0xf1 -0x93cbdc9747fab -0xd9f690e1b64d0 -0x0 -0x1ab1e9f7ba4a -0x59e57af077bea -0x2 -0x1c885e18521117 -0x81245406d707c -0x5 -0x1c09c2947a1067 -0x13215075ebb743 -0xe5 -0x1fc0b792b6c8ce -0xe9884cf04721d -0x2f -0x144617c620a489 -0x1f497e7115f5b4 -0xffffffffffffffff -0x1ae47ced5ad3a3 -0xa2c6fbd42a883 -0x5 -0xb9e9253823be -0x1bd67da246b7a6 -0x10e -0x1bb16c7f546078 -0x1edc5424565bbe -0x21c -0x305 -0x309 -0x94 -0x72cc716d0d736 -0x1e7c78aceae3e8 -0x124 -0xd0bf7d6644188 -0x133d77cb1a83e7 -0x92 -0x139da06e6cbf55 -0x1ca3de51b16a13 -0x19b -0x194a80ee239485 -0x1704d2bf665acd -0x3f4 -0x229 -0x31 -0x30bb2986d48e0 -0x6dad9af00bae1 -0x3 -0x143d3ccf72cc6a -0x1272257645e054 -0x84 -0x1124a37048f083 -0x1084ce7caad86a -0x9 -0x1cea54a09c4bb5 -0x1ab6eac00ea1cc -0xc1 -0x13c855d1666b97 -0x1da18afcac568a -0x273 -0x1fe -0x134dcf198d08d5 -0x56d7aa877e65b -0x3 -0x19c1af5ea21ea0 -0xeaca78e7822 -0x1 -0x807e8630dc7ed -0xdb91f876d1fe5 -0x16 -0xdd5c5f42f155 -0x129a02e8915eef -0x2 -0x365fdd52f9d57 -0x15660795ef0ed4 -0x217 -0x88 -0xdc1d746a07de2 -0x1e4a5c76a57b57 -0x198 -0x13b94df18444f1 -0xbb1f76a846da0 -0xb -0x17bb74a9f969e6 -0x42d5523f10d7a -0x1 -0x105046a138d532 -0x30621e8844265 -0x1 \ No newline at end of file diff --git a/core/transcoder_test.go b/core/transcoder_test.go index 25e19c5818..8b8061ffc8 100644 --- a/core/transcoder_test.go +++ b/core/transcoder_test.go @@ -32,10 +32,10 @@ func TestLocalTranscoder(t *testing.T) { if len(res.Segments) != len(videoProfiles) { t.Error("Mismatched results") } - if Over1Pct(len(res.Segments[0].Data), 585620) { + if Over1Pct(len(res.Segments[0].Data), 522264) { t.Errorf("Wrong data %v", len(res.Segments[0].Data)) } - if Over1Pct(len(res.Segments[1].Data), 813100) { + if Over1Pct(len(res.Segments[1].Data), 715528) { t.Errorf("Wrong data %v", len(res.Segments[1].Data)) } } diff --git a/discovery/db_discovery.go b/discovery/db_discovery.go index 5c9905bdde..caf2106660 100644 --- a/discovery/db_discovery.go +++ b/discovery/db_discovery.go @@ -16,6 +16,7 @@ import ( lpTypes "github.com/livepeer/go-livepeer/eth/types" "github.com/livepeer/go-livepeer/net" "github.com/livepeer/go-livepeer/pm" + "github.com/livepeer/go-livepeer/server" "github.com/golang/glog" ) @@ -70,6 +71,7 @@ func NewDBOrchestratorPoolCache(ctx context.Context, node *core.LivepeerNode, rm func (dbo *DBOrchestratorPoolCache) getURLs() ([]*url.URL, error) { orchs, err := dbo.store.SelectOrchs( &common.DBOrchFilter{ + MaxPrice: server.BroadcastCfg.MaxPrice(), CurrentRound: dbo.rm.LastInitializedRound(), UpdatedLastDay: true, }, @@ -118,7 +120,8 @@ func (dbo *DBOrchestratorPoolCache) GetOrchestrators(ctx context.Context, numOrc return false } - // check if O has a valid price + // check if O's price is below B's max price + maxPrice := server.BroadcastCfg.MaxPrice() price, err := common.RatPriceInfo(info.PriceInfo) if err != nil { clog.V(common.DEBUG).Infof(ctx, "invalid price info orch=%v err=%q", info.GetTranscoder(), err) @@ -128,8 +131,12 @@ func (dbo *DBOrchestratorPoolCache) GetOrchestrators(ctx context.Context, numOrc clog.V(common.DEBUG).Infof(ctx, "no price info received for orch=%v", info.GetTranscoder()) return false } - if price.Sign() < 0 { - clog.V(common.DEBUG).Infof(ctx, "invalid price received for orch=%v price=%v", info.GetTranscoder(), price.RatString()) + if maxPrice != nil && price.Cmp(maxPrice) > 0 { + clog.V(common.DEBUG).Infof(ctx, "orchestrator's price is too high orch=%v price=%v wei/pixel maxPrice=%v wei/pixel", + info.GetTranscoder(), + price.FloatString(3), + maxPrice.FloatString(3), + ) return false } return true @@ -147,6 +154,7 @@ func (dbo *DBOrchestratorPoolCache) GetOrchestrators(ctx context.Context, numOrc func (dbo *DBOrchestratorPoolCache) Size() int { count, _ := dbo.store.OrchCount( &common.DBOrchFilter{ + MaxPrice: server.BroadcastCfg.MaxPrice(), CurrentRound: dbo.rm.LastInitializedRound(), UpdatedLastDay: true, }, diff --git a/discovery/discovery_test.go b/discovery/discovery_test.go index 33e20e5b79..c52ce7ce61 100644 --- a/discovery/discovery_test.go +++ b/discovery/discovery_test.go @@ -608,11 +608,11 @@ func TestNewOrchestratorPoolWithPred_TestPredicate(t *testing.T) { assert.True(t, pool.pred(oInfo)) // Set server.BroadcastCfg.maxPrice higher than PriceInfo , should return true - server.BroadcastCfg.SetMaxPrice(core.NewFixedPrice(big.NewRat(10, 1))) + server.BroadcastCfg.SetMaxPrice(big.NewRat(10, 1)) assert.True(t, pool.pred(oInfo)) // Set MaxBroadcastPrice lower than PriceInfo, should return false - server.BroadcastCfg.SetMaxPrice(core.NewFixedPrice(big.NewRat(1, 1))) + server.BroadcastCfg.SetMaxPrice(big.NewRat(1, 1)) assert.False(t, pool.pred(oInfo)) // PixelsPerUnit is 0 , return false @@ -620,7 +620,7 @@ func TestNewOrchestratorPoolWithPred_TestPredicate(t *testing.T) { assert.False(t, pool.pred(oInfo)) } -func TestCachedPool_AllOrchestratorsTooExpensive_ReturnsAllOrchestrators(t *testing.T) { +func TestCachedPool_AllOrchestratorsTooExpensive_ReturnsEmptyList(t *testing.T) { // Test setup expPriceInfo := &net.PriceInfo{ PricePerUnit: 999, @@ -629,7 +629,7 @@ func TestCachedPool_AllOrchestratorsTooExpensive_ReturnsAllOrchestrators(t *test expTranscoder := "transcoderFromTest" expPricePerPixel, _ := common.PriceToFixed(big.NewRat(999, 1)) - server.BroadcastCfg.SetMaxPrice(core.NewFixedPrice(big.NewRat(1, 1))) + server.BroadcastCfg.SetMaxPrice(big.NewRat(1, 1)) gmp := runtime.GOMAXPROCS(50) defer runtime.GOMAXPROCS(gmp) var mu sync.Mutex @@ -698,15 +698,14 @@ func TestCachedPool_AllOrchestratorsTooExpensive_ReturnsAllOrchestrators(t *test } // check size - assert.Equal(50, pool.Size()) + assert.Equal(0, pool.Size()) urls := pool.GetInfos() - assert.Len(urls, 50) - + assert.Len(urls, 0) infos, err := pool.GetOrchestrators(context.TODO(), len(addresses), newStubSuspender(), newStubCapabilities(), common.ScoreAtLeast(0)) assert.Nil(err, "Should not be error") - assert.Len(infos, 50) + assert.Len(infos, 0) } func TestCachedPool_GetOrchestrators_MaxBroadcastPriceNotSet(t *testing.T) { @@ -824,7 +823,7 @@ func TestCachedPool_N_OrchestratorsGoodPricing_ReturnsNOrchestrators(t *testing. }, } - server.BroadcastCfg.SetMaxPrice(core.NewFixedPrice(big.NewRat(10, 1))) + server.BroadcastCfg.SetMaxPrice(big.NewRat(10, 1)) gmp := runtime.GOMAXPROCS(50) defer runtime.GOMAXPROCS(gmp) var mu sync.Mutex @@ -900,27 +899,22 @@ func TestCachedPool_N_OrchestratorsGoodPricing_ReturnsNOrchestrators(t *testing. assert.Contains(testOrchs[25:], toOrchTest(o.EthereumAddr, o.ServiceURI, o.PricePerPixel)) } - // check pool returns all Os, not filtering by max price - assert.Equal(50, pool.Size()) + // check size + assert.Equal(25, pool.Size()) infos := pool.GetInfos() - assert.Len(infos, 50) + assert.Len(infos, 25) for _, info := range infos { - assert.Contains(addresses, info.URL.String()) + assert.Contains(addresses[25:], info.URL.String()) } oinfos, err := pool.GetOrchestrators(context.TODO(), len(orchestrators), newStubSuspender(), newStubCapabilities(), common.ScoreAtLeast(0)) assert.Nil(err, "Should not be error") - assert.Len(oinfos, 50) - - seenAddrs := make(map[string]bool) + assert.Len(oinfos, 25) for _, info := range oinfos { - addr := info.LocalInfo.URL.String() - assert.Contains(addresses, addr) - seenAddrs[addr] = true + assert.Equal(info.RemoteInfo.Transcoder, "goodPriceTranscoder") } - assert.Len(seenAddrs, 50) } func TestCachedPool_GetOrchestrators_TicketParamsValidation(t *testing.T) { diff --git a/eth/contracts/chainlink/AggregatorV3Interface.abi b/eth/contracts/chainlink/AggregatorV3Interface.abi deleted file mode 100644 index 106c4a7bcb..0000000000 --- a/eth/contracts/chainlink/AggregatorV3Interface.abi +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}] diff --git a/eth/contracts/chainlink/AggregatorV3Interface.go b/eth/contracts/chainlink/AggregatorV3Interface.go deleted file mode 100644 index 2b0c1c9587..0000000000 --- a/eth/contracts/chainlink/AggregatorV3Interface.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package chainlink - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// AggregatorV3InterfaceMetaData contains all meta data concerning the AggregatorV3Interface contract. -var AggregatorV3InterfaceMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"description\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint80\",\"name\":\"_roundId\",\"type\":\"uint80\"}],\"name\":\"getRoundData\",\"outputs\":[{\"internalType\":\"uint80\",\"name\":\"roundId\",\"type\":\"uint80\"},{\"internalType\":\"int256\",\"name\":\"answer\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"updatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint80\",\"name\":\"answeredInRound\",\"type\":\"uint80\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestRoundData\",\"outputs\":[{\"internalType\":\"uint80\",\"name\":\"roundId\",\"type\":\"uint80\"},{\"internalType\":\"int256\",\"name\":\"answer\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"updatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint80\",\"name\":\"answeredInRound\",\"type\":\"uint80\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} - -// AggregatorV3InterfaceABI is the input ABI used to generate the binding from. -// Deprecated: Use AggregatorV3InterfaceMetaData.ABI instead. -var AggregatorV3InterfaceABI = AggregatorV3InterfaceMetaData.ABI - -// AggregatorV3Interface is an auto generated Go binding around an Ethereum contract. -type AggregatorV3Interface struct { - AggregatorV3InterfaceCaller // Read-only binding to the contract - AggregatorV3InterfaceTransactor // Write-only binding to the contract - AggregatorV3InterfaceFilterer // Log filterer for contract events -} - -// AggregatorV3InterfaceCaller is an auto generated read-only Go binding around an Ethereum contract. -type AggregatorV3InterfaceCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AggregatorV3InterfaceTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AggregatorV3InterfaceTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AggregatorV3InterfaceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AggregatorV3InterfaceFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AggregatorV3InterfaceSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type AggregatorV3InterfaceSession struct { - Contract *AggregatorV3Interface // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AggregatorV3InterfaceCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type AggregatorV3InterfaceCallerSession struct { - Contract *AggregatorV3InterfaceCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// AggregatorV3InterfaceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type AggregatorV3InterfaceTransactorSession struct { - Contract *AggregatorV3InterfaceTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AggregatorV3InterfaceRaw is an auto generated low-level Go binding around an Ethereum contract. -type AggregatorV3InterfaceRaw struct { - Contract *AggregatorV3Interface // Generic contract binding to access the raw methods on -} - -// AggregatorV3InterfaceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AggregatorV3InterfaceCallerRaw struct { - Contract *AggregatorV3InterfaceCaller // Generic read-only contract binding to access the raw methods on -} - -// AggregatorV3InterfaceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AggregatorV3InterfaceTransactorRaw struct { - Contract *AggregatorV3InterfaceTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewAggregatorV3Interface creates a new instance of AggregatorV3Interface, bound to a specific deployed contract. -func NewAggregatorV3Interface(address common.Address, backend bind.ContractBackend) (*AggregatorV3Interface, error) { - contract, err := bindAggregatorV3Interface(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &AggregatorV3Interface{AggregatorV3InterfaceCaller: AggregatorV3InterfaceCaller{contract: contract}, AggregatorV3InterfaceTransactor: AggregatorV3InterfaceTransactor{contract: contract}, AggregatorV3InterfaceFilterer: AggregatorV3InterfaceFilterer{contract: contract}}, nil -} - -// NewAggregatorV3InterfaceCaller creates a new read-only instance of AggregatorV3Interface, bound to a specific deployed contract. -func NewAggregatorV3InterfaceCaller(address common.Address, caller bind.ContractCaller) (*AggregatorV3InterfaceCaller, error) { - contract, err := bindAggregatorV3Interface(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AggregatorV3InterfaceCaller{contract: contract}, nil -} - -// NewAggregatorV3InterfaceTransactor creates a new write-only instance of AggregatorV3Interface, bound to a specific deployed contract. -func NewAggregatorV3InterfaceTransactor(address common.Address, transactor bind.ContractTransactor) (*AggregatorV3InterfaceTransactor, error) { - contract, err := bindAggregatorV3Interface(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AggregatorV3InterfaceTransactor{contract: contract}, nil -} - -// NewAggregatorV3InterfaceFilterer creates a new log filterer instance of AggregatorV3Interface, bound to a specific deployed contract. -func NewAggregatorV3InterfaceFilterer(address common.Address, filterer bind.ContractFilterer) (*AggregatorV3InterfaceFilterer, error) { - contract, err := bindAggregatorV3Interface(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AggregatorV3InterfaceFilterer{contract: contract}, nil -} - -// bindAggregatorV3Interface binds a generic wrapper to an already deployed contract. -func bindAggregatorV3Interface(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := AggregatorV3InterfaceMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_AggregatorV3Interface *AggregatorV3InterfaceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AggregatorV3Interface.Contract.AggregatorV3InterfaceCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_AggregatorV3Interface *AggregatorV3InterfaceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AggregatorV3Interface.Contract.AggregatorV3InterfaceTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AggregatorV3Interface *AggregatorV3InterfaceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AggregatorV3Interface.Contract.AggregatorV3InterfaceTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_AggregatorV3Interface *AggregatorV3InterfaceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AggregatorV3Interface.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_AggregatorV3Interface *AggregatorV3InterfaceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AggregatorV3Interface.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AggregatorV3Interface *AggregatorV3InterfaceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AggregatorV3Interface.Contract.contract.Transact(opts, method, params...) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_AggregatorV3Interface *AggregatorV3InterfaceCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _AggregatorV3Interface.contract.Call(opts, &out, "decimals") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_AggregatorV3Interface *AggregatorV3InterfaceSession) Decimals() (uint8, error) { - return _AggregatorV3Interface.Contract.Decimals(&_AggregatorV3Interface.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_AggregatorV3Interface *AggregatorV3InterfaceCallerSession) Decimals() (uint8, error) { - return _AggregatorV3Interface.Contract.Decimals(&_AggregatorV3Interface.CallOpts) -} - -// Description is a free data retrieval call binding the contract method 0x7284e416. -// -// Solidity: function description() view returns(string) -func (_AggregatorV3Interface *AggregatorV3InterfaceCaller) Description(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _AggregatorV3Interface.contract.Call(opts, &out, "description") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// Description is a free data retrieval call binding the contract method 0x7284e416. -// -// Solidity: function description() view returns(string) -func (_AggregatorV3Interface *AggregatorV3InterfaceSession) Description() (string, error) { - return _AggregatorV3Interface.Contract.Description(&_AggregatorV3Interface.CallOpts) -} - -// Description is a free data retrieval call binding the contract method 0x7284e416. -// -// Solidity: function description() view returns(string) -func (_AggregatorV3Interface *AggregatorV3InterfaceCallerSession) Description() (string, error) { - return _AggregatorV3Interface.Contract.Description(&_AggregatorV3Interface.CallOpts) -} - -// GetRoundData is a free data retrieval call binding the contract method 0x9a6fc8f5. -// -// Solidity: function getRoundData(uint80 _roundId) view returns(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) -func (_AggregatorV3Interface *AggregatorV3InterfaceCaller) GetRoundData(opts *bind.CallOpts, _roundId *big.Int) (struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int -}, error) { - var out []interface{} - err := _AggregatorV3Interface.contract.Call(opts, &out, "getRoundData", _roundId) - - outstruct := new(struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.RoundId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.Answer = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.StartedAt = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.UpdatedAt = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.AnsweredInRound = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// GetRoundData is a free data retrieval call binding the contract method 0x9a6fc8f5. -// -// Solidity: function getRoundData(uint80 _roundId) view returns(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) -func (_AggregatorV3Interface *AggregatorV3InterfaceSession) GetRoundData(_roundId *big.Int) (struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int -}, error) { - return _AggregatorV3Interface.Contract.GetRoundData(&_AggregatorV3Interface.CallOpts, _roundId) -} - -// GetRoundData is a free data retrieval call binding the contract method 0x9a6fc8f5. -// -// Solidity: function getRoundData(uint80 _roundId) view returns(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) -func (_AggregatorV3Interface *AggregatorV3InterfaceCallerSession) GetRoundData(_roundId *big.Int) (struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int -}, error) { - return _AggregatorV3Interface.Contract.GetRoundData(&_AggregatorV3Interface.CallOpts, _roundId) -} - -// LatestRoundData is a free data retrieval call binding the contract method 0xfeaf968c. -// -// Solidity: function latestRoundData() view returns(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) -func (_AggregatorV3Interface *AggregatorV3InterfaceCaller) LatestRoundData(opts *bind.CallOpts) (struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int -}, error) { - var out []interface{} - err := _AggregatorV3Interface.contract.Call(opts, &out, "latestRoundData") - - outstruct := new(struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.RoundId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.Answer = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.StartedAt = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.UpdatedAt = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.AnsweredInRound = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// LatestRoundData is a free data retrieval call binding the contract method 0xfeaf968c. -// -// Solidity: function latestRoundData() view returns(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) -func (_AggregatorV3Interface *AggregatorV3InterfaceSession) LatestRoundData() (struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int -}, error) { - return _AggregatorV3Interface.Contract.LatestRoundData(&_AggregatorV3Interface.CallOpts) -} - -// LatestRoundData is a free data retrieval call binding the contract method 0xfeaf968c. -// -// Solidity: function latestRoundData() view returns(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) -func (_AggregatorV3Interface *AggregatorV3InterfaceCallerSession) LatestRoundData() (struct { - RoundId *big.Int - Answer *big.Int - StartedAt *big.Int - UpdatedAt *big.Int - AnsweredInRound *big.Int -}, error) { - return _AggregatorV3Interface.Contract.LatestRoundData(&_AggregatorV3Interface.CallOpts) -} - -// Version is a free data retrieval call binding the contract method 0x54fd4d50. -// -// Solidity: function version() view returns(uint256) -func (_AggregatorV3Interface *AggregatorV3InterfaceCaller) Version(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AggregatorV3Interface.contract.Call(opts, &out, "version") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Version is a free data retrieval call binding the contract method 0x54fd4d50. -// -// Solidity: function version() view returns(uint256) -func (_AggregatorV3Interface *AggregatorV3InterfaceSession) Version() (*big.Int, error) { - return _AggregatorV3Interface.Contract.Version(&_AggregatorV3Interface.CallOpts) -} - -// Version is a free data retrieval call binding the contract method 0x54fd4d50. -// -// Solidity: function version() view returns(uint256) -func (_AggregatorV3Interface *AggregatorV3InterfaceCallerSession) Version() (*big.Int, error) { - return _AggregatorV3Interface.Contract.Version(&_AggregatorV3Interface.CallOpts) -} diff --git a/eth/contracts/chainlink/AggregatorV3Interface.sol b/eth/contracts/chainlink/AggregatorV3Interface.sol deleted file mode 100644 index 1bedfce214..0000000000 --- a/eth/contracts/chainlink/AggregatorV3Interface.sol +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT -// https://github.com/smartcontractkit/chainlink/blob/v2.9.1/contracts/src/v0.7/interfaces/AggregatorV3Interface.sol -pragma solidity ^0.7.0; - -interface AggregatorV3Interface { - function decimals() external view returns (uint8); - - function description() external view returns (string memory); - - function version() external view returns (uint256); - - // getRoundData and latestRoundData should both raise "No data present" - // if they do not have data to report, instead of returning unset values - // which could be misinterpreted as actual reported values. - function getRoundData(uint80 _roundId) - external - view - returns ( - uint80 roundId, - int256 answer, - uint256 startedAt, - uint256 updatedAt, - uint80 answeredInRound - ); - - function latestRoundData() - external - view - returns ( - uint80 roundId, - int256 answer, - uint256 startedAt, - uint256 updatedAt, - uint80 answeredInRound - ); -} diff --git a/eth/pricefeed.go b/eth/pricefeed.go deleted file mode 100644 index a9f51d0122..0000000000 --- a/eth/pricefeed.go +++ /dev/null @@ -1,78 +0,0 @@ -package eth - -import ( - "errors" - "fmt" - "math/big" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/livepeer/go-livepeer/eth/contracts/chainlink" -) - -type PriceData struct { - RoundID int64 - Price *big.Rat - UpdatedAt time.Time -} - -// PriceFeedEthClient is an interface for fetching price data from a Chainlink -// PriceFeed contract. -type PriceFeedEthClient interface { - Description() (string, error) - FetchPriceData() (PriceData, error) -} - -func NewPriceFeedEthClient(ethClient *ethclient.Client, priceFeedAddr string) (PriceFeedEthClient, error) { - addr := common.HexToAddress(priceFeedAddr) - priceFeed, err := chainlink.NewAggregatorV3Interface(addr, ethClient) - if err != nil { - return nil, fmt.Errorf("failed to create aggregator proxy: %w", err) - } - - return &priceFeedClient{ - client: ethClient, - priceFeed: priceFeed, - }, nil -} - -type priceFeedClient struct { - client *ethclient.Client - priceFeed *chainlink.AggregatorV3Interface -} - -func (c *priceFeedClient) Description() (string, error) { - return c.priceFeed.Description(&bind.CallOpts{}) -} - -func (c *priceFeedClient) FetchPriceData() (PriceData, error) { - data, err := c.priceFeed.LatestRoundData(&bind.CallOpts{}) - if err != nil { - return PriceData{}, errors.New("failed to get latest round data: " + err.Error()) - } - - decimals, err := c.priceFeed.Decimals(&bind.CallOpts{}) - if err != nil { - return PriceData{}, errors.New("failed to get decimals: " + err.Error()) - } - - return computePriceData(data.RoundId, data.UpdatedAt, data.Answer, decimals), nil -} - -// computePriceData transforms the raw data from the PriceFeed into the higher -// level PriceData struct, more easily usable by the rest of the system. -func computePriceData(roundID, updatedAt, answer *big.Int, decimals uint8) PriceData { - // Compute a big.int which is 10^decimals. - divisor := new(big.Int).Exp( - big.NewInt(10), - big.NewInt(int64(decimals)), - nil) - - return PriceData{ - RoundID: roundID.Int64(), - Price: new(big.Rat).SetFrac(answer, divisor), - UpdatedAt: time.Unix(updatedAt.Int64(), 0), - } -} diff --git a/eth/pricefeed_test.go b/eth/pricefeed_test.go deleted file mode 100644 index 981a158e75..0000000000 --- a/eth/pricefeed_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package eth - -import ( - "math/big" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestComputePriceData(t *testing.T) { - assert := assert.New(t) - - t.Run("valid data", func(t *testing.T) { - roundID := big.NewInt(1) - updatedAt := big.NewInt(1626192000) - answer := big.NewInt(420666000) - decimals := uint8(6) - - data := computePriceData(roundID, updatedAt, answer, decimals) - - assert.EqualValues(int64(1), data.RoundID, "Round ID didn't match") - assert.Equal("210333/500", data.Price.RatString(), "The Price Rat didn't match") - assert.Equal("2021-07-13 16:00:00 +0000 UTC", data.UpdatedAt.UTC().String(), "The updated at time did not match") - }) - - t.Run("zero answer", func(t *testing.T) { - roundID := big.NewInt(2) - updatedAt := big.NewInt(1626192000) - answer := big.NewInt(0) - decimals := uint8(18) - - data := computePriceData(roundID, updatedAt, answer, decimals) - - assert.EqualValues(int64(2), data.RoundID, "Round ID didn't match") - assert.Equal("0", data.Price.RatString(), "The Price Rat didn't match") - assert.Equal("2021-07-13 16:00:00 +0000 UTC", data.UpdatedAt.UTC().String(), "The updated at time did not match") - }) - - t.Run("zero decimals", func(t *testing.T) { - roundID := big.NewInt(3) - updatedAt := big.NewInt(1626192000) - answer := big.NewInt(13) - decimals := uint8(0) - - data := computePriceData(roundID, updatedAt, answer, decimals) - - assert.EqualValues(int64(3), data.RoundID, "Round ID didn't match") - assert.Equal("13", data.Price.RatString(), "The Price Rat didn't match") - assert.Equal("2021-07-13 16:00:00 +0000 UTC", data.UpdatedAt.UTC().String(), "The updated at time did not match") - }) -} diff --git a/eth/roundinitializer.go b/eth/roundinitializer.go index a7aaff6667..d3f2cbeeee 100644 --- a/eth/roundinitializer.go +++ b/eth/roundinitializer.go @@ -2,11 +2,10 @@ package eth import ( "math/big" - "math/rand" "sync" - "time" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event" "github.com/golang/glog" ) @@ -30,22 +29,20 @@ type timeWatcher interface { // This selection process is purely a client side implementation that attempts to minimize on-chain transaction collisions, but // collisions are still possible if initialization transactions are submitted by parties that are not using this selection process type RoundInitializer struct { - maxDelay time.Duration - client LivepeerEthClient - tw timeWatcher - quit chan struct{} + client LivepeerEthClient + tw timeWatcher + quit chan struct{} nextRoundStartL1Block *big.Int mu sync.Mutex } // NewRoundInitializer creates a RoundInitializer instance -func NewRoundInitializer(client LivepeerEthClient, tw timeWatcher, maxDelay time.Duration) *RoundInitializer { +func NewRoundInitializer(client LivepeerEthClient, tw timeWatcher) *RoundInitializer { return &RoundInitializer{ - maxDelay: maxDelay, - client: client, - tw: tw, - quit: make(chan struct{}), + client: client, + tw: tw, + quit: make(chan struct{}), } } @@ -107,23 +104,23 @@ func (r *RoundInitializer) tryInitialize() error { r.mu.Lock() defer r.mu.Unlock() - if r.tw.LastSeenL1Block().Cmp(r.nextRoundStartL1Block) < 0 { - // Round already initialized - return nil - } + currentL1Blk := r.tw.LastSeenL1Block() + lastInitializedL1BlkHash := r.tw.LastInitializedL1BlockHash() - if r.maxDelay > 0 { - randDelay := time.Duration(rand.Int63n(int64(r.maxDelay))) - glog.Infof("Waiting %v before attempting to initialize round", randDelay) - time.Sleep(randDelay) + epochSeed := r.currentEpochSeed(currentL1Blk, r.nextRoundStartL1Block, lastInitializedL1BlkHash) - if r.tw.LastSeenL1Block().Cmp(r.nextRoundStartL1Block) < 0 { - glog.Infof("Round is already initialized, not initializing") - return nil - } + ok, err := r.shouldInitialize(epochSeed) + if err != nil { + return err + } + + // Noop if the caller should not initialize the round + if !ok { + return nil } currentRound := new(big.Int).Add(r.tw.LastInitializedRound(), big.NewInt(1)) + glog.Infof("New round - preparing to initialize round to join active set, current round is %d", currentRound) tx, err := r.client.InitializeRound() @@ -139,3 +136,55 @@ func (r *RoundInitializer) tryInitialize() error { return nil } + +func (r *RoundInitializer) shouldInitialize(epochSeed *big.Int) (bool, error) { + transcoders, err := r.client.TranscoderPool() + if err != nil { + return false, err + } + + numActive := big.NewInt(int64(len(transcoders))) + + // Should not initialize if the upcoming active set is empty + if numActive.Cmp(big.NewInt(0)) == 0 { + return false, nil + } + + // Find the caller's rank in the upcoming active set + rank := int64(-1) + maxRank := numActive.Int64() + caller := r.client.Account().Address + for i := int64(0); i < maxRank; i++ { + if transcoders[i].Address == caller { + rank = i + break + } + } + + // Should not initialize if the caller is not in the upcoming active set + if rank == -1 { + return false, nil + } + + // Use the seed to select a position within the active set + selection := new(big.Int).Mod(epochSeed, numActive) + // Should not initialize if the selection does not match the caller's rank in the active set + if selection.Int64() != int64(rank) { + return false, nil + } + + // If the selection matches the caller's rank the caller should initialize the round + return true, nil +} + +// Returns the seed used to select a round initializer in the current epoch for the current round +// This seed is not meant to be unpredictable. The only requirement for the seed is that it is calculated the same way for each +// party running the round initializer +func (r *RoundInitializer) currentEpochSeed(currentL1Block, roundStartL1Block *big.Int, lastInitializedL1BlkHash [32]byte) *big.Int { + epochNum := new(big.Int).Sub(currentL1Block, roundStartL1Block) + epochNum.Div(epochNum, epochL1Blocks) + + // The seed for the current epoch is calculated as: + // keccak256(lastInitializedL1BlkHash | epochNum) + return crypto.Keccak256Hash(append(lastInitializedL1BlkHash[:], epochNum.Bytes()...)).Big() +} diff --git a/eth/roundinitializer_test.go b/eth/roundinitializer_test.go index a96cb3b2f2..25e60205a0 100644 --- a/eth/roundinitializer_test.go +++ b/eth/roundinitializer_test.go @@ -16,6 +16,84 @@ import ( "github.com/stretchr/testify/mock" ) +func TestRoundInitializer_CurrentEpochSeed(t *testing.T) { + initializer := NewRoundInitializer(nil, nil) + + assert := assert.New(t) + + // Test epochNum = 0 + blkHash := [32]byte{123} + + epochSeed := initializer.currentEpochSeed(big.NewInt(5), big.NewInt(5), blkHash) + // epochNum = (5 - 5) / 5 = 0 + // epochSeed = keccak256(blkHash | 0) = 53205358842179480591542570540016728811976439286094436690881169143335261643310 + expEpochSeed, _ := new(big.Int).SetString("53205358842179480591542570540016728811976439286094436690881169143335261643310", 10) + assert.Equal(expEpochSeed, epochSeed) + + // Test epochNum > 0 + epochSeed = initializer.currentEpochSeed(big.NewInt(20), big.NewInt(5), blkHash) + // epochNum = (20 - 5) / 5 = 3 + // epochSeed = keccak256(blkHash | 3) = 42541119854153860846042329644941941146216657514071318786342840580076059276721 + expEpochSeed.SetString("42541119854153860846042329644941941146216657514071318786342840580076059276721", 10) + assert.Equal(expEpochSeed, epochSeed) + + // Test epochNum > 0 with some # of blocks into the epoch + epochSeed = initializer.currentEpochSeed(big.NewInt(20), big.NewInt(4), blkHash) + // epochNum = (20 - 4) / 5 = 3.2 -> 3 + assert.Equal(expEpochSeed, epochSeed) +} + +func TestRoundInitializer_ShouldInitialize(t *testing.T) { + client := &MockClient{} + tw := &stubTimeWatcher{} + initializer := NewRoundInitializer(client, tw) + + assert := assert.New(t) + + // Test error getting transcoders + expErr := errors.New("TranscoderPool error") + client.On("TranscoderPool").Return(nil, expErr).Once() + + ok, err := initializer.shouldInitialize(nil) + assert.EqualError(err, expErr.Error()) + assert.False(ok) + + // Test active set is empty because no registered transcoders + client.On("TranscoderPool").Return([]*lpTypes.Transcoder{}, nil).Once() + ok, err = initializer.shouldInitialize(nil) + assert.Nil(err) + assert.False(ok) + + // Test that caller is not in active set because it is not registered + caller := ethcommon.BytesToAddress([]byte("foo")) + client.On("Account").Return(accounts.Account{Address: caller}) + + registered := []*lpTypes.Transcoder{ + {Address: ethcommon.BytesToAddress([]byte("jar"))}, + {Address: ethcommon.BytesToAddress([]byte("bar"))}, + } + client.On("TranscoderPool").Return(registered, nil).Once() + + ok, err = initializer.shouldInitialize(nil) + assert.Nil(err) + assert.False(ok) + + // Test not selected + registered = append(registered, &lpTypes.Transcoder{Address: caller}) + client.On("TranscoderPool").Return(registered, nil) + + seed := big.NewInt(3) + ok, err = initializer.shouldInitialize(seed) + assert.Nil(err) + assert.False(ok) + + // Test caller selected + seed = big.NewInt(5) + ok, err = initializer.shouldInitialize(seed) + assert.Nil(err) + assert.True(ok) +} + func TestRoundInitializer_TryInitialize(t *testing.T) { client := &MockClient{} tw := &stubTimeWatcher{ @@ -23,17 +101,45 @@ func TestRoundInitializer_TryInitialize(t *testing.T) { lastInitializedRound: big.NewInt(100), lastInitializedBlockHash: [32]byte{123}, } - initializer := NewRoundInitializer(client, tw, 0) + initializer := NewRoundInitializer(client, tw) initializer.nextRoundStartL1Block = big.NewInt(5) assert := assert.New(t) + // Test error checking should initialize + expErr := errors.New("shouldInitialize error") + client.On("TranscoderPool").Return(nil, expErr).Once() + + err := initializer.tryInitialize() + assert.EqualError(err, expErr.Error()) + + // Test should not initialize + caller := ethcommon.BytesToAddress([]byte("foo")) + client.On("Account").Return(accounts.Account{Address: caller}) + + registered := []*lpTypes.Transcoder{ + {Address: ethcommon.BytesToAddress([]byte("jar"))}, + } + client.On("TranscoderPool").Return(registered, nil).Once() + + err = initializer.tryInitialize() + assert.Nil(err) + + // Test error when submitting initialization tx + registered = []*lpTypes.Transcoder{{Address: caller}} + client.On("TranscoderPool").Return(registered, nil) + expErr = errors.New("InitializeRound error") + client.On("InitializeRound").Return(nil, expErr).Once() + + err = initializer.tryInitialize() + assert.EqualError(err, expErr.Error()) + // Test error checking initialization tx tx := &types.Transaction{} client.On("InitializeRound").Return(tx, nil) - expErr := errors.New("CheckTx error") + expErr = errors.New("CheckTx error") client.On("CheckTx", mock.Anything).Return(expErr).Once() - err := initializer.tryInitialize() + err = initializer.tryInitialize() assert.EqualError(err, expErr.Error()) // Test success diff --git a/eth/watchers/pricefeedwatcher.go b/eth/watchers/pricefeedwatcher.go deleted file mode 100644 index 1bab9dc130..0000000000 --- a/eth/watchers/pricefeedwatcher.go +++ /dev/null @@ -1,234 +0,0 @@ -package watchers - -import ( - "context" - "fmt" - "strings" - "sync" - "time" - - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/event" - "github.com/livepeer/go-livepeer/clog" - "github.com/livepeer/go-livepeer/eth" -) - -const ( - priceUpdateMaxRetries = 5 - priceUpdateBaseRetryDelay = 30 * time.Second - priceUpdatePeriod = 1 * time.Hour -) - -type PriceFeedWatcher interface { - Currencies() (base string, quote string, err error) - Current() (eth.PriceData, error) - Subscribe(ctx context.Context, sink chan<- eth.PriceData) -} - -// PriceFeedWatcher monitors a Chainlink PriceFeed for updated pricing info. It -// allows fetching the current price as well as listening for updates on the -// PriceUpdated channel. -type priceFeedWatcher struct { - baseRetryDelay time.Duration - - priceFeed eth.PriceFeedEthClient - - mu sync.RWMutex - current eth.PriceData - cancelWatch func() - - priceEventFeed event.Feed - subscriptions event.SubscriptionScope -} - -// NewPriceFeedWatcher creates a new PriceFeedWatcher instance. It will already -// fetch the current price and start a goroutine to watch for updates. -func NewPriceFeedWatcher(ethClient *ethclient.Client, priceFeedAddr string) (PriceFeedWatcher, error) { - priceFeed, err := eth.NewPriceFeedEthClient(ethClient, priceFeedAddr) - if err != nil { - return nil, fmt.Errorf("failed to create price feed client: %w", err) - } - w := &priceFeedWatcher{ - baseRetryDelay: priceUpdateBaseRetryDelay, - priceFeed: priceFeed, - } - return w, nil -} - -// Currencies returns the base and quote currencies of the price feed. -// i.e. base = CurrentPrice() * quote -func (w *priceFeedWatcher) Currencies() (base string, quote string, err error) { - description, err := w.priceFeed.Description() - if err != nil { - return "", "", fmt.Errorf("failed to get description: %w", err) - } - - base, quote, err = parseCurrencies(description) - if err != nil { - return "", "", err - } - return -} - -// Current returns the latest fetched price data, or fetches it in case it has -// not been fetched yet. -func (w *priceFeedWatcher) Current() (eth.PriceData, error) { - w.mu.RLock() - current := w.current - w.mu.RUnlock() - if current.UpdatedAt.IsZero() { - return w.updatePrice() - } - return current, nil -} - -// Subscribe allows one to subscribe to price updates emitted by the Watcher. -// The sink channel should have ample buffer space to avoid blocking other -// subscribers. Slow subscribers are not dropped. The subscription is kept alive -// until the passed Context is cancelled. -// -// The watch loop is run automatically while there are active subscriptions. It -// will be started when the first subscription is made and is automatically -// stopped when the last subscription is closed. -func (w *priceFeedWatcher) Subscribe(ctx context.Context, sink chan<- eth.PriceData) { - w.mu.Lock() - defer w.mu.Unlock() - w.ensureWatchLocked() - - sub := w.subscriptions.Track(w.priceEventFeed.Subscribe(sink)) - go w.handleUnsubscribe(ctx, sub) -} - -// updatePrice fetches the latest price data from the price feed and updates the -// current price if it is newer. If the price is updated, it will also send the -// updated price to the price event feed. -func (w *priceFeedWatcher) updatePrice() (eth.PriceData, error) { - newPrice, err := w.priceFeed.FetchPriceData() - if err != nil { - return eth.PriceData{}, fmt.Errorf("failed to fetch price data: %w", err) - } - - if newPrice.UpdatedAt.After(w.current.UpdatedAt) { - w.mu.Lock() - w.current = newPrice - w.mu.Unlock() - w.priceEventFeed.Send(newPrice) - } - - return newPrice, nil -} - -// ensureWatchLocked makes sure that the watch process is running. It assumes it -// is already running in a locked context (w.mu). The watch process itself will -// run in background and periodically poll the price feed for updates until the -// `w.cancelWatch` function is called. -func (w *priceFeedWatcher) ensureWatchLocked() { - if w.cancelWatch != nil { - // already running - return - } - ctx, cancel := context.WithCancel(context.Background()) - w.cancelWatch = cancel - - ticker := newTruncatedTicker(ctx, priceUpdatePeriod) - go w.watchTicker(ctx, ticker) -} - -// handleUnsubscribe waits for the provided Context to be done and then closes -// the given subscription. It then stops the watch process if there are no more -// active subscriptions. -func (w *priceFeedWatcher) handleUnsubscribe(ctx context.Context, sub event.Subscription) { -loop: - for { - select { - case <-ctx.Done(): - break loop - case <-sub.Err(): - clog.Errorf(ctx, "PriceFeedWatcher subscription error: %v", sub.Err()) - } - } - w.mu.Lock() - defer w.mu.Unlock() - - sub.Unsubscribe() - if w.subscriptions.Count() == 0 && w.cancelWatch != nil { - w.cancelWatch() - w.cancelWatch = nil - } -} - -// watchTicker is the main loop that periodically fetches the latest price data -// from the price feed. It's lifecycle is handled through the ensureWatch and -// handleUnsubscribe functions. -func (w *priceFeedWatcher) watchTicker(ctx context.Context, ticker <-chan time.Time) { - clog.V(6).Infof(ctx, "Starting PriceFeed watch loop") - for { - select { - case <-ctx.Done(): - clog.V(6).Infof(ctx, "Stopping PriceFeed watch loop") - return - case <-ticker: - attempt, retryDelay := 1, w.baseRetryDelay - for { - _, err := w.updatePrice() - if err == nil { - break - } else if attempt >= priceUpdateMaxRetries { - clog.Errorf(ctx, "Failed to fetch updated price from PriceFeed attempts=%d err=%q", attempt, err) - break - } - - clog.Warningf(ctx, "Failed to fetch updated price from PriceFeed, retrying after retryDelay=%d attempt=%d err=%q", retryDelay, attempt, err) - select { - case <-ctx.Done(): - return - case <-time.After(retryDelay): - } - attempt, retryDelay = attempt+1, retryDelay*2 - } - } - } -} - -// parseCurrencies parses the base and quote currencies from a price feed based -// on Chainlink PriceFeed description pattern "FROM / TO". -func parseCurrencies(description string) (currencyBase string, currencyQuote string, err error) { - currencies := strings.Split(description, "/") - if len(currencies) != 2 { - return "", "", fmt.Errorf("aggregator description must be in the format 'FROM / TO' but got: %s", description) - } - - currencyBase = strings.TrimSpace(currencies[0]) - currencyQuote = strings.TrimSpace(currencies[1]) - return -} - -// newTruncatedTicker creates a ticker that ticks at the next time that is a -// multiple of d, starting from the current time. This is a best-effort approach -// to ensure that nodes update their prices around the same time to avoid too -// big price discrepancies. -func newTruncatedTicker(ctx context.Context, d time.Duration) <-chan time.Time { - ch := make(chan time.Time, 1) - go func() { - // Do not close the channel, to prevent a concurrent goroutine reading from - // the channel from seeing an erroneous "tick" after its closed. - - nextTick := time.Now().UTC().Truncate(d) - for { - nextTick = nextTick.Add(d) - untilNextTick := nextTick.Sub(time.Now().UTC()) - if untilNextTick <= 0 { - continue - } - - select { - case <-ctx.Done(): - return - case t := <-time.After(untilNextTick): - ch <- t - } - } - }() - - return ch -} diff --git a/eth/watchers/pricefeedwatcher_test.go b/eth/watchers/pricefeedwatcher_test.go deleted file mode 100644 index 27eb5d24d0..0000000000 --- a/eth/watchers/pricefeedwatcher_test.go +++ /dev/null @@ -1,249 +0,0 @@ -package watchers - -import ( - "context" - "errors" - "math/big" - "reflect" - "testing" - "time" - - "github.com/livepeer/go-livepeer/eth" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" -) - -type mockPriceFeedEthClient struct { - mock.Mock -} - -func (m *mockPriceFeedEthClient) FetchPriceData() (eth.PriceData, error) { - args := m.Called() - return args.Get(0).(eth.PriceData), args.Error(1) -} - -func (m *mockPriceFeedEthClient) Description() (string, error) { - args := m.Called() - return args.String(0), args.Error(1) -} - -func TestPriceFeedWatcher_UpdatePrice(t *testing.T) { - priceFeedMock := new(mockPriceFeedEthClient) - defer priceFeedMock.AssertExpectations(t) - - priceData := eth.PriceData{ - RoundID: 10, - Price: big.NewRat(3, 2), - UpdatedAt: time.Now(), - } - priceFeedMock.On("FetchPriceData").Return(priceData, nil).Once() - - w := &priceFeedWatcher{priceFeed: priceFeedMock} - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - priceUpdated := make(chan eth.PriceData, 1) - w.Subscribe(ctx, priceUpdated) - - newPrice, err := w.updatePrice() - require.NoError(t, err) - require.Equal(t, priceData, newPrice) - - select { - case updatedPrice := <-priceUpdated: - require.Equal(t, priceData, updatedPrice) - case <-time.After(2 * time.Second): - t.Error("Updated price hasn't been received on channel") - } -} - -func TestPriceFeedWatcher_Subscribe(t *testing.T) { - require := require.New(t) - priceFeedMock := new(mockPriceFeedEthClient) - defer priceFeedMock.AssertExpectations(t) - - w := &priceFeedWatcher{priceFeed: priceFeedMock} - - // Start a bunch of subscriptions and make sure only 1 watch loop gets started - observedCancelWatch := []context.CancelFunc{} - cancelSub := []context.CancelFunc{} - for i := 0; i < 5; i++ { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - w.Subscribe(ctx, make(chan eth.PriceData, 1)) - - observedCancelWatch = append(observedCancelWatch, w.cancelWatch) - cancelSub = append(cancelSub, cancel) - } - - require.NotNil(w.cancelWatch) - for i := range observedCancelWatch { - require.Equal(reflect.ValueOf(w.cancelWatch).Pointer(), reflect.ValueOf(observedCancelWatch[i]).Pointer()) - } - - // Stop all but the last subscription and ensure watch loop stays running - for i := 0; i < 4; i++ { - cancelSub[i]() - require.NotNil(w.cancelWatch) - } - - // Now stop the last subscription and ensure watch loop gets stopped - cancelSub[4]() - time.Sleep(1 * time.Second) - require.Nil(w.cancelWatch) - - // Finally, just make sure it can be started again after having been stopped - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - w.Subscribe(ctx, make(chan eth.PriceData, 1)) - require.NotNil(w.cancelWatch) -} - -func TestPriceFeedWatcher_Watch(t *testing.T) { - require := require.New(t) - priceFeedMock := new(mockPriceFeedEthClient) - defer priceFeedMock.AssertExpectations(t) - - w := &priceFeedWatcher{priceFeed: priceFeedMock} - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - priceUpdated := make(chan eth.PriceData, 1) - w.Subscribe(ctx, priceUpdated) - - priceData := eth.PriceData{ - RoundID: 10, - Price: big.NewRat(9, 2), - UpdatedAt: time.Now(), - } - checkPriceUpdated := func() { - select { - case updatedPrice := <-priceUpdated: - require.Equal(priceData, updatedPrice) - require.Equal(priceData, w.current) - case <-time.After(1 * time.Second): - require.Fail("Updated price hasn't been received on channel in a timely manner") - } - priceFeedMock.AssertExpectations(t) - } - checkNoPriceUpdate := func() { - select { - case <-priceUpdated: - require.Fail("Unexpected price update given it hasn't changed") - case <-time.After(1 * time.Second): - // all good - } - priceFeedMock.AssertExpectations(t) - } - - // Start the watch loop - fakeTicker := make(chan time.Time, 10) - go func() { - w.watchTicker(ctx, fakeTicker) - }() - - // First time should trigger an update - priceFeedMock.On("FetchPriceData").Return(priceData, nil).Once() - fakeTicker <- time.Now() - checkPriceUpdated() - - // Trigger a dummy update given price hasn't changed - priceFeedMock.On("FetchPriceData").Return(priceData, nil).Once() - fakeTicker <- time.Now() - checkNoPriceUpdate() - - // still shouldn't update given UpdatedAt stayed the same - priceData.Price = big.NewRat(1, 1) - priceFeedMock.On("FetchPriceData").Return(priceData, nil).Once() - fakeTicker <- time.Now() - checkNoPriceUpdate() - - // bump the UpdatedAt time to trigger an update - priceData.UpdatedAt = priceData.UpdatedAt.Add(1 * time.Minute) - priceFeedMock.On("FetchPriceData").Return(priceData, nil).Once() - fakeTicker <- time.Now() - checkPriceUpdated() - - priceData.UpdatedAt = priceData.UpdatedAt.Add(1 * time.Hour) - priceData.Price = big.NewRat(3, 2) - priceFeedMock.On("FetchPriceData").Return(priceData, nil).Once() - fakeTicker <- time.Now() - checkPriceUpdated() -} - -func TestPriceFeedWatcher_WatchErrorRetries(t *testing.T) { - priceFeedMock := new(mockPriceFeedEthClient) - defer priceFeedMock.AssertExpectations(t) - - // First 4 calls should fail then succeed on the 5th - for i := 0; i < 4; i++ { - priceFeedMock.On("FetchPriceData").Return(eth.PriceData{}, errors.New("error")).Once() - } - priceData := eth.PriceData{ - RoundID: 10, - Price: big.NewRat(3, 2), - UpdatedAt: time.Now(), - } - priceFeedMock.On("FetchPriceData").Return(priceData, nil) - - w := &priceFeedWatcher{ - baseRetryDelay: 5 * time.Millisecond, - priceFeed: priceFeedMock, - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - priceUpdated := make(chan eth.PriceData, 1) - w.Subscribe(ctx, priceUpdated) - - // Start watch loop - fakeTicker := make(chan time.Time, 10) - go func() { - w.watchTicker(ctx, fakeTicker) - }() - - fakeTicker <- time.Now() - select { - case updatedPrice := <-priceUpdated: - require.Equal(t, priceData, updatedPrice) - case <-time.After(2 * time.Second): - t.Error("Updated price hasn't been received on channel") - } -} - -func TestParseCurrencies(t *testing.T) { - t.Run("Valid currencies", func(t *testing.T) { - description := "ETH / USD" - currencyBase, currencyQuote, err := parseCurrencies(description) - - require.NoError(t, err) - require.Equal(t, "ETH", currencyBase) - require.Equal(t, "USD", currencyQuote) - }) - - t.Run("Missing separator", func(t *testing.T) { - description := "ETHUSD" - _, _, err := parseCurrencies(description) - - require.Error(t, err) - require.Contains(t, err.Error(), "aggregator description must be in the format 'FROM / TO'") - }) - - t.Run("Extra spaces", func(t *testing.T) { - description := " ETH / USD " - currencyBase, currencyQuote, err := parseCurrencies(description) - - require.NoError(t, err) - require.Equal(t, "ETH", currencyBase) - require.Equal(t, "USD", currencyQuote) - }) - - t.Run("Lowercase currency", func(t *testing.T) { - description := "eth / usd" - currencyBase, currencyQuote, err := parseCurrencies(description) - - require.NoError(t, err) - require.Equal(t, "eth", currencyBase) - require.Equal(t, "usd", currencyQuote) - }) -} diff --git a/go.mod b/go.mod index 1a59fc36fc..c80fe64f37 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,10 @@ go 1.21.5 require ( contrib.go.opencensus.io/exporter/prometheus v0.4.2 - github.com/Masterminds/semver/v3 v3.2.1 github.com/cenkalti/backoff v2.2.1+incompatible github.com/ethereum/go-ethereum v1.13.5 github.com/getkin/kin-openapi v0.124.0 - github.com/golang/glog v1.2.1 + github.com/golang/glog v1.1.1 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/jaypipes/ghw v0.10.0 @@ -16,7 +15,7 @@ require ( github.com/livepeer/ai-worker v0.1.0 github.com/livepeer/go-tools v0.3.6-0.20240130205227-92479de8531b github.com/livepeer/livepeer-data v0.7.5-0.20231004073737-06f1f383fb18 - github.com/livepeer/lpms v0.0.0-20240731140137-28406cf8bc78 + github.com/livepeer/lpms v0.0.0-20240711175220-227325841434 github.com/livepeer/m3u8 v0.11.1 github.com/mattn/go-sqlite3 v1.14.18 github.com/oapi-codegen/nethttp-middleware v1.0.1 @@ -32,34 +31,27 @@ require ( go.opencensus.io v0.24.0 go.uber.org/goleak v1.3.0 golang.org/x/net v0.25.0 - google.golang.org/grpc v1.65.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/grpc v1.57.1 + google.golang.org/protobuf v1.33.0 pgregory.net/rapid v1.1.0 ) require ( cloud.google.com/go v0.110.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/compute v1.20.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.0 // indirect cloud.google.com/go/storage v1.30.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/DataDog/zstd v1.4.5 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/aws/aws-sdk-go v1.44.273 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.7.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/cespare/cp v1.1.1 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cockroachdb/errors v1.8.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect - github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.0.8 // indirect - github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 // indirect - github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/containerd/containerd v1.7.0-beta.2 // indirect @@ -68,7 +60,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect - github.com/deepmap/oapi-codegen v1.6.0 // indirect github.com/deepmap/oapi-codegen/v2 v2.2.0 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect @@ -81,7 +72,6 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -96,28 +86,19 @@ require ( github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/go-test/deep v1.1.0 // indirect - github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.6.0 // indirect + github.com/google/uuid v1.5.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.10.0 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.4.2 // indirect - github.com/graph-gophers/graphql-go v1.3.0 // indirect - github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect - github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.3 // indirect - github.com/huin/goupnp v1.3.0 // indirect - github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect - github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect - github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/invopop/yaml v0.2.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-block-format v0.1.2 // indirect @@ -141,7 +122,6 @@ require ( github.com/ipld/go-car v0.6.0 // indirect github.com/ipld/go-codec-dagpb v1.6.0 // indirect github.com/ipld/go-ipld-prime v0.20.0 // indirect - github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -149,8 +129,6 @@ require ( github.com/karalabe/usb v0.0.2 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect github.com/livepeer/joy4 v0.1.2-0.20191121080656-b2fea45cbded // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -161,8 +139,6 @@ require ( github.com/minio/minio-go/v7 v7.0.66 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect - github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -191,8 +167,6 @@ require ( github.com/rabbitmq/amqp091-go v1.8.0 // indirect github.com/rabbitmq/rabbitmq-stream-go-client v1.1.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.7.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect @@ -201,14 +175,10 @@ require ( github.com/status-im/keycard-go v0.2.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/supranational/blst v0.3.11 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/tyler-smith/go-bip39 v1.1.0 // indirect - github.com/urfave/cli/v2 v2.25.7 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect github.com/whyrusleeping/cbor-gen v0.0.0-20230418232409-daab9ece03a0 // indirect - github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.opentelemetry.io/otel v1.16.0 // indirect go.opentelemetry.io/otel/metric v1.16.0 // indirect go.opentelemetry.io/otel/trace v1.16.0 // indirect @@ -218,20 +188,18 @@ require ( golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/oauth2 v0.20.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect - golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.125.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect diff --git a/go.sum b/go.sum index 2e9eacc712..74df1b7267 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,10 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute v1.20.0 h1:cUOcywWuowO9It2i1KX1lIb0HH7gLv6nENKuZGnlcSo= +cloud.google.com/go/compute v1.20.0/go.mod h1:kn5BhC++qUWR/AM3Dn21myV7QbgqejW04cAOrtppaQI= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= @@ -43,23 +45,14 @@ contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20221206110420-d395f97c4830 h1:u8scGKApGy+gXpYDw2f+nh60R0FqCfrpDRIQki+5o3U= github.com/AdaLogics/go-fuzz-headers v0.0.0-20221206110420-d395f97c4830/go.mod h1:VzwV+t+dZ9j/H867F1M2ziD+yLHtB46oM35FxxMJ4d0= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -67,27 +60,21 @@ github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXn github.com/Microsoft/hcsshim v0.10.0-rc.1 h1:Lms8jwpaIdIUvoBNee8ZuvIi1XnNy9uvnxSC9L1q1x4= github.com/Microsoft/hcsshim v0.10.0-rc.1/go.mod h1:7XX96hdvnwWGdXnksDNdhfFcUH1BtQY6bL2L3f9Abyk= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aws/aws-sdk-go v1.44.273 h1:CX8O0gK+cGrgUyv7bgJ6QQP9mQg7u5mweHdNzULH47c= github.com/aws/aws-sdk-go v1.44.273/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -109,9 +96,8 @@ github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= @@ -127,10 +113,6 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= @@ -143,7 +125,6 @@ github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeS github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= @@ -153,11 +134,7 @@ github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/containerd/containerd v1.7.0-beta.2 h1:GWmC96y8j7jlFJX0Wh+covft0M1hHBqQL7lo+N6qvxg= github.com/containerd/containerd v1.7.0-beta.2/go.mod h1:RR01Jsm/jovDKK48sFCVqWyKAH2APMPi88Aeu1on63I= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -166,7 +143,6 @@ github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXk github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -178,13 +154,8 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen/v2 v2.2.0 h1:FW4f7C0Xb6EaezBSB3GYw2QGwHD5ChDflG+3xSZBdvY= github.com/deepmap/oapi-codegen/v2 v2.2.0/go.mod h1:L4zUv7ULYDtYSb/aYk/xO3OYcQU6BoU/0viULkbi2DE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= @@ -209,53 +180,38 @@ github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5R github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.5 h1:U6TCRciCqZRe4FPXmy1sMGxTfuk8P7u2UoinF3VbaFk= github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M= github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -275,14 +231,11 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw= github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -301,25 +254,19 @@ github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.1.1 h1:jxpi2eWoU84wbX9iIEyAeeoac3FLuifZpY9tcNUD9kw= +github.com/golang/glog v1.1.1/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -352,11 +299,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -372,7 +316,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= @@ -395,8 +338,8 @@ github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -407,25 +350,19 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= -github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= @@ -435,17 +372,8 @@ github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZm github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= -github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= -github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= @@ -522,10 +450,6 @@ github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYt github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.20.0 h1:Ud3VwE9ClxpO2LkCYP7vWPc0Fo+dYdYzgxUJZ3uRG4g= github.com/ipld/go-ipld-prime v0.20.0/go.mod h1:PzqZ/ZR981eKbgdr3y2DJYeD/8bgMawdGVlJDE8kK+M= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jaypipes/ghw v0.10.0 h1:UHu9UX08Py315iPojADFPOkmjTsNzHj4g4adsNKKteY= @@ -554,28 +478,15 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.2 h1:M6QQBNxF+CQ8OFvxrT90BA0qBOXymndZnk5q235mFc4= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= @@ -596,9 +507,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -631,25 +539,15 @@ github.com/livepeer/joy4 v0.1.2-0.20191121080656-b2fea45cbded h1:ZQlvR5RB4nfT+cO github.com/livepeer/joy4 v0.1.2-0.20191121080656-b2fea45cbded/go.mod h1:xkDdm+akniYxVT9KW1Y2Y7Hso6aW+rZObz3nrA9yTHw= github.com/livepeer/livepeer-data v0.7.5-0.20231004073737-06f1f383fb18 h1:4oH3NqV0NvcdS44Ld3zK2tO8IUiNozIggm74yobQeZg= github.com/livepeer/livepeer-data v0.7.5-0.20231004073737-06f1f383fb18/go.mod h1:Jpf4jHK+fbWioBHRDRM1WadNT1qmY27g2YicTdO0Rtc= -github.com/livepeer/lpms v0.0.0-20240731140137-28406cf8bc78 h1:J026gPdu533qY+KNEgWaSiu3dExW+DB4UyE8+PAEKvg= -github.com/livepeer/lpms v0.0.0-20240731140137-28406cf8bc78/go.mod h1:z5ROP1l5OzAKSoqVRLc34MjUdueil6wHSecQYV7llIw= +github.com/livepeer/lpms v0.0.0-20240711175220-227325841434 h1:E7PKN6q/jMLapEV+eEwlwv87Xe5zacaVhvZ8T6AJR3c= +github.com/livepeer/lpms v0.0.0-20240711175220-227325841434/go.mod h1:Hr/JhxxPDipOVd4ZrGYWrdJfpVF8/SEI0nNr2ctAlkM= github.com/livepeer/m3u8 v0.11.1 h1:VkUJzfNTyjy9mqsgp5JPvouwna8wGZMvd/gAfT5FinU= github.com/livepeer/m3u8 v0.11.1/go.mod h1:IUqAtwWPAG2CblfQa4SVzTQoDcEMPyfNOaBSxqHMS04= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -663,13 +561,9 @@ github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= -github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= @@ -684,7 +578,6 @@ github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dz github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= @@ -711,7 +604,6 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwd github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= @@ -751,11 +643,6 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= -github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oapi-codegen/nethttp-middleware v1.0.1 h1:ZWvwfnMU0eloHX1VEJmQscQm3741t0vCm0eSIie1NIo= github.com/oapi-codegen/nethttp-middleware v1.0.1/go.mod h1:P7xtAvpoqNB+5obR9qRCeefH7YlXWSK3KgPs/9WB8tE= github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= @@ -763,16 +650,11 @@ github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI= github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -786,12 +668,10 @@ github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/ github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/peterbourgon/ff/v3 v3.4.0 h1:QBvM/rizZM1cB0p0lGMdmR7HxZeI/ZrBWB4DqLkMUBc= @@ -800,9 +680,6 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQm github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -854,21 +731,16 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -889,12 +761,7 @@ github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+ github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= @@ -929,10 +796,8 @@ github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+F github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= @@ -942,12 +807,6 @@ github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= @@ -961,16 +820,8 @@ github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvS github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20230418232409-daab9ece03a0 h1:XYEgH2nJgsrcrj32p+SAbx6T3s/6QknOXezXtz7kzbg= github.com/whyrusleeping/cbor-gen v0.0.0-20230418232409-daab9ece03a0/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1010,17 +861,13 @@ go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -1066,11 +913,9 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1079,7 +924,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1090,16 +934,13 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1117,8 +958,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= -golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1138,10 +979,8 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1150,16 +989,11 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1175,13 +1009,10 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1221,7 +1052,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= @@ -1231,21 +1061,16 @@ golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1322,7 +1147,6 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1355,11 +1179,10 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1377,8 +1200,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/grpc v1.57.1 h1:upNTNqv0ES+2ZOOqACwVtS3Il8M12/+Hz41RCPzAjQg= +google.golang.org/grpc v1.57.1/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1394,9 +1217,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1405,14 +1227,10 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/install_ffmpeg.sh b/install_ffmpeg.sh index 3de15fdc17..df864b4968 100755 --- a/install_ffmpeg.sh +++ b/install_ffmpeg.sh @@ -1,3 +1,230 @@ #!/usr/bin/env bash -echo 'WARNING: downloading and executing lpms/install_ffmpeg.sh, use it directly in case of issues' -curl https://raw.githubusercontent.com/livepeer/lpms/5b7b9f5e831f041c6cf707bbaad7b5503c2f138d/install_ffmpeg.sh | bash -s $1 + +set -exuo pipefail + +ROOT="${1:-$HOME}" +NPROC=${NPROC:-$(nproc)} +EXTRA_CFLAGS="" +EXTRA_LDFLAGS="" +EXTRA_X264_FLAGS="" +EXTRA_FFMPEG_FLAGS="" +BUILD_TAGS="${BUILD_TAGS:-}" + +# Build platform flags +BUILDOS=$(uname -s | tr '[:upper:]' '[:lower:]') +BUILDARCH=$(uname -m | tr '[:upper:]' '[:lower:]') +if [[ $BUILDARCH == "aarch64" ]]; then + BUILDARCH=arm64 +fi +if [[ $BUILDARCH == "x86_64" ]]; then + BUILDARCH=amd64 +fi + +# Override these for cross-compilation +export GOOS="${GOOS:-$BUILDOS}" +export GOARCH="${GOARCH:-$BUILDARCH}" + +echo "BUILDOS: $BUILDOS" +echo "BUILDARCH: $BUILDARCH" +echo "GOOS: $GOOS" +echo "GOARCH: $GOARCH" + +function check_sysroot() { + if ! stat $SYSROOT > /dev/null; then + echo "cross-compilation sysroot not found at $SYSROOT, try setting SYSROOT to the correct path" + exit 1 + fi +} + +if [[ "$BUILDARCH" == "amd64" && "$BUILDOS" == "linux" && "$GOARCH" == "arm64" && "$GOOS" == "linux" ]]; then + echo "cross-compiling linux-amd64 --> linux-arm64" + export CC="clang-14" + export STRIP="llvm-strip-14" + export AR="llvm-ar-14" + export RANLIB="llvm-ranlib-14" + EXTRA_CFLAGS="--target=aarch64-linux-gnu -I/usr/local/cuda_arm64/include $EXTRA_CFLAGS" + EXTRA_LDFLAGS="-fuse-ld=lld --target=aarch64-linux-gnu -L/usr/local/cuda_arm64/lib64 $EXTRA_LDFLAGS" + EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --arch=aarch64 --enable-cross-compile --cc=clang --strip=llvm-strip-14" + HOST_OS="--host=aarch64-linux-gnu" +fi + +if [[ "$BUILDARCH" == "arm64" && "$BUILDOS" == "darwin" && "$GOARCH" == "arm64" && "$GOOS" == "linux" ]]; then + SYSROOT="${SYSROOT:-"/tmp/sysroot-aarch64-linux-gnu"}" + check_sysroot + echo "cross-compiling darwin-arm64 --> linux-arm64" + LLVM_PATH="${LLVM_PATH:-/opt/homebrew/opt/llvm/bin}" + if [[ ! -f "$LLVM_PATH/ld.lld" ]]; then + echo "llvm linker not found at '$LLVM_PATH/ld.lld'. try 'brew install llvm' or set LLVM_PATH to your LLVM bin directory" + exit 1 + fi + export CC="$LLVM_PATH/clang --sysroot=$SYSROOT" + export AR="/opt/homebrew/opt/llvm/bin/llvm-ar" + export RANLIB="/opt/homebrew/opt/llvm/bin/llvm-ranlib" + EXTRA_CFLAGS="--target=aarch64-linux-gnu $EXTRA_CFLAGS" + EXTRA_LDFLAGS="--target=aarch64-linux-gnu -fuse-ld=$LLVM_PATH/ld.lld $EXTRA_LDFLAGS" + EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --arch=aarch64 --enable-cross-compile --cc=$LLVM_PATH/clang --sysroot=$SYSROOT --ar=$AR --ranlib=$RANLIB --target-os=linux" + EXTRA_X264_FLAGS="$EXTRA_X264_FLAGS --sysroot=$SYSROOT --ar=$AR --ranlib=$RANLIB" + HOST_OS="--host=aarch64-linux-gnu" +fi + +if [[ "$BUILDOS" == "linux" && "$GOARCH" == "amd64" && "$GOOS" == "windows" ]]; then + echo "cross-compiling linux-$BUILDARCH --> windows-amd64" + SYSROOT="${SYSROOT:-"/usr/x86_64-w64-mingw32"}" + check_sysroot + EXTRA_CFLAGS="-L$SYSROOT/lib -I$SYSROOT/include $EXTRA_CFLAGS" + EXTRA_LDFLAGS="-L$SYSROOT/lib $EXTRA_LDFLAGS" + EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --arch=x86_64 --enable-cross-compile --cross-prefix=x86_64-w64-mingw32- --target-os=mingw64 --sysroot=$SYSROOT" + EXTRA_X264_FLAGS="$EXTRA_X264_FLAGS --cross-prefix=x86_64-w64-mingw32- --sysroot=$SYSROOT" + HOST_OS="--host=mingw64" + # Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967969 + export PKG_CONFIG_LIBDIR="/usr/local/x86_64-w64-mingw32/lib/pkgconfig" + EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --pkg-config=$(which pkg-config)" +fi + +if [[ "$BUILDARCH" == "amd64" && "$BUILDOS" == "darwin" && "$GOARCH" == "arm64" && "$GOOS" == "darwin" ]]; then + echo "cross-compiling darwin-amd64 --> darwin-arm64" + EXTRA_CFLAGS="$EXTRA_CFLAGS --target=arm64-apple-macos11" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS --target=arm64-apple-macos11" + HOST_OS="--host=aarch64-darwin" + EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --arch=aarch64 --enable-cross-compile" +fi + +# Windows (MSYS2) needs a few tweaks +if [[ "$BUILDOS" == *"MSYS"* ]]; then + ROOT="/build" + export PATH="$PATH:/usr/bin:/mingw64/bin" + export C_INCLUDE_PATH="${C_INCLUDE_PATH:-}:/mingw64/lib" + + export PATH="$ROOT/compiled/bin":$PATH + export PKG_CONFIG_PATH=/mingw64/lib/pkgconfig + + export TARGET_OS="--target-os=mingw64" + export HOST_OS="--host=x86_64-w64-mingw32" + export BUILD_OS="--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32" + + # Needed for mbedtls + export WINDOWS_BUILD=1 +fi + +export PATH="$ROOT/compiled/bin:${PATH}" +export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:-}:$ROOT/compiled/lib/pkgconfig" + +mkdir -p "$ROOT/" + +# NVENC only works on Windows/Linux +if [[ "$GOOS" != "darwin" ]]; then + if [[ ! -e "$ROOT/nv-codec-headers" ]]; then + git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git "$ROOT/nv-codec-headers" + cd $ROOT/nv-codec-headers + git checkout n12.1.14.0 + make -e PREFIX="$ROOT/compiled" + make install -e PREFIX="$ROOT/compiled" + fi +fi + +if [[ "$GOOS" != "windows" && "$GOARCH" == "amd64" ]]; then + if [[ ! -e "$ROOT/nasm-2.14.02" ]]; then + # sudo apt-get -y install asciidoc xmlto # this fails :( + cd "$ROOT" + curl -o nasm-2.14.02.tar.gz https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.gz + echo 'b34bae344a3f2ed93b2ca7bf25f1ed3fb12da89eeda6096e3551fd66adeae9fc nasm-2.14.02.tar.gz' >nasm-2.14.02.tar.gz.sha256 + sha256sum -c nasm-2.14.02.tar.gz.sha256 + tar xf nasm-2.14.02.tar.gz + rm nasm-2.14.02.tar.gz nasm-2.14.02.tar.gz.sha256 + cd "$ROOT/nasm-2.14.02" + ./configure --prefix="$ROOT/compiled" + make -j$NPROC + make -j$NPROC install || echo "Installing docs fails but should be OK otherwise" + fi +fi + +if [[ ! -e "$ROOT/x264" ]]; then + git clone http://git.videolan.org/git/x264.git "$ROOT/x264" + cd "$ROOT/x264" + if [[ $GOARCH == "arm64" ]]; then + # newer git master, compiles on Apple Silicon + git checkout 66a5bc1bd1563d8227d5d18440b525a09bcf17ca + else + # older git master, does not compile on Apple Silicon + git checkout 545de2ffec6ae9a80738de1b2c8cf820249a2530 + fi + ./configure --prefix="$ROOT/compiled" --enable-pic --enable-static ${HOST_OS:-} --disable-cli --extra-cflags="$EXTRA_CFLAGS" --extra-asflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" $EXTRA_X264_FLAGS || (cat $ROOT/x264/config.log && exit 1) + make -j$NPROC + make -j$NPROC install-lib-static +fi + +if [[ "$GOOS" == "linux" && "$BUILD_TAGS" == *"debug-video"* ]]; then + sudo apt-get install -y libnuma-dev cmake + if [[ ! -e "$ROOT/x265" ]]; then + git clone https://bitbucket.org/multicoreware/x265_git.git "$ROOT/x265" + cd "$ROOT/x265" + git checkout 17839cc0dc5a389e27810944ae2128a65ac39318 + cd build/linux/ + cmake -DCMAKE_INSTALL_PREFIX=$ROOT/compiled -G "Unix Makefiles" ../../source + make -j$NPROC + make -j$NPROC install + fi + # VP8/9 support + if [[ ! -e "$ROOT/libvpx" ]]; then + git clone https://chromium.googlesource.com/webm/libvpx.git "$ROOT/libvpx" + cd "$ROOT/libvpx" + git checkout ab35ee100a38347433af24df05a5e1578172a2ae + ./configure --prefix="$ROOT/compiled" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --enable-shared --as=nasm + make -j$NPROC + make -j$NPROC install + fi +fi + +DISABLE_FFMPEG_COMPONENTS="" +EXTRA_FFMPEG_LDFLAGS="$EXTRA_LDFLAGS" +# all flags which should be present for production build, but should be replaced/removed for debug build +DEV_FFMPEG_FLAGS="" + +if [[ "$BUILDOS" == "darwin" && "$GOOS" == "darwin" ]]; then + EXTRA_FFMPEG_LDFLAGS="$EXTRA_FFMPEG_LDFLAGS -framework CoreFoundation -framework Security" +elif [[ "$GOOS" == "windows" ]]; then + EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-decoder=h264_cuvid,hevc_cuvid,vp8_cuvid,vp9_cuvid --enable-filter=scale_cuda,signature_cuda,hwupload_cuda --enable-encoder=h264_nvenc,hevc_nvenc" +elif [[ -e "/usr/local/cuda/lib64" ]]; then + echo "CUDA SDK detected, building with GPU support" + EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-decoder=h264_cuvid,hevc_cuvid,vp8_cuvid,vp9_cuvid --enable-filter=scale_npp,signature_cuda,hwupload_cuda --enable-encoder=h264_nvenc,hevc_nvenc" +else + echo "No CUDA SDK detected, building without GPU support" +fi + +if [[ $BUILD_TAGS == *"debug-video"* ]]; then + echo "video debug mode, building ffmpeg with tools, debug info and additional capabilities for running tests" + DEV_FFMPEG_FLAGS="--enable-muxer=md5,flv --enable-demuxer=hls --enable-filter=ssim,tinterlace --enable-encoder=wrapped_avframe,pcm_s16le " + DEV_FFMPEG_FLAGS+="--enable-shared --enable-debug=3 --disable-stripping --disable-optimizations --enable-encoder=libx265,libvpx_vp8,libvpx_vp9 " + DEV_FFMPEG_FLAGS+="--enable-decoder=hevc,libvpx_vp8,libvpx_vp9 --enable-libx265 --enable-libvpx --enable-bsf=noise " +else + # disable all unnecessary features for production build + DISABLE_FFMPEG_COMPONENTS+=" --disable-doc --disable-sdl2 --disable-iconv --disable-muxers --disable-demuxers --disable-parsers --disable-protocols " + DISABLE_FFMPEG_COMPONENTS+=" --disable-encoders --disable-decoders --disable-filters --disable-bsfs --disable-postproc --disable-lzma " +fi + +if [[ ! -e "$ROOT/ffmpeg/libavcodec/libavcodec.a" ]]; then + git clone https://github.com/livepeer/FFmpeg-6.1.1.git "$ROOT/ffmpeg" || echo "FFmpeg dir already exists" + cd "$ROOT/ffmpeg" + ./configure ${TARGET_OS:-} $DISABLE_FFMPEG_COMPONENTS --fatal-warnings \ + --enable-libx264 --enable-gpl \ + --enable-protocol=rtmp,file,pipe \ + --enable-muxer=mp3,wav,flac,mpegts,hls,segment,mp4,hevc,matroska,webm,null --enable-demuxer=mp3,wav,flac,flv,mpegts,mp4,mov,webm,matroska,image2 \ + --enable-bsf=h264_mp4toannexb,aac_adtstoasc,h264_metadata,h264_redundant_pps,hevc_mp4toannexb,extract_extradata \ + --enable-parser=mpegaudio,vorbis,opus,flac,aac,aac_latm,h264,hevc,vp8,vp9,png \ + --enable-filter=abuffer,buffer,abuffersink,buffersink,afifo,fifo,aformat,format \ + --enable-filter=aresample,asetnsamples,fps,scale,hwdownload,select,livepeer_dnn,signature \ + --enable-encoder=mp3,vorbis,flac,aac,opus,libx264 \ + --enable-decoder=mp3,vorbis,flac,aac,opus,h264,png \ + --extra-cflags="${EXTRA_CFLAGS} -I${ROOT}/compiled/include -I/usr/local/cuda/include" \ + --extra-ldflags="${EXTRA_FFMPEG_LDFLAGS} -L${ROOT}/compiled/lib -L/usr/local/cuda/lib64" \ + --prefix="$ROOT/compiled" \ + $EXTRA_FFMPEG_FLAGS \ + $DEV_FFMPEG_FLAGS || (tail -100 ${ROOT}/ffmpeg/ffbuild/config.log && exit 1) + # If configure fails, then print the last 100 log lines for debugging and exit. +fi + +if [[ ! -e "$ROOT/ffmpeg/libavcodec/libavcodec.a" || $BUILD_TAGS == *"debug-video"* ]]; then + cd "$ROOT/ffmpeg" + make -j$NPROC + make -j$NPROC install +fi diff --git a/monitor/census.go b/monitor/census.go index 12ab133276..2f883d5e48 100644 --- a/monitor/census.go +++ b/monitor/census.go @@ -1629,12 +1629,14 @@ func Reserve(sender string, reserve *big.Int) { } func MaxTranscodingPrice(maxPrice *big.Rat) { - floatWei, _ := maxPrice.Float64() - if err := stats.RecordWithTags(census.ctx, - []tag.Mutator{tag.Insert(census.kSender, "max")}, - census.mTranscodingPrice.M(floatWei)); err != nil { + floatWei, ok := maxPrice.Float64() + if ok { + if err := stats.RecordWithTags(census.ctx, + []tag.Mutator{tag.Insert(census.kSender, "max")}, + census.mTranscodingPrice.M(floatWei)); err != nil { - glog.Errorf("Error recording metrics err=%q", err) + glog.Errorf("Error recording metrics err=%q", err) + } } } @@ -1748,13 +1750,15 @@ func MaxGasPrice(maxGasPrice *big.Int) { // TranscodingPrice records the last transcoding price func TranscodingPrice(sender string, price *big.Rat) { - floatWei, _ := price.Float64() - stats.Record(census.ctx, census.mTranscodingPrice.M(floatWei)) - if err := stats.RecordWithTags(census.ctx, - []tag.Mutator{tag.Insert(census.kSender, sender)}, - census.mTranscodingPrice.M(floatWei)); err != nil { + floatWei, ok := price.Float64() + if ok { + stats.Record(census.ctx, census.mTranscodingPrice.M(floatWei)) + if err := stats.RecordWithTags(census.ctx, + []tag.Mutator{tag.Insert(census.kSender, sender)}, + census.mTranscodingPrice.M(floatWei)); err != nil { - glog.Errorf("Error recording metrics err=%q", err) + glog.Errorf("Error recording metrics err=%q", err) + } } } diff --git a/net/lp_rpc.pb.go b/net/lp_rpc.pb.go index 461cbfb79f..0ccebb6813 100644 --- a/net/lp_rpc.pb.go +++ b/net/lp_rpc.pb.go @@ -1,24 +1,24 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v4.25.2 // source: net/lp_rpc.proto package net import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type OSInfo_StorageType int32 @@ -28,24 +28,45 @@ const ( OSInfo_GOOGLE OSInfo_StorageType = 2 ) -var OSInfo_StorageType_name = map[int32]string{ - 0: "DIRECT", - 1: "S3", - 2: "GOOGLE", -} +// Enum value maps for OSInfo_StorageType. +var ( + OSInfo_StorageType_name = map[int32]string{ + 0: "DIRECT", + 1: "S3", + 2: "GOOGLE", + } + OSInfo_StorageType_value = map[string]int32{ + "DIRECT": 0, + "S3": 1, + "GOOGLE": 2, + } +) -var OSInfo_StorageType_value = map[string]int32{ - "DIRECT": 0, - "S3": 1, - "GOOGLE": 2, +func (x OSInfo_StorageType) Enum() *OSInfo_StorageType { + p := new(OSInfo_StorageType) + *p = x + return p } func (x OSInfo_StorageType) String() string { - return proto.EnumName(OSInfo_StorageType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OSInfo_StorageType) Descriptor() protoreflect.EnumDescriptor { + return file_net_lp_rpc_proto_enumTypes[0].Descriptor() +} + +func (OSInfo_StorageType) Type() protoreflect.EnumType { + return &file_net_lp_rpc_proto_enumTypes[0] +} + +func (x OSInfo_StorageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use OSInfo_StorageType.Descriptor instead. func (OSInfo_StorageType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{4, 0} + return file_net_lp_rpc_proto_rawDescGZIP(), []int{4, 0} } // Desired output format @@ -56,22 +77,43 @@ const ( VideoProfile_MP4 VideoProfile_Format = 1 ) -var VideoProfile_Format_name = map[int32]string{ - 0: "MPEGTS", - 1: "MP4", -} +// Enum value maps for VideoProfile_Format. +var ( + VideoProfile_Format_name = map[int32]string{ + 0: "MPEGTS", + 1: "MP4", + } + VideoProfile_Format_value = map[string]int32{ + "MPEGTS": 0, + "MP4": 1, + } +) -var VideoProfile_Format_value = map[string]int32{ - "MPEGTS": 0, - "MP4": 1, +func (x VideoProfile_Format) Enum() *VideoProfile_Format { + p := new(VideoProfile_Format) + *p = x + return p } func (x VideoProfile_Format) String() string { - return proto.EnumName(VideoProfile_Format_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VideoProfile_Format) Descriptor() protoreflect.EnumDescriptor { + return file_net_lp_rpc_proto_enumTypes[1].Descriptor() +} + +func (VideoProfile_Format) Type() protoreflect.EnumType { + return &file_net_lp_rpc_proto_enumTypes[1] +} + +func (x VideoProfile_Format) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use VideoProfile_Format.Descriptor instead. func (VideoProfile_Format) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{12, 0} + return file_net_lp_rpc_proto_rawDescGZIP(), []int{12, 0} } type VideoProfile_Profile int32 @@ -84,28 +126,49 @@ const ( VideoProfile_H264_CONSTRAINED_HIGH VideoProfile_Profile = 4 ) -var VideoProfile_Profile_name = map[int32]string{ - 0: "ENCODER_DEFAULT", - 1: "H264_BASELINE", - 2: "H264_MAIN", - 3: "H264_HIGH", - 4: "H264_CONSTRAINED_HIGH", -} +// Enum value maps for VideoProfile_Profile. +var ( + VideoProfile_Profile_name = map[int32]string{ + 0: "ENCODER_DEFAULT", + 1: "H264_BASELINE", + 2: "H264_MAIN", + 3: "H264_HIGH", + 4: "H264_CONSTRAINED_HIGH", + } + VideoProfile_Profile_value = map[string]int32{ + "ENCODER_DEFAULT": 0, + "H264_BASELINE": 1, + "H264_MAIN": 2, + "H264_HIGH": 3, + "H264_CONSTRAINED_HIGH": 4, + } +) -var VideoProfile_Profile_value = map[string]int32{ - "ENCODER_DEFAULT": 0, - "H264_BASELINE": 1, - "H264_MAIN": 2, - "H264_HIGH": 3, - "H264_CONSTRAINED_HIGH": 4, +func (x VideoProfile_Profile) Enum() *VideoProfile_Profile { + p := new(VideoProfile_Profile) + *p = x + return p } func (x VideoProfile_Profile) String() string { - return proto.EnumName(VideoProfile_Profile_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VideoProfile_Profile) Descriptor() protoreflect.EnumDescriptor { + return file_net_lp_rpc_proto_enumTypes[2].Descriptor() +} + +func (VideoProfile_Profile) Type() protoreflect.EnumType { + return &file_net_lp_rpc_proto_enumTypes[2] +} + +func (x VideoProfile_Profile) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use VideoProfile_Profile.Descriptor instead. func (VideoProfile_Profile) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{12, 1} + return file_net_lp_rpc_proto_rawDescGZIP(), []int{12, 1} } type VideoProfile_VideoCodec int32 @@ -117,26 +180,47 @@ const ( VideoProfile_VP9 VideoProfile_VideoCodec = 3 ) -var VideoProfile_VideoCodec_name = map[int32]string{ - 0: "H264", - 1: "H265", - 2: "VP8", - 3: "VP9", -} +// Enum value maps for VideoProfile_VideoCodec. +var ( + VideoProfile_VideoCodec_name = map[int32]string{ + 0: "H264", + 1: "H265", + 2: "VP8", + 3: "VP9", + } + VideoProfile_VideoCodec_value = map[string]int32{ + "H264": 0, + "H265": 1, + "VP8": 2, + "VP9": 3, + } +) -var VideoProfile_VideoCodec_value = map[string]int32{ - "H264": 0, - "H265": 1, - "VP8": 2, - "VP9": 3, +func (x VideoProfile_VideoCodec) Enum() *VideoProfile_VideoCodec { + p := new(VideoProfile_VideoCodec) + *p = x + return p } func (x VideoProfile_VideoCodec) String() string { - return proto.EnumName(VideoProfile_VideoCodec_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VideoProfile_VideoCodec) Descriptor() protoreflect.EnumDescriptor { + return file_net_lp_rpc_proto_enumTypes[3].Descriptor() +} + +func (VideoProfile_VideoCodec) Type() protoreflect.EnumType { + return &file_net_lp_rpc_proto_enumTypes[3] } +func (x VideoProfile_VideoCodec) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VideoProfile_VideoCodec.Descriptor instead. func (VideoProfile_VideoCodec) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{12, 2} + return file_net_lp_rpc_proto_rawDescGZIP(), []int{12, 2} } type VideoProfile_ChromaSubsampling int32 @@ -147,194 +231,246 @@ const ( VideoProfile_CHROMA_444 VideoProfile_ChromaSubsampling = 2 ) -var VideoProfile_ChromaSubsampling_name = map[int32]string{ - 0: "CHROMA_420", - 1: "CHROMA_422", - 2: "CHROMA_444", -} +// Enum value maps for VideoProfile_ChromaSubsampling. +var ( + VideoProfile_ChromaSubsampling_name = map[int32]string{ + 0: "CHROMA_420", + 1: "CHROMA_422", + 2: "CHROMA_444", + } + VideoProfile_ChromaSubsampling_value = map[string]int32{ + "CHROMA_420": 0, + "CHROMA_422": 1, + "CHROMA_444": 2, + } +) -var VideoProfile_ChromaSubsampling_value = map[string]int32{ - "CHROMA_420": 0, - "CHROMA_422": 1, - "CHROMA_444": 2, +func (x VideoProfile_ChromaSubsampling) Enum() *VideoProfile_ChromaSubsampling { + p := new(VideoProfile_ChromaSubsampling) + *p = x + return p } func (x VideoProfile_ChromaSubsampling) String() string { - return proto.EnumName(VideoProfile_ChromaSubsampling_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (VideoProfile_ChromaSubsampling) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{12, 3} +func (VideoProfile_ChromaSubsampling) Descriptor() protoreflect.EnumDescriptor { + return file_net_lp_rpc_proto_enumTypes[4].Descriptor() } -type PingPong struct { - // Implementation defined - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (VideoProfile_ChromaSubsampling) Type() protoreflect.EnumType { + return &file_net_lp_rpc_proto_enumTypes[4] } -func (m *PingPong) Reset() { *m = PingPong{} } -func (m *PingPong) String() string { return proto.CompactTextString(m) } -func (*PingPong) ProtoMessage() {} -func (*PingPong) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{0} +func (x VideoProfile_ChromaSubsampling) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *PingPong) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PingPong.Unmarshal(m, b) +// Deprecated: Use VideoProfile_ChromaSubsampling.Descriptor instead. +func (VideoProfile_ChromaSubsampling) EnumDescriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{12, 3} } -func (m *PingPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PingPong.Marshal(b, m, deterministic) + +type PingPong struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Implementation defined + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *PingPong) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingPong.Merge(m, src) + +func (x *PingPong) Reset() { + *x = PingPong{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PingPong) XXX_Size() int { - return xxx_messageInfo_PingPong.Size(m) + +func (x *PingPong) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PingPong) XXX_DiscardUnknown() { - xxx_messageInfo_PingPong.DiscardUnknown(m) + +func (*PingPong) ProtoMessage() {} + +func (x *PingPong) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PingPong proto.InternalMessageInfo +// Deprecated: Use PingPong.ProtoReflect.Descriptor instead. +func (*PingPong) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{0} +} -func (m *PingPong) GetValue() []byte { - if m != nil { - return m.Value +func (x *PingPong) GetValue() []byte { + if x != nil { + return x.Value } return nil } // sent by Broadcaster to Orchestrator to terminate the transcoding session and free resources (used for verification sessions) type EndTranscodingSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Data for transcoding authentication - AuthToken *AuthToken `protobuf:"bytes,1,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AuthToken *AuthToken `protobuf:"bytes,1,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"` } -func (m *EndTranscodingSessionRequest) Reset() { *m = EndTranscodingSessionRequest{} } -func (m *EndTranscodingSessionRequest) String() string { return proto.CompactTextString(m) } -func (*EndTranscodingSessionRequest) ProtoMessage() {} -func (*EndTranscodingSessionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{1} +func (x *EndTranscodingSessionRequest) Reset() { + *x = EndTranscodingSessionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EndTranscodingSessionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EndTranscodingSessionRequest.Unmarshal(m, b) -} -func (m *EndTranscodingSessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EndTranscodingSessionRequest.Marshal(b, m, deterministic) +func (x *EndTranscodingSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EndTranscodingSessionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndTranscodingSessionRequest.Merge(m, src) -} -func (m *EndTranscodingSessionRequest) XXX_Size() int { - return xxx_messageInfo_EndTranscodingSessionRequest.Size(m) -} -func (m *EndTranscodingSessionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EndTranscodingSessionRequest.DiscardUnknown(m) + +func (*EndTranscodingSessionRequest) ProtoMessage() {} + +func (x *EndTranscodingSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EndTranscodingSessionRequest proto.InternalMessageInfo +// Deprecated: Use EndTranscodingSessionRequest.ProtoReflect.Descriptor instead. +func (*EndTranscodingSessionRequest) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{1} +} -func (m *EndTranscodingSessionRequest) GetAuthToken() *AuthToken { - if m != nil { - return m.AuthToken +func (x *EndTranscodingSessionRequest) GetAuthToken() *AuthToken { + if x != nil { + return x.AuthToken } return nil } type EndTranscodingSessionResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *EndTranscodingSessionResponse) Reset() { *m = EndTranscodingSessionResponse{} } -func (m *EndTranscodingSessionResponse) String() string { return proto.CompactTextString(m) } -func (*EndTranscodingSessionResponse) ProtoMessage() {} -func (*EndTranscodingSessionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{2} +func (x *EndTranscodingSessionResponse) Reset() { + *x = EndTranscodingSessionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EndTranscodingSessionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EndTranscodingSessionResponse.Unmarshal(m, b) -} -func (m *EndTranscodingSessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EndTranscodingSessionResponse.Marshal(b, m, deterministic) -} -func (m *EndTranscodingSessionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndTranscodingSessionResponse.Merge(m, src) +func (x *EndTranscodingSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EndTranscodingSessionResponse) XXX_Size() int { - return xxx_messageInfo_EndTranscodingSessionResponse.Size(m) -} -func (m *EndTranscodingSessionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EndTranscodingSessionResponse.DiscardUnknown(m) + +func (*EndTranscodingSessionResponse) ProtoMessage() {} + +func (x *EndTranscodingSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EndTranscodingSessionResponse proto.InternalMessageInfo +// Deprecated: Use EndTranscodingSessionResponse.ProtoReflect.Descriptor instead. +func (*EndTranscodingSessionResponse) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{2} +} // This request is sent by the broadcaster in `GetTranscoder` to request // information on which transcoder to use. type OrchestratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Ethereum address of the broadcaster Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Broadcaster's signature over its address Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` // Features and constraints required by the broadcaster - Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"` } -func (m *OrchestratorRequest) Reset() { *m = OrchestratorRequest{} } -func (m *OrchestratorRequest) String() string { return proto.CompactTextString(m) } -func (*OrchestratorRequest) ProtoMessage() {} -func (*OrchestratorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{3} +func (x *OrchestratorRequest) Reset() { + *x = OrchestratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OrchestratorRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_OrchestratorRequest.Unmarshal(m, b) -} -func (m *OrchestratorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_OrchestratorRequest.Marshal(b, m, deterministic) -} -func (m *OrchestratorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OrchestratorRequest.Merge(m, src) -} -func (m *OrchestratorRequest) XXX_Size() int { - return xxx_messageInfo_OrchestratorRequest.Size(m) +func (x *OrchestratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *OrchestratorRequest) XXX_DiscardUnknown() { - xxx_messageInfo_OrchestratorRequest.DiscardUnknown(m) + +func (*OrchestratorRequest) ProtoMessage() {} + +func (x *OrchestratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_OrchestratorRequest proto.InternalMessageInfo +// Deprecated: Use OrchestratorRequest.ProtoReflect.Descriptor instead. +func (*OrchestratorRequest) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{3} +} -func (m *OrchestratorRequest) GetAddress() []byte { - if m != nil { - return m.Address +func (x *OrchestratorRequest) GetAddress() []byte { + if x != nil { + return x.Address } return nil } -func (m *OrchestratorRequest) GetSig() []byte { - if m != nil { - return m.Sig +func (x *OrchestratorRequest) GetSig() []byte { + if x != nil { + return x.Sig } return nil } -func (m *OrchestratorRequest) GetCapabilities() *Capabilities { - if m != nil { - return m.Capabilities +func (x *OrchestratorRequest) GetCapabilities() *Capabilities { + if x != nil { + return x.Capabilities } return nil } @@ -342,54 +478,66 @@ func (m *OrchestratorRequest) GetCapabilities() *Capabilities { // OSInfo needed to negotiate storages that will be used. // It carries info needed to write to the storage. type OSInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Storage type: direct, s3, ipfs. - StorageType OSInfo_StorageType `protobuf:"varint,1,opt,name=storageType,proto3,enum=net.OSInfo_StorageType" json:"storageType,omitempty"` - S3Info *S3OSInfo `protobuf:"bytes,16,opt,name=s3info,proto3" json:"s3info,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + StorageType OSInfo_StorageType `protobuf:"varint,1,opt,name=storageType,proto3,enum=net.OSInfo_StorageType" json:"storageType,omitempty"` + S3Info *S3OSInfo `protobuf:"bytes,16,opt,name=s3info,proto3" json:"s3info,omitempty"` } -func (m *OSInfo) Reset() { *m = OSInfo{} } -func (m *OSInfo) String() string { return proto.CompactTextString(m) } -func (*OSInfo) ProtoMessage() {} -func (*OSInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{4} +func (x *OSInfo) Reset() { + *x = OSInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OSInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_OSInfo.Unmarshal(m, b) -} -func (m *OSInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_OSInfo.Marshal(b, m, deterministic) +func (x *OSInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *OSInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_OSInfo.Merge(m, src) -} -func (m *OSInfo) XXX_Size() int { - return xxx_messageInfo_OSInfo.Size(m) -} -func (m *OSInfo) XXX_DiscardUnknown() { - xxx_messageInfo_OSInfo.DiscardUnknown(m) + +func (*OSInfo) ProtoMessage() {} + +func (x *OSInfo) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_OSInfo proto.InternalMessageInfo +// Deprecated: Use OSInfo.ProtoReflect.Descriptor instead. +func (*OSInfo) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{4} +} -func (m *OSInfo) GetStorageType() OSInfo_StorageType { - if m != nil { - return m.StorageType +func (x *OSInfo) GetStorageType() OSInfo_StorageType { + if x != nil { + return x.StorageType } return OSInfo_DIRECT } -func (m *OSInfo) GetS3Info() *S3OSInfo { - if m != nil { - return m.S3Info +func (x *OSInfo) GetS3Info() *S3OSInfo { + if x != nil { + return x.S3Info } return nil } type S3OSInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Host to use to connect to S3 Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Key (prefix) to use when uploading the object. @@ -401,338 +549,223 @@ type S3OSInfo struct { // Needed for POST policy. Credential string `protobuf:"bytes,5,opt,name=credential,proto3" json:"credential,omitempty"` // Needed for POST policy. - XAmzDate string `protobuf:"bytes,6,opt,name=xAmzDate,proto3" json:"xAmzDate,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XAmzDate string `protobuf:"bytes,6,opt,name=xAmzDate,proto3" json:"xAmzDate,omitempty"` } -func (m *S3OSInfo) Reset() { *m = S3OSInfo{} } -func (m *S3OSInfo) String() string { return proto.CompactTextString(m) } -func (*S3OSInfo) ProtoMessage() {} -func (*S3OSInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{5} +func (x *S3OSInfo) Reset() { + *x = S3OSInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *S3OSInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_S3OSInfo.Unmarshal(m, b) +func (x *S3OSInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *S3OSInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_S3OSInfo.Marshal(b, m, deterministic) -} -func (m *S3OSInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_S3OSInfo.Merge(m, src) -} -func (m *S3OSInfo) XXX_Size() int { - return xxx_messageInfo_S3OSInfo.Size(m) -} -func (m *S3OSInfo) XXX_DiscardUnknown() { - xxx_messageInfo_S3OSInfo.DiscardUnknown(m) + +func (*S3OSInfo) ProtoMessage() {} + +func (x *S3OSInfo) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_S3OSInfo proto.InternalMessageInfo +// Deprecated: Use S3OSInfo.ProtoReflect.Descriptor instead. +func (*S3OSInfo) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{5} +} -func (m *S3OSInfo) GetHost() string { - if m != nil { - return m.Host +func (x *S3OSInfo) GetHost() string { + if x != nil { + return x.Host } return "" } -func (m *S3OSInfo) GetKey() string { - if m != nil { - return m.Key +func (x *S3OSInfo) GetKey() string { + if x != nil { + return x.Key } return "" } -func (m *S3OSInfo) GetPolicy() string { - if m != nil { - return m.Policy +func (x *S3OSInfo) GetPolicy() string { + if x != nil { + return x.Policy } return "" } -func (m *S3OSInfo) GetSignature() string { - if m != nil { - return m.Signature +func (x *S3OSInfo) GetSignature() string { + if x != nil { + return x.Signature } return "" } -func (m *S3OSInfo) GetCredential() string { - if m != nil { - return m.Credential +func (x *S3OSInfo) GetCredential() string { + if x != nil { + return x.Credential } return "" } -func (m *S3OSInfo) GetXAmzDate() string { - if m != nil { - return m.XAmzDate +func (x *S3OSInfo) GetXAmzDate() string { + if x != nil { + return x.XAmzDate } return "" } // PriceInfo conveys pricing info for transcoding services type PriceInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // price in wei PricePerUnit int64 `protobuf:"varint,1,opt,name=pricePerUnit,proto3" json:"pricePerUnit,omitempty"` // Pixels covered in the price // Set price to 1 wei and pixelsPerUnit > 1 to have a smaller price granularity per pixel than 1 wei - PixelsPerUnit int64 `protobuf:"varint,2,opt,name=pixelsPerUnit,proto3" json:"pixelsPerUnit,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + PixelsPerUnit int64 `protobuf:"varint,2,opt,name=pixelsPerUnit,proto3" json:"pixelsPerUnit,omitempty"` } -func (m *PriceInfo) Reset() { *m = PriceInfo{} } -func (m *PriceInfo) String() string { return proto.CompactTextString(m) } -func (*PriceInfo) ProtoMessage() {} -func (*PriceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{6} +func (x *PriceInfo) Reset() { + *x = PriceInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PriceInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PriceInfo.Unmarshal(m, b) -} -func (m *PriceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PriceInfo.Marshal(b, m, deterministic) -} -func (m *PriceInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriceInfo.Merge(m, src) -} -func (m *PriceInfo) XXX_Size() int { - return xxx_messageInfo_PriceInfo.Size(m) +func (x *PriceInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PriceInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PriceInfo.DiscardUnknown(m) + +func (*PriceInfo) ProtoMessage() {} + +func (x *PriceInfo) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PriceInfo proto.InternalMessageInfo +// Deprecated: Use PriceInfo.ProtoReflect.Descriptor instead. +func (*PriceInfo) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{6} +} -func (m *PriceInfo) GetPricePerUnit() int64 { - if m != nil { - return m.PricePerUnit +func (x *PriceInfo) GetPricePerUnit() int64 { + if x != nil { + return x.PricePerUnit } return 0 } -func (m *PriceInfo) GetPixelsPerUnit() int64 { - if m != nil { - return m.PixelsPerUnit +func (x *PriceInfo) GetPixelsPerUnit() int64 { + if x != nil { + return x.PixelsPerUnit } return 0 } type Capabilities struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Bit string of supported features - one bit per feature Bitstring []uint64 `protobuf:"varint,1,rep,packed,name=bitstring,proto3" json:"bitstring,omitempty"` // Bit string of features that are required to be supported Mandatories []uint64 `protobuf:"varint,2,rep,packed,name=mandatories,proto3" json:"mandatories,omitempty"` // Capacity corresponding to each capability - Capacities map[uint32]uint32 `protobuf:"bytes,3,rep,name=capacities,proto3" json:"capacities,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - Constraints *Capabilities_Constraints `protobuf:"bytes,5,opt,name=constraints,proto3" json:"constraints,omitempty"` - CapabilityConstraints map[uint32]*Capabilities_CapabilityConstraints `protobuf:"bytes,6,rep,name=capabilityConstraints,proto3" json:"capabilityConstraints,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Capabilities) Reset() { *m = Capabilities{} } -func (m *Capabilities) String() string { return proto.CompactTextString(m) } -func (*Capabilities) ProtoMessage() {} -func (*Capabilities) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{7} -} - -func (m *Capabilities) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Capabilities.Unmarshal(m, b) -} -func (m *Capabilities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Capabilities.Marshal(b, m, deterministic) + Capacities map[uint32]uint32 `protobuf:"bytes,3,rep,name=capacities,proto3" json:"capacities,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Constraints map[uint32]*Capabilities_Constraints `protobuf:"bytes,4,rep,name=constraints,proto3" json:"constraints,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *Capabilities) XXX_Merge(src proto.Message) { - xxx_messageInfo_Capabilities.Merge(m, src) -} -func (m *Capabilities) XXX_Size() int { - return xxx_messageInfo_Capabilities.Size(m) -} -func (m *Capabilities) XXX_DiscardUnknown() { - xxx_messageInfo_Capabilities.DiscardUnknown(m) -} - -var xxx_messageInfo_Capabilities proto.InternalMessageInfo -func (m *Capabilities) GetBitstring() []uint64 { - if m != nil { - return m.Bitstring +func (x *Capabilities) Reset() { + *x = Capabilities{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (m *Capabilities) GetMandatories() []uint64 { - if m != nil { - return m.Mandatories - } - return nil +func (x *Capabilities) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Capabilities) GetCapacities() map[uint32]uint32 { - if m != nil { - return m.Capacities - } - return nil -} +func (*Capabilities) ProtoMessage() {} -func (m *Capabilities) GetVersion() string { - if m != nil { - return m.Version +func (x *Capabilities) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *Capabilities) GetConstraints() *Capabilities_Constraints { - if m != nil { - return m.Constraints - } - return nil +// Deprecated: Use Capabilities.ProtoReflect.Descriptor instead. +func (*Capabilities) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{7} } -func (m *Capabilities) GetCapabilityConstraints() map[uint32]*Capabilities_CapabilityConstraints { - if m != nil { - return m.CapabilityConstraints +func (x *Capabilities) GetBitstring() []uint64 { + if x != nil { + return x.Bitstring } return nil } -// Non-binary general constraints. -type Capabilities_Constraints struct { - MinVersion string `protobuf:"bytes,1,opt,name=minVersion,proto3" json:"minVersion,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Capabilities_Constraints) Reset() { *m = Capabilities_Constraints{} } -func (m *Capabilities_Constraints) String() string { return proto.CompactTextString(m) } -func (*Capabilities_Constraints) ProtoMessage() {} -func (*Capabilities_Constraints) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{7, 1} -} - -func (m *Capabilities_Constraints) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Capabilities_Constraints.Unmarshal(m, b) -} -func (m *Capabilities_Constraints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Capabilities_Constraints.Marshal(b, m, deterministic) -} -func (m *Capabilities_Constraints) XXX_Merge(src proto.Message) { - xxx_messageInfo_Capabilities_Constraints.Merge(m, src) -} -func (m *Capabilities_Constraints) XXX_Size() int { - return xxx_messageInfo_Capabilities_Constraints.Size(m) -} -func (m *Capabilities_Constraints) XXX_DiscardUnknown() { - xxx_messageInfo_Capabilities_Constraints.DiscardUnknown(m) -} - -var xxx_messageInfo_Capabilities_Constraints proto.InternalMessageInfo - -func (m *Capabilities_Constraints) GetMinVersion() string { - if m != nil { - return m.MinVersion +func (x *Capabilities) GetMandatories() []uint64 { + if x != nil { + return x.Mandatories } - return "" -} - -// Non-binary capability constraints, such as supported ranges. -type Capabilities_CapabilityConstraints struct { - Models map[string]*Capabilities_CapabilityConstraints_ModelConstraint `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Capabilities_CapabilityConstraints) Reset() { *m = Capabilities_CapabilityConstraints{} } -func (m *Capabilities_CapabilityConstraints) String() string { return proto.CompactTextString(m) } -func (*Capabilities_CapabilityConstraints) ProtoMessage() {} -func (*Capabilities_CapabilityConstraints) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{7, 2} -} - -func (m *Capabilities_CapabilityConstraints) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Capabilities_CapabilityConstraints.Unmarshal(m, b) -} -func (m *Capabilities_CapabilityConstraints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Capabilities_CapabilityConstraints.Marshal(b, m, deterministic) -} -func (m *Capabilities_CapabilityConstraints) XXX_Merge(src proto.Message) { - xxx_messageInfo_Capabilities_CapabilityConstraints.Merge(m, src) -} -func (m *Capabilities_CapabilityConstraints) XXX_Size() int { - return xxx_messageInfo_Capabilities_CapabilityConstraints.Size(m) -} -func (m *Capabilities_CapabilityConstraints) XXX_DiscardUnknown() { - xxx_messageInfo_Capabilities_CapabilityConstraints.DiscardUnknown(m) + return nil } -var xxx_messageInfo_Capabilities_CapabilityConstraints proto.InternalMessageInfo - -func (m *Capabilities_CapabilityConstraints) GetModels() map[string]*Capabilities_CapabilityConstraints_ModelConstraint { - if m != nil { - return m.Models +func (x *Capabilities) GetCapacities() map[uint32]uint32 { + if x != nil { + return x.Capacities } return nil } -type Capabilities_CapabilityConstraints_ModelConstraint struct { - Warm bool `protobuf:"varint,1,opt,name=warm,proto3" json:"warm,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Capabilities_CapabilityConstraints_ModelConstraint) Reset() { - *m = Capabilities_CapabilityConstraints_ModelConstraint{} -} -func (m *Capabilities_CapabilityConstraints_ModelConstraint) String() string { - return proto.CompactTextString(m) -} -func (*Capabilities_CapabilityConstraints_ModelConstraint) ProtoMessage() {} -func (*Capabilities_CapabilityConstraints_ModelConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{7, 2, 0} -} - -func (m *Capabilities_CapabilityConstraints_ModelConstraint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Capabilities_CapabilityConstraints_ModelConstraint.Unmarshal(m, b) -} -func (m *Capabilities_CapabilityConstraints_ModelConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Capabilities_CapabilityConstraints_ModelConstraint.Marshal(b, m, deterministic) -} -func (m *Capabilities_CapabilityConstraints_ModelConstraint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Capabilities_CapabilityConstraints_ModelConstraint.Merge(m, src) -} -func (m *Capabilities_CapabilityConstraints_ModelConstraint) XXX_Size() int { - return xxx_messageInfo_Capabilities_CapabilityConstraints_ModelConstraint.Size(m) -} -func (m *Capabilities_CapabilityConstraints_ModelConstraint) XXX_DiscardUnknown() { - xxx_messageInfo_Capabilities_CapabilityConstraints_ModelConstraint.DiscardUnknown(m) -} - -var xxx_messageInfo_Capabilities_CapabilityConstraints_ModelConstraint proto.InternalMessageInfo - -func (m *Capabilities_CapabilityConstraints_ModelConstraint) GetWarm() bool { - if m != nil { - return m.Warm +func (x *Capabilities) GetConstraints() map[uint32]*Capabilities_Constraints { + if x != nil { + return x.Constraints } - return false + return nil } // The orchestrator sends this in response to `GetOrchestrator`, containing // miscellaneous data related to the job. type OrchestratorInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // URI of the transcoder to use for submitting segments. Transcoder string `protobuf:"bytes,1,opt,name=transcoder,proto3" json:"transcoder,omitempty"` // Parameters for probabilistic micropayment tickets @@ -746,148 +779,164 @@ type OrchestratorInfo struct { // Data for transcoding authentication AuthToken *AuthToken `protobuf:"bytes,6,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"` // Orchestrator returns info about own input object storage, if it wants it to be used. - Storage []*OSInfo `protobuf:"bytes,32,rep,name=storage,proto3" json:"storage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Storage []*OSInfo `protobuf:"bytes,32,rep,name=storage,proto3" json:"storage,omitempty"` } -func (m *OrchestratorInfo) Reset() { *m = OrchestratorInfo{} } -func (m *OrchestratorInfo) String() string { return proto.CompactTextString(m) } -func (*OrchestratorInfo) ProtoMessage() {} -func (*OrchestratorInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{8} +func (x *OrchestratorInfo) Reset() { + *x = OrchestratorInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OrchestratorInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_OrchestratorInfo.Unmarshal(m, b) -} -func (m *OrchestratorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_OrchestratorInfo.Marshal(b, m, deterministic) -} -func (m *OrchestratorInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_OrchestratorInfo.Merge(m, src) -} -func (m *OrchestratorInfo) XXX_Size() int { - return xxx_messageInfo_OrchestratorInfo.Size(m) +func (x *OrchestratorInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *OrchestratorInfo) XXX_DiscardUnknown() { - xxx_messageInfo_OrchestratorInfo.DiscardUnknown(m) + +func (*OrchestratorInfo) ProtoMessage() {} + +func (x *OrchestratorInfo) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_OrchestratorInfo proto.InternalMessageInfo +// Deprecated: Use OrchestratorInfo.ProtoReflect.Descriptor instead. +func (*OrchestratorInfo) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{8} +} -func (m *OrchestratorInfo) GetTranscoder() string { - if m != nil { - return m.Transcoder +func (x *OrchestratorInfo) GetTranscoder() string { + if x != nil { + return x.Transcoder } return "" } -func (m *OrchestratorInfo) GetTicketParams() *TicketParams { - if m != nil { - return m.TicketParams +func (x *OrchestratorInfo) GetTicketParams() *TicketParams { + if x != nil { + return x.TicketParams } return nil } -func (m *OrchestratorInfo) GetPriceInfo() *PriceInfo { - if m != nil { - return m.PriceInfo +func (x *OrchestratorInfo) GetPriceInfo() *PriceInfo { + if x != nil { + return x.PriceInfo } return nil } -func (m *OrchestratorInfo) GetAddress() []byte { - if m != nil { - return m.Address +func (x *OrchestratorInfo) GetAddress() []byte { + if x != nil { + return x.Address } return nil } -func (m *OrchestratorInfo) GetCapabilities() *Capabilities { - if m != nil { - return m.Capabilities +func (x *OrchestratorInfo) GetCapabilities() *Capabilities { + if x != nil { + return x.Capabilities } return nil } -func (m *OrchestratorInfo) GetAuthToken() *AuthToken { - if m != nil { - return m.AuthToken +func (x *OrchestratorInfo) GetAuthToken() *AuthToken { + if x != nil { + return x.AuthToken } return nil } -func (m *OrchestratorInfo) GetStorage() []*OSInfo { - if m != nil { - return m.Storage +func (x *OrchestratorInfo) GetStorage() []*OSInfo { + if x != nil { + return x.Storage } return nil } // Data for transcoding authentication that is included in the OrchestratorInfo message during discovery type AuthToken struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Record used to authenticate for a transcode session // Opaque to the receiver Token []byte `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // ID of the transcode session that the token is authenticating for SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Timestamp when the token expires - Expiration int64 `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Expiration int64 `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"` } -func (m *AuthToken) Reset() { *m = AuthToken{} } -func (m *AuthToken) String() string { return proto.CompactTextString(m) } -func (*AuthToken) ProtoMessage() {} -func (*AuthToken) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{9} +func (x *AuthToken) Reset() { + *x = AuthToken{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AuthToken) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AuthToken.Unmarshal(m, b) -} -func (m *AuthToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AuthToken.Marshal(b, m, deterministic) +func (x *AuthToken) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AuthToken) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthToken.Merge(m, src) -} -func (m *AuthToken) XXX_Size() int { - return xxx_messageInfo_AuthToken.Size(m) -} -func (m *AuthToken) XXX_DiscardUnknown() { - xxx_messageInfo_AuthToken.DiscardUnknown(m) + +func (*AuthToken) ProtoMessage() {} + +func (x *AuthToken) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AuthToken proto.InternalMessageInfo +// Deprecated: Use AuthToken.ProtoReflect.Descriptor instead. +func (*AuthToken) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{9} +} -func (m *AuthToken) GetToken() []byte { - if m != nil { - return m.Token +func (x *AuthToken) GetToken() []byte { + if x != nil { + return x.Token } return nil } -func (m *AuthToken) GetSessionId() string { - if m != nil { - return m.SessionId +func (x *AuthToken) GetSessionId() string { + if x != nil { + return x.SessionId } return "" } -func (m *AuthToken) GetExpiration() int64 { - if m != nil { - return m.Expiration +func (x *AuthToken) GetExpiration() int64 { + if x != nil { + return x.Expiration } return 0 } // Data included by the broadcaster when submitting a segment for transcoding. type SegData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Manifest ID this segment belongs to ManifestId []byte `protobuf:"bytes,1,opt,name=manifestId,proto3" json:"manifestId,omitempty"` // Sequence number of the segment to be transcoded @@ -921,194 +970,210 @@ type SegData struct { // Transcoding parameters specific to this segment SegmentParameters *SegParameters `protobuf:"bytes,37,opt,name=segment_parameters,json=segmentParameters,proto3" json:"segment_parameters,omitempty"` // Force HW Session Reinit - ForceSessionReinit bool `protobuf:"varint,38,opt,name=ForceSessionReinit,proto3" json:"ForceSessionReinit,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ForceSessionReinit bool `protobuf:"varint,38,opt,name=ForceSessionReinit,proto3" json:"ForceSessionReinit,omitempty"` } -func (m *SegData) Reset() { *m = SegData{} } -func (m *SegData) String() string { return proto.CompactTextString(m) } -func (*SegData) ProtoMessage() {} -func (*SegData) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{10} +func (x *SegData) Reset() { + *x = SegData{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SegData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SegData.Unmarshal(m, b) -} -func (m *SegData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SegData.Marshal(b, m, deterministic) -} -func (m *SegData) XXX_Merge(src proto.Message) { - xxx_messageInfo_SegData.Merge(m, src) -} -func (m *SegData) XXX_Size() int { - return xxx_messageInfo_SegData.Size(m) +func (x *SegData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SegData) XXX_DiscardUnknown() { - xxx_messageInfo_SegData.DiscardUnknown(m) + +func (*SegData) ProtoMessage() {} + +func (x *SegData) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SegData proto.InternalMessageInfo +// Deprecated: Use SegData.ProtoReflect.Descriptor instead. +func (*SegData) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{10} +} -func (m *SegData) GetManifestId() []byte { - if m != nil { - return m.ManifestId +func (x *SegData) GetManifestId() []byte { + if x != nil { + return x.ManifestId } return nil } -func (m *SegData) GetSeq() int64 { - if m != nil { - return m.Seq +func (x *SegData) GetSeq() int64 { + if x != nil { + return x.Seq } return 0 } -func (m *SegData) GetHash() []byte { - if m != nil { - return m.Hash +func (x *SegData) GetHash() []byte { + if x != nil { + return x.Hash } return nil } -func (m *SegData) GetProfiles() []byte { - if m != nil { - return m.Profiles +func (x *SegData) GetProfiles() []byte { + if x != nil { + return x.Profiles } return nil } -func (m *SegData) GetSig() []byte { - if m != nil { - return m.Sig +func (x *SegData) GetSig() []byte { + if x != nil { + return x.Sig } return nil } -func (m *SegData) GetDuration() int32 { - if m != nil { - return m.Duration +func (x *SegData) GetDuration() int32 { + if x != nil { + return x.Duration } return 0 } -func (m *SegData) GetCapabilities() *Capabilities { - if m != nil { - return m.Capabilities +func (x *SegData) GetCapabilities() *Capabilities { + if x != nil { + return x.Capabilities } return nil } -func (m *SegData) GetAuthToken() *AuthToken { - if m != nil { - return m.AuthToken +func (x *SegData) GetAuthToken() *AuthToken { + if x != nil { + return x.AuthToken } return nil } -func (m *SegData) GetCalcPerceptualHash() bool { - if m != nil { - return m.CalcPerceptualHash +func (x *SegData) GetCalcPerceptualHash() bool { + if x != nil { + return x.CalcPerceptualHash } return false } -func (m *SegData) GetStorage() []*OSInfo { - if m != nil { - return m.Storage +func (x *SegData) GetStorage() []*OSInfo { + if x != nil { + return x.Storage } return nil } -func (m *SegData) GetFullProfiles() []*VideoProfile { - if m != nil { - return m.FullProfiles +func (x *SegData) GetFullProfiles() []*VideoProfile { + if x != nil { + return x.FullProfiles } return nil } -func (m *SegData) GetFullProfiles2() []*VideoProfile { - if m != nil { - return m.FullProfiles2 +func (x *SegData) GetFullProfiles2() []*VideoProfile { + if x != nil { + return x.FullProfiles2 } return nil } -func (m *SegData) GetFullProfiles3() []*VideoProfile { - if m != nil { - return m.FullProfiles3 +func (x *SegData) GetFullProfiles3() []*VideoProfile { + if x != nil { + return x.FullProfiles3 } return nil } -func (m *SegData) GetSegmentParameters() *SegParameters { - if m != nil { - return m.SegmentParameters +func (x *SegData) GetSegmentParameters() *SegParameters { + if x != nil { + return x.SegmentParameters } return nil } -func (m *SegData) GetForceSessionReinit() bool { - if m != nil { - return m.ForceSessionReinit +func (x *SegData) GetForceSessionReinit() bool { + if x != nil { + return x.ForceSessionReinit } return false } type SegParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Start timestamp from which to start encoding // Milliseconds, from start of the file From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` // Skip all frames after that timestamp // Milliseconds, from start of the file - To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` } -func (m *SegParameters) Reset() { *m = SegParameters{} } -func (m *SegParameters) String() string { return proto.CompactTextString(m) } -func (*SegParameters) ProtoMessage() {} -func (*SegParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{11} +func (x *SegParameters) Reset() { + *x = SegParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SegParameters) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SegParameters.Unmarshal(m, b) -} -func (m *SegParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SegParameters.Marshal(b, m, deterministic) +func (x *SegParameters) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SegParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_SegParameters.Merge(m, src) -} -func (m *SegParameters) XXX_Size() int { - return xxx_messageInfo_SegParameters.Size(m) -} -func (m *SegParameters) XXX_DiscardUnknown() { - xxx_messageInfo_SegParameters.DiscardUnknown(m) + +func (*SegParameters) ProtoMessage() {} + +func (x *SegParameters) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SegParameters proto.InternalMessageInfo +// Deprecated: Use SegParameters.ProtoReflect.Descriptor instead. +func (*SegParameters) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{11} +} -func (m *SegParameters) GetFrom() uint64 { - if m != nil { - return m.From +func (x *SegParameters) GetFrom() uint64 { + if x != nil { + return x.From } return 0 } -func (m *SegParameters) GetTo() uint64 { - if m != nil { - return m.To +func (x *SegParameters) GetTo() uint64 { + if x != nil { + return x.To } return 0 } type VideoProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Name of VideoProfile Name string `protobuf:"bytes,16,opt,name=name,proto3" json:"name,omitempty"` // Width of VideoProfile @@ -1127,306 +1192,318 @@ type VideoProfile struct { // GOP interval Gop int32 `protobuf:"varint,24,opt,name=gop,proto3" json:"gop,omitempty"` // Encoder (video codec) - Encoder VideoProfile_VideoCodec `protobuf:"varint,25,opt,name=encoder,proto3,enum=net.VideoProfile_VideoCodec" json:"encoder,omitempty"` - ColorDepth int32 `protobuf:"varint,26,opt,name=colorDepth,proto3" json:"colorDepth,omitempty"` - ChromaFormat VideoProfile_ChromaSubsampling `protobuf:"varint,27,opt,name=chromaFormat,proto3,enum=net.VideoProfile_ChromaSubsampling" json:"chromaFormat,omitempty"` - Quality uint32 `protobuf:"varint,28,opt,name=quality,proto3" json:"quality,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VideoProfile) Reset() { *m = VideoProfile{} } -func (m *VideoProfile) String() string { return proto.CompactTextString(m) } -func (*VideoProfile) ProtoMessage() {} -func (*VideoProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{12} + Encoder VideoProfile_VideoCodec `protobuf:"varint,25,opt,name=encoder,proto3,enum=net.VideoProfile_VideoCodec" json:"encoder,omitempty"` + ColorDepth int32 `protobuf:"varint,26,opt,name=colorDepth,proto3" json:"colorDepth,omitempty"` + ChromaFormat VideoProfile_ChromaSubsampling `protobuf:"varint,27,opt,name=chromaFormat,proto3,enum=net.VideoProfile_ChromaSubsampling" json:"chromaFormat,omitempty"` + Quality uint32 `protobuf:"varint,28,opt,name=quality,proto3" json:"quality,omitempty"` } -func (m *VideoProfile) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VideoProfile.Unmarshal(m, b) -} -func (m *VideoProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VideoProfile.Marshal(b, m, deterministic) -} -func (m *VideoProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_VideoProfile.Merge(m, src) +func (x *VideoProfile) Reset() { + *x = VideoProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *VideoProfile) XXX_Size() int { - return xxx_messageInfo_VideoProfile.Size(m) + +func (x *VideoProfile) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *VideoProfile) XXX_DiscardUnknown() { - xxx_messageInfo_VideoProfile.DiscardUnknown(m) + +func (*VideoProfile) ProtoMessage() {} + +func (x *VideoProfile) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_VideoProfile proto.InternalMessageInfo +// Deprecated: Use VideoProfile.ProtoReflect.Descriptor instead. +func (*VideoProfile) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{12} +} -func (m *VideoProfile) GetName() string { - if m != nil { - return m.Name +func (x *VideoProfile) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *VideoProfile) GetWidth() int32 { - if m != nil { - return m.Width +func (x *VideoProfile) GetWidth() int32 { + if x != nil { + return x.Width } return 0 } -func (m *VideoProfile) GetHeight() int32 { - if m != nil { - return m.Height +func (x *VideoProfile) GetHeight() int32 { + if x != nil { + return x.Height } return 0 } -func (m *VideoProfile) GetBitrate() int32 { - if m != nil { - return m.Bitrate +func (x *VideoProfile) GetBitrate() int32 { + if x != nil { + return x.Bitrate } return 0 } -func (m *VideoProfile) GetFps() uint32 { - if m != nil { - return m.Fps +func (x *VideoProfile) GetFps() uint32 { + if x != nil { + return x.Fps } return 0 } -func (m *VideoProfile) GetFormat() VideoProfile_Format { - if m != nil { - return m.Format +func (x *VideoProfile) GetFormat() VideoProfile_Format { + if x != nil { + return x.Format } return VideoProfile_MPEGTS } -func (m *VideoProfile) GetFpsDen() uint32 { - if m != nil { - return m.FpsDen +func (x *VideoProfile) GetFpsDen() uint32 { + if x != nil { + return x.FpsDen } return 0 } -func (m *VideoProfile) GetProfile() VideoProfile_Profile { - if m != nil { - return m.Profile +func (x *VideoProfile) GetProfile() VideoProfile_Profile { + if x != nil { + return x.Profile } return VideoProfile_ENCODER_DEFAULT } -func (m *VideoProfile) GetGop() int32 { - if m != nil { - return m.Gop +func (x *VideoProfile) GetGop() int32 { + if x != nil { + return x.Gop } return 0 } -func (m *VideoProfile) GetEncoder() VideoProfile_VideoCodec { - if m != nil { - return m.Encoder +func (x *VideoProfile) GetEncoder() VideoProfile_VideoCodec { + if x != nil { + return x.Encoder } return VideoProfile_H264 } -func (m *VideoProfile) GetColorDepth() int32 { - if m != nil { - return m.ColorDepth +func (x *VideoProfile) GetColorDepth() int32 { + if x != nil { + return x.ColorDepth } return 0 } -func (m *VideoProfile) GetChromaFormat() VideoProfile_ChromaSubsampling { - if m != nil { - return m.ChromaFormat +func (x *VideoProfile) GetChromaFormat() VideoProfile_ChromaSubsampling { + if x != nil { + return x.ChromaFormat } return VideoProfile_CHROMA_420 } -func (m *VideoProfile) GetQuality() uint32 { - if m != nil { - return m.Quality +func (x *VideoProfile) GetQuality() uint32 { + if x != nil { + return x.Quality } return 0 } // Individual transcoded segment data. type TranscodedSegmentData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // URL where the transcoded data can be downloaded from. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // Amount of pixels processed (output pixels) Pixels int64 `protobuf:"varint,2,opt,name=pixels,proto3" json:"pixels,omitempty"` // URL where the perceptual hash data can be downloaded from (can be empty) - PerceptualHashUrl string `protobuf:"bytes,3,opt,name=perceptual_hash_url,json=perceptualHashUrl,proto3" json:"perceptual_hash_url,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + PerceptualHashUrl string `protobuf:"bytes,3,opt,name=perceptual_hash_url,json=perceptualHashUrl,proto3" json:"perceptual_hash_url,omitempty"` } -func (m *TranscodedSegmentData) Reset() { *m = TranscodedSegmentData{} } -func (m *TranscodedSegmentData) String() string { return proto.CompactTextString(m) } -func (*TranscodedSegmentData) ProtoMessage() {} -func (*TranscodedSegmentData) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{13} +func (x *TranscodedSegmentData) Reset() { + *x = TranscodedSegmentData{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TranscodedSegmentData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TranscodedSegmentData.Unmarshal(m, b) +func (x *TranscodedSegmentData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TranscodedSegmentData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TranscodedSegmentData.Marshal(b, m, deterministic) -} -func (m *TranscodedSegmentData) XXX_Merge(src proto.Message) { - xxx_messageInfo_TranscodedSegmentData.Merge(m, src) -} -func (m *TranscodedSegmentData) XXX_Size() int { - return xxx_messageInfo_TranscodedSegmentData.Size(m) -} -func (m *TranscodedSegmentData) XXX_DiscardUnknown() { - xxx_messageInfo_TranscodedSegmentData.DiscardUnknown(m) + +func (*TranscodedSegmentData) ProtoMessage() {} + +func (x *TranscodedSegmentData) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TranscodedSegmentData proto.InternalMessageInfo +// Deprecated: Use TranscodedSegmentData.ProtoReflect.Descriptor instead. +func (*TranscodedSegmentData) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{13} +} -func (m *TranscodedSegmentData) GetUrl() string { - if m != nil { - return m.Url +func (x *TranscodedSegmentData) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *TranscodedSegmentData) GetPixels() int64 { - if m != nil { - return m.Pixels +func (x *TranscodedSegmentData) GetPixels() int64 { + if x != nil { + return x.Pixels } return 0 } -func (m *TranscodedSegmentData) GetPerceptualHashUrl() string { - if m != nil { - return m.PerceptualHashUrl +func (x *TranscodedSegmentData) GetPerceptualHashUrl() string { + if x != nil { + return x.PerceptualHashUrl } return "" } // A set of transcoded segments following the profiles specified in the job. type TranscodeData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Transcoded data, in the order specified in the job options Segments []*TranscodedSegmentData `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` // Signature of the hash of the concatenated hashes - Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` } -func (m *TranscodeData) Reset() { *m = TranscodeData{} } -func (m *TranscodeData) String() string { return proto.CompactTextString(m) } -func (*TranscodeData) ProtoMessage() {} -func (*TranscodeData) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{14} +func (x *TranscodeData) Reset() { + *x = TranscodeData{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TranscodeData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TranscodeData.Unmarshal(m, b) -} -func (m *TranscodeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TranscodeData.Marshal(b, m, deterministic) +func (x *TranscodeData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TranscodeData) XXX_Merge(src proto.Message) { - xxx_messageInfo_TranscodeData.Merge(m, src) -} -func (m *TranscodeData) XXX_Size() int { - return xxx_messageInfo_TranscodeData.Size(m) -} -func (m *TranscodeData) XXX_DiscardUnknown() { - xxx_messageInfo_TranscodeData.DiscardUnknown(m) + +func (*TranscodeData) ProtoMessage() {} + +func (x *TranscodeData) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TranscodeData proto.InternalMessageInfo +// Deprecated: Use TranscodeData.ProtoReflect.Descriptor instead. +func (*TranscodeData) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{14} +} -func (m *TranscodeData) GetSegments() []*TranscodedSegmentData { - if m != nil { - return m.Segments +func (x *TranscodeData) GetSegments() []*TranscodedSegmentData { + if x != nil { + return x.Segments } return nil } -func (m *TranscodeData) GetSig() []byte { - if m != nil { - return m.Sig +func (x *TranscodeData) GetSig() []byte { + if x != nil { + return x.Sig } return nil } // Response that a transcoder sends after transcoding a segment. type TranscodeResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Sequence number of the transcoded results. Seq int64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` // Result of transcoding can be an error, or successful with more info // - // Types that are valid to be assigned to Result: + // Types that are assignable to Result: // // *TranscodeResult_Error // *TranscodeResult_Data Result isTranscodeResult_Result `protobuf_oneof:"result"` // Used to notify a broadcaster of updated orchestrator information - Info *OrchestratorInfo `protobuf:"bytes,16,opt,name=info,proto3" json:"info,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Info *OrchestratorInfo `protobuf:"bytes,16,opt,name=info,proto3" json:"info,omitempty"` } -func (m *TranscodeResult) Reset() { *m = TranscodeResult{} } -func (m *TranscodeResult) String() string { return proto.CompactTextString(m) } -func (*TranscodeResult) ProtoMessage() {} -func (*TranscodeResult) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{15} +func (x *TranscodeResult) Reset() { + *x = TranscodeResult{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TranscodeResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TranscodeResult.Unmarshal(m, b) -} -func (m *TranscodeResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TranscodeResult.Marshal(b, m, deterministic) -} -func (m *TranscodeResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TranscodeResult.Merge(m, src) -} -func (m *TranscodeResult) XXX_Size() int { - return xxx_messageInfo_TranscodeResult.Size(m) -} -func (m *TranscodeResult) XXX_DiscardUnknown() { - xxx_messageInfo_TranscodeResult.DiscardUnknown(m) +func (x *TranscodeResult) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_TranscodeResult proto.InternalMessageInfo +func (*TranscodeResult) ProtoMessage() {} -func (m *TranscodeResult) GetSeq() int64 { - if m != nil { - return m.Seq +func (x *TranscodeResult) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 -} - -type isTranscodeResult_Result interface { - isTranscodeResult_Result() + return mi.MessageOf(x) } -type TranscodeResult_Error struct { - Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +// Deprecated: Use TranscodeResult.ProtoReflect.Descriptor instead. +func (*TranscodeResult) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{15} } -type TranscodeResult_Data struct { - Data *TranscodeData `protobuf:"bytes,3,opt,name=data,proto3,oneof"` +func (x *TranscodeResult) GetSeq() int64 { + if x != nil { + return x.Seq + } + return 0 } -func (*TranscodeResult_Error) isTranscodeResult_Result() {} - -func (*TranscodeResult_Data) isTranscodeResult_Result() {} - func (m *TranscodeResult) GetResult() isTranscodeResult_Result { if m != nil { return m.Result @@ -1434,96 +1511,116 @@ func (m *TranscodeResult) GetResult() isTranscodeResult_Result { return nil } -func (m *TranscodeResult) GetError() string { - if x, ok := m.GetResult().(*TranscodeResult_Error); ok { +func (x *TranscodeResult) GetError() string { + if x, ok := x.GetResult().(*TranscodeResult_Error); ok { return x.Error } return "" } -func (m *TranscodeResult) GetData() *TranscodeData { - if x, ok := m.GetResult().(*TranscodeResult_Data); ok { +func (x *TranscodeResult) GetData() *TranscodeData { + if x, ok := x.GetResult().(*TranscodeResult_Data); ok { return x.Data } return nil } -func (m *TranscodeResult) GetInfo() *OrchestratorInfo { - if m != nil { - return m.Info +func (x *TranscodeResult) GetInfo() *OrchestratorInfo { + if x != nil { + return x.Info } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TranscodeResult) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TranscodeResult_Error)(nil), - (*TranscodeResult_Data)(nil), - } +type isTranscodeResult_Result interface { + isTranscodeResult_Result() +} + +type TranscodeResult_Error struct { + Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +type TranscodeResult_Data struct { + Data *TranscodeData `protobuf:"bytes,3,opt,name=data,proto3,oneof"` } +func (*TranscodeResult_Error) isTranscodeResult_Result() {} + +func (*TranscodeResult_Data) isTranscodeResult_Result() {} + // Sent by the transcoder to register itself to the orchestrator. type RegisterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Shared secret for auth Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // Transcoder capacity Capacity int64 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"` // Transcoder capabilities - Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"` } -func (m *RegisterRequest) Reset() { *m = RegisterRequest{} } -func (m *RegisterRequest) String() string { return proto.CompactTextString(m) } -func (*RegisterRequest) ProtoMessage() {} -func (*RegisterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{16} +func (x *RegisterRequest) Reset() { + *x = RegisterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RegisterRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RegisterRequest.Unmarshal(m, b) -} -func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RegisterRequest.Marshal(b, m, deterministic) -} -func (m *RegisterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegisterRequest.Merge(m, src) +func (x *RegisterRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RegisterRequest) XXX_Size() int { - return xxx_messageInfo_RegisterRequest.Size(m) -} -func (m *RegisterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RegisterRequest.DiscardUnknown(m) + +func (*RegisterRequest) ProtoMessage() {} + +func (x *RegisterRequest) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RegisterRequest proto.InternalMessageInfo +// Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead. +func (*RegisterRequest) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{16} +} -func (m *RegisterRequest) GetSecret() string { - if m != nil { - return m.Secret +func (x *RegisterRequest) GetSecret() string { + if x != nil { + return x.Secret } return "" } -func (m *RegisterRequest) GetCapacity() int64 { - if m != nil { - return m.Capacity +func (x *RegisterRequest) GetCapacity() int64 { + if x != nil { + return x.Capacity } return 0 } -func (m *RegisterRequest) GetCapabilities() *Capabilities { - if m != nil { - return m.Capabilities +func (x *RegisterRequest) GetCapabilities() *Capabilities { + if x != nil { + return x.Capabilities } return nil } // Sent by the orchestrator to the transcoder type NotifySegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // URL of the segment to transcode. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // Configuration for the transcoding job @@ -1532,67 +1629,75 @@ type NotifySegment struct { TaskId int64 `protobuf:"varint,16,opt,name=taskId,proto3" json:"taskId,omitempty"` // Deprecated by fullProfiles. Set of presets to transcode into. // Should be set to an invalid value to induce failures - Profiles []byte `protobuf:"bytes,17,opt,name=profiles,proto3" json:"profiles,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Profiles []byte `protobuf:"bytes,17,opt,name=profiles,proto3" json:"profiles,omitempty"` } -func (m *NotifySegment) Reset() { *m = NotifySegment{} } -func (m *NotifySegment) String() string { return proto.CompactTextString(m) } -func (*NotifySegment) ProtoMessage() {} -func (*NotifySegment) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{17} +func (x *NotifySegment) Reset() { + *x = NotifySegment{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NotifySegment) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NotifySegment.Unmarshal(m, b) +func (x *NotifySegment) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NotifySegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NotifySegment.Marshal(b, m, deterministic) -} -func (m *NotifySegment) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotifySegment.Merge(m, src) -} -func (m *NotifySegment) XXX_Size() int { - return xxx_messageInfo_NotifySegment.Size(m) -} -func (m *NotifySegment) XXX_DiscardUnknown() { - xxx_messageInfo_NotifySegment.DiscardUnknown(m) + +func (*NotifySegment) ProtoMessage() {} + +func (x *NotifySegment) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NotifySegment proto.InternalMessageInfo +// Deprecated: Use NotifySegment.ProtoReflect.Descriptor instead. +func (*NotifySegment) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{17} +} -func (m *NotifySegment) GetUrl() string { - if m != nil { - return m.Url +func (x *NotifySegment) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *NotifySegment) GetSegData() *SegData { - if m != nil { - return m.SegData +func (x *NotifySegment) GetSegData() *SegData { + if x != nil { + return x.SegData } return nil } -func (m *NotifySegment) GetTaskId() int64 { - if m != nil { - return m.TaskId +func (x *NotifySegment) GetTaskId() int64 { + if x != nil { + return x.TaskId } return 0 } -func (m *NotifySegment) GetProfiles() []byte { - if m != nil { - return m.Profiles +func (x *NotifySegment) GetProfiles() []byte { + if x != nil { + return x.Profiles } return nil } // Required parameters for probabilistic micropayment tickets type TicketParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // ETH address of the recipient Recipient []byte `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` // Pay out (in Wei) to the recipient if the ticket wins @@ -1608,183 +1713,203 @@ type TicketParams struct { // Block number at which the current set of advertised TicketParams is no longer valid ExpirationBlock []byte `protobuf:"bytes,6,opt,name=expiration_block,json=expirationBlock,proto3" json:"expiration_block,omitempty"` // Expected ticket expiration params - ExpirationParams *TicketExpirationParams `protobuf:"bytes,7,opt,name=expiration_params,json=expirationParams,proto3" json:"expiration_params,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ExpirationParams *TicketExpirationParams `protobuf:"bytes,7,opt,name=expiration_params,json=expirationParams,proto3" json:"expiration_params,omitempty"` } -func (m *TicketParams) Reset() { *m = TicketParams{} } -func (m *TicketParams) String() string { return proto.CompactTextString(m) } -func (*TicketParams) ProtoMessage() {} -func (*TicketParams) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{18} +func (x *TicketParams) Reset() { + *x = TicketParams{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TicketParams) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TicketParams.Unmarshal(m, b) -} -func (m *TicketParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TicketParams.Marshal(b, m, deterministic) +func (x *TicketParams) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TicketParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_TicketParams.Merge(m, src) -} -func (m *TicketParams) XXX_Size() int { - return xxx_messageInfo_TicketParams.Size(m) -} -func (m *TicketParams) XXX_DiscardUnknown() { - xxx_messageInfo_TicketParams.DiscardUnknown(m) + +func (*TicketParams) ProtoMessage() {} + +func (x *TicketParams) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TicketParams proto.InternalMessageInfo +// Deprecated: Use TicketParams.ProtoReflect.Descriptor instead. +func (*TicketParams) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{18} +} -func (m *TicketParams) GetRecipient() []byte { - if m != nil { - return m.Recipient +func (x *TicketParams) GetRecipient() []byte { + if x != nil { + return x.Recipient } return nil } -func (m *TicketParams) GetFaceValue() []byte { - if m != nil { - return m.FaceValue +func (x *TicketParams) GetFaceValue() []byte { + if x != nil { + return x.FaceValue } return nil } -func (m *TicketParams) GetWinProb() []byte { - if m != nil { - return m.WinProb +func (x *TicketParams) GetWinProb() []byte { + if x != nil { + return x.WinProb } return nil } -func (m *TicketParams) GetRecipientRandHash() []byte { - if m != nil { - return m.RecipientRandHash +func (x *TicketParams) GetRecipientRandHash() []byte { + if x != nil { + return x.RecipientRandHash } return nil } -func (m *TicketParams) GetSeed() []byte { - if m != nil { - return m.Seed +func (x *TicketParams) GetSeed() []byte { + if x != nil { + return x.Seed } return nil } -func (m *TicketParams) GetExpirationBlock() []byte { - if m != nil { - return m.ExpirationBlock +func (x *TicketParams) GetExpirationBlock() []byte { + if x != nil { + return x.ExpirationBlock } return nil } -func (m *TicketParams) GetExpirationParams() *TicketExpirationParams { - if m != nil { - return m.ExpirationParams +func (x *TicketParams) GetExpirationParams() *TicketExpirationParams { + if x != nil { + return x.ExpirationParams } return nil } // Sender Params (nonces and signatures) type TicketSenderParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Monotonically increasing counter that makes the ticket // unique relative to a particular hash commitment to a recipient's random number SenderNonce uint32 `protobuf:"varint,1,opt,name=sender_nonce,json=senderNonce,proto3" json:"sender_nonce,omitempty"` // Sender signature over the ticket - Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` } -func (m *TicketSenderParams) Reset() { *m = TicketSenderParams{} } -func (m *TicketSenderParams) String() string { return proto.CompactTextString(m) } -func (*TicketSenderParams) ProtoMessage() {} -func (*TicketSenderParams) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{19} +func (x *TicketSenderParams) Reset() { + *x = TicketSenderParams{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TicketSenderParams) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TicketSenderParams.Unmarshal(m, b) -} -func (m *TicketSenderParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TicketSenderParams.Marshal(b, m, deterministic) -} -func (m *TicketSenderParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_TicketSenderParams.Merge(m, src) +func (x *TicketSenderParams) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TicketSenderParams) XXX_Size() int { - return xxx_messageInfo_TicketSenderParams.Size(m) -} -func (m *TicketSenderParams) XXX_DiscardUnknown() { - xxx_messageInfo_TicketSenderParams.DiscardUnknown(m) + +func (*TicketSenderParams) ProtoMessage() {} + +func (x *TicketSenderParams) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TicketSenderParams proto.InternalMessageInfo +// Deprecated: Use TicketSenderParams.ProtoReflect.Descriptor instead. +func (*TicketSenderParams) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{19} +} -func (m *TicketSenderParams) GetSenderNonce() uint32 { - if m != nil { - return m.SenderNonce +func (x *TicketSenderParams) GetSenderNonce() uint32 { + if x != nil { + return x.SenderNonce } return 0 } -func (m *TicketSenderParams) GetSig() []byte { - if m != nil { - return m.Sig +func (x *TicketSenderParams) GetSig() []byte { + if x != nil { + return x.Sig } return nil } // Ticket params for expiration related validation type TicketExpirationParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Round during which tickets are created CreationRound int64 `protobuf:"varint,1,opt,name=creation_round,json=creationRound,proto3" json:"creation_round,omitempty"` // Block hash associated with creation_round - CreationRoundBlockHash []byte `protobuf:"bytes,2,opt,name=creation_round_block_hash,json=creationRoundBlockHash,proto3" json:"creation_round_block_hash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CreationRoundBlockHash []byte `protobuf:"bytes,2,opt,name=creation_round_block_hash,json=creationRoundBlockHash,proto3" json:"creation_round_block_hash,omitempty"` } -func (m *TicketExpirationParams) Reset() { *m = TicketExpirationParams{} } -func (m *TicketExpirationParams) String() string { return proto.CompactTextString(m) } -func (*TicketExpirationParams) ProtoMessage() {} -func (*TicketExpirationParams) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{20} +func (x *TicketExpirationParams) Reset() { + *x = TicketExpirationParams{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TicketExpirationParams) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TicketExpirationParams.Unmarshal(m, b) -} -func (m *TicketExpirationParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TicketExpirationParams.Marshal(b, m, deterministic) +func (x *TicketExpirationParams) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TicketExpirationParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_TicketExpirationParams.Merge(m, src) -} -func (m *TicketExpirationParams) XXX_Size() int { - return xxx_messageInfo_TicketExpirationParams.Size(m) -} -func (m *TicketExpirationParams) XXX_DiscardUnknown() { - xxx_messageInfo_TicketExpirationParams.DiscardUnknown(m) + +func (*TicketExpirationParams) ProtoMessage() {} + +func (x *TicketExpirationParams) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TicketExpirationParams proto.InternalMessageInfo +// Deprecated: Use TicketExpirationParams.ProtoReflect.Descriptor instead. +func (*TicketExpirationParams) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{20} +} -func (m *TicketExpirationParams) GetCreationRound() int64 { - if m != nil { - return m.CreationRound +func (x *TicketExpirationParams) GetCreationRound() int64 { + if x != nil { + return x.CreationRound } return 0 } -func (m *TicketExpirationParams) GetCreationRoundBlockHash() []byte { - if m != nil { - return m.CreationRoundBlockHash +func (x *TicketExpirationParams) GetCreationRoundBlockHash() []byte { + if x != nil { + return x.CreationRoundBlockHash } return nil } @@ -1793,6 +1918,10 @@ func (m *TicketExpirationParams) GetCreationRoundBlockHash() []byte { // A payment can constitute of multiple tickets // A broadcaster might need to send multiple tickets to top up his credit with an Orchestrator type Payment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Probabilistic micropayment ticket parameters // These remain the same even when sending multiple tickets TicketParams *TicketParams `protobuf:"bytes,1,opt,name=ticket_params,json=ticketParams,proto3" json:"ticket_params,omitempty"` @@ -1802,239 +1931,895 @@ type Payment struct { ExpirationParams *TicketExpirationParams `protobuf:"bytes,3,opt,name=expiration_params,json=expirationParams,proto3" json:"expiration_params,omitempty"` TicketSenderParams []*TicketSenderParams `protobuf:"bytes,4,rep,name=ticket_sender_params,json=ticketSenderParams,proto3" json:"ticket_sender_params,omitempty"` // O's last known price - ExpectedPrice *PriceInfo `protobuf:"bytes,5,opt,name=expected_price,json=expectedPrice,proto3" json:"expected_price,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ExpectedPrice *PriceInfo `protobuf:"bytes,5,opt,name=expected_price,json=expectedPrice,proto3" json:"expected_price,omitempty"` } -func (m *Payment) Reset() { *m = Payment{} } -func (m *Payment) String() string { return proto.CompactTextString(m) } -func (*Payment) ProtoMessage() {} -func (*Payment) Descriptor() ([]byte, []int) { - return fileDescriptor_034e29c79f9ba827, []int{21} +func (x *Payment) Reset() { + *x = Payment{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Payment) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Payment.Unmarshal(m, b) +func (x *Payment) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Payment.Marshal(b, m, deterministic) -} -func (m *Payment) XXX_Merge(src proto.Message) { - xxx_messageInfo_Payment.Merge(m, src) -} -func (m *Payment) XXX_Size() int { - return xxx_messageInfo_Payment.Size(m) + +func (*Payment) ProtoMessage() {} + +func (x *Payment) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *Payment) XXX_DiscardUnknown() { - xxx_messageInfo_Payment.DiscardUnknown(m) + +// Deprecated: Use Payment.ProtoReflect.Descriptor instead. +func (*Payment) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{21} } -var xxx_messageInfo_Payment proto.InternalMessageInfo +func (x *Payment) GetTicketParams() *TicketParams { + if x != nil { + return x.TicketParams + } + return nil +} -func (m *Payment) GetTicketParams() *TicketParams { - if m != nil { - return m.TicketParams +func (x *Payment) GetSender() []byte { + if x != nil { + return x.Sender } return nil } -func (m *Payment) GetSender() []byte { - if m != nil { - return m.Sender +func (x *Payment) GetExpirationParams() *TicketExpirationParams { + if x != nil { + return x.ExpirationParams } return nil } -func (m *Payment) GetExpirationParams() *TicketExpirationParams { - if m != nil { - return m.ExpirationParams +func (x *Payment) GetTicketSenderParams() []*TicketSenderParams { + if x != nil { + return x.TicketSenderParams } return nil } -func (m *Payment) GetTicketSenderParams() []*TicketSenderParams { - if m != nil { - return m.TicketSenderParams +func (x *Payment) GetExpectedPrice() *PriceInfo { + if x != nil { + return x.ExpectedPrice } return nil } -func (m *Payment) GetExpectedPrice() *PriceInfo { - if m != nil { - return m.ExpectedPrice +// Non-binary capability constraints, such as supported ranges. +type Capabilities_Constraints struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Models map[string]*Capabilities_Constraints_ModelConstraint `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Capabilities_Constraints) Reset() { + *x = Capabilities_Constraints{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Capabilities_Constraints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Capabilities_Constraints) ProtoMessage() {} + +func (x *Capabilities_Constraints) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Capabilities_Constraints.ProtoReflect.Descriptor instead. +func (*Capabilities_Constraints) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{7, 1} +} + +func (x *Capabilities_Constraints) GetModels() map[string]*Capabilities_Constraints_ModelConstraint { + if x != nil { + return x.Models } return nil } -func init() { - proto.RegisterEnum("net.OSInfo_StorageType", OSInfo_StorageType_name, OSInfo_StorageType_value) - proto.RegisterEnum("net.VideoProfile_Format", VideoProfile_Format_name, VideoProfile_Format_value) - proto.RegisterEnum("net.VideoProfile_Profile", VideoProfile_Profile_name, VideoProfile_Profile_value) - proto.RegisterEnum("net.VideoProfile_VideoCodec", VideoProfile_VideoCodec_name, VideoProfile_VideoCodec_value) - proto.RegisterEnum("net.VideoProfile_ChromaSubsampling", VideoProfile_ChromaSubsampling_name, VideoProfile_ChromaSubsampling_value) - proto.RegisterType((*PingPong)(nil), "net.PingPong") - proto.RegisterType((*EndTranscodingSessionRequest)(nil), "net.EndTranscodingSessionRequest") - proto.RegisterType((*EndTranscodingSessionResponse)(nil), "net.EndTranscodingSessionResponse") - proto.RegisterType((*OrchestratorRequest)(nil), "net.OrchestratorRequest") - proto.RegisterType((*OSInfo)(nil), "net.OSInfo") - proto.RegisterType((*S3OSInfo)(nil), "net.S3OSInfo") - proto.RegisterType((*PriceInfo)(nil), "net.PriceInfo") - proto.RegisterType((*Capabilities)(nil), "net.Capabilities") - proto.RegisterMapType((map[uint32]*Capabilities_CapabilityConstraints)(nil), "net.Capabilities.CapabilityConstraintsEntry") - proto.RegisterMapType((map[uint32]uint32)(nil), "net.Capabilities.CapacitiesEntry") - proto.RegisterType((*Capabilities_Constraints)(nil), "net.Capabilities.Constraints") - proto.RegisterType((*Capabilities_CapabilityConstraints)(nil), "net.Capabilities.CapabilityConstraints") - proto.RegisterMapType((map[string]*Capabilities_CapabilityConstraints_ModelConstraint)(nil), "net.Capabilities.CapabilityConstraints.ModelsEntry") - proto.RegisterType((*Capabilities_CapabilityConstraints_ModelConstraint)(nil), "net.Capabilities.CapabilityConstraints.ModelConstraint") - proto.RegisterType((*OrchestratorInfo)(nil), "net.OrchestratorInfo") - proto.RegisterType((*AuthToken)(nil), "net.AuthToken") - proto.RegisterType((*SegData)(nil), "net.SegData") - proto.RegisterType((*SegParameters)(nil), "net.SegParameters") - proto.RegisterType((*VideoProfile)(nil), "net.VideoProfile") - proto.RegisterType((*TranscodedSegmentData)(nil), "net.TranscodedSegmentData") - proto.RegisterType((*TranscodeData)(nil), "net.TranscodeData") - proto.RegisterType((*TranscodeResult)(nil), "net.TranscodeResult") - proto.RegisterType((*RegisterRequest)(nil), "net.RegisterRequest") - proto.RegisterType((*NotifySegment)(nil), "net.NotifySegment") - proto.RegisterType((*TicketParams)(nil), "net.TicketParams") - proto.RegisterType((*TicketSenderParams)(nil), "net.TicketSenderParams") - proto.RegisterType((*TicketExpirationParams)(nil), "net.TicketExpirationParams") - proto.RegisterType((*Payment)(nil), "net.Payment") -} - -func init() { - proto.RegisterFile("net/lp_rpc.proto", fileDescriptor_034e29c79f9ba827) -} - -var fileDescriptor_034e29c79f9ba827 = []byte{ - // 2021 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x72, 0xdb, 0xc6, - 0xf5, 0x17, 0x3f, 0xc4, 0x8f, 0x43, 0x52, 0x82, 0xd6, 0x96, 0x0c, 0x33, 0x76, 0xfe, 0x32, 0x12, - 0xe5, 0xef, 0xcc, 0xd4, 0x8a, 0x87, 0x92, 0x9d, 0xb8, 0x33, 0x99, 0x56, 0x1f, 0xb4, 0xc4, 0xd4, - 0x92, 0x38, 0x4b, 0xd9, 0x33, 0xed, 0x45, 0x59, 0x08, 0x58, 0x92, 0xa8, 0x48, 0x00, 0x5a, 0x2c, - 0x63, 0x29, 0xd3, 0x17, 0xe8, 0x23, 0xb4, 0x37, 0x9d, 0xe9, 0x4c, 0x9f, 0xa0, 0x2f, 0xd0, 0x07, - 0xe8, 0x03, 0xf4, 0x41, 0x7a, 0xdf, 0xce, 0x9e, 0x5d, 0x80, 0x80, 0x48, 0x27, 0xaa, 0xef, 0xf6, - 0x7c, 0xee, 0xd9, 0xb3, 0x67, 0x7f, 0xe7, 0x00, 0x60, 0xf8, 0x4c, 0x7c, 0x35, 0x0e, 0xfb, 0x3c, - 0x74, 0xb6, 0x43, 0x1e, 0x88, 0x80, 0x14, 0x7c, 0x26, 0xac, 0x4d, 0xa8, 0x74, 0x3d, 0x7f, 0xd8, - 0x0d, 0xfc, 0x21, 0xb9, 0x0f, 0xcb, 0xdf, 0xdb, 0xe3, 0x29, 0x33, 0x73, 0x9b, 0xb9, 0xa7, 0x75, - 0xaa, 0x08, 0xeb, 0x04, 0x1e, 0xb5, 0x7d, 0xf7, 0x9c, 0xdb, 0x7e, 0xe4, 0x04, 0xae, 0xe7, 0x0f, - 0x7b, 0x2c, 0x8a, 0xbc, 0xc0, 0xa7, 0xec, 0x6a, 0xca, 0x22, 0x41, 0x9e, 0x01, 0xd8, 0x53, 0x31, - 0xea, 0x8b, 0xe0, 0x92, 0xf9, 0x68, 0x5a, 0x6b, 0xad, 0x6c, 0xfb, 0x4c, 0x6c, 0xef, 0x4d, 0xc5, - 0xe8, 0x5c, 0x72, 0x69, 0xd5, 0x8e, 0x97, 0xd6, 0xff, 0xc1, 0xe3, 0x0f, 0xb8, 0x8b, 0xc2, 0xc0, - 0x8f, 0x98, 0x75, 0x0d, 0xf7, 0xce, 0xb8, 0x33, 0x62, 0x91, 0xe0, 0xb6, 0x08, 0x78, 0xbc, 0x8d, - 0x09, 0x65, 0xdb, 0x75, 0x39, 0x8b, 0x22, 0x1d, 0x5e, 0x4c, 0x12, 0x03, 0x0a, 0x91, 0x37, 0x34, - 0xf3, 0xc8, 0x95, 0x4b, 0xf2, 0x02, 0xea, 0x8e, 0x1d, 0xda, 0x17, 0xde, 0xd8, 0x13, 0x1e, 0x8b, - 0xcc, 0x02, 0x06, 0xb5, 0x86, 0x41, 0x1d, 0xa4, 0x04, 0x34, 0xa3, 0x66, 0xfd, 0x29, 0x07, 0xa5, - 0xb3, 0x5e, 0xc7, 0x1f, 0x04, 0xe4, 0x15, 0xd4, 0x22, 0x11, 0x70, 0x7b, 0xc8, 0xce, 0x6f, 0x42, - 0x95, 0x90, 0x95, 0xd6, 0x03, 0x74, 0xa0, 0x34, 0xb6, 0x7b, 0x33, 0x31, 0x4d, 0xeb, 0x92, 0x2d, - 0x28, 0x45, 0x3b, 0x9e, 0x3f, 0x08, 0x4c, 0x03, 0xb7, 0x6d, 0xa0, 0x55, 0x6f, 0x47, 0xd9, 0x51, - 0x2d, 0xb4, 0x9e, 0x41, 0x2d, 0xe5, 0x82, 0x00, 0x94, 0x0e, 0x3b, 0xb4, 0x7d, 0x70, 0x6e, 0x2c, - 0x91, 0x12, 0xe4, 0x7b, 0x3b, 0x46, 0x4e, 0xf2, 0x8e, 0xce, 0xce, 0x8e, 0xde, 0xb4, 0x8d, 0xbc, - 0xf5, 0xd7, 0x1c, 0x54, 0x62, 0x1f, 0x84, 0x40, 0x71, 0x14, 0x44, 0x02, 0xc3, 0xaa, 0x52, 0x5c, - 0xcb, 0x2c, 0x5c, 0xb2, 0x1b, 0xcc, 0x42, 0x95, 0xca, 0x25, 0xd9, 0x80, 0x52, 0x18, 0x8c, 0x3d, - 0xe7, 0x06, 0xcf, 0x5f, 0xa5, 0x9a, 0x22, 0x8f, 0xa0, 0x1a, 0x79, 0x43, 0xdf, 0x16, 0x53, 0xce, - 0xcc, 0x22, 0x8a, 0x66, 0x0c, 0xf2, 0x29, 0x80, 0xc3, 0x99, 0xcb, 0x7c, 0xe1, 0xd9, 0x63, 0x73, - 0x19, 0xc5, 0x29, 0x0e, 0x69, 0x42, 0xe5, 0x7a, 0x6f, 0xf2, 0xc3, 0xa1, 0x2d, 0x98, 0x59, 0x42, - 0x69, 0x42, 0x5b, 0x6f, 0xa1, 0xda, 0xe5, 0x9e, 0xc3, 0x30, 0x48, 0x0b, 0xea, 0xa1, 0x24, 0xba, - 0x8c, 0xbf, 0xf5, 0x3d, 0x15, 0x6c, 0x81, 0x66, 0x78, 0xe4, 0x73, 0x68, 0x84, 0xde, 0x35, 0x1b, - 0x47, 0xb1, 0x52, 0x1e, 0x95, 0xb2, 0x4c, 0xeb, 0xef, 0x25, 0xa8, 0xa7, 0xaf, 0x4d, 0x9e, 0xe0, - 0xc2, 0x13, 0x91, 0xe0, 0x9e, 0x3f, 0x34, 0x73, 0x9b, 0x85, 0xa7, 0x45, 0x3a, 0x63, 0x90, 0x4d, - 0xa8, 0x4d, 0x6c, 0xdf, 0x95, 0xc5, 0x23, 0x2f, 0x3f, 0x8f, 0xf2, 0x34, 0x8b, 0xec, 0x01, 0xc8, - 0x8b, 0x77, 0xe2, 0xea, 0x28, 0x3c, 0xad, 0xb5, 0x9e, 0xcc, 0x55, 0x07, 0x12, 0x4a, 0xa7, 0xed, - 0x0b, 0x7e, 0x43, 0x53, 0x46, 0xb2, 0x1c, 0xbf, 0x67, 0x5c, 0x16, 0xae, 0x4e, 0x61, 0x4c, 0x92, - 0x5f, 0x40, 0xcd, 0x09, 0x7c, 0x59, 0xbd, 0x9e, 0x2f, 0x22, 0xcc, 0x60, 0xad, 0xf5, 0x78, 0x81, - 0xf7, 0x99, 0x12, 0x4d, 0x5b, 0x90, 0x0b, 0x58, 0x4f, 0xca, 0xf2, 0x26, 0xa5, 0x65, 0x96, 0x30, - 0xd0, 0x9f, 0x2d, 0x0e, 0x74, 0x4e, 0x5d, 0xc5, 0xbc, 0xd8, 0x55, 0xf3, 0x5b, 0x58, 0xbd, 0x75, - 0xba, 0xb8, 0x80, 0xe4, 0x35, 0x35, 0x54, 0x01, 0x25, 0x78, 0x90, 0x47, 0x9e, 0x22, 0x7e, 0x9e, - 0xff, 0x26, 0xd7, 0x7c, 0x06, 0xb5, 0x94, 0x37, 0x59, 0x33, 0x13, 0xcf, 0x7f, 0xa7, 0xf3, 0xa1, - 0xaa, 0x32, 0xc5, 0x69, 0xfe, 0x27, 0x07, 0xeb, 0x0b, 0x63, 0x24, 0xbf, 0x82, 0xd2, 0x24, 0x70, - 0xd9, 0x38, 0xc2, 0x6b, 0xac, 0xb5, 0x76, 0xee, 0x78, 0xb8, 0xed, 0x13, 0xb4, 0x52, 0x67, 0xd4, - 0x2e, 0x9a, 0x5b, 0xb0, 0x8a, 0xec, 0x99, 0x9e, 0x7c, 0x29, 0xef, 0x6d, 0x3e, 0xc1, 0x98, 0x2a, - 0x14, 0xd7, 0x4d, 0x0e, 0xb5, 0x94, 0x75, 0xfa, 0xdc, 0xfa, 0xe1, 0x9c, 0xa4, 0xcf, 0x5d, 0x6b, - 0x7d, 0xfd, 0x3f, 0xc5, 0x34, 0x63, 0xa4, 0x13, 0x76, 0x05, 0xcd, 0x0f, 0x5f, 0xd2, 0x82, 0xd4, - 0x7f, 0x9b, 0x0d, 0xe1, 0xff, 0xef, 0x18, 0x42, 0x6a, 0x4b, 0xeb, 0x1f, 0x79, 0x30, 0xd2, 0x40, - 0x8a, 0x8f, 0xf2, 0x53, 0x00, 0xa1, 0xa1, 0x97, 0xf1, 0xf8, 0xa6, 0x66, 0x1c, 0xf2, 0x12, 0x1a, - 0xc2, 0x73, 0x2e, 0x99, 0xe8, 0x87, 0x36, 0xb7, 0x27, 0x91, 0xde, 0x5f, 0x41, 0xe7, 0x39, 0x4a, - 0xba, 0x28, 0xa0, 0x75, 0x91, 0xa2, 0x64, 0x13, 0xc0, 0x87, 0xdd, 0x47, 0xe0, 0x2b, 0xa4, 0x9a, - 0x40, 0x02, 0x08, 0xb4, 0x1a, 0x26, 0xd8, 0x90, 0x02, 0xf3, 0x62, 0x16, 0xcc, 0x6f, 0x43, 0xf7, - 0xf2, 0x9d, 0xa0, 0xfb, 0x56, 0x13, 0x2a, 0xfd, 0x44, 0x13, 0x22, 0x5b, 0x50, 0xd6, 0x90, 0x6d, - 0x6e, 0x62, 0xdd, 0xd5, 0x52, 0xd0, 0x4e, 0x63, 0x99, 0xf5, 0x3b, 0xa8, 0x26, 0xe6, 0xf2, 0x35, - 0xcc, 0x5a, 0x5c, 0x9d, 0x2a, 0x82, 0x3c, 0x06, 0x88, 0x54, 0x03, 0xeb, 0x7b, 0xae, 0x46, 0xdf, - 0xaa, 0xe6, 0x74, 0x5c, 0x99, 0x6f, 0x76, 0x1d, 0x7a, 0xdc, 0x16, 0xf2, 0x65, 0x14, 0x10, 0xdd, - 0x52, 0x1c, 0xeb, 0xdf, 0x45, 0x28, 0xf7, 0xd8, 0xf0, 0xd0, 0x16, 0x36, 0xbe, 0x22, 0xdb, 0xf7, - 0x06, 0x2c, 0x12, 0x1d, 0x57, 0xef, 0x92, 0xe2, 0x60, 0x9f, 0x63, 0x57, 0x1a, 0x22, 0xe5, 0x12, - 0xfb, 0x80, 0x1d, 0x8d, 0xd0, 0x6f, 0x9d, 0xe2, 0x5a, 0xe2, 0x73, 0xc8, 0x83, 0x81, 0x37, 0x66, - 0x71, 0x6e, 0x13, 0x3a, 0xee, 0x94, 0xcb, 0xb3, 0x4e, 0xd9, 0x84, 0x8a, 0x3b, 0xd5, 0xd1, 0xc9, - 0xac, 0x2d, 0xd3, 0x84, 0x9e, 0xbb, 0x8a, 0xf2, 0xc7, 0x5c, 0x45, 0xe5, 0xa7, 0xae, 0xe2, 0x39, - 0xdc, 0x77, 0xec, 0xb1, 0xd3, 0x0f, 0x19, 0x77, 0x58, 0x28, 0xa6, 0xf6, 0xb8, 0x8f, 0x67, 0x02, - 0x7c, 0xb1, 0x44, 0xca, 0xba, 0x89, 0xe8, 0x58, 0x9e, 0xf0, 0x6e, 0x97, 0x27, 0xc3, 0x1f, 0x4c, - 0xc7, 0xe3, 0x6e, 0x9c, 0x8c, 0x27, 0xa8, 0xab, 0xc2, 0x7f, 0xe7, 0xb9, 0x2c, 0xd0, 0x12, 0x9a, - 0x51, 0x23, 0x5f, 0x43, 0x23, 0x4d, 0xb7, 0x4c, 0xeb, 0x43, 0x76, 0x59, 0xbd, 0xdb, 0x86, 0x3b, - 0xe6, 0x67, 0x77, 0x32, 0xdc, 0x21, 0x7b, 0x40, 0x22, 0x36, 0x9c, 0x30, 0x5f, 0x3f, 0x3a, 0x26, - 0x18, 0x8f, 0xcc, 0x2d, 0x4c, 0x1c, 0x51, 0xc3, 0x03, 0x1b, 0x76, 0x13, 0x09, 0x5d, 0xd3, 0xda, - 0x33, 0x16, 0xd9, 0x06, 0xf2, 0x3a, 0xe0, 0x0e, 0x4b, 0x66, 0x29, 0x4f, 0x36, 0xd3, 0x2f, 0x54, - 0x0a, 0xe7, 0x25, 0xd6, 0x0e, 0x34, 0x32, 0x3e, 0x65, 0x25, 0x0d, 0x78, 0xa0, 0x70, 0xb2, 0x48, - 0x71, 0x4d, 0x56, 0x20, 0x2f, 0x02, 0x2c, 0xb7, 0x22, 0xcd, 0x8b, 0xc0, 0xfa, 0xe7, 0x32, 0xd4, - 0xd3, 0xe7, 0x90, 0x46, 0xbe, 0x3d, 0x61, 0x38, 0xe7, 0x54, 0x29, 0xae, 0xe5, 0x2b, 0x79, 0xef, - 0xb9, 0x62, 0x64, 0xae, 0x61, 0x35, 0x29, 0x42, 0x8e, 0x22, 0x23, 0xe6, 0x0d, 0x47, 0xc2, 0x24, - 0xc8, 0xd6, 0x94, 0xc4, 0x81, 0x0b, 0x4f, 0xc2, 0x13, 0x33, 0xef, 0xa1, 0x20, 0x26, 0x65, 0xa9, - 0x0e, 0xc2, 0xc8, 0xbc, 0xaf, 0x20, 0x71, 0x10, 0x46, 0xe4, 0x39, 0x94, 0x06, 0x01, 0x9f, 0xd8, - 0xc2, 0x5c, 0xc7, 0x69, 0xcc, 0x9c, 0x4b, 0xec, 0xf6, 0x6b, 0x94, 0x53, 0xad, 0x27, 0x77, 0x1d, - 0x84, 0xd1, 0x21, 0xf3, 0xcd, 0x0d, 0x74, 0xa3, 0x29, 0xb2, 0x03, 0x65, 0xfd, 0x24, 0xcc, 0x07, - 0xe8, 0xea, 0xe1, 0xbc, 0xab, 0xf8, 0xae, 0x62, 0x4d, 0x19, 0xd0, 0x30, 0x08, 0x4d, 0x13, 0xc3, - 0x94, 0x4b, 0xf2, 0x12, 0xca, 0xcc, 0x57, 0x40, 0xfa, 0x10, 0xdd, 0x3c, 0x9a, 0x77, 0x83, 0xc4, - 0x41, 0xe0, 0x32, 0x87, 0xc6, 0xca, 0x38, 0x61, 0x05, 0xe3, 0x80, 0x1f, 0xb2, 0x50, 0x8c, 0xcc, - 0x26, 0x3a, 0x4c, 0x71, 0xc8, 0x11, 0xd4, 0x9d, 0x11, 0x0f, 0x26, 0xb6, 0x3a, 0x8e, 0xf9, 0x09, - 0x3a, 0xff, 0x6c, 0xde, 0xf9, 0x01, 0x6a, 0xf5, 0xa6, 0x17, 0x91, 0x3d, 0x09, 0xc7, 0x9e, 0x3f, - 0xa4, 0x19, 0x43, 0x99, 0xdd, 0xab, 0xa9, 0x2d, 0x5b, 0x84, 0xf9, 0x08, 0x13, 0x10, 0x93, 0xd6, - 0x63, 0x28, 0x69, 0x1d, 0x80, 0xd2, 0x49, 0xb7, 0x7d, 0x74, 0xde, 0x33, 0x96, 0x48, 0x19, 0x0a, - 0x27, 0xdd, 0x5d, 0x23, 0x67, 0xfd, 0x1e, 0xca, 0xf1, 0x1d, 0xdf, 0x83, 0xd5, 0xf6, 0xe9, 0xc1, - 0xd9, 0x61, 0x9b, 0xf6, 0x0f, 0xdb, 0xaf, 0xf7, 0xde, 0xbe, 0x91, 0x03, 0xea, 0x1a, 0x34, 0x8e, - 0x5b, 0x2f, 0x77, 0xfb, 0xfb, 0x7b, 0xbd, 0xf6, 0x9b, 0xce, 0x69, 0xdb, 0xc8, 0x91, 0x06, 0x54, - 0x91, 0x75, 0xb2, 0xd7, 0x39, 0x35, 0xf2, 0x09, 0x79, 0xdc, 0x39, 0x3a, 0x36, 0x0a, 0xe4, 0x21, - 0xac, 0x23, 0x79, 0x70, 0x76, 0xda, 0x3b, 0xa7, 0x7b, 0x9d, 0xd3, 0xf6, 0xa1, 0x12, 0x15, 0xad, - 0x16, 0xc0, 0x2c, 0x49, 0xa4, 0x02, 0x45, 0xa9, 0x68, 0x2c, 0xe9, 0xd5, 0x0b, 0x23, 0x27, 0xc3, - 0x7a, 0xd7, 0xfd, 0xc6, 0xc8, 0xab, 0xc5, 0x2b, 0xa3, 0x60, 0x1d, 0xc0, 0xda, 0xdc, 0xd9, 0xc9, - 0x0a, 0xc0, 0xc1, 0x31, 0x3d, 0x3b, 0xd9, 0xeb, 0xef, 0xb6, 0x9e, 0x1b, 0x4b, 0x19, 0xba, 0x65, - 0xe4, 0xd2, 0xf4, 0xee, 0xae, 0x91, 0xb7, 0xae, 0x60, 0x3d, 0xfe, 0x0a, 0x61, 0x6e, 0x4f, 0x3d, - 0x29, 0xc4, 0x61, 0x03, 0x0a, 0x53, 0x3e, 0x8e, 0x07, 0x82, 0x29, 0x1f, 0xe3, 0x24, 0x8d, 0x13, - 0xa9, 0x06, 0x5f, 0x4d, 0x91, 0x6d, 0xb8, 0x77, 0x0b, 0xb6, 0xfa, 0xd2, 0x52, 0x8d, 0xdb, 0x6b, - 0x61, 0x06, 0xb6, 0xde, 0xf2, 0xb1, 0xf5, 0x6b, 0x68, 0x24, 0x5b, 0xe2, 0x56, 0x2f, 0xa1, 0xa2, - 0x1f, 0x73, 0x3c, 0x00, 0x35, 0x55, 0xa7, 0x5d, 0x14, 0x18, 0x4d, 0x74, 0xe7, 0x3f, 0x79, 0xac, - 0x3f, 0xe7, 0x60, 0x35, 0xb1, 0xa2, 0x2c, 0x9a, 0x8e, 0x45, 0xdc, 0x30, 0x72, 0xb3, 0x86, 0xb1, - 0x01, 0xcb, 0x8c, 0xf3, 0x80, 0xab, 0x46, 0x75, 0xbc, 0x44, 0x15, 0x49, 0x9e, 0x42, 0xd1, 0xb5, - 0x85, 0xad, 0x1b, 0x37, 0xc9, 0xc6, 0x20, 0xf7, 0x3e, 0x5e, 0xa2, 0xa8, 0x41, 0xbe, 0x84, 0x62, - 0xea, 0xdb, 0x66, 0x5d, 0x21, 0xef, 0xad, 0x29, 0x83, 0xa2, 0xca, 0x7e, 0x05, 0x4a, 0x1c, 0x03, - 0xb1, 0xfe, 0x00, 0xab, 0x94, 0x0d, 0xbd, 0x48, 0xb0, 0xe4, 0x73, 0x6e, 0x03, 0x4a, 0x11, 0x73, - 0x38, 0x8b, 0x3f, 0x62, 0x34, 0x25, 0x1b, 0x92, 0x9e, 0xb2, 0x6f, 0x74, 0xb2, 0x13, 0xfa, 0x63, - 0x3f, 0xeb, 0xfe, 0x98, 0x83, 0xc6, 0x69, 0x20, 0xbc, 0xc1, 0x8d, 0x4e, 0xe6, 0x82, 0x1b, 0xfe, - 0x02, 0xca, 0x91, 0x6a, 0xc3, 0xda, 0x6b, 0x3d, 0x06, 0x5e, 0xcc, 0x7c, 0x2c, 0x94, 0x61, 0x0b, - 0x3b, 0xba, 0xec, 0xb8, 0x98, 0x80, 0x02, 0xd5, 0x54, 0xa6, 0xeb, 0xae, 0x65, 0xbb, 0xee, 0x77, - 0xc5, 0x4a, 0xde, 0x28, 0x7c, 0x57, 0xac, 0x3c, 0x31, 0x2c, 0xeb, 0x2f, 0x79, 0xa8, 0xa7, 0xc7, - 0x28, 0xf9, 0x29, 0xc3, 0x99, 0xe3, 0x85, 0x1e, 0xf3, 0x85, 0xee, 0xf9, 0x33, 0x86, 0x9c, 0x2e, - 0x06, 0xb6, 0xc3, 0xfa, 0xb3, 0x59, 0xb0, 0x4e, 0xab, 0x92, 0xf3, 0x4e, 0x32, 0xc8, 0x43, 0xa8, - 0xbc, 0xf7, 0xfc, 0x7e, 0xc8, 0x83, 0x0b, 0x3d, 0x03, 0x94, 0xdf, 0x7b, 0x7e, 0x97, 0x07, 0x17, - 0xb2, 0x34, 0x13, 0x37, 0x7d, 0x6e, 0xfb, 0xae, 0xea, 0xaa, 0x6a, 0x22, 0x58, 0x4b, 0x44, 0xd4, - 0xf6, 0x5d, 0x6c, 0xaa, 0x04, 0x8a, 0x11, 0x63, 0xae, 0x9e, 0x0d, 0x70, 0x4d, 0xbe, 0x04, 0x63, - 0x36, 0xaa, 0xf4, 0x2f, 0xc6, 0x81, 0x73, 0x89, 0x43, 0x42, 0x9d, 0xae, 0xce, 0xf8, 0xfb, 0x92, - 0x4d, 0x8e, 0x61, 0x2d, 0xa5, 0xaa, 0x67, 0x47, 0x35, 0x30, 0x7c, 0x92, 0x9a, 0x1d, 0xdb, 0x89, - 0x8e, 0x9e, 0x22, 0x53, 0x1b, 0x28, 0x8e, 0xd5, 0x01, 0xa2, 0x74, 0x7b, 0xcc, 0x77, 0x19, 0xd7, - 0x69, 0x7a, 0x02, 0xf5, 0x08, 0xe9, 0xbe, 0x1f, 0xf8, 0x0e, 0xd3, 0xa3, 0x72, 0x4d, 0xf1, 0x4e, - 0x25, 0x6b, 0xc1, 0x9b, 0xf8, 0x01, 0x36, 0x16, 0x6f, 0x4b, 0xb6, 0x60, 0xc5, 0xe1, 0x4c, 0x05, - 0xcb, 0x83, 0xa9, 0xef, 0xea, 0x47, 0xd2, 0x88, 0xb9, 0x54, 0x32, 0xc9, 0x2b, 0x78, 0x98, 0x55, - 0x53, 0x49, 0x50, 0xa9, 0x54, 0x1b, 0x6d, 0x64, 0x2c, 0x30, 0x19, 0x32, 0x9f, 0xd6, 0xdf, 0xf2, - 0x50, 0xee, 0xda, 0x37, 0x58, 0x6e, 0x73, 0x43, 0x75, 0xee, 0x6e, 0x43, 0x35, 0xbe, 0x11, 0x79, - 0x40, 0xbd, 0x97, 0xa6, 0x16, 0x27, 0xbb, 0xf0, 0x11, 0xc9, 0x26, 0x1d, 0xb8, 0xaf, 0x23, 0xd3, - 0xd9, 0xd5, 0xce, 0x8a, 0x88, 0x45, 0x0f, 0x52, 0xce, 0xd2, 0xb7, 0x41, 0x89, 0x98, 0xbf, 0xa1, - 0x17, 0xb0, 0xc2, 0xae, 0x43, 0xe6, 0x08, 0xe6, 0xf6, 0x71, 0xd0, 0xd7, 0xa3, 0xfb, 0xed, 0xaf, - 0x80, 0x46, 0xac, 0x85, 0xac, 0xd6, 0xbf, 0x72, 0x50, 0x4f, 0xe3, 0x07, 0xd9, 0x87, 0xd5, 0x23, - 0x26, 0x32, 0x2c, 0x73, 0x0e, 0x65, 0x34, 0x8a, 0x34, 0x17, 0xe3, 0x0f, 0xf9, 0x2d, 0xac, 0x2f, - 0xfc, 0xc7, 0x44, 0xd4, 0x47, 0xfe, 0x8f, 0xfd, 0xce, 0x6a, 0x5a, 0x3f, 0xa6, 0xa2, 0x7e, 0x51, - 0x91, 0xcf, 0xa1, 0xd8, 0x95, 0x2d, 0x47, 0xfd, 0xda, 0x89, 0xff, 0x9f, 0x35, 0xb3, 0x64, 0xeb, - 0x14, 0xe0, 0x7c, 0xf6, 0x65, 0xf5, 0x4b, 0x20, 0x31, 0x06, 0xa6, 0xb8, 0xf7, 0xd1, 0xe4, 0x16, - 0x38, 0x36, 0x15, 0x00, 0x67, 0x30, 0xeb, 0x79, 0x6e, 0xbf, 0xfc, 0x9b, 0xe5, 0xed, 0xaf, 0x7c, - 0x26, 0x2e, 0x4a, 0xf8, 0xff, 0x6e, 0xe7, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xc3, 0xc1, - 0x2e, 0xd3, 0x13, 0x00, 0x00, +type Capabilities_Constraints_ModelConstraint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Warm bool `protobuf:"varint,1,opt,name=warm,proto3" json:"warm,omitempty"` +} + +func (x *Capabilities_Constraints_ModelConstraint) Reset() { + *x = Capabilities_Constraints_ModelConstraint{} + if protoimpl.UnsafeEnabled { + mi := &file_net_lp_rpc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Capabilities_Constraints_ModelConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Capabilities_Constraints_ModelConstraint) ProtoMessage() {} + +func (x *Capabilities_Constraints_ModelConstraint) ProtoReflect() protoreflect.Message { + mi := &file_net_lp_rpc_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Capabilities_Constraints_ModelConstraint.ProtoReflect.Descriptor instead. +func (*Capabilities_Constraints_ModelConstraint) Descriptor() ([]byte, []int) { + return file_net_lp_rpc_proto_rawDescGZIP(), []int{7, 1, 0} +} + +func (x *Capabilities_Constraints_ModelConstraint) GetWarm() bool { + if x != nil { + return x.Warm + } + return false +} + +var File_net_lp_rpc_proto protoreflect.FileDescriptor + +var file_net_lp_rpc_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x6e, 0x65, 0x74, 0x2f, 0x6c, 0x70, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x03, 0x6e, 0x65, 0x74, 0x22, 0x20, 0x0a, 0x08, 0x50, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x1c, 0x45, 0x6e, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x6e, 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x1f, 0x0a, 0x1d, 0x45, 0x6e, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x13, 0x4f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x0c, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x39, + 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x73, 0x33, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6e, 0x65, 0x74, 0x2e, + 0x53, 0x33, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x73, 0x33, 0x69, 0x6e, 0x66, 0x6f, + 0x22, 0x2d, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0a, 0x0a, 0x06, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x53, + 0x33, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x10, 0x02, 0x22, + 0xa2, 0x01, 0x0a, 0x08, 0x53, 0x33, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x78, 0x41, 0x6d, 0x7a, + 0x44, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x78, 0x41, 0x6d, 0x7a, + 0x44, 0x61, 0x74, 0x65, 0x22, 0x55, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, + 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x50, + 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, 0x69, + 0x78, 0x65, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x22, 0xd9, 0x04, 0x0a, 0x0c, + 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x62, 0x69, 0x74, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, + 0x09, 0x62, 0x69, 0x74, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, + 0x6e, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, + 0x0b, 0x6d, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0a, + 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x44, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xe1, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, + 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x1a, 0x25, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x61, + 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x61, 0x72, 0x6d, 0x1a, 0x68, + 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5d, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc0, 0x02, 0x0a, 0x10, 0x4f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0d, + 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, + 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x25, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x20, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4f, 0x53, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x22, 0x60, 0x0a, 0x09, 0x41, 0x75, + 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf4, 0x04, 0x0a, + 0x07, 0x53, 0x65, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x2d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x30, + 0x0a, 0x14, 0x63, 0x61, 0x6c, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x75, 0x61, + 0x6c, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x63, 0x61, + 0x6c, 0x63, 0x50, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x25, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x20, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x66, 0x75, 0x6c, 0x6c, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x6e, 0x65, 0x74, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x52, 0x0c, 0x66, 0x75, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x37, + 0x0a, 0x0d, 0x66, 0x75, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x32, 0x18, + 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x66, 0x75, 0x6c, 0x6c, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x32, 0x12, 0x37, 0x0a, 0x0d, 0x66, 0x75, 0x6c, 0x6c, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x33, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x0d, 0x66, 0x75, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x33, + 0x12, 0x41, 0x0a, 0x12, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6e, + 0x65, 0x74, 0x2e, 0x53, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x52, 0x11, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x26, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x12, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x69, + 0x6e, 0x69, 0x74, 0x22, 0x33, 0x0a, 0x0d, 0x53, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x74, 0x6f, 0x22, 0xcc, 0x05, 0x0a, 0x0c, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x62, + 0x69, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x69, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x70, 0x73, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x03, 0x66, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x70, 0x73, + 0x44, 0x65, 0x6e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x66, 0x70, 0x73, 0x44, 0x65, + 0x6e, 0x12, 0x33, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x6f, 0x70, 0x18, 0x18, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x6f, 0x70, 0x12, 0x36, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x74, 0x2e, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x18, 0x1a, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, + 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x61, + 0x53, 0x75, 0x62, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x63, 0x68, 0x72, + 0x6f, 0x6d, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, + 0x6c, 0x69, 0x74, 0x79, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, + 0x69, 0x74, 0x79, 0x22, 0x1d, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x0a, 0x0a, + 0x06, 0x4d, 0x50, 0x45, 0x47, 0x54, 0x53, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x50, 0x34, + 0x10, 0x01, 0x22, 0x6a, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x13, 0x0a, + 0x0f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, + 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x48, 0x32, 0x36, 0x34, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x4c, + 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x32, 0x36, 0x34, 0x5f, 0x4d, 0x41, + 0x49, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x32, 0x36, 0x34, 0x5f, 0x48, 0x49, 0x47, + 0x48, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x32, 0x36, 0x34, 0x5f, 0x43, 0x4f, 0x4e, 0x53, + 0x54, 0x52, 0x41, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x04, 0x22, 0x32, + 0x0a, 0x0a, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x08, 0x0a, 0x04, + 0x48, 0x32, 0x36, 0x34, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x32, 0x36, 0x35, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x56, 0x50, 0x38, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x56, 0x50, 0x39, + 0x10, 0x03, 0x22, 0x43, 0x0a, 0x11, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x48, 0x52, 0x4f, 0x4d, + 0x41, 0x5f, 0x34, 0x32, 0x30, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x48, 0x52, 0x4f, 0x4d, + 0x41, 0x5f, 0x34, 0x32, 0x32, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x48, 0x52, 0x4f, 0x4d, + 0x41, 0x5f, 0x34, 0x34, 0x34, 0x10, 0x02, 0x22, 0x71, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x63, 0x6f, 0x64, 0x65, 0x64, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x70, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, + 0x75, 0x61, 0x6c, 0x48, 0x61, 0x73, 0x68, 0x55, 0x72, 0x6c, 0x22, 0x59, 0x0a, 0x0d, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x08, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x73, 0x69, 0x67, 0x22, 0x9a, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, + 0x74, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x22, 0x7c, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x72, 0x6c, 0x12, 0x26, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x53, 0x65, 0x67, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x07, 0x73, 0x65, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x21, 0x10, 0x22, 0x22, 0x9f, 0x02, 0x0a, + 0x0c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, + 0x61, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x66, 0x61, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x77, 0x69, + 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, + 0x6e, 0x50, 0x72, 0x6f, 0x62, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x11, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, + 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x48, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x10, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x49, + 0x0a, 0x12, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x22, 0x7a, 0x0a, 0x16, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0xa5, 0x02, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x36, 0x0a, 0x0d, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x74, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x48, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, + 0x65, 0x74, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x49, 0x0a, 0x14, 0x74, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x74, 0x2e, + 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x12, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, + 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x32, 0xd8, 0x01, + 0x0a, 0x0c, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x42, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x18, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6e, 0x65, + 0x74, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x5e, 0x0a, 0x15, 0x45, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x6e, 0x65, + 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x0d, 0x2e, 0x6e, 0x65, 0x74, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6e, 0x67, 0x1a, 0x0d, 0x2e, 0x6e, 0x65, 0x74, 0x2e, + 0x50, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6e, 0x67, 0x32, 0x4e, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x6e, + 0x65, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x6e, 0x65, + 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_net_lp_rpc_proto_rawDescOnce sync.Once + file_net_lp_rpc_proto_rawDescData = file_net_lp_rpc_proto_rawDesc +) + +func file_net_lp_rpc_proto_rawDescGZIP() []byte { + file_net_lp_rpc_proto_rawDescOnce.Do(func() { + file_net_lp_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_net_lp_rpc_proto_rawDescData) + }) + return file_net_lp_rpc_proto_rawDescData +} + +var file_net_lp_rpc_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_net_lp_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_net_lp_rpc_proto_goTypes = []interface{}{ + (OSInfo_StorageType)(0), // 0: net.OSInfo.StorageType + (VideoProfile_Format)(0), // 1: net.VideoProfile.Format + (VideoProfile_Profile)(0), // 2: net.VideoProfile.Profile + (VideoProfile_VideoCodec)(0), // 3: net.VideoProfile.VideoCodec + (VideoProfile_ChromaSubsampling)(0), // 4: net.VideoProfile.ChromaSubsampling + (*PingPong)(nil), // 5: net.PingPong + (*EndTranscodingSessionRequest)(nil), // 6: net.EndTranscodingSessionRequest + (*EndTranscodingSessionResponse)(nil), // 7: net.EndTranscodingSessionResponse + (*OrchestratorRequest)(nil), // 8: net.OrchestratorRequest + (*OSInfo)(nil), // 9: net.OSInfo + (*S3OSInfo)(nil), // 10: net.S3OSInfo + (*PriceInfo)(nil), // 11: net.PriceInfo + (*Capabilities)(nil), // 12: net.Capabilities + (*OrchestratorInfo)(nil), // 13: net.OrchestratorInfo + (*AuthToken)(nil), // 14: net.AuthToken + (*SegData)(nil), // 15: net.SegData + (*SegParameters)(nil), // 16: net.SegParameters + (*VideoProfile)(nil), // 17: net.VideoProfile + (*TranscodedSegmentData)(nil), // 18: net.TranscodedSegmentData + (*TranscodeData)(nil), // 19: net.TranscodeData + (*TranscodeResult)(nil), // 20: net.TranscodeResult + (*RegisterRequest)(nil), // 21: net.RegisterRequest + (*NotifySegment)(nil), // 22: net.NotifySegment + (*TicketParams)(nil), // 23: net.TicketParams + (*TicketSenderParams)(nil), // 24: net.TicketSenderParams + (*TicketExpirationParams)(nil), // 25: net.TicketExpirationParams + (*Payment)(nil), // 26: net.Payment + nil, // 27: net.Capabilities.CapacitiesEntry + (*Capabilities_Constraints)(nil), // 28: net.Capabilities.Constraints + nil, // 29: net.Capabilities.ConstraintsEntry + (*Capabilities_Constraints_ModelConstraint)(nil), // 30: net.Capabilities.Constraints.ModelConstraint + nil, // 31: net.Capabilities.Constraints.ModelsEntry +} +var file_net_lp_rpc_proto_depIdxs = []int32{ + 14, // 0: net.EndTranscodingSessionRequest.auth_token:type_name -> net.AuthToken + 12, // 1: net.OrchestratorRequest.capabilities:type_name -> net.Capabilities + 0, // 2: net.OSInfo.storageType:type_name -> net.OSInfo.StorageType + 10, // 3: net.OSInfo.s3info:type_name -> net.S3OSInfo + 27, // 4: net.Capabilities.capacities:type_name -> net.Capabilities.CapacitiesEntry + 29, // 5: net.Capabilities.constraints:type_name -> net.Capabilities.ConstraintsEntry + 23, // 6: net.OrchestratorInfo.ticket_params:type_name -> net.TicketParams + 11, // 7: net.OrchestratorInfo.price_info:type_name -> net.PriceInfo + 12, // 8: net.OrchestratorInfo.capabilities:type_name -> net.Capabilities + 14, // 9: net.OrchestratorInfo.auth_token:type_name -> net.AuthToken + 9, // 10: net.OrchestratorInfo.storage:type_name -> net.OSInfo + 12, // 11: net.SegData.capabilities:type_name -> net.Capabilities + 14, // 12: net.SegData.auth_token:type_name -> net.AuthToken + 9, // 13: net.SegData.storage:type_name -> net.OSInfo + 17, // 14: net.SegData.fullProfiles:type_name -> net.VideoProfile + 17, // 15: net.SegData.fullProfiles2:type_name -> net.VideoProfile + 17, // 16: net.SegData.fullProfiles3:type_name -> net.VideoProfile + 16, // 17: net.SegData.segment_parameters:type_name -> net.SegParameters + 1, // 18: net.VideoProfile.format:type_name -> net.VideoProfile.Format + 2, // 19: net.VideoProfile.profile:type_name -> net.VideoProfile.Profile + 3, // 20: net.VideoProfile.encoder:type_name -> net.VideoProfile.VideoCodec + 4, // 21: net.VideoProfile.chromaFormat:type_name -> net.VideoProfile.ChromaSubsampling + 18, // 22: net.TranscodeData.segments:type_name -> net.TranscodedSegmentData + 19, // 23: net.TranscodeResult.data:type_name -> net.TranscodeData + 13, // 24: net.TranscodeResult.info:type_name -> net.OrchestratorInfo + 12, // 25: net.RegisterRequest.capabilities:type_name -> net.Capabilities + 15, // 26: net.NotifySegment.segData:type_name -> net.SegData + 25, // 27: net.TicketParams.expiration_params:type_name -> net.TicketExpirationParams + 23, // 28: net.Payment.ticket_params:type_name -> net.TicketParams + 25, // 29: net.Payment.expiration_params:type_name -> net.TicketExpirationParams + 24, // 30: net.Payment.ticket_sender_params:type_name -> net.TicketSenderParams + 11, // 31: net.Payment.expected_price:type_name -> net.PriceInfo + 31, // 32: net.Capabilities.Constraints.models:type_name -> net.Capabilities.Constraints.ModelsEntry + 28, // 33: net.Capabilities.ConstraintsEntry.value:type_name -> net.Capabilities.Constraints + 30, // 34: net.Capabilities.Constraints.ModelsEntry.value:type_name -> net.Capabilities.Constraints.ModelConstraint + 8, // 35: net.Orchestrator.GetOrchestrator:input_type -> net.OrchestratorRequest + 6, // 36: net.Orchestrator.EndTranscodingSession:input_type -> net.EndTranscodingSessionRequest + 5, // 37: net.Orchestrator.Ping:input_type -> net.PingPong + 21, // 38: net.Transcoder.RegisterTranscoder:input_type -> net.RegisterRequest + 13, // 39: net.Orchestrator.GetOrchestrator:output_type -> net.OrchestratorInfo + 7, // 40: net.Orchestrator.EndTranscodingSession:output_type -> net.EndTranscodingSessionResponse + 5, // 41: net.Orchestrator.Ping:output_type -> net.PingPong + 22, // 42: net.Transcoder.RegisterTranscoder:output_type -> net.NotifySegment + 39, // [39:43] is the sub-list for method output_type + 35, // [35:39] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name +} + +func init() { file_net_lp_rpc_proto_init() } +func file_net_lp_rpc_proto_init() { + if File_net_lp_rpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_net_lp_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingPong); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EndTranscodingSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EndTranscodingSessionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrchestratorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OSInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S3OSInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PriceInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Capabilities); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrchestratorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthToken); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SegData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SegParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TranscodedSegmentData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TranscodeData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TranscodeResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NotifySegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TicketParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TicketSenderParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TicketExpirationParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Payment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Capabilities_Constraints); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_net_lp_rpc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Capabilities_Constraints_ModelConstraint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_net_lp_rpc_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*TranscodeResult_Error)(nil), + (*TranscodeResult_Data)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_net_lp_rpc_proto_rawDesc, + NumEnums: 5, + NumMessages: 27, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_net_lp_rpc_proto_goTypes, + DependencyIndexes: file_net_lp_rpc_proto_depIdxs, + EnumInfos: file_net_lp_rpc_proto_enumTypes, + MessageInfos: file_net_lp_rpc_proto_msgTypes, + }.Build() + File_net_lp_rpc_proto = out.File + file_net_lp_rpc_proto_rawDesc = nil + file_net_lp_rpc_proto_goTypes = nil + file_net_lp_rpc_proto_depIdxs = nil } diff --git a/net/lp_rpc.proto b/net/lp_rpc.proto index bd3e6f1efa..0eddc9fee2 100644 --- a/net/lp_rpc.proto +++ b/net/lp_rpc.proto @@ -108,17 +108,8 @@ message Capabilities { // Capacity corresponding to each capability map capacities = 3; - string version = 4; - - Constraints constraints = 5; - - // Non-binary general constraints. - message Constraints { - string minVersion = 1; - } - // Non-binary capability constraints, such as supported ranges. - message CapabilityConstraints { + message Constraints { message ModelConstraint { bool warm = 1; } @@ -126,7 +117,7 @@ message Capabilities { map models = 1; } - map capabilityConstraints = 6; + map constraints = 4; } // The orchestrator sends this in response to `GetOrchestrator`, containing diff --git a/net/lp_rpc_grpc.pb.go b/net/lp_rpc_grpc.pb.go index fa1d80d2ec..3743d79756 100644 --- a/net/lp_rpc_grpc.pb.go +++ b/net/lp_rpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v3.21.12 +// - protoc-gen-go-grpc v1.2.0 +// - protoc v4.25.2 // source: net/lp_rpc.proto package net @@ -15,20 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Orchestrator_GetOrchestrator_FullMethodName = "/net.Orchestrator/GetOrchestrator" - Orchestrator_EndTranscodingSession_FullMethodName = "/net.Orchestrator/EndTranscodingSession" - Orchestrator_Ping_FullMethodName = "/net.Orchestrator/Ping" -) +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 // OrchestratorClient is the client API for Orchestrator service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// RPC calls implemented by the orchestrator type OrchestratorClient interface { // Called by the broadcaster to request transcoder info from an orchestrator. GetOrchestrator(ctx context.Context, in *OrchestratorRequest, opts ...grpc.CallOption) (*OrchestratorInfo, error) @@ -45,9 +37,8 @@ func NewOrchestratorClient(cc grpc.ClientConnInterface) OrchestratorClient { } func (c *orchestratorClient) GetOrchestrator(ctx context.Context, in *OrchestratorRequest, opts ...grpc.CallOption) (*OrchestratorInfo, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OrchestratorInfo) - err := c.cc.Invoke(ctx, Orchestrator_GetOrchestrator_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, "/net.Orchestrator/GetOrchestrator", in, out, opts...) if err != nil { return nil, err } @@ -55,9 +46,8 @@ func (c *orchestratorClient) GetOrchestrator(ctx context.Context, in *Orchestrat } func (c *orchestratorClient) EndTranscodingSession(ctx context.Context, in *EndTranscodingSessionRequest, opts ...grpc.CallOption) (*EndTranscodingSessionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EndTranscodingSessionResponse) - err := c.cc.Invoke(ctx, Orchestrator_EndTranscodingSession_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, "/net.Orchestrator/EndTranscodingSession", in, out, opts...) if err != nil { return nil, err } @@ -65,9 +55,8 @@ func (c *orchestratorClient) EndTranscodingSession(ctx context.Context, in *EndT } func (c *orchestratorClient) Ping(ctx context.Context, in *PingPong, opts ...grpc.CallOption) (*PingPong, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PingPong) - err := c.cc.Invoke(ctx, Orchestrator_Ping_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, "/net.Orchestrator/Ping", in, out, opts...) if err != nil { return nil, err } @@ -76,9 +65,7 @@ func (c *orchestratorClient) Ping(ctx context.Context, in *PingPong, opts ...grp // OrchestratorServer is the server API for Orchestrator service. // All implementations must embed UnimplementedOrchestratorServer -// for forward compatibility. -// -// RPC calls implemented by the orchestrator +// for forward compatibility type OrchestratorServer interface { // Called by the broadcaster to request transcoder info from an orchestrator. GetOrchestrator(context.Context, *OrchestratorRequest) (*OrchestratorInfo, error) @@ -87,12 +74,9 @@ type OrchestratorServer interface { mustEmbedUnimplementedOrchestratorServer() } -// UnimplementedOrchestratorServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedOrchestratorServer struct{} +// UnimplementedOrchestratorServer must be embedded to have forward compatible implementations. +type UnimplementedOrchestratorServer struct { +} func (UnimplementedOrchestratorServer) GetOrchestrator(context.Context, *OrchestratorRequest) (*OrchestratorInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOrchestrator not implemented") @@ -104,7 +88,6 @@ func (UnimplementedOrchestratorServer) Ping(context.Context, *PingPong) (*PingPo return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") } func (UnimplementedOrchestratorServer) mustEmbedUnimplementedOrchestratorServer() {} -func (UnimplementedOrchestratorServer) testEmbeddedByValue() {} // UnsafeOrchestratorServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to OrchestratorServer will @@ -114,13 +97,6 @@ type UnsafeOrchestratorServer interface { } func RegisterOrchestratorServer(s grpc.ServiceRegistrar, srv OrchestratorServer) { - // If the following call pancis, it indicates UnimplementedOrchestratorServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Orchestrator_ServiceDesc, srv) } @@ -134,7 +110,7 @@ func _Orchestrator_GetOrchestrator_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Orchestrator_GetOrchestrator_FullMethodName, + FullMethod: "/net.Orchestrator/GetOrchestrator", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrchestratorServer).GetOrchestrator(ctx, req.(*OrchestratorRequest)) @@ -152,7 +128,7 @@ func _Orchestrator_EndTranscodingSession_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Orchestrator_EndTranscodingSession_FullMethodName, + FullMethod: "/net.Orchestrator/EndTranscodingSession", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrchestratorServer).EndTranscodingSession(ctx, req.(*EndTranscodingSessionRequest)) @@ -170,7 +146,7 @@ func _Orchestrator_Ping_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Orchestrator_Ping_FullMethodName, + FullMethod: "/net.Orchestrator/Ping", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrchestratorServer).Ping(ctx, req.(*PingPong)) @@ -202,17 +178,13 @@ var Orchestrator_ServiceDesc = grpc.ServiceDesc{ Metadata: "net/lp_rpc.proto", } -const ( - Transcoder_RegisterTranscoder_FullMethodName = "/net.Transcoder/RegisterTranscoder" -) - // TranscoderClient is the client API for Transcoder service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TranscoderClient interface { // Called by the transcoder to register to an orchestrator. The orchestrator // notifies registered transcoders of segments as they come in. - RegisterTranscoder(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NotifySegment], error) + RegisterTranscoder(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (Transcoder_RegisterTranscoderClient, error) } type transcoderClient struct { @@ -223,13 +195,12 @@ func NewTranscoderClient(cc grpc.ClientConnInterface) TranscoderClient { return &transcoderClient{cc} } -func (c *transcoderClient) RegisterTranscoder(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NotifySegment], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Transcoder_ServiceDesc.Streams[0], Transcoder_RegisterTranscoder_FullMethodName, cOpts...) +func (c *transcoderClient) RegisterTranscoder(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (Transcoder_RegisterTranscoderClient, error) { + stream, err := c.cc.NewStream(ctx, &Transcoder_ServiceDesc.Streams[0], "/net.Transcoder/RegisterTranscoder", opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[RegisterRequest, NotifySegment]{ClientStream: stream} + x := &transcoderRegisterTranscoderClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -239,31 +210,41 @@ func (c *transcoderClient) RegisterTranscoder(ctx context.Context, in *RegisterR return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Transcoder_RegisterTranscoderClient = grpc.ServerStreamingClient[NotifySegment] +type Transcoder_RegisterTranscoderClient interface { + Recv() (*NotifySegment, error) + grpc.ClientStream +} + +type transcoderRegisterTranscoderClient struct { + grpc.ClientStream +} + +func (x *transcoderRegisterTranscoderClient) Recv() (*NotifySegment, error) { + m := new(NotifySegment) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} // TranscoderServer is the server API for Transcoder service. // All implementations must embed UnimplementedTranscoderServer -// for forward compatibility. +// for forward compatibility type TranscoderServer interface { // Called by the transcoder to register to an orchestrator. The orchestrator // notifies registered transcoders of segments as they come in. - RegisterTranscoder(*RegisterRequest, grpc.ServerStreamingServer[NotifySegment]) error + RegisterTranscoder(*RegisterRequest, Transcoder_RegisterTranscoderServer) error mustEmbedUnimplementedTranscoderServer() } -// UnimplementedTranscoderServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedTranscoderServer struct{} +// UnimplementedTranscoderServer must be embedded to have forward compatible implementations. +type UnimplementedTranscoderServer struct { +} -func (UnimplementedTranscoderServer) RegisterTranscoder(*RegisterRequest, grpc.ServerStreamingServer[NotifySegment]) error { +func (UnimplementedTranscoderServer) RegisterTranscoder(*RegisterRequest, Transcoder_RegisterTranscoderServer) error { return status.Errorf(codes.Unimplemented, "method RegisterTranscoder not implemented") } func (UnimplementedTranscoderServer) mustEmbedUnimplementedTranscoderServer() {} -func (UnimplementedTranscoderServer) testEmbeddedByValue() {} // UnsafeTranscoderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TranscoderServer will @@ -273,13 +254,6 @@ type UnsafeTranscoderServer interface { } func RegisterTranscoderServer(s grpc.ServiceRegistrar, srv TranscoderServer) { - // If the following call pancis, it indicates UnimplementedTranscoderServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Transcoder_ServiceDesc, srv) } @@ -288,11 +262,21 @@ func _Transcoder_RegisterTranscoder_Handler(srv interface{}, stream grpc.ServerS if err := stream.RecvMsg(m); err != nil { return err } - return srv.(TranscoderServer).RegisterTranscoder(m, &grpc.GenericServerStream[RegisterRequest, NotifySegment]{ServerStream: stream}) + return srv.(TranscoderServer).RegisterTranscoder(m, &transcoderRegisterTranscoderServer{stream}) +} + +type Transcoder_RegisterTranscoderServer interface { + Send(*NotifySegment) error + grpc.ServerStream } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Transcoder_RegisterTranscoderServer = grpc.ServerStreamingServer[NotifySegment] +type transcoderRegisterTranscoderServer struct { + grpc.ServerStream +} + +func (x *transcoderRegisterTranscoderServer) Send(m *NotifySegment) error { + return x.ServerStream.SendMsg(m) +} // Transcoder_ServiceDesc is the grpc.ServiceDesc for Transcoder service. // It's only intended for direct use with grpc.RegisterService, diff --git a/net/redeemer.pb.go b/net/redeemer.pb.go index 87d1869b4d..132a70cf49 100644 --- a/net/redeemer.pb.go +++ b/net/redeemer.pb.go @@ -319,6 +319,7 @@ func file_net_redeemer_proto_init() { if File_net_redeemer_proto != nil { return } + file_net_lp_rpc_proto_init() if !protoimpl.UnsafeEnabled { file_net_redeemer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ticket); i { diff --git a/pm/recipient.go b/pm/recipient.go index 4c20281756..1c2333a5bb 100644 --- a/pm/recipient.go +++ b/pm/recipient.go @@ -43,7 +43,7 @@ type Recipient interface { RedeemWinningTicket(ticket *Ticket, sig []byte, seed *big.Int) error // TicketParams returns the recipient's currently accepted ticket parameters - // for a provided sender ETH address + // for a provided sender ETH adddress TicketParams(sender ethcommon.Address, price *big.Rat) (*TicketParams, error) // TxCostMultiplier returns the tx cost multiplier for an address diff --git a/pm/sender.go b/pm/sender.go index 6f6acf0fd4..db178bfc5b 100644 --- a/pm/sender.go +++ b/pm/sender.go @@ -113,7 +113,7 @@ func (s *sender) CreateTicketBatch(sessionID string, size int) (*TicketBatch, er ticketParams := &session.ticketParams expirationParams := ticketParams.ExpirationParams - // Ensure backwards compatibility + // Ensure backwards compatbility // If no expirationParams are included by O // B sets the values based upon its last seen round if expirationParams == nil || expirationParams.CreationRound == 0 || expirationParams.CreationRoundBlockHash == (ethcommon.Hash{}) { diff --git a/pm/stub.go b/pm/stub.go index a3e0f7f224..856bb9416f 100644 --- a/pm/stub.go +++ b/pm/stub.go @@ -466,7 +466,7 @@ func (m *MockRecipient) RedeemWinningTicket(ticket *Ticket, sig []byte, seed *bi } // TicketParams returns the recipient's currently accepted ticket parameters -// for a provided sender ETH address +// for a provided sender ETH adddress func (m *MockRecipient) TicketParams(sender ethcommon.Address, price *big.Rat) (*TicketParams, error) { args := m.Called(sender, price) diff --git a/server/ai_session.go b/server/ai_session.go index 3a6c28207d..6274e397d5 100644 --- a/server/ai_session.go +++ b/server/ai_session.go @@ -259,7 +259,7 @@ func (sel *AISessionSelector) Refresh(ctx context.Context) error { var coldSessions []*BroadcastSession for _, sess := range sessions { // If the constraints are missing for this capability skip this session - constraints, ok := sess.OrchestratorInfo.Capabilities.CapabilityConstraints[uint32(sel.cap)] + constraints, ok := sess.OrchestratorInfo.Capabilities.Constraints[uint32(sel.cap)] if !ok { continue } @@ -288,7 +288,7 @@ func (sel *AISessionSelector) Refresh(ctx context.Context) error { func (sel *AISessionSelector) getSessions(ctx context.Context) ([]*BroadcastSession, error) { // No warm constraints applied here because we don't want to filter out orchs based on warm criteria at discovery time // Instead, we want all orchs that support the model and then will filter for orchs that have a warm model separately - capabilityConstraints := map[core.Capability]*core.PerCapabilityConstraints{ + constraints := map[core.Capability]*core.Constraints{ sel.cap: { Models: map[string]*core.ModelConstraint{ sel.modelID: { @@ -297,8 +297,7 @@ func (sel *AISessionSelector) getSessions(ctx context.Context) ([]*BroadcastSess }, }, } - caps := core.NewCapabilitiesWithConstraints(append(core.DefaultCapabilities(), sel.cap), nil, core.Constraints{}, capabilityConstraints) - caps.SetMinVersionConstraint(sel.node.Capabilities.MinVersionConstraint()) + caps := core.NewCapabilitiesWithConstraints(append(core.DefaultCapabilities(), sel.cap), nil, constraints) // Set numOrchs to the pool size so that discovery tries to find maximum # of compatible orchs within a timeout numOrchs := sel.node.OrchestratorPool.Size() diff --git a/server/broadcast.go b/server/broadcast.go index df854cc48f..bb0a8344fc 100755 --- a/server/broadcast.go +++ b/server/broadcast.go @@ -56,7 +56,7 @@ var submitMultiSession = func(ctx context.Context, sess *BroadcastSession, seg * var maxTranscodeAttempts = errors.New("hit max transcode attempts") type BroadcastConfig struct { - maxPrice *core.AutoConvertedPrice + maxPrice *big.Rat mu sync.RWMutex } @@ -68,19 +68,16 @@ type SegFlightMetadata struct { func (cfg *BroadcastConfig) MaxPrice() *big.Rat { cfg.mu.RLock() defer cfg.mu.RUnlock() - if cfg.maxPrice == nil { - return nil - } - return cfg.maxPrice.Value() + return cfg.maxPrice } -func (cfg *BroadcastConfig) SetMaxPrice(price *core.AutoConvertedPrice) { +func (cfg *BroadcastConfig) SetMaxPrice(price *big.Rat) { cfg.mu.Lock() defer cfg.mu.Unlock() - prevPrice := cfg.maxPrice cfg.maxPrice = price - if prevPrice != nil { - prevPrice.Stop() + + if monitor.Enabled { + monitor.MaxTranscodingPrice(price) } } @@ -288,9 +285,7 @@ func (sp *SessionPool) selectSessions(ctx context.Context, sessionsNum int) []*B checkSessions := func(m *SessionPool) bool { numSess := m.sel.Size() - refreshThreshold := int(math.Min(maxRefreshSessionsThreshold, math.Ceil(float64(m.numOrchs)/2.0))) - clog.Infof(ctx, "Checking if the session refresh is needed, numSess=%v, refreshThreshold=%v", numSess, refreshThreshold) - if numSess < refreshThreshold { + if numSess < int(math.Min(maxRefreshSessionsThreshold, math.Ceil(float64(m.numOrchs)/2.0))) { go m.refreshSessions(ctx) } return (numSess > 0 || len(sp.lastSess) > 0) @@ -450,9 +445,6 @@ func (bsm *BroadcastSessionsManager) shouldSkipVerification(sessions []*Broadcas } func NewSessionManager(ctx context.Context, node *core.LivepeerNode, params *core.StreamParameters, sel BroadcastSessionsSelectorFactory) *BroadcastSessionsManager { - if node.Capabilities != nil { - params.Capabilities.SetMinVersionConstraint(node.Capabilities.MinVersionConstraint()) - } var trustedPoolSize, untrustedPoolSize float64 if node.OrchestratorPool != nil { trustedPoolSize = float64(node.OrchestratorPool.SizeWith(common.ScoreAtLeast(common.Score_Trusted))) diff --git a/server/handlers.go b/server/handlers.go index e953156543..23992a165b 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -23,7 +23,6 @@ import ( "github.com/livepeer/go-livepeer/core" "github.com/livepeer/go-livepeer/eth" "github.com/livepeer/go-livepeer/eth/types" - "github.com/livepeer/go-livepeer/monitor" "github.com/livepeer/go-livepeer/pm" "github.com/livepeer/lpms/ffmpeg" "github.com/pkg/errors" @@ -32,12 +31,6 @@ import ( const MainnetChainId = 1 const RinkebyChainId = 4 -func (s *LivepeerServer) healthzHandler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - respondOk(w, nil) - }) -} - // Status func (s *LivepeerServer) statusHandler() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -135,7 +128,6 @@ func setBroadcastConfigHandler() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { pricePerUnit := r.FormValue("maxPricePerUnit") pixelsPerUnit := r.FormValue("pixelsPerUnit") - currency := r.FormValue("currency") transcodingOptions := r.FormValue("transcodingOptions") if (pricePerUnit == "" || pixelsPerUnit == "") && transcodingOptions == "" { @@ -145,38 +137,28 @@ func setBroadcastConfigHandler() http.Handler { // set max price if pricePerUnit != "" && pixelsPerUnit != "" { - pr, ok := new(big.Rat).SetString(pricePerUnit) - if !ok { - respond400(w, fmt.Sprintf("Error parsing pricePerUnit value: %s", pricePerUnit)) + pr, err := strconv.ParseInt(pricePerUnit, 10, 64) + if err != nil { + respond400(w, errors.Wrapf(err, "Error converting string to int64").Error()) return } - px, ok := new(big.Rat).SetString(pixelsPerUnit) - if !ok { - respond400(w, fmt.Sprintf("Error parsing pixelsPerUnit value: %s", pixelsPerUnit)) + px, err := strconv.ParseInt(pixelsPerUnit, 10, 64) + if err != nil { + respond400(w, errors.Wrapf(err, "Error converting string to int64").Error()) return } - if px.Sign() <= 0 { - respond400(w, fmt.Sprintf("pixels per unit must be greater than 0, provided %v", pixelsPerUnit)) + if px <= 0 { + respond400(w, fmt.Sprintf("pixels per unit must be greater than 0, provided %d", px)) return } - pricePerPixel := new(big.Rat).Quo(pr, px) - - var autoPrice *core.AutoConvertedPrice - if pricePerPixel.Sign() > 0 { - var err error - autoPrice, err = core.NewAutoConvertedPrice(currency, pricePerPixel, func(price *big.Rat) { - if monitor.Enabled { - monitor.MaxTranscodingPrice(price) - } - glog.Infof("Maximum transcoding price: %v wei per pixel\n", price.FloatString(3)) - }) - if err != nil { - respond400(w, errors.Wrap(err, "error converting price").Error()) - return - } + + var price *big.Rat + if pr > 0 { + price = big.NewRat(pr, px) } - BroadcastCfg.SetMaxPrice(autoPrice) + BroadcastCfg.SetMaxPrice(price) + glog.Infof("Maximum transcoding price: %d per %q pixels\n", pr, px) } // set broadcast profiles @@ -312,8 +294,7 @@ func (s *LivepeerServer) activateOrchestratorHandler(client eth.LivepeerEthClien return } - pricePerUnit, pixelsPerUnit, currency := r.FormValue("pricePerUnit"), r.FormValue("pixelsPerUnit"), r.FormValue("currency") - if err := s.setOrchestratorPriceInfo("default", pricePerUnit, pixelsPerUnit, currency); err != nil { + if err := s.setOrchestratorPriceInfo("default", r.FormValue("pricePerUnit"), r.FormValue("pixelsPerUnit")); err != nil { respond400(w, err.Error()) return } @@ -407,9 +388,8 @@ func (s *LivepeerServer) setOrchestratorConfigHandler(client eth.LivepeerEthClie return mustHaveClient(client, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { pixels := r.FormValue("pixelsPerUnit") price := r.FormValue("pricePerUnit") - currency := r.FormValue("currency") if pixels != "" && price != "" { - if err := s.setOrchestratorPriceInfo("default", price, pixels, currency); err != nil { + if err := s.setOrchestratorPriceInfo("default", price, pixels); err != nil { respond400(w, err.Error()) return } @@ -481,43 +461,53 @@ func (s *LivepeerServer) setOrchestratorConfigHandler(client eth.LivepeerEthClie })) } -func (s *LivepeerServer) setOrchestratorPriceInfo(broadcasterEthAddr, pricePerUnitStr, pixelsPerUnitStr, currency string) error { - ok, err := regexp.MatchString("^0x[0-9a-fA-F]{40}|default$", broadcasterEthAddr) +func (s *LivepeerServer) setOrchestratorPriceInfo(broadcasterEthAddr, pricePerUnitStr, pixelsPerUnitStr string) error { + ok, err := regexp.MatchString("^[0-9]+$", pricePerUnitStr) if err != nil { return err } if !ok { - return fmt.Errorf("broadcasterEthAddr is not a valid eth address, provided %v", broadcasterEthAddr) + return fmt.Errorf("pricePerUnit is not a valid integer, provided %v", pricePerUnitStr) } - pricePerUnit, ok := new(big.Rat).SetString(pricePerUnitStr) - if !ok { - return fmt.Errorf("error parsing pricePerUnit value: %s", pricePerUnitStr) + ok, err = regexp.MatchString("^[0-9]+$", pixelsPerUnitStr) + if err != nil { + return err } - if pricePerUnit.Sign() < 0 { - return fmt.Errorf("price unit must be greater than or equal to 0, provided %s", pricePerUnitStr) + if !ok { + return fmt.Errorf("pixelsPerUnit is not a valid integer, provided %v", pixelsPerUnitStr) } - pixelsPerUnit, ok := new(big.Rat).SetString(pixelsPerUnitStr) + ok, err = regexp.MatchString("^0x[0-9a-fA-F]{40}|default$", broadcasterEthAddr) + if err != nil { + return err + } if !ok { - return fmt.Errorf("error parsing pixelsPerUnit value: %v", pixelsPerUnitStr) + return fmt.Errorf("broadcasterEthAddr is not a valid eth address, provided %v", broadcasterEthAddr) } - if pixelsPerUnit.Sign() <= 0 { - return fmt.Errorf("pixels per unit must be greater than 0, provided %s", pixelsPerUnitStr) + + pricePerUnit, err := strconv.ParseInt(pricePerUnitStr, 10, 64) + if err != nil { + return fmt.Errorf("error converting pricePerUnit string to int64: %v", err) + } + if pricePerUnit < 0 { + return fmt.Errorf("price unit must be greater than or equal to 0, provided %d", pricePerUnit) } - pricePerPixel := new(big.Rat).Quo(pricePerUnit, pixelsPerUnit) - autoPrice, err := core.NewAutoConvertedPrice(currency, pricePerPixel, func(price *big.Rat) { - if broadcasterEthAddr == "default" { - glog.Infof("Price: %v wei per pixel\n ", price.FloatString(3)) - } else { - glog.Infof("Price: %v wei per pixel for broadcaster %v", price.FloatString(3), broadcasterEthAddr) - } - }) + pixelsPerUnit, err := strconv.ParseInt(pixelsPerUnitStr, 10, 64) if err != nil { - return fmt.Errorf("error converting price: %v", err) + return fmt.Errorf("error converting pixelsPerUnit string to int64: %v", err) + } + if pixelsPerUnit <= 0 { + return fmt.Errorf("pixels per unit must be greater than 0, provided %d", pixelsPerUnit) + } + + s.LivepeerNode.SetBasePrice(broadcasterEthAddr, big.NewRat(pricePerUnit, pixelsPerUnit)) + if broadcasterEthAddr == "default" { + glog.Infof("Price per pixel set to %d wei for %d pixels\n", pricePerUnit, pixelsPerUnit) + } else { + glog.Infof("Price per pixel set to %d wei for %d pixels for broadcaster %s\n", pricePerUnit, pixelsPerUnit, broadcasterEthAddr) } - s.LivepeerNode.SetBasePrice(broadcasterEthAddr, autoPrice) return nil } @@ -577,10 +567,9 @@ func (s *LivepeerServer) setPriceForBroadcaster() http.Handler { if s.LivepeerNode.NodeType == core.OrchestratorNode { pricePerUnitStr := r.FormValue("pricePerUnit") pixelsPerUnitStr := r.FormValue("pixelsPerUnit") - currency := r.FormValue("currency") broadcasterEthAddr := r.FormValue("broadcasterEthAddr") - err := s.setOrchestratorPriceInfo(broadcasterEthAddr, pricePerUnitStr, pixelsPerUnitStr, currency) + err := s.setOrchestratorPriceInfo(broadcasterEthAddr, pricePerUnitStr, pixelsPerUnitStr) if err == nil { respondOk(w, []byte(fmt.Sprintf("Price per pixel set to %s wei for %s pixels for broadcaster %s\n", pricePerUnitStr, pixelsPerUnitStr, broadcasterEthAddr))) } else { diff --git a/server/handlers_test.go b/server/handlers_test.go index d191d0a75e..aa01fe88cc 100644 --- a/server/handlers_test.go +++ b/server/handlers_test.go @@ -116,7 +116,7 @@ func TestOrchestratorInfoHandler_Success(t *testing.T) { s := &LivepeerServer{LivepeerNode: n} price := big.NewRat(1, 2) - s.LivepeerNode.SetBasePrice("default", core.NewFixedPrice(price)) + s.LivepeerNode.SetBasePrice("default", price) trans := &types.Transcoder{ ServiceURI: "127.0.0.1:8935", @@ -196,7 +196,7 @@ func TestSetBroadcastConfigHandler_ConvertPricePerUnitError(t *testing.T) { }) assert.Equal(http.StatusBadRequest, status) - assert.Contains(body, "Error parsing pricePerUnit value") + assert.Contains(body, "Error converting string to int64") } func TestSetBroadcastConfigHandler_ConvertPixelsPerUnitError(t *testing.T) { @@ -209,7 +209,7 @@ func TestSetBroadcastConfigHandler_ConvertPixelsPerUnitError(t *testing.T) { }) assert.Equal(http.StatusBadRequest, status) - assert.Contains(body, "Error parsing pixelsPerUnit value") + assert.Contains(body, "Error converting string to int64") } func TestSetBroadcastConfigHandler_NegativePixelPerUnitError(t *testing.T) { @@ -259,7 +259,7 @@ func TestSetBroadcastConfigHandler_Success(t *testing.T) { func TestGetBroadcastConfigHandler(t *testing.T) { assert := assert.New(t) - BroadcastCfg.maxPrice = core.NewFixedPrice(big.NewRat(1, 2)) + BroadcastCfg.maxPrice = big.NewRat(1, 2) BroadcastJobVideoProfiles = []ffmpeg.VideoProfile{ ffmpeg.VideoProfileLookup["P240p25fps16x9"], } @@ -501,32 +501,27 @@ func TestSetOrchestratorPriceInfo(t *testing.T) { s := stubServer() // pricePerUnit is not an integer - err := s.setOrchestratorPriceInfo("default", "nil", "1", "") + err := s.setOrchestratorPriceInfo("default", "nil", "1") assert.Error(t, err) - assert.Contains(t, err.Error(), "error parsing pricePerUnit value") + assert.True(t, strings.Contains(err.Error(), "pricePerUnit is not a valid integer")) // pixelsPerUnit is not an integer - err = s.setOrchestratorPriceInfo("default", "1", "nil", "") + err = s.setOrchestratorPriceInfo("default", "1", "nil") assert.Error(t, err) - assert.Contains(t, err.Error(), "error parsing pixelsPerUnit value") + assert.True(t, strings.Contains(err.Error(), "pixelsPerUnit is not a valid integer")) - // price feed watcher is not initialized and one attempts a custom currency - err = s.setOrchestratorPriceInfo("default", "1e12", "0.7", "USD") - assert.Error(t, err) - assert.Contains(t, err.Error(), "PriceFeedWatcher is not initialized") - - err = s.setOrchestratorPriceInfo("default", "1", "1", "") + err = s.setOrchestratorPriceInfo("default", "1", "1") assert.Nil(t, err) assert.Zero(t, s.LivepeerNode.GetBasePrice("default").Cmp(big.NewRat(1, 1))) - err = s.setOrchestratorPriceInfo("default", "-5", "1", "") - assert.EqualError(t, err, fmt.Sprintf("price unit must be greater than or equal to 0, provided %d", -5)) + err = s.setOrchestratorPriceInfo("default", "-5", "1") + assert.EqualErrorf(t, err, err.Error(), "price unit must be greater than or equal to 0, provided %d\n", -5) // pixels per unit <= 0 - err = s.setOrchestratorPriceInfo("default", "1", "0", "") - assert.EqualError(t, err, fmt.Sprintf("pixels per unit must be greater than 0, provided %d", 0)) - err = s.setOrchestratorPriceInfo("default", "1", "-5", "") - assert.EqualError(t, err, fmt.Sprintf("pixels per unit must be greater than 0, provided %d", -5)) + err = s.setOrchestratorPriceInfo("default", "1", "0") + assert.EqualErrorf(t, err, err.Error(), "pixels per unit must be greater than 0, provided %d\n", 0) + err = s.setOrchestratorPriceInfo("default", "1", "-5") + assert.EqualErrorf(t, err, err.Error(), "pixels per unit must be greater than 0, provided %d\n", -5) } func TestSetPriceForBroadcasterHandler(t *testing.T) { diff --git a/server/mediaserver.go b/server/mediaserver.go index 1e1b1be154..72a445ffb6 100644 --- a/server/mediaserver.go +++ b/server/mediaserver.go @@ -44,15 +44,12 @@ import ( "github.com/patrickmn/go-cache" ) -var ( - errAlreadyExists = errors.New("StreamAlreadyExists") - errStorage = errors.New("ErrStorage") - errDiscovery = errors.New("ErrDiscovery") - errNoOrchs = errors.New("ErrNoOrchs") - errUnknownStream = errors.New("ErrUnknownStream") - errMismatchedParams = errors.New("Mismatched type for stream params") - errForbidden = errors.New("authentication denied") -) +var errAlreadyExists = errors.New("StreamAlreadyExists") +var errStorage = errors.New("ErrStorage") +var errDiscovery = errors.New("ErrDiscovery") +var errNoOrchs = errors.New("ErrNoOrchs") +var errUnknownStream = errors.New("ErrUnknownStream") +var errMismatchedParams = errors.New("Mismatched type for stream params") const HLSWaitInterval = time.Second const HLSBufferCap = uint(43200) //12 hrs assuming 1s segment @@ -206,9 +203,6 @@ func (s *LivepeerServer) StartMediaServer(ctx context.Context, httpAddr string) // Store ctx to later use as cancel signal for watchdog goroutine s.context = ctx - // health endpoint - s.HTTPMux.Handle("/healthz", s.healthzHandler()) - //LPMS handlers for handling RTMP video s.LPMS.HandleRTMPPublish(createRTMPStreamIDHandler(ctx, s, nil), gotRTMPStreamHandler(s), endRTMPStreamHandler(s)) s.LPMS.HandleRTMPPlay(getRTMPStreamHandler(s)) @@ -246,8 +240,8 @@ func (s *LivepeerServer) StartMediaServer(ctx context.Context, httpAddr string) } // RTMP Publish Handlers -func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookResponseOverride *authWebhookResponse) func(url *url.URL) (strmID stream.AppData, e error) { - return func(url *url.URL) (strmID stream.AppData, e error) { +func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookResponseOverride *authWebhookResponse) func(url *url.URL) (strmID stream.AppData) { + return func(url *url.URL) (strmID stream.AppData) { //Check HTTP header for ManifestID //If ManifestID is passed in HTTP header, use that one //Else check webhook for ManifestID @@ -269,8 +263,8 @@ func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookR // do not replace captured _ctx variable ctx := clog.AddNonce(_ctx, nonce) if resp, err = authenticateStream(AuthWebhookURL, url.String()); err != nil { - clog.Errorf(ctx, fmt.Sprintf("Forbidden: Authentication denied for streamID url=%s err=%q", url.String(), err)) - return nil, errForbidden + clog.Errorf(ctx, "Authentication denied for streamID url=%s err=%q", url.String(), err) + return nil } // If we've received auth in header AND callback URL forms then for now, we reject cases where they're @@ -278,7 +272,7 @@ func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookR if resp != nil && webhookResponseOverride != nil { if !resp.areProfilesEqual(*webhookResponseOverride) { clog.Errorf(ctx, "Received auth header with profiles that don't match those in callback URL response") - return nil, fmt.Errorf("Received auth header with profiles that don't match those in callback URL response") + return nil } } @@ -300,9 +294,8 @@ func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookR parsedProfiles, err := ffmpeg.ParseProfilesFromJsonProfileArray(resp.Profiles) if err != nil { - errMsg := fmt.Sprintf("Failed to parse JSON video profile for streamID url=%s err=%q", url.String(), err) - clog.Errorf(ctx, errMsg) - return nil, fmt.Errorf(errMsg) + clog.Errorf(ctx, "Failed to parse JSON video profile for streamID url=%s err=%q", url.String(), err) + return nil } profiles = append(profiles, parsedProfiles...) @@ -315,18 +308,16 @@ func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookR if resp.ObjectStore != "" { os, err = drivers.ParseOSURL(resp.ObjectStore, false) if err != nil { - errMsg := fmt.Sprintf("Failed to parse object store url for streamID url=%s err=%q", url.String(), err) - clog.Errorf(ctx, errMsg) - return nil, fmt.Errorf(errMsg) + clog.Errorf(ctx, "Failed to parse object store url for streamID url=%s err=%q", url.String(), err) + return nil } } // set Recording OS if it was provided if resp.RecordObjectStore != "" { ros, err = drivers.ParseOSURL(resp.RecordObjectStore, true) if err != nil { - errMsg := fmt.Sprintf("Failed to parse recording object store url for streamID url=%s err=%q", url.String(), err) - clog.Errorf(ctx, errMsg) - return nil, fmt.Errorf(errMsg) + clog.Errorf(ctx, "Failed to parse recording object store url for streamID url=%s err=%q", url.String(), err) + return nil } } @@ -362,10 +353,8 @@ func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookR s.connectionLock.RLock() defer s.connectionLock.RUnlock() if core.MaxSessions > 0 && len(s.rtmpConnections) >= core.MaxSessions { - errMsg := fmt.Sprintf("Too many connections for streamID url=%s err=%q", url.String(), err) - clog.Errorf(ctx, errMsg) - return nil, fmt.Errorf(errMsg) - + clog.Errorf(ctx, "Too many connections for streamID url=%s err=%q", url.String(), err) + return nil } return &core.StreamParameters{ ManifestID: mid, @@ -378,7 +367,7 @@ func createRTMPStreamIDHandler(_ctx context.Context, s *LivepeerServer, webhookR RecordOS: ross, VerificationFreq: VerificationFreq, Nonce: nonce, - }, nil + } } } @@ -451,7 +440,6 @@ func gotRTMPStreamHandler(s *LivepeerServer) func(url *url.URL, rtmpStrm stream. func endRTMPStreamHandler(s *LivepeerServer) func(url *url.URL, rtmpStrm stream.RTMPVideoStream) error { return func(url *url.URL, rtmpStrm stream.RTMPVideoStream) error { params := streamParams(rtmpStrm.AppData()) - params.Capabilities.SetMinVersionConstraint(s.LivepeerNode.Capabilities.MinVersionConstraint()) if params == nil { return errMismatchedParams } @@ -838,15 +826,10 @@ func (s *LivepeerServer) HandlePush(w http.ResponseWriter, r *http.Request) { // Check for presence and register if a fresh cxn if !exists { - appData, err := (createRTMPStreamIDHandler(ctx, s, authHeaderConfig))(r.URL) - if err != nil { - if errors.Is(err, errForbidden) { - errorOut(http.StatusForbidden, "Could not create stream ID: url=%s", r.URL) - return - } else { - errorOut(http.StatusInternalServerError, "Could not create stream ID: url=%s", r.URL) - return - } + appData := (createRTMPStreamIDHandler(ctx, s, authHeaderConfig))(r.URL) + if appData == nil { + errorOut(http.StatusInternalServerError, "Could not create stream ID: url=%s", r.URL) + return } params := streamParams(appData) if authHeaderConfig != nil { diff --git a/server/mediaserver_test.go b/server/mediaserver_test.go index 595c4e29ab..79b4f611fb 100644 --- a/server/mediaserver_test.go +++ b/server/mediaserver_test.go @@ -438,9 +438,7 @@ func TestCreateRTMPStreamHandlerCap(t *testing.T) { oldMaxSessions := core.MaxSessions core.MaxSessions = 1 // happy case - id, err := createSid(u) - require.NoError(t, err) - sid := id.(*core.StreamParameters) + sid := createSid(u).(*core.StreamParameters) mid := sid.ManifestID if mid != "id1" { t.Error("Stream should be allowd", sid) @@ -450,8 +448,7 @@ func TestCreateRTMPStreamHandlerCap(t *testing.T) { } s.rtmpConnections[core.ManifestID("id1")] = nil // capped case - params, err := createSid(u) - require.Error(t, err) + params := createSid(u) if params != nil { t.Error("Stream should be denied because of capacity cap") } @@ -463,7 +460,7 @@ type authWebhookReq struct { } func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { - assert := require.New(t) + assert := assert.New(t) s, cancel := setupServerWithCancel() defer serverCleanup(s) defer cancel() @@ -472,8 +469,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { AuthWebhookURL = mustParseUrl(t, "http://localhost:8938/notexisting") u := mustParseUrl(t, "http://hot/something/id1") - sid, err := createSid(u) - assert.Error(err) + sid := createSid(u) assert.Nil(sid, "Webhook auth failed") ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -490,8 +486,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { })) defer ts.Close() AuthWebhookURL = mustParseUrl(t, ts.URL) - sid, err = createSid(u) - assert.NoError(err) + sid = createSid(u) assert.NotNil(sid, "On empty response with 200 code should pass") // local helper to reduce boilerplate @@ -508,23 +503,19 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { // empty manifestID ts2 := makeServer(`{"manifestID":""}`) defer ts2.Close() - sid, err = createSid(u) - assert.Error(err) + sid = createSid(u) assert.Nil(sid, "Should not pass if returned manifest id is empty") // invalid json ts3 := makeServer(`{manifestID:"XX"}`) defer ts3.Close() - sid, err = createSid(u) - assert.Error(err) + sid = createSid(u) assert.Nil(sid, "Should not pass if returned json is invalid") // set manifestID ts4 := makeServer(`{"manifestID":"xy"}`) defer ts4.Close() - p, err := createSid(u) - assert.NoError(err) - params := p.(*core.StreamParameters) + params := createSid(u).(*core.StreamParameters) mid := params.ManifestID assert.Equal(core.ManifestID("xy"), mid, "Should set manifest id to one provided by webhook") @@ -535,9 +526,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { // set manifestID + streamKey ts5 := makeServer(`{"manifestID":"xyz", "streamKey":"zyx"}`) defer ts5.Close() - id, err := createSid(u) - require.NoError(t, err) - params = id.(*core.StreamParameters) + params = createSid(u).(*core.StreamParameters) mid = params.ManifestID assert.Equal(core.ManifestID("xyz"), mid, "Should set manifest to one provided by webhook") assert.Equal("xyz/zyx", params.StreamID(), "Should set streamkey to one provided by webhook") @@ -546,9 +535,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { // set presets (with some invalid) ts6 := makeServer(`{"manifestID":"a", "presets":["P240p30fps16x9", "unknown", "P720p30fps16x9"]}`) defer ts6.Close() - strmID, err := createSid(u) - require.NoError(t, err) - params = strmID.(*core.StreamParameters) + params = createSid(u).(*core.StreamParameters) assert.Len(params.Profiles, 2) assert.Equal(params.Profiles, []ffmpeg.VideoProfile{ffmpeg.P240p30fps16x9, ffmpeg.P720p30fps16x9}, "Did not have matching presets") @@ -560,9 +547,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { {"name": "passthru_fps", "bitrate": 890, "width": 789, "height": 654, "profile": "H264ConstrainedHigh", "gop":"123"}, {"name": "gop0", "bitrate": 800, "width": 400, "height": 220, "profile": "H264ConstrainedHigh", "gop":"0.0"}]}`) defer ts7.Close() - data, err := createSid(u) - require.NoError(t, err) - params = data.(*core.StreamParameters) + params = createSid(u).(*core.StreamParameters) assert.Len(params.Profiles, 4) expectedProfiles := []ffmpeg.VideoProfile{ @@ -612,9 +597,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { {"name": "prof1", "bitrate": 432, "fps": 560, "width": 123, "height": 456}, {"name": "prof2", "bitrate": 765, "fps": 876, "width": 456, "height": "hello"}]}`) defer ts8.Close() - appData, err := createSid(u) - require.Error(t, err) - params, ok := appData.(*core.StreamParameters) + params, ok := createSid(u).(*core.StreamParameters) assert.False(ok) assert.Nil(params) @@ -626,9 +609,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { {"name": "gop0", "bitrate": 800, "width": 400, "height": 220, "profile": "H264ConstrainedHigh", "gop":"0.0"}]}`) defer ts9.Close() - i, err := createSid(u) - require.NoError(t, err) - params = i.(*core.StreamParameters) + params = createSid(u).(*core.StreamParameters) jointProfiles := append([]ffmpeg.VideoProfile{ffmpeg.P240p30fps16x9, ffmpeg.P720p30fps16x9}, expectedProfiles...) assert.Len(params.Profiles, 6) @@ -637,9 +618,7 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { // all invalid presets in webhook should lead to empty set ts10 := makeServer(`{"manifestID":"a", "presets":["very", "unknown"]}`) defer ts10.Close() - id2, err := createSid(u) - require.NoError(t, err) - params = id2.(*core.StreamParameters) + params = createSid(u).(*core.StreamParameters) assert.Len(params.Profiles, 0, "Unexpected value in presets") // invalid gops @@ -657,31 +636,25 @@ func TestCreateRTMPStreamHandlerWebhook(t *testing.T) { // intra only gop ts14 := makeServer(`{"manifestID":"a", "profiles": [ {"gop": "intra" }]}`) defer ts14.Close() - id3, err := createSid(u) - require.NoError(t, err) - params = id3.(*core.StreamParameters) + params = createSid(u).(*core.StreamParameters) assert.Len(params.Profiles, 1) assert.Equal(ffmpeg.GOPIntraOnly, params.Profiles[0].GOP) // do not create stream if ObjectStore URL is invalid ts15 := makeServer(`{"manifestID":"a2", "objectStore": "invalid://object.store", "recordObjectStore": ""}`) defer ts15.Close() - sid, err = createSid(u) - require.Error(t, err) + sid = createSid(u) assert.Nil(sid) // do not create stream if RecordObjectStore URL is invalid ts16 := makeServer(`{"manifestID":"a2", "objectStore": "", "recordObjectStore": "invalid://object.store"}`) defer ts16.Close() - sid, err = createSid(u) - require.Error(t, err) + sid = createSid(u) assert.Nil(sid) ts17 := makeServer(`{"manifestID":"a3", "objectStore": "s3+http://us:pass@object.store/path", "recordObjectStore": "s3+http://us:pass@record.store"}`) defer ts17.Close() - id4, err := createSid(u) - require.NoError(t, err) - params = id4.(*core.StreamParameters) + params = createSid(u).(*core.StreamParameters) assert.Equal(core.ManifestID("a3"), params.ManifestID) assert.NotNil(params.OS) assert.True(params.OS.IsExternal()) @@ -716,41 +689,30 @@ func TestCreateRTMPStreamHandler(t *testing.T) { u := mustParseUrl(t, "rtmp://localhost/"+expectedSid.String()) // with key rand.Seed(123) - sid, err := createSid(u) - require.NoError(t, err) + sid := createSid(u) sap := sid.(*core.StreamParameters) assert.Equal(t, uint64(0x4a68998bed5c40f1), sap.Nonce) - sid, err = createSid(u) - require.NoError(t, err) - if sid.StreamID() != expectedSid.String() { + if sid := createSid(u); sid.StreamID() != expectedSid.String() { t.Error("Unexpected streamid", sid.StreamID()) } u = mustParseUrl(t, "rtmp://localhost/stream/"+expectedSid.String()) // with stream - sid, err = createSid(u) - require.NoError(t, err) - if sid.StreamID() != expectedSid.String() { + if sid := createSid(u); sid.StreamID() != expectedSid.String() { t.Error("Unexpected streamid") } expectedMid := "mnopq" key := common.RandomIDGenerator(StreamKeyBytes) u = mustParseUrl(t, "rtmp://localhost/"+string(expectedMid)) // without key - sid, err = createSid(u) - require.NoError(t, err) - if sid.StreamID() != string(expectedMid)+"/"+key { + if sid := createSid(u); sid.StreamID() != string(expectedMid)+"/"+key { t.Error("Unexpected streamid", sid.StreamID()) } u = mustParseUrl(t, "rtmp://localhost/stream/"+string(expectedMid)) // with stream, without key - sid, err = createSid(u) - require.NoError(t, err) - if sid.StreamID() != string(expectedMid)+"/"+key { + if sid := createSid(u); sid.StreamID() != string(expectedMid)+"/"+key { t.Error("Unexpected streamid", sid.StreamID()) } // Test normal case u = mustParseUrl(t, "rtmp://localhost") - id, err := createSid(u) - require.NoError(t, err) - st := stream.NewBasicRTMPVideoStream(id) + st := stream.NewBasicRTMPVideoStream(createSid(u)) if st.GetStreamID() == "" { t.Error("Empty streamid") } @@ -759,18 +721,14 @@ func TestCreateRTMPStreamHandler(t *testing.T) { t.Error("Handler failed ", err) } // Test collisions via stream reuse - sid, err = createSid(u) - require.NoError(t, err) - if sid == nil { + if sid := createSid(u); sid == nil { t.Error("Did not expect a failure due to naming collision") } // Ensure the stream ID is reusable after the stream ends if err := endHandler(u, st); err != nil { t.Error("Could not clean up stream") } - sid, err = createSid(u) - require.NoError(t, err) - if sid.StreamID() != st.GetStreamID() { + if sid := createSid(u); sid.StreamID() != st.GetStreamID() { t.Error("Mismatched streamid during stream reuse", sid.StreamID(), st.GetStreamID()) } @@ -781,9 +739,7 @@ func TestCreateRTMPStreamHandler(t *testing.T) { // This isn't a great test because if the query param ever changes, // this test will still pass u := mustParseUrl(t, "rtmp://localhost/"+inp) - sid, err = createSid(u) - require.NoError(t, err) - if sid.StreamID() != st.GetStreamID() { + if sid := createSid(u); sid.StreamID() != st.GetStreamID() { t.Errorf("Unexpected StreamID for '%v' ; expected '%v' for input '%v'", sid, st.GetStreamID(), inp) } } @@ -848,8 +804,7 @@ func TestCreateRTMPStreamHandlerWithAuthHeader(t *testing.T) { expectedSid := core.MakeStreamIDFromString("override-manifest-id", "abcdef") u := mustParseUrl(t, "rtmp://localhost/"+expectedSid.String()) // with key - sid, err := createSid(u) - require.NoError(t, err) + sid := createSid(u) require.NotNil(t, sid) require.Equal(t, expectedSid.String(), sid.StreamID()) @@ -919,8 +874,7 @@ func TestCreateRTMPStreamHandlerWithAuthHeader_DifferentProfilesToCallbackURL(t expectedSid := core.MakeStreamIDFromString("override-manifest-id", "abcdef") u := mustParseUrl(t, "rtmp://localhost/"+expectedSid.String()) // with key - sid, err := createSid(u) - require.Error(t, err) + sid := createSid(u) require.Nil(t, sid) } @@ -933,8 +887,7 @@ func TestEndRTMPStreamHandler(t *testing.T) { handler := gotRTMPStreamHandler(s) endHandler := endRTMPStreamHandler(s) u := mustParseUrl(t, "rtmp://localhost") - sid, err := createSid(u) - require.NoError(t, err) + sid := createSid(u) st := stream.NewBasicRTMPVideoStream(sid) // Nonexistent stream @@ -1045,9 +998,7 @@ func TestMultiStream(t *testing.T) { createSid := createRTMPStreamIDHandler(context.TODO(), s, nil) handleStream := func(i int) { - id, err := createSid(u) - require.NoError(t, err) - st := stream.NewBasicRTMPVideoStream(id) + st := stream.NewBasicRTMPVideoStream(createSid(u)) if err := handler(u, st); err != nil { t.Error("Could not handle stream ", i, err) } @@ -1278,8 +1229,7 @@ func TestBroadcastSessionManagerWithStreamStartStop(t *testing.T) { // create BasicRTMPVideoStream and extract ManifestID u := mustParseUrl(t, "rtmp://localhost") - sid, err := createSid(u) - assert.NoError(err) + sid := createSid(u) st := stream.NewBasicRTMPVideoStream(sid) mid := streamParams(st.AppData()).ManifestID @@ -1288,8 +1238,8 @@ func TestBroadcastSessionManagerWithStreamStartStop(t *testing.T) { assert.Equal(exists, false) // assert stream starts successfully - err = handler(u, st) - assert.NoError(err) + err := handler(u, st) + assert.Nil(err) // assert sessManager is running and has right number of sessions cxn, exists := s.rtmpConnections[mid] diff --git a/server/push_test.go b/server/push_test.go index bb17ac8a11..b5d0817e0c 100644 --- a/server/push_test.go +++ b/server/push_test.go @@ -1037,7 +1037,7 @@ func TestPush_ForAuthWebhookFailure(t *testing.T) { body, err := ioutil.ReadAll(resp.Body) require.Nil(t, err) - assert.Equal(http.StatusForbidden, resp.StatusCode) + assert.Equal(http.StatusInternalServerError, resp.StatusCode) assert.Contains(strings.TrimSpace(string(body)), "Could not create stream ID") } diff --git a/server/rpc.go b/server/rpc.go index 0c8b9f8066..0fc46494f8 100644 --- a/server/rpc.go +++ b/server/rpc.go @@ -280,7 +280,7 @@ func GetOrchestratorInfo(ctx context.Context, bcast common.Broadcaster, orchestr return r, nil } -// EndTranscodingSession - the broadcaster calls EndTranscodingSession to tear down sessions used for verification only once +// EndSession - the broadcaster calls EndTranscodingSession to tear down sessions used for verification only once func EndTranscodingSession(ctx context.Context, sess *BroadcastSession) error { uri, err := url.Parse(sess.Transcoder()) if err != nil { @@ -338,6 +338,7 @@ func getOrchestrator(orch Orchestrator, req *net.OrchestratorRequest) (*net.Orch } // currently, orchestrator == transcoder + if req.Capabilities == nil { return orchestratorInfo(orch, addr, orch.ServiceURI().String(), "") } diff --git a/server/rpc_test.go b/server/rpc_test.go index c0832a0c46..712568c20d 100644 --- a/server/rpc_test.go +++ b/server/rpc_test.go @@ -549,13 +549,13 @@ func TestGenPayment(t *testing.T) { sender := &pm.MockSender{} s.Sender = sender - // Test changing O price - s.InitialPrice = &net.PriceInfo{PricePerUnit: 1, PixelsPerUnit: 7} + // Test invalid price + BroadcastCfg.SetMaxPrice(big.NewRat(1, 5)) payment, err = genPayment(context.TODO(), s, 1) assert.Equal("", payment) - assert.Errorf(err, "Orchestrator price has more than doubled, Orchestrator price: %v, Orchestrator initial price: %v", "1/3", "1/7") + assert.Errorf(err, err.Error(), "Orchestrator price higher than the set maximum price of %v wei per %v pixels", int64(1), int64(5)) - s.InitialPrice = nil + BroadcastCfg.SetMaxPrice(nil) // Test CreateTicketBatch error sender.On("CreateTicketBatch", mock.Anything, mock.Anything).Return(nil, errors.New("CreateTicketBatch error")).Once() @@ -680,10 +680,22 @@ func TestValidatePrice(t *testing.T) { PMSessionID: "foo", } - // O's Initial Price is nil + // B's MaxPrice is nil err := validatePrice(s) assert.Nil(err) + defer BroadcastCfg.SetMaxPrice(nil) + + // B MaxPrice > O Price + BroadcastCfg.SetMaxPrice(big.NewRat(5, 1)) + err = validatePrice(s) + assert.Nil(err) + + // B MaxPrice == O Price + BroadcastCfg.SetMaxPrice(big.NewRat(1, 3)) + err = validatePrice(s) + assert.Nil(err) + // O Initial Price == O Price s.InitialPrice = oinfo.PriceInfo err = validatePrice(s) @@ -694,15 +706,16 @@ func TestValidatePrice(t *testing.T) { err = validatePrice(s) assert.Nil(err) - // O Price higher but up to 2x Initial Price - s.InitialPrice = &net.PriceInfo{PricePerUnit: 1, PixelsPerUnit: 6} + // O Initial Price lower than O Price + s.InitialPrice = &net.PriceInfo{PricePerUnit: 1, PixelsPerUnit: 10} err = validatePrice(s) - assert.Nil(err) + assert.ErrorContains(err, "price has changed") - // O Price higher than 2x Initial Price - s.InitialPrice = &net.PriceInfo{PricePerUnit: 1000, PixelsPerUnit: 6001} + // B MaxPrice < O Price + s.InitialPrice = nil + BroadcastCfg.SetMaxPrice(big.NewRat(1, 5)) err = validatePrice(s) - assert.ErrorContains(err, "price has more than doubled") + assert.EqualError(err, fmt.Sprintf("Orchestrator price higher than the set maximum price of %v wei per %v pixels", int64(1), int64(5))) // O.PriceInfo is nil s.OrchestratorInfo.PriceInfo = nil diff --git a/server/segment_rpc.go b/server/segment_rpc.go index b7a948b5f0..7f81999f7b 100644 --- a/server/segment_rpc.go +++ b/server/segment_rpc.go @@ -36,9 +36,6 @@ const segmentHeader = "Livepeer-Segment" const pixelEstimateMultiplier = 1.02 -// Maximum price change allowed in orchestrator pricing before the session is swapped. -var priceIncreaseThreshold = big.NewRat(2, 1) - var errSegEncoding = errors.New("ErrorSegEncoding") var errSegSig = errors.New("ErrSegSig") var errFormat = errors.New("unrecognized profile output format") @@ -829,18 +826,13 @@ func validatePrice(sess *BroadcastSession) error { return errors.New("missing orchestrator price") } - initPrice, err := common.RatPriceInfo(sess.InitialPrice) - if err != nil { - glog.Warningf("Error parsing session initial price (%d / %d): %v", - sess.InitialPrice.PricePerUnit, sess.InitialPrice.PixelsPerUnit, err) + maxPrice := BroadcastCfg.MaxPrice() + if maxPrice != nil && oPrice.Cmp(maxPrice) == 1 { + return fmt.Errorf("Orchestrator price higher than the set maximum price of %v wei per %v pixels", maxPrice.Num().Int64(), maxPrice.Denom().Int64()) } - if initPrice != nil { - // Prices are dynamic if configured with a custom currency, so we need to allow some change during the session. - // TODO: Make sure prices stay the same during a session so we can make this logic more strict, disallowing any price changes. - maxIncreasedPrice := new(big.Rat).Mul(initPrice, priceIncreaseThreshold) - if oPrice.Cmp(maxIncreasedPrice) > 0 { - return fmt.Errorf("Orchestrator price has more than doubled, Orchestrator price: %v, Orchestrator initial price: %v", oPrice.RatString(), initPrice.RatString()) - } + iPrice, err := common.RatPriceInfo(sess.InitialPrice) + if err == nil && iPrice != nil && oPrice.Cmp(iPrice) == 1 { + return fmt.Errorf("Orchestrator price has changed, Orchestrator price: %v, Orchestrator initial price: %v", oPrice, iPrice) } return nil diff --git a/server/segment_rpc_test.go b/server/segment_rpc_test.go index 282e3187dc..6feb1a5ba8 100644 --- a/server/segment_rpc_test.go +++ b/server/segment_rpc_test.go @@ -1677,15 +1677,14 @@ func TestSubmitSegment_GenPaymentError_ValidatePriceError(t *testing.T) { Sender: sender, Balance: balance, OrchestratorInfo: oinfo, - InitialPrice: &net.PriceInfo{ - PricePerUnit: 1, - PixelsPerUnit: 7, - }, } + BroadcastCfg.SetMaxPrice(big.NewRat(1, 5)) + defer BroadcastCfg.SetMaxPrice(nil) + _, err := SubmitSegment(context.TODO(), s, &stream.HLSSegment{}, nil, 0, false, true) - assert.EqualError(t, err, fmt.Sprintf("Orchestrator price has more than doubled, Orchestrator price: %v, Orchestrator initial price: %v", "1/3", "1/7")) + assert.EqualErrorf(t, err, err.Error(), "Orchestrator price higher than the set maximum price of %v wei per %v pixels", int64(1), int64(5)) balance.AssertCalled(t, "Credit", existingCredit) } diff --git a/server/selection.go b/server/selection.go index c827034db6..c7187c79e1 100644 --- a/server/selection.go +++ b/server/selection.go @@ -3,8 +3,6 @@ package server import ( "container/heap" "context" - "math/big" - ethcommon "github.com/ethereum/go-ethereum/common" "github.com/livepeer/go-livepeer/clog" "github.com/livepeer/go-livepeer/common" @@ -169,7 +167,7 @@ func (s *MinLSSelector) selectUnknownSession(ctx context.Context) *BroadcastSess } var addrs []ethcommon.Address - prices := map[ethcommon.Address]*big.Rat{} + prices := map[ethcommon.Address]float64{} addrCount := make(map[ethcommon.Address]int) for _, sess := range s.unknownSessions { if sess.OrchestratorInfo.GetTicketParams() == nil { @@ -182,10 +180,9 @@ func (s *MinLSSelector) selectUnknownSession(ctx context.Context) *BroadcastSess addrCount[addr]++ pi := sess.OrchestratorInfo.PriceInfo if pi != nil && pi.PixelsPerUnit != 0 { - prices[addr] = big.NewRat(pi.PricePerUnit, pi.PixelsPerUnit) + prices[addr] = float64(pi.PricePerUnit) / float64(pi.PixelsPerUnit) } } - maxPrice := BroadcastCfg.MaxPrice() stakes, err := s.stakeRdr.Stakes(addrs) if err != nil { @@ -202,7 +199,7 @@ func (s *MinLSSelector) selectUnknownSession(ctx context.Context) *BroadcastSess s.perfScore.Mu.Unlock() } - selected := s.selectionAlgorithm.Select(ctx, addrs, stakes, maxPrice, prices, perfScores) + selected := s.selectionAlgorithm.Select(addrs, stakes, prices, perfScores) for i, sess := range s.unknownSessions { if sess.OrchestratorInfo.GetTicketParams() == nil { diff --git a/server/selection_algorithm.go b/server/selection_algorithm.go index 050b459283..72bc2a663b 100644 --- a/server/selection_algorithm.go +++ b/server/selection_algorithm.go @@ -1,14 +1,11 @@ package server import ( - "context" + ethcommon "github.com/ethereum/go-ethereum/common" + "github.com/golang/glog" "math" - "math/big" "math/rand" "time" - - ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/livepeer/go-livepeer/clog" ) var random = rand.New(rand.NewSource(time.Now().UnixNano())) @@ -23,19 +20,14 @@ type ProbabilitySelectionAlgorithm struct { PriceExpFactor float64 } -func (sa ProbabilitySelectionAlgorithm) Select(ctx context.Context, addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, maxPrice *big.Rat, prices map[ethcommon.Address]*big.Rat, perfScores map[ethcommon.Address]float64) ethcommon.Address { - filtered := sa.filter(ctx, addrs, maxPrice, prices, perfScores) +func (sa ProbabilitySelectionAlgorithm) Select(addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, prices map[ethcommon.Address]float64, perfScores map[ethcommon.Address]float64) ethcommon.Address { + filtered := sa.filter(addrs, perfScores) probabilities := sa.calculateProbabilities(filtered, stakes, prices) return selectBy(probabilities) } -func (sa ProbabilitySelectionAlgorithm) filter(ctx context.Context, addrs []ethcommon.Address, maxPrice *big.Rat, prices map[ethcommon.Address]*big.Rat, perfScores map[ethcommon.Address]float64) []ethcommon.Address { - filteredByPerfScore := sa.filterByPerfScore(ctx, addrs, perfScores) - return sa.filterByMaxPrice(ctx, filteredByPerfScore, maxPrice, prices) -} - -func (sa ProbabilitySelectionAlgorithm) filterByPerfScore(ctx context.Context, addrs []ethcommon.Address, scores map[ethcommon.Address]float64) []ethcommon.Address { - if sa.MinPerfScore <= 0 || len(scores) == 0 { +func (sa ProbabilitySelectionAlgorithm) filter(addrs []ethcommon.Address, scores map[ethcommon.Address]float64) []ethcommon.Address { + if sa.MinPerfScore <= 0 || scores == nil || len(scores) == 0 { // Performance Score filter not defined, return all Orchestrators return addrs } @@ -48,41 +40,18 @@ func (sa ProbabilitySelectionAlgorithm) filterByPerfScore(ctx context.Context, a } if len(res) == 0 { - // If no orchestrators pass the perf filter, return all Orchestrators. + // If no orchestrators pass the filter, then returns all Orchestrators // That may mean some issues with the PerfScore service. - clog.Warningf(ctx, "No Orchestrators passed min performance score filter, not using the filter, numAddrs=%d, minPerfScore=%v, scores=%v, addrs=%v", len(addrs), sa.MinPerfScore, scores, addrs) - return addrs - } - return res -} - -func (sa ProbabilitySelectionAlgorithm) filterByMaxPrice(ctx context.Context, addrs []ethcommon.Address, maxPrice *big.Rat, prices map[ethcommon.Address]*big.Rat) []ethcommon.Address { - if maxPrice == nil || len(prices) == 0 { - // Max price filter not defined, return all Orchestrators - return addrs - } - - var res []ethcommon.Address - for _, addr := range addrs { - price := prices[addr] - if price != nil && price.Cmp(maxPrice) <= 0 { - res = append(res, addr) - } - } - - if len(res) == 0 { - // If no orchestrators pass the filter, return all Orchestrators - // It means that no orchestrators are below the max price - clog.Warningf(ctx, "No Orchestrators passed max price filter, not using the filter, numAddrs=%d, maxPrice=%v, prices=%v, addrs=%v", len(addrs), maxPrice, prices, addrs) + glog.Warning("No Orchestrators passed min performance score filter, not using the filter") return addrs } return res } -func (sa ProbabilitySelectionAlgorithm) calculateProbabilities(addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, prices map[ethcommon.Address]*big.Rat) map[ethcommon.Address]float64 { +func (sa ProbabilitySelectionAlgorithm) calculateProbabilities(addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, prices map[ethcommon.Address]float64) map[ethcommon.Address]float64 { pricesNorm := map[ethcommon.Address]float64{} for _, addr := range addrs { - p, _ := prices[addr].Float64() + p := prices[addr] pricesNorm[addr] = math.Exp(-1 * p / sa.PriceExpFactor) } diff --git a/server/selection_algorithm_test.go b/server/selection_algorithm_test.go index ffae12de39..96ef58f0a4 100644 --- a/server/selection_algorithm_test.go +++ b/server/selection_algorithm_test.go @@ -1,12 +1,9 @@ package server import ( - "context" - "math/big" - "testing" - ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "testing" ) const testPriceExpFactor = 100 @@ -15,8 +12,6 @@ func TestFilter(t *testing.T) { tests := []struct { name string orchMinPerfScore float64 - maxPrice float64 - prices map[string]float64 orchPerfScores map[string]float64 orchestrators []string want []string @@ -90,126 +85,21 @@ func TestFilter(t *testing.T) { "0x0000000000000000000000000000000000000004", }, }, - { - name: "All prices below max price", - orchMinPerfScore: 0.7, - maxPrice: 2000, - prices: map[string]float64{ - "0x0000000000000000000000000000000000000001": 500, - "0x0000000000000000000000000000000000000002": 1500, - "0x0000000000000000000000000000000000000003": 1000, - }, - orchPerfScores: map[string]float64{ - "0x0000000000000000000000000000000000000001": 0.6, - "0x0000000000000000000000000000000000000002": 0.8, - "0x0000000000000000000000000000000000000003": 0.9, - }, - orchestrators: []string{ - "0x0000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000002", - "0x0000000000000000000000000000000000000003", - }, - want: []string{ - "0x0000000000000000000000000000000000000002", - "0x0000000000000000000000000000000000000003", - }, - }, - { - name: "All prices above max price", - orchMinPerfScore: 0.7, - maxPrice: 100, - prices: map[string]float64{ - "0x0000000000000000000000000000000000000001": 500, - "0x0000000000000000000000000000000000000002": 1500, - "0x0000000000000000000000000000000000000003": 1000, - }, - orchPerfScores: map[string]float64{ - "0x0000000000000000000000000000000000000001": 0.6, - "0x0000000000000000000000000000000000000002": 0.8, - "0x0000000000000000000000000000000000000003": 0.9, - }, - orchestrators: []string{ - "0x0000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000002", - "0x0000000000000000000000000000000000000003", - }, - want: []string{ - "0x0000000000000000000000000000000000000002", - "0x0000000000000000000000000000000000000003", - }, - }, - { - name: "Mix of prices relative to max price", - orchMinPerfScore: 0.7, - maxPrice: 750, - prices: map[string]float64{ - "0x0000000000000000000000000000000000000001": 500, - "0x0000000000000000000000000000000000000002": 1500, - "0x0000000000000000000000000000000000000003": 700, - }, - orchPerfScores: map[string]float64{ - "0x0000000000000000000000000000000000000001": 0.8, - "0x0000000000000000000000000000000000000002": 0.6, - "0x0000000000000000000000000000000000000003": 0.9, - }, - orchestrators: []string{ - "0x0000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000002", - "0x0000000000000000000000000000000000000003", - }, - want: []string{ - "0x0000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000003", - }, - }, - { - name: "Exact match with max price", - orchMinPerfScore: 0.7, - maxPrice: 1000, - prices: map[string]float64{ - "0x0000000000000000000000000000000000000001": 500, - "0x0000000000000000000000000000000000000002": 1000, // exactly max - "0x0000000000000000000000000000000000000003": 1500, - }, - orchPerfScores: map[string]float64{ - "0x0000000000000000000000000000000000000001": 0.8, - "0x0000000000000000000000000000000000000002": 0.9, - "0x0000000000000000000000000000000000000003": 0.6, - }, - orchestrators: []string{ - "0x0000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000002", - "0x0000000000000000000000000000000000000003", - }, - want: []string{ - "0x0000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000002", - }, - }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { var addrs []ethcommon.Address - var maxPrice *big.Rat - prices := map[ethcommon.Address]*big.Rat{} perfScores := map[ethcommon.Address]float64{} for _, o := range tt.orchestrators { - addr := ethcommon.HexToAddress(o) - addrs = append(addrs, addr) - perfScores[addr] = tt.orchPerfScores[o] - if price, ok := tt.prices[o]; ok { - prices[addr] = new(big.Rat).SetFloat64(price) - } - } - if tt.maxPrice > 0 { - maxPrice = new(big.Rat).SetFloat64(tt.maxPrice) + perfScores[ethcommon.HexToAddress(o)] = tt.orchPerfScores[o] + addrs = append(addrs, ethcommon.HexToAddress(o)) } sa := &ProbabilitySelectionAlgorithm{ MinPerfScore: tt.orchMinPerfScore, } - res := sa.filter(context.Background(), addrs, maxPrice, prices, perfScores) + res := sa.filter(addrs, perfScores) var exp []ethcommon.Address for _, o := range tt.want { @@ -270,13 +160,13 @@ func TestCalculateProbabilities(t *testing.T) { t.Run(tt.name, func(t *testing.T) { var orchs []ethcommon.Address stakes := map[ethcommon.Address]int64{} - prices := map[ethcommon.Address]*big.Rat{} + prices := map[ethcommon.Address]float64{} expProbs := map[ethcommon.Address]float64{} for i, addrStr := range tt.addrs { addr := ethcommon.HexToAddress(addrStr) orchs = append(orchs, addr) stakes[addr] = tt.stakes[i] - prices[addr] = new(big.Rat).SetFloat64(tt.prices[i]) + prices[addr] = tt.prices[i] expProbs[addr] = tt.want[i] } diff --git a/server/selection_test.go b/server/selection_test.go index aa936ddb04..716c780d06 100644 --- a/server/selection_test.go +++ b/server/selection_test.go @@ -4,12 +4,10 @@ import ( "container/heap" "context" "errors" - "math/big" - "testing" - "github.com/livepeer/go-livepeer/core" "github.com/livepeer/go-livepeer/net" "github.com/stretchr/testify/require" + "testing" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/livepeer/go-livepeer/common" @@ -91,7 +89,7 @@ func (r *stubStakeReader) SetStakes(stakes map[ethcommon.Address]int64) { type stubSelectionAlgorithm struct{} -func (sa stubSelectionAlgorithm) Select(ctx context.Context, addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, maxPrice *big.Rat, prices map[ethcommon.Address]*big.Rat, perfScores map[ethcommon.Address]float64) ethcommon.Address { +func (sa stubSelectionAlgorithm) Select(addrs []ethcommon.Address, stakes map[ethcommon.Address]int64, prices map[ethcommon.Address]float64, perfScores map[ethcommon.Address]float64) ethcommon.Address { if len(addrs) == 0 { return ethcommon.Address{} } @@ -100,7 +98,7 @@ func (sa stubSelectionAlgorithm) Select(ctx context.Context, addrs []ethcommon.A // select lowest price lowest := prices[addr] for _, a := range addrs { - if prices[a].Cmp(lowest) < 0 { + if prices[a] < lowest { addr = a lowest = prices[a] } diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index efc723d602..59a77b5c88 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -122,7 +122,7 @@ func lpCfg() starter.LivepeerConfig { ethPassword := "" network := "devnet" blockPollingInterval := 1 - pricePerUnit := "1" + pricePerUnit := 1 initializeRound := true cfg := starter.DefaultLivepeerConfig() diff --git a/tools.go b/tools.go deleted file mode 100644 index 6bc191ddd2..0000000000 --- a/tools.go +++ /dev/null @@ -1,9 +0,0 @@ -//go:build tools -// +build tools - -package tools - -import ( - _ "github.com/ethereum/go-ethereum/cmd/abigen" - _ "github.com/golang/mock/mockgen" -)