Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

server: Skip redundant maxPrice check in ongoing session #2994

Merged
merged 5 commits into from
Apr 3, 2024

Conversation

victorges
Copy link
Member

@victorges victorges commented Apr 2, 2024

What does this pull request do? Explain your changes. (required)
After #2981, we started allowing both Bs and Os to updated their prices dynamically over time
based on an external currency. This creates a problem for Bs, given their maxPrice could
become lower than an Os price in the middle of a session. Even though we want the price to
be dynamic, we want a given session prices to be negotiated in the beginning of the session,
and don't want to drop a session mid-transcoding because the prices were updated.

The initial intuition was to save the "initial max price" on the BroadcastSession object as well,
but we realized that this logic would be redundant given we already check for the max price when
the session is estabilished in the first place, and disallow the O to increase prices mid-session.
It goes something like this:

  • On session start, we already check O price <= B maxPrice
  • We save the O price as initialPrice, and would save B price as initialMaxPrice
    • Thus we have that O initialPrice <= B initialMaxPrice
  • During session, we also already check that O price <= O initialPrice (kept this check on the same validatePrice func)
  • So this means O price <= O initialPrice <= B initialMaxPrice
  • i.e. necessarily O price <= B initialMaxPrice, which means we don't need a separate check for that (nor even saving the initialMaxPrice, as that would be its only use)

Specific updates (required)

  • Remove maxPrice check from validatePrice
  • Fix tests

How did you test each of these updates (required)
Ran automated tests.

Does this pull request close any open issues?
Related to ENG-1855 but a bit parallel to that

Checklist:

When I was writing the tests for validatePrice I found out
we were using that function wrong in a couple places and
never checking any error. We were sending err.Error() to check
the error from err.
Copy link

linear bot commented Apr 2, 2024

@victorges victorges requested a review from leszko April 2, 2024 15:19
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.44328%. Comparing base (85bea86) to head (73fd824).

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #2994         +/-   ##
===================================================
- Coverage   57.47690%   57.44328%   -0.03362%     
===================================================
  Files             92          92                 
  Lines          15695       15692          -3     
===================================================
- Hits            9021        9014          -7     
- Misses          6078        6080          +2     
- Partials         596         598          +2     
Files Coverage Δ
server/segment_rpc.go 79.10156% <ø> (-0.12174%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85bea86...73fd824. Read the comment docs.

Files Coverage Δ
server/segment_rpc.go 79.10156% <ø> (-0.12174%) ⬇️

... and 1 file with indirect coverage changes

@eliteprox
Copy link
Collaborator

For this change, I validated the discovery loop still selects orchestrator via price. In testing this change allowed an orchestrator that is specified by the broadcaster with -orchAddr to have a higher price than the max price on the broadcaster. However, I think this might be okay.

Do we really need the validatePrice() function? We can use sess.InitalPrice instead of getting a fresh price from the orchestrator during every segment. This would eliminate both checks done by validatePrice(). See commit 9866e77

If we need to keep price validation, perhaps it can be moved to when the session is created?

@victorges
Copy link
Member Author

Hey @eliteprox, thank you for reviewing and testing this further! I agree that it should be fine to allow overriding the price for an O to sth higher than the max, given it's an explicit override.

Also had seen your PR and thought that the validatePrice function could completely disappear if we did both. Unfortunately, I don't have enough context yet on the SubmitSegment function to know if the B could just start sending a different price than what the O is currently configured with. I'm currently digging through that code.

I believe the spirit of the original fix though (#2892), was to make the prices sticky for a given session on the O side, so they would never return a different price for a given session. While we have updated the PriceInfo function on that PR to return a fixed number, I think there may be other flows where it should be updated (like the handler of SubmitSegment itself) which could break if the B started sending a different price (from current O config). So I'm currently trying to understand that whole flow to evaluate what's the proper fix.

In the meantime, a solution we are evaluating is to allow some price change on the O until we figure out what is making the price to get updated for a running O session. My current suspicion is this, which updates the sess.OrchestratorInfo based on the response from a SubmitSegment, but will need to dig&test further.

Then for the fix, we could merge this PR (#2994), and temporarily merge #2995 until we make the prices actually stick during a session. There will be a risk of dropping sessions until we do that, but it'd be much lower given the 2x increase threshold. Then we can go on with the migration to USD prices in the meantime.

Let me know if you have any thoughts!

@eliteprox
Copy link
Collaborator

Also had seen your PR and thought that the validatePrice function could completely disappear if we did both. Unfortunately, I don't have enough context yet on the SubmitSegment function to know if the B could just start sending a different price than what the O is currently configured with. I'm currently digging through that code.

The broadcaster seems to be refreshing the pricing info on every segment when generating tickets. I think it will be safer and simpler to use sess.InitialPrice from the session instead

if err := validatePrice(sess); err != nil {
return "", err
}
protoPayment := &net.Payment{
Sender: sess.Broadcaster.Address().Bytes(),
ExpectedPrice: sess.OrchestratorInfo.PriceInfo,
}

If we use sess.InitialPrice like in #2991, the broadcaster should pay tickets only on the initially agreed price, unless the session resets and comes back to the same O, then it would continue at the new price.

In the meantime, a solution we are evaluating is to allow some price change on the O until we figure out what is making the price to get updated for a running O session. My current suspicion is this, which updates the sess.OrchestratorInfo based on the response from a SubmitSegment, but will need to dig&test further.

As for removing the maximum price check here, I'm also in support of that because it is already validated when the session begins. If the price should remain the same for the entire session, it makes sense to not update or validate it on each segment. I much prefer this approach over #2995 and I think it is more secure/reliable overall.

I opened #2996 to track the issue since we have a few solutions out there.

@victorges
Copy link
Member Author

@eliteprox thanks for the further input. Unfortunately it shouldn't be so simple as sending a different price on the B side, since the problem is exactly that the O is updating the current price for the session while it is running. On that case, it will naturally reject segments whose price doesn't match its internal state (otherwise the B could just choose to pay "zero" for every segment). So the correct fix here, given we want to have fixed prices for a running session, is to correct the O logic that is losing the current price for the session.

As for removing the maximum price check here, I'm also in support of that because it is already validated when the session begins. If the price should remain the same for the entire session, it makes sense to not update or validate it on each segment. I much prefer this approach over #2995 and I think it is more secure/reliable overall.

FTR the maxPrice change (this PR) is independent of the O price-change validation done in #2995. This PR is required regardless of how we fix the O price-change validation, with the objective of being resilient to maxPrice updates given they're also gonna be set in USD.

As for the other issue, we cannot remove the price-change validation altogether otherwise Os could increase their price indefinitely in the middle of a session (B risk), while we also can't just set any price on the B otherwise the Os that would be at risk (since they'd need to stop validating the segment prices, as explained above).

So, the ideal solution is to fix the O behavior not to lose the fixed price in the middle of a session. We are carrying on the investigation about that (all help appreciated!), but in the meantime we're deploying this and #2995 to allow the prices to change based on USD quote (up to 2x since the session started, for O prices). This will stop dropping most of the sessions (ETH price would need to drop 2x in 1h) until we figure out why the prices are changing mid-session.

@victorges victorges merged commit 07fed97 into master Apr 3, 2024
18 checks passed
@victorges victorges deleted the vg/fix/max-price-check branch April 3, 2024 11:44
rickstaa added a commit that referenced this pull request Aug 7, 2024
* eth,eth/watcher: Create Chainlink price feed watcher (#2972)

* eth/watchers: Create PriceFeed watcher

Makefile: Use mockgen binary from tool dependencies

eth/contracts: Add chainlink interfaces source

Makefile: Generate Chainlink contracts ABI

tools: Add abigen tool to repo

eth/contracts: Generate chainlink bindings

Makefile: Fix abigen bindings generation

Revert everything abigen

Turns out there's already bindings exported from the Chainlink lib.

go.mod: Add chainlink library

eth/watchers: Add pricefeed watcher

eth/watchers: Clean-up event watching code

eth/watchers: Improve price tracking

Revert "go.mod: Add chainlink library"

This reverts commit ac415bd.

Revert "Revert everything abigen"

This reverts commit b7c40b1.

eth/contracts: Gen bindings for proxy iface

eth/watchers: Use local bindings for contracts

eth/watchers: Simplify event subs logic

eth/watchers: Simplify&optimize truncated ticker

eth/watchers: Update decimals on fetch

eth/watchers: Improve handling of decimals

eth/watchers: Fix price rat creation

eth/watchers: Make sure we use UTC on truncated timer

eth/contracts/chainlink: Generate only V3 contract bindings

eth/watchers: Watch PriceFeed only with polling

eth/watchers: Add a retry logic on price update

eth/watchers: Use clog instead of fmt.Printf

* eth: Create separate pricefeed client unit

This will make the code more testable.

* eth: Add tests for pricefeed client

* eth/watchers: Add tests to the truncated ticker

Gosh that was much harder than I thought

* eth/watchers: Add tests for pricefeedwatcher

* eth: Add comments to the new components

* go fmt

* eth: Address minor review comments

* eth,eth/watchers: Improve pricefeed watcher interface

* eth/watchers: Remove truncated ticker tests

* cmd/livepeer: Use price feed watcher for dynamic pricePerPixel (#2981)

* eth/watchers: Create PriceFeed watcher

Makefile: Use mockgen binary from tool dependencies

eth/contracts: Add chainlink interfaces source

Makefile: Generate Chainlink contracts ABI

tools: Add abigen tool to repo

eth/contracts: Generate chainlink bindings

Makefile: Fix abigen bindings generation

Revert everything abigen

Turns out there's already bindings exported from the Chainlink lib.

go.mod: Add chainlink library

eth/watchers: Add pricefeed watcher

eth/watchers: Clean-up event watching code

eth/watchers: Improve price tracking

Revert "go.mod: Add chainlink library"

This reverts commit ac415bd.

Revert "Revert everything abigen"

This reverts commit b7c40b1.

eth/contracts: Gen bindings for proxy iface

eth/watchers: Use local bindings for contracts

eth/watchers: Simplify event subs logic

eth/watchers: Simplify&optimize truncated ticker

eth/watchers: Update decimals on fetch

eth/watchers: Improve handling of decimals

eth/watchers: Fix price rat creation

eth/watchers: Make sure we use UTC on truncated timer

eth/contracts/chainlink: Generate only V3 contract bindings

eth/watchers: Watch PriceFeed only with polling

eth/watchers: Add a retry logic on price update

eth/watchers: Use clog instead of fmt.Printf

* eth: Create separate pricefeed client unit

This will make the code more testable.

* eth: Add tests for pricefeed client

* eth/watchers: Add tests to the truncated ticker

Gosh that was much harder than I thought

* eth/watchers: Add tests for pricefeedwatcher

* eth: Add comments to the new components

* go fmt

* cmd: make pricePerUnit flags strings

* cmd: Allow price per unit to be speficied with a currency

Currently ignoring the currency value.

* cmd: Add logic to start price update loop

* cmd: Add flag for specifying price feed address

* cmd: Add a lil test to priceDataToWei

* TODO: Reminder for something I noticed is missing

* cmd/starter: Support currencies for custom broadcaster prices

* eth: Address minor review comments

* eth,eth/watchers: Improve pricefeed watcher interface

* eth/watchers: Fix pricefeed watcher after merge

* cmd,core,server: Support dynamic updates to price in USD

* eth/watchers: Remove truncated ticker tests

* eth/watchers: Finalize pricefeedwatcher docs/tests

* cmd: Address review comment

* core: Create tests for autoconvertedprice

* cmd,core: Move wei default to AutoConvertedPrice

* Address review comments

* cmd: Fix the e2e flow for setting/updating configs

* CHANGELOG

* cmd: Make sure pricePerPixel can be specified with e notation

Parse it directlty as a big.Rat from a raw string, like I was
doing for pricePerUnit in some places.

* Fix tests

Turns out tests were not running on my branch due to base branch

* go fmt

* core: Fix typo in comment

* cmd,server: Use 3 decimal points when logging PPP

Found out that's officially supported precision on the
discovery logic, so let's reflect that here.

* Release 0.7.3 (#2988)

* release v0.7.3

* release v0.7.3

* Revert "Bump ffmpeg version and nv-codec-headers" (#2989)

* Revert "Bump ffmpeg version and nv-codec-headers (#2973)"

This reverts commit cad6713.

* Revert "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)"

This reverts commit 6c09a9f.

* Reapply "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)"

This reverts commit ebbf210.

* Force ffmpeg reinstall

* Revert "Force ffmpeg reinstall"

This reverts commit 5adb9a5.

---------

Co-authored-by: Victor Elias <[email protected]>

* Bump LPMS (#2992)

* release v0.7.4 (#2993)

* server: Skip redundant maxPrice check in ongoing session (#2994)

* server: Remove maxPrice check mid-session

* server: Fix tests

* server: Fix erroneous usage of assert.EqualErrorf

When I was writing the tests for validatePrice I found out
we were using that function wrong in a couple places and
never checking any error. We were sending err.Error() to check
the error from err.

* server: Fix error checks after fixing assertion

* CHANGELOG

* server: Allow Os price to increase up to 2x mid-session (#2995)

* server: Allow dynamic (and sometimes >max) prices for Os

* CHANGELOG

* server,discovery: Allow B to use any O in case none match maxPrice (#2999)

* discovery: Ignore maxPrice on db_discovery queries

Still kept the feature on the db as it had all the tests
already implemented and could still be useful in the future.
I can remove it if preferred though.

* server: Get prices as big rats for selection

While this may not seem useful now since we just convert
them to floats on the probability calculation, it will be
useful later when comparing prices to max price.

* server: Add maxPrice filter logic on selection algorithm

* CHANGELOG

* server: Break filter in 2 functions

* Fix transcoding price metrics (#3001)

* ci(ai): add AI issue templates

This commit introduces two new AI-specific issue templates, aiming to streamline
the routing of AI subnet-related issues and feature requests to the appropriate team.

* ci(ai): add AI pull request labeler

This commit adds a pull request labeler action that automatically
attaches the `ai` label when a pull request is created to the `ai-video`
branch.

* ci: change issue template order and add PR labeler config (#3006)

* ci: change issue template order

This commit ensures that the main branch issue templates are put above
the AI related issue templates.

* ci(ai): add PR labeler config file

This commmit adds a https://github.com/actions/labeler configuration
file so that all PRs on the `ai-video` branch will be correctly labeled
with the `ai` label.

* ci(ai): fix incorrect labels (#3012)

* ci(ai): fix incorrect labels

This commit fixed the labels that were specified in the Issue Templates
to the one found in the repository.

* ci: rename labeler and remove trailing whitespace

* ci(ai): fix pull request config warning (#3018) (#3019)

* ci(ai): fix pull request config warning (#3018)

This commit gets rid of the Pull request labeler configuration file
warning.

* ci(ai): auto assign AI issues

This commit auto assigns the AI issues to the right member of the AI
team.

* ci(ai): cleanup labeler actions

This commit cleans up the labeler actions and ensure they run on the
right triggers.

* Initialize round by any B/O who has the initializeRound flag set to true (#3029)

* Fix CI Darwin Build (#3049)

* Fix CI

* Fix CI

* chore: fix function names (#3040)

Signed-off-by: kevincatty <[email protected]>
Co-authored-by: Rafał Leszko <[email protected]>

* Create option to filter Os by min livepeer version used (#3050)

* Update LPMS with the mobile transcoding fix (#3003)

* Release 0.7.5 (#3051)

* refactor: add -gateway and deprecate -broadcaster (#3053)

* refactor: add -gateway and deprecate -broadcaster

This commit adds the `gateway` flag and deprecates the `broadcaster` flag
per core team decision (details:
https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

---------

Co-authored-by: John | Elite Encoder <[email protected]>

* refactor(census): rename Broadcaster metrics to Gateway (#3055)

* refactor(census): rename Broadcaster metrics to Gateway

This commit renames the metrics related to Broadcaster to Gateway, following
a team decision. More details can be found in the discussion
here:
[Team Discussion Link](.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* refactor: add -pricePerGateway and deprecate -pricePerBroadcaster (#3056)

* refactor: add -pricePerGateway and deprecate -pricePerBroadcaster

This commit adds the `pricePerGateway` flag and deprecates the `pricePerBroadcaster` flag
per core team decision (details:
https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* refactor: remove redundant deprecation comment

This commit removes the `PricePerBroadcaster` deprecation comment since
this is already clear from the glog warning below.

* fix: correct the `pricePerBroadcaster` flag check

This commit ensures that the deprecation condition for the `pricePerBroadcaster`
flag properly handles the default empty string value.

* fix: ensure 'pricePerGateway' is used

This commit ensures that the `pricePerGateway` is correctly used instead
of the `pricePerBroadcaster` when it is set.

* refactor: deprecate 'pricePerGateway' broadcasters property in favor of 'gateways'

This commit updates the configuration to replace the `broadcasters` property
specified under the `pricePerGateway` flag with `gateways`. Additionally, it
ensures that a warning is issued when the deprecated property is still used.

* test: fix TestParseGetBroadcasterPrices test

This commit ensures that the TestParseGetBroadcasterPrices function uses
the new getGatewayPrices function.

* test: rename TestParseGetBroadcasterPrices to reflect Gateway naming

This commit updates the `TestParseGetBroadcasterPrices` function to
`TestParseGetGatewayPrices` to align with the new node naming convention.

* ci: protect Docker 'stable' tag (#3062)

This commit introduces a safeguard to ensure that the Docker image
tagged
as 'stable' is only pushed when a new tag is created on the stable
branch.
This prevents unintended updates to the stable Docker image, ensuring
consistency and reliability for users relying on the stable tag.

* Return appropriate errors when auth fails, not just 5xx (#3065)

* Return appropriate errors when auth fails, not just 5xx

* Fix unit tests for new signature

* Fix remaining tests

* Fix another test

* Refactor Forbidden to error type

* Refactor Forbidden to error type

---------

Co-authored-by: Rafał Leszko <[email protected]>

* ci: fix syntax error in Docker action tags (#3068)

* ci: fix syntax error in Docker action tags

This commit addresses a syntax error in the Docker image tag creation
step.

* ci(docker): ensure stable tag is created on master branch

This commit ensures that the stable tag is created on the master branch.

* chore: fix some comments (#3070)

Signed-off-by: linghuying <[email protected]>

* Add logging to selection_algorithm.go (#3076)

* Add logging to selection_algorithm.go

* Add even more logging

* Fix typo in logs (#3079)

* Add ctx to logging for selection algorithm (#3080)

* Add ctx to logging for selection algorithm

* Reorg imports

* Fix unit tests

* chore: make function comment match function name (#3081)

Signed-off-by: tongjicoder <[email protected]>

* refactor: rename internal references from Broadcaster to Gateway (#3060)

* refactor: rename internal references from Broadcaster to Gateway

This commit updates internal references from 'Broadcaster' to 'Gateway'
in accordance with the core team’s decision. For more details, refer to
the discussion: [Discord
Link](https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* Add logging to the session refresh (#3083)

* Add `/healthz` endpoint (#3095)

* Update LPMS to ffmpeg 7 (#3096)

* install_ffmpeg: point to LPMS

* Update to use ffmpeg7 LPMS

* release v0.7.6

* chore(ai): ensure ai-video-rebased ffmpeg file is used

Since the lpms `ai-video` and `ai-video-rebase-main` branches are not
yet merged into the main branch we need to ensure the right AI
install_ffmpeg.sh script is used.

* chore(ai): remove local go module dependency

This commit removes the local go module dependency to lpms that was
accidentally commited.

* test: fix broadcast test

This commit fixes the bugs that were introduced by the AI codebas einto
the broadcast test functions.

* feat(ai): add dynamic pricePerUnit feature to AI pricing

This commit ensures that Orchestrators can set their pricing in USD and
the price gets updated dynamically.

* cmd: Use `-gateway` consistently

Avoid references to deprecated CLI flags.

* feat(ai): add minLivepeerVersion constraint and IgnorePreReleaseVersions

- Adds minLivepeerVersion constraint from
  #3050 to the AI codebase.
- Introduces `IgnorePreReleaseVersions` flag to filter out pre-release versions.

This update is essential for distinguishing AI subnet versions, which use pre-release
suffixes, from standard transcoding releases. This new flag can be
removed when merging in the main branch.

* fix(ai): fix offchain 'PriceFeedWatcher is not initialized' error

This commit ensures that the `PriceFeedWatcher is not initialized` error
is not thrown when the software is run in `offchain` mode.

* test: add pre-release suffix min version tests

This commit adds some tests to check if pre-release versions are
correctly handled when filtering orchestrators based on minimum version.

* feat: simplify pre-release version filter logic

This commit removes the POC `ignorePreReleaseVersions` command line
argument for logic in the `LivepeerVersionCompatibleWith` which ensures
that pre-release versions are only checked when the gateway specifies as
pre-release suffix in the `orchMinLivepeerVersion` command line
argument.

* feat: allow Gateways to filter by pre-release

This commit gives Gateways the ability to filter by pre-release suffix.
When a pre-release suffix is specified in the `OrchMinLivepeerVersion`
command line argument the software now also checks the pre-release
version suffix on the orchestrator.

* refactor(ai): rename capability constraint variable

This commit renames the orchConstraints variable in the capabilities.go
file to better reflect that it are constraints per capabilities.

* chore(ai): remove lpms local dependency

This commit ensure that the right remote dependency is used for the lpms
package.

* chore(ai): update lpms dependency

This commit updates the lpms dependency to the lastest version of the
`ai-video-rebase-main`.

* feat: remove AI specific minVersion constraint logic

This commit removes the ai-specific logic that allows ai suffixes to
work during version constraint checking. This was done to add it back in
a seperate commit so that we can always revert.

* feat(ai): Add AI suffix handling for min version logic

This commit introduces logic to handle version constraints with AI-specific
suffixes (e.g., v0.7.6-ai.1). This ensures compatibility during version
constraint filtering. Note that this logic should be removed when merging
into the master branch.

* core: Make the AI config take a big rat

* fix: add AIModels currency config field and fix pixelsPerUnit handling

This commit adds a new `currency` field to the `AIModelConfig` to specify the
currency. Additionally, it improves the AI startup code in `starter.go` to
correctly handle parsing of this currency while ensuring compatibility with
'offchain' mode. Further improvements to the AI startup code are deferred to
avoid conflicts with existing pull requests.

* fix(ai): temporarily disable arm64 builds

This commit disables the linux/arm64 for now as we haven't yet added support it.
This prevent the Docker CI from failing.

---------

Signed-off-by: kevincatty <[email protected]>
Signed-off-by: linghuying <[email protected]>
Signed-off-by: tongjicoder <[email protected]>
Co-authored-by: Victor Elias <[email protected]>
Co-authored-by: Rafał Leszko <[email protected]>
Co-authored-by: Thom Shutt <[email protected]>
Co-authored-by: Victor Elias <[email protected]>
Co-authored-by: kevincatty <[email protected]>
Co-authored-by: John | Elite Encoder <[email protected]>
Co-authored-by: linghuying <[email protected]>
Co-authored-by: tongjicoder <[email protected]>
Co-authored-by: Josh Allmann <[email protected]>
rickstaa added a commit that referenced this pull request Aug 7, 2024
This commit aims to synchronize the ai-video branch with the master branch. It addresses an issue where PR #3103 was not correctly recognized by GitHub as being in sync with the master branch.

* eth,eth/watcher: Create Chainlink price feed watcher (#2972)

* eth/watchers: Create PriceFeed watcher

Makefile: Use mockgen binary from tool dependencies

eth/contracts: Add chainlink interfaces source

Makefile: Generate Chainlink contracts ABI

tools: Add abigen tool to repo

eth/contracts: Generate chainlink bindings

Makefile: Fix abigen bindings generation

Revert everything abigen

Turns out there's already bindings exported from the Chainlink lib.

go.mod: Add chainlink library

eth/watchers: Add pricefeed watcher

eth/watchers: Clean-up event watching code

eth/watchers: Improve price tracking

Revert "go.mod: Add chainlink library"

This reverts commit ac415bd.

Revert "Revert everything abigen"

This reverts commit b7c40b1.

eth/contracts: Gen bindings for proxy iface

eth/watchers: Use local bindings for contracts

eth/watchers: Simplify event subs logic

eth/watchers: Simplify&optimize truncated ticker

eth/watchers: Update decimals on fetch

eth/watchers: Improve handling of decimals

eth/watchers: Fix price rat creation

eth/watchers: Make sure we use UTC on truncated timer

eth/contracts/chainlink: Generate only V3 contract bindings

eth/watchers: Watch PriceFeed only with polling

eth/watchers: Add a retry logic on price update

eth/watchers: Use clog instead of fmt.Printf

* eth: Create separate pricefeed client unit

This will make the code more testable.

* eth: Add tests for pricefeed client

* eth/watchers: Add tests to the truncated ticker

Gosh that was much harder than I thought

* eth/watchers: Add tests for pricefeedwatcher

* eth: Add comments to the new components

* go fmt

* eth: Address minor review comments

* eth,eth/watchers: Improve pricefeed watcher interface

* eth/watchers: Remove truncated ticker tests

* cmd/livepeer: Use price feed watcher for dynamic pricePerPixel (#2981)

* eth/watchers: Create PriceFeed watcher

Makefile: Use mockgen binary from tool dependencies

eth/contracts: Add chainlink interfaces source

Makefile: Generate Chainlink contracts ABI

tools: Add abigen tool to repo

eth/contracts: Generate chainlink bindings

Makefile: Fix abigen bindings generation

Revert everything abigen

Turns out there's already bindings exported from the Chainlink lib.

go.mod: Add chainlink library

eth/watchers: Add pricefeed watcher

eth/watchers: Clean-up event watching code

eth/watchers: Improve price tracking

Revert "go.mod: Add chainlink library"

This reverts commit ac415bd.

Revert "Revert everything abigen"

This reverts commit b7c40b1.

eth/contracts: Gen bindings for proxy iface

eth/watchers: Use local bindings for contracts

eth/watchers: Simplify event subs logic

eth/watchers: Simplify&optimize truncated ticker

eth/watchers: Update decimals on fetch

eth/watchers: Improve handling of decimals

eth/watchers: Fix price rat creation

eth/watchers: Make sure we use UTC on truncated timer

eth/contracts/chainlink: Generate only V3 contract bindings

eth/watchers: Watch PriceFeed only with polling

eth/watchers: Add a retry logic on price update

eth/watchers: Use clog instead of fmt.Printf

* eth: Create separate pricefeed client unit

This will make the code more testable.

* eth: Add tests for pricefeed client

* eth/watchers: Add tests to the truncated ticker

Gosh that was much harder than I thought

* eth/watchers: Add tests for pricefeedwatcher

* eth: Add comments to the new components

* go fmt

* cmd: make pricePerUnit flags strings

* cmd: Allow price per unit to be speficied with a currency

Currently ignoring the currency value.

* cmd: Add logic to start price update loop

* cmd: Add flag for specifying price feed address

* cmd: Add a lil test to priceDataToWei

* TODO: Reminder for something I noticed is missing

* cmd/starter: Support currencies for custom broadcaster prices

* eth: Address minor review comments

* eth,eth/watchers: Improve pricefeed watcher interface

* eth/watchers: Fix pricefeed watcher after merge

* cmd,core,server: Support dynamic updates to price in USD

* eth/watchers: Remove truncated ticker tests

* eth/watchers: Finalize pricefeedwatcher docs/tests

* cmd: Address review comment

* core: Create tests for autoconvertedprice

* cmd,core: Move wei default to AutoConvertedPrice

* Address review comments

* cmd: Fix the e2e flow for setting/updating configs

* CHANGELOG

* cmd: Make sure pricePerPixel can be specified with e notation

Parse it directlty as a big.Rat from a raw string, like I was
doing for pricePerUnit in some places.

* Fix tests

Turns out tests were not running on my branch due to base branch

* go fmt

* core: Fix typo in comment

* cmd,server: Use 3 decimal points when logging PPP

Found out that's officially supported precision on the
discovery logic, so let's reflect that here.

* Release 0.7.3 (#2988)

* release v0.7.3

* release v0.7.3

* Revert "Bump ffmpeg version and nv-codec-headers" (#2989)

* Revert "Bump ffmpeg version and nv-codec-headers (#2973)"

This reverts commit cad6713.

* Revert "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)"

This reverts commit 6c09a9f.

* Reapply "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)"

This reverts commit ebbf210.

* Force ffmpeg reinstall

* Revert "Force ffmpeg reinstall"

This reverts commit 5adb9a5.

---------

Co-authored-by: Victor Elias <[email protected]>

* Bump LPMS (#2992)

* release v0.7.4 (#2993)

* server: Skip redundant maxPrice check in ongoing session (#2994)

* server: Remove maxPrice check mid-session

* server: Fix tests

* server: Fix erroneous usage of assert.EqualErrorf

When I was writing the tests for validatePrice I found out
we were using that function wrong in a couple places and
never checking any error. We were sending err.Error() to check
the error from err.

* server: Fix error checks after fixing assertion

* CHANGELOG

* server: Allow Os price to increase up to 2x mid-session (#2995)

* server: Allow dynamic (and sometimes >max) prices for Os

* CHANGELOG

* server,discovery: Allow B to use any O in case none match maxPrice (#2999)

* discovery: Ignore maxPrice on db_discovery queries

Still kept the feature on the db as it had all the tests
already implemented and could still be useful in the future.
I can remove it if preferred though.

* server: Get prices as big rats for selection

While this may not seem useful now since we just convert
them to floats on the probability calculation, it will be
useful later when comparing prices to max price.

* server: Add maxPrice filter logic on selection algorithm

* CHANGELOG

* server: Break filter in 2 functions

* Fix transcoding price metrics (#3001)

* ci(ai): add AI issue templates

This commit introduces two new AI-specific issue templates, aiming to streamline
the routing of AI subnet-related issues and feature requests to the appropriate team.

* ci(ai): add AI pull request labeler

This commit adds a pull request labeler action that automatically
attaches the `ai` label when a pull request is created to the `ai-video`
branch.

* ci: change issue template order and add PR labeler config (#3006)

* ci: change issue template order

This commit ensures that the main branch issue templates are put above
the AI related issue templates.

* ci(ai): add PR labeler config file

This commmit adds a https://github.com/actions/labeler configuration
file so that all PRs on the `ai-video` branch will be correctly labeled
with the `ai` label.

* ci(ai): fix incorrect labels (#3012)

* ci(ai): fix incorrect labels

This commit fixed the labels that were specified in the Issue Templates
to the one found in the repository.

* ci: rename labeler and remove trailing whitespace

* ci(ai): fix pull request config warning (#3018) (#3019)

* ci(ai): fix pull request config warning (#3018)

This commit gets rid of the Pull request labeler configuration file
warning.

* ci(ai): auto assign AI issues

This commit auto assigns the AI issues to the right member of the AI
team.

* ci(ai): cleanup labeler actions

This commit cleans up the labeler actions and ensure they run on the
right triggers.

* Initialize round by any B/O who has the initializeRound flag set to true (#3029)

* Fix CI Darwin Build (#3049)

* Fix CI

* Fix CI

* chore: fix function names (#3040)

Signed-off-by: kevincatty <[email protected]>
Co-authored-by: Rafał Leszko <[email protected]>

* Create option to filter Os by min livepeer version used (#3050)

* Update LPMS with the mobile transcoding fix (#3003)

* Release 0.7.5 (#3051)

* refactor: add -gateway and deprecate -broadcaster (#3053)

* refactor: add -gateway and deprecate -broadcaster

This commit adds the `gateway` flag and deprecates the `broadcaster` flag
per core team decision (details:
https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

---------

Co-authored-by: John | Elite Encoder <[email protected]>

* refactor(census): rename Broadcaster metrics to Gateway (#3055)

* refactor(census): rename Broadcaster metrics to Gateway

This commit renames the metrics related to Broadcaster to Gateway, following
a team decision. More details can be found in the discussion
here:
[Team Discussion Link](.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* refactor: add -pricePerGateway and deprecate -pricePerBroadcaster (#3056)

* refactor: add -pricePerGateway and deprecate -pricePerBroadcaster

This commit adds the `pricePerGateway` flag and deprecates the `pricePerBroadcaster` flag
per core team decision (details:
https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* refactor: remove redundant deprecation comment

This commit removes the `PricePerBroadcaster` deprecation comment since
this is already clear from the glog warning below.

* fix: correct the `pricePerBroadcaster` flag check

This commit ensures that the deprecation condition for the `pricePerBroadcaster`
flag properly handles the default empty string value.

* fix: ensure 'pricePerGateway' is used

This commit ensures that the `pricePerGateway` is correctly used instead
of the `pricePerBroadcaster` when it is set.

* refactor: deprecate 'pricePerGateway' broadcasters property in favor of 'gateways'

This commit updates the configuration to replace the `broadcasters` property
specified under the `pricePerGateway` flag with `gateways`. Additionally, it
ensures that a warning is issued when the deprecated property is still used.

* test: fix TestParseGetBroadcasterPrices test

This commit ensures that the TestParseGetBroadcasterPrices function uses
the new getGatewayPrices function.

* test: rename TestParseGetBroadcasterPrices to reflect Gateway naming

This commit updates the `TestParseGetBroadcasterPrices` function to
`TestParseGetGatewayPrices` to align with the new node naming convention.

* ci: protect Docker 'stable' tag (#3062)

This commit introduces a safeguard to ensure that the Docker image
tagged
as 'stable' is only pushed when a new tag is created on the stable
branch.
This prevents unintended updates to the stable Docker image, ensuring
consistency and reliability for users relying on the stable tag.

* Return appropriate errors when auth fails, not just 5xx (#3065)

* Return appropriate errors when auth fails, not just 5xx

* Fix unit tests for new signature

* Fix remaining tests

* Fix another test

* Refactor Forbidden to error type

* Refactor Forbidden to error type

---------

Co-authored-by: Rafał Leszko <[email protected]>

* ci: fix syntax error in Docker action tags (#3068)

* ci: fix syntax error in Docker action tags

This commit addresses a syntax error in the Docker image tag creation
step.

* ci(docker): ensure stable tag is created on master branch

This commit ensures that the stable tag is created on the master branch.

* chore: fix some comments (#3070)

Signed-off-by: linghuying <[email protected]>

* Add logging to selection_algorithm.go (#3076)

* Add logging to selection_algorithm.go

* Add even more logging

* Fix typo in logs (#3079)

* Add ctx to logging for selection algorithm (#3080)

* Add ctx to logging for selection algorithm

* Reorg imports

* Fix unit tests

* chore: make function comment match function name (#3081)

Signed-off-by: tongjicoder <[email protected]>

* refactor: rename internal references from Broadcaster to Gateway (#3060)

* refactor: rename internal references from Broadcaster to Gateway

This commit updates internal references from 'Broadcaster' to 'Gateway'
in accordance with the core team’s decision. For more details, refer to
the discussion: [Discord
Link](https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* Add logging to the session refresh (#3083)

* Add `/healthz` endpoint (#3095)

* Update LPMS to ffmpeg 7 (#3096)

* install_ffmpeg: point to LPMS

* Update to use ffmpeg7 LPMS

* release v0.7.6

* cmd: Use `-gateway` consistently

Avoid references to deprecated CLI flags.

* core: Rename 'InArray' to 'HasCapability' (#3118)

---------

Signed-off-by: kevincatty <[email protected]>
Signed-off-by: linghuying <[email protected]>
Signed-off-by: tongjicoder <[email protected]>
Co-authored-by: Victor Elias <[email protected]>
Co-authored-by: Rafał Leszko <[email protected]>
Co-authored-by: Thom Shutt <[email protected]>
Co-authored-by: Victor Elias <[email protected]>
Co-authored-by: kevincatty <[email protected]>
Co-authored-by: John | Elite Encoder <[email protected]>
Co-authored-by: linghuying <[email protected]>
Co-authored-by: tongjicoder <[email protected]>
Co-authored-by: Josh Allmann <[email protected]>
rickstaa added a commit that referenced this pull request Aug 7, 2024
* eth,eth/watcher: Create Chainlink price feed watcher (#2972)

* eth/watchers: Create PriceFeed watcher

Makefile: Use mockgen binary from tool dependencies

eth/contracts: Add chainlink interfaces source

Makefile: Generate Chainlink contracts ABI

tools: Add abigen tool to repo

eth/contracts: Generate chainlink bindings

Makefile: Fix abigen bindings generation

Revert everything abigen

Turns out there's already bindings exported from the Chainlink lib.

go.mod: Add chainlink library

eth/watchers: Add pricefeed watcher

eth/watchers: Clean-up event watching code

eth/watchers: Improve price tracking

Revert "go.mod: Add chainlink library"

This reverts commit ac415bd.

Revert "Revert everything abigen"

This reverts commit b7c40b1.

eth/contracts: Gen bindings for proxy iface

eth/watchers: Use local bindings for contracts

eth/watchers: Simplify event subs logic

eth/watchers: Simplify&optimize truncated ticker

eth/watchers: Update decimals on fetch

eth/watchers: Improve handling of decimals

eth/watchers: Fix price rat creation

eth/watchers: Make sure we use UTC on truncated timer

eth/contracts/chainlink: Generate only V3 contract bindings

eth/watchers: Watch PriceFeed only with polling

eth/watchers: Add a retry logic on price update

eth/watchers: Use clog instead of fmt.Printf

* eth: Create separate pricefeed client unit

This will make the code more testable.

* eth: Add tests for pricefeed client

* eth/watchers: Add tests to the truncated ticker

Gosh that was much harder than I thought

* eth/watchers: Add tests for pricefeedwatcher

* eth: Add comments to the new components

* go fmt

* eth: Address minor review comments

* eth,eth/watchers: Improve pricefeed watcher interface

* eth/watchers: Remove truncated ticker tests

* cmd/livepeer: Use price feed watcher for dynamic pricePerPixel (#2981)

* eth/watchers: Create PriceFeed watcher

Makefile: Use mockgen binary from tool dependencies

eth/contracts: Add chainlink interfaces source

Makefile: Generate Chainlink contracts ABI

tools: Add abigen tool to repo

eth/contracts: Generate chainlink bindings

Makefile: Fix abigen bindings generation

Revert everything abigen

Turns out there's already bindings exported from the Chainlink lib.

go.mod: Add chainlink library

eth/watchers: Add pricefeed watcher

eth/watchers: Clean-up event watching code

eth/watchers: Improve price tracking

Revert "go.mod: Add chainlink library"

This reverts commit ac415bd.

Revert "Revert everything abigen"

This reverts commit b7c40b1.

eth/contracts: Gen bindings for proxy iface

eth/watchers: Use local bindings for contracts

eth/watchers: Simplify event subs logic

eth/watchers: Simplify&optimize truncated ticker

eth/watchers: Update decimals on fetch

eth/watchers: Improve handling of decimals

eth/watchers: Fix price rat creation

eth/watchers: Make sure we use UTC on truncated timer

eth/contracts/chainlink: Generate only V3 contract bindings

eth/watchers: Watch PriceFeed only with polling

eth/watchers: Add a retry logic on price update

eth/watchers: Use clog instead of fmt.Printf

* eth: Create separate pricefeed client unit

This will make the code more testable.

* eth: Add tests for pricefeed client

* eth/watchers: Add tests to the truncated ticker

Gosh that was much harder than I thought

* eth/watchers: Add tests for pricefeedwatcher

* eth: Add comments to the new components

* go fmt

* cmd: make pricePerUnit flags strings

* cmd: Allow price per unit to be speficied with a currency

Currently ignoring the currency value.

* cmd: Add logic to start price update loop

* cmd: Add flag for specifying price feed address

* cmd: Add a lil test to priceDataToWei

* TODO: Reminder for something I noticed is missing

* cmd/starter: Support currencies for custom broadcaster prices

* eth: Address minor review comments

* eth,eth/watchers: Improve pricefeed watcher interface

* eth/watchers: Fix pricefeed watcher after merge

* cmd,core,server: Support dynamic updates to price in USD

* eth/watchers: Remove truncated ticker tests

* eth/watchers: Finalize pricefeedwatcher docs/tests

* cmd: Address review comment

* core: Create tests for autoconvertedprice

* cmd,core: Move wei default to AutoConvertedPrice

* Address review comments

* cmd: Fix the e2e flow for setting/updating configs

* CHANGELOG

* cmd: Make sure pricePerPixel can be specified with e notation

Parse it directlty as a big.Rat from a raw string, like I was
doing for pricePerUnit in some places.

* Fix tests

Turns out tests were not running on my branch due to base branch

* go fmt

* core: Fix typo in comment

* cmd,server: Use 3 decimal points when logging PPP

Found out that's officially supported precision on the
discovery logic, so let's reflect that here.

* Release 0.7.3 (#2988)

* release v0.7.3

* release v0.7.3

* Revert "Bump ffmpeg version and nv-codec-headers" (#2989)

* Revert "Bump ffmpeg version and nv-codec-headers (#2973)"

This reverts commit cad6713.

* Revert "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)"

This reverts commit 6c09a9f.

* Reapply "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)"

This reverts commit ebbf210.

* Force ffmpeg reinstall

* Revert "Force ffmpeg reinstall"

This reverts commit 5adb9a5.

---------

Co-authored-by: Victor Elias <[email protected]>

* Bump LPMS (#2992)

* release v0.7.4 (#2993)

* server: Skip redundant maxPrice check in ongoing session (#2994)

* server: Remove maxPrice check mid-session

* server: Fix tests

* server: Fix erroneous usage of assert.EqualErrorf

When I was writing the tests for validatePrice I found out
we were using that function wrong in a couple places and
never checking any error. We were sending err.Error() to check
the error from err.

* server: Fix error checks after fixing assertion

* CHANGELOG

* server: Allow Os price to increase up to 2x mid-session (#2995)

* server: Allow dynamic (and sometimes >max) prices for Os

* CHANGELOG

* server,discovery: Allow B to use any O in case none match maxPrice (#2999)

* discovery: Ignore maxPrice on db_discovery queries

Still kept the feature on the db as it had all the tests
already implemented and could still be useful in the future.
I can remove it if preferred though.

* server: Get prices as big rats for selection

While this may not seem useful now since we just convert
them to floats on the probability calculation, it will be
useful later when comparing prices to max price.

* server: Add maxPrice filter logic on selection algorithm

* CHANGELOG

* server: Break filter in 2 functions

* Fix transcoding price metrics (#3001)

* ci(ai): add AI issue templates

This commit introduces two new AI-specific issue templates, aiming to streamline
the routing of AI subnet-related issues and feature requests to the appropriate team.

* ci(ai): add AI pull request labeler

This commit adds a pull request labeler action that automatically
attaches the `ai` label when a pull request is created to the `ai-video`
branch.

* ci: change issue template order and add PR labeler config (#3006)

* ci: change issue template order

This commit ensures that the main branch issue templates are put above
the AI related issue templates.

* ci(ai): add PR labeler config file

This commmit adds a https://github.com/actions/labeler configuration
file so that all PRs on the `ai-video` branch will be correctly labeled
with the `ai` label.

* ci(ai): fix incorrect labels (#3012)

* ci(ai): fix incorrect labels

This commit fixed the labels that were specified in the Issue Templates
to the one found in the repository.

* ci: rename labeler and remove trailing whitespace

* ci(ai): fix pull request config warning (#3018) (#3019)

* ci(ai): fix pull request config warning (#3018)

This commit gets rid of the Pull request labeler configuration file
warning.

* ci(ai): auto assign AI issues

This commit auto assigns the AI issues to the right member of the AI
team.

* ci(ai): cleanup labeler actions

This commit cleans up the labeler actions and ensure they run on the
right triggers.

* Initialize round by any B/O who has the initializeRound flag set to true (#3029)

* Fix CI Darwin Build (#3049)

* Fix CI

* Fix CI

* chore: fix function names (#3040)

Signed-off-by: kevincatty <[email protected]>
Co-authored-by: Rafał Leszko <[email protected]>

* Create option to filter Os by min livepeer version used (#3050)

* Update LPMS with the mobile transcoding fix (#3003)

* Release 0.7.5 (#3051)

* refactor: add -gateway and deprecate -broadcaster (#3053)

* refactor: add -gateway and deprecate -broadcaster

This commit adds the `gateway` flag and deprecates the `broadcaster` flag
per core team decision (details:
https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

---------

Co-authored-by: John | Elite Encoder <[email protected]>

* refactor(census): rename Broadcaster metrics to Gateway (#3055)

* refactor(census): rename Broadcaster metrics to Gateway

This commit renames the metrics related to Broadcaster to Gateway, following
a team decision. More details can be found in the discussion
here:
[Team Discussion Link](.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* refactor: add -pricePerGateway and deprecate -pricePerBroadcaster (#3056)

* refactor: add -pricePerGateway and deprecate -pricePerBroadcaster

This commit adds the `pricePerGateway` flag and deprecates the `pricePerBroadcaster` flag
per core team decision (details:
https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* refactor: remove redundant deprecation comment

This commit removes the `PricePerBroadcaster` deprecation comment since
this is already clear from the glog warning below.

* fix: correct the `pricePerBroadcaster` flag check

This commit ensures that the deprecation condition for the `pricePerBroadcaster`
flag properly handles the default empty string value.

* fix: ensure 'pricePerGateway' is used

This commit ensures that the `pricePerGateway` is correctly used instead
of the `pricePerBroadcaster` when it is set.

* refactor: deprecate 'pricePerGateway' broadcasters property in favor of 'gateways'

This commit updates the configuration to replace the `broadcasters` property
specified under the `pricePerGateway` flag with `gateways`. Additionally, it
ensures that a warning is issued when the deprecated property is still used.

* test: fix TestParseGetBroadcasterPrices test

This commit ensures that the TestParseGetBroadcasterPrices function uses
the new getGatewayPrices function.

* test: rename TestParseGetBroadcasterPrices to reflect Gateway naming

This commit updates the `TestParseGetBroadcasterPrices` function to
`TestParseGetGatewayPrices` to align with the new node naming convention.

* ci: protect Docker 'stable' tag (#3062)

This commit introduces a safeguard to ensure that the Docker image
tagged
as 'stable' is only pushed when a new tag is created on the stable
branch.
This prevents unintended updates to the stable Docker image, ensuring
consistency and reliability for users relying on the stable tag.

* Return appropriate errors when auth fails, not just 5xx (#3065)

* Return appropriate errors when auth fails, not just 5xx

* Fix unit tests for new signature

* Fix remaining tests

* Fix another test

* Refactor Forbidden to error type

* Refactor Forbidden to error type

---------

Co-authored-by: Rafał Leszko <[email protected]>

* ci: fix syntax error in Docker action tags (#3068)

* ci: fix syntax error in Docker action tags

This commit addresses a syntax error in the Docker image tag creation
step.

* ci(docker): ensure stable tag is created on master branch

This commit ensures that the stable tag is created on the master branch.

* chore: fix some comments (#3070)

Signed-off-by: linghuying <[email protected]>

* Add logging to selection_algorithm.go (#3076)

* Add logging to selection_algorithm.go

* Add even more logging

* Fix typo in logs (#3079)

* Add ctx to logging for selection algorithm (#3080)

* Add ctx to logging for selection algorithm

* Reorg imports

* Fix unit tests

* chore: make function comment match function name (#3081)

Signed-off-by: tongjicoder <[email protected]>

* refactor: rename internal references from Broadcaster to Gateway (#3060)

* refactor: rename internal references from Broadcaster to Gateway

This commit updates internal references from 'Broadcaster' to 'Gateway'
in accordance with the core team’s decision. For more details, refer to
the discussion: [Discord
Link](https://discord.com/channels/423160867534929930/1051963444598943784/1210356864643109004).

* chore: update pending changelog

* Add logging to the session refresh (#3083)

* Add `/healthz` endpoint (#3095)

* Update LPMS to ffmpeg 7 (#3096)

* install_ffmpeg: point to LPMS

* Update to use ffmpeg7 LPMS

* release v0.7.6

* chore(ai): ensure ai-video-rebased ffmpeg file is used

Since the lpms `ai-video` and `ai-video-rebase-main` branches are not
yet merged into the main branch we need to ensure the right AI
install_ffmpeg.sh script is used.

* chore(ai): remove local go module dependency

This commit removes the local go module dependency to lpms that was
accidentally commited.

* test: fix broadcast test

This commit fixes the bugs that were introduced by the AI codebas einto
the broadcast test functions.

* feat(ai): add dynamic pricePerUnit feature to AI pricing

This commit ensures that Orchestrators can set their pricing in USD and
the price gets updated dynamically.

* cmd: Use `-gateway` consistently

Avoid references to deprecated CLI flags.

* feat(ai): add minLivepeerVersion constraint and IgnorePreReleaseVersions

- Adds minLivepeerVersion constraint from
  #3050 to the AI codebase.
- Introduces `IgnorePreReleaseVersions` flag to filter out pre-release versions.

This update is essential for distinguishing AI subnet versions, which use pre-release
suffixes, from standard transcoding releases. This new flag can be
removed when merging in the main branch.

* fix(ai): fix offchain 'PriceFeedWatcher is not initialized' error

This commit ensures that the `PriceFeedWatcher is not initialized` error
is not thrown when the software is run in `offchain` mode.

* test: add pre-release suffix min version tests

This commit adds some tests to check if pre-release versions are
correctly handled when filtering orchestrators based on minimum version.

* feat: simplify pre-release version filter logic

This commit removes the POC `ignorePreReleaseVersions` command line
argument for logic in the `LivepeerVersionCompatibleWith` which ensures
that pre-release versions are only checked when the gateway specifies as
pre-release suffix in the `orchMinLivepeerVersion` command line
argument.

* feat: allow Gateways to filter by pre-release

This commit gives Gateways the ability to filter by pre-release suffix.
When a pre-release suffix is specified in the `OrchMinLivepeerVersion`
command line argument the software now also checks the pre-release
version suffix on the orchestrator.

* refactor(ai): rename capability constraint variable

This commit renames the orchConstraints variable in the capabilities.go
file to better reflect that it are constraints per capabilities.

* chore(ai): remove lpms local dependency

This commit ensure that the right remote dependency is used for the lpms
package.

* chore(ai): update lpms dependency

This commit updates the lpms dependency to the lastest version of the
`ai-video-rebase-main`.

* feat: remove AI specific minVersion constraint logic

This commit removes the ai-specific logic that allows ai suffixes to
work during version constraint checking. This was done to add it back in
a seperate commit so that we can always revert.

* feat(ai): Add AI suffix handling for min version logic

This commit introduces logic to handle version constraints with AI-specific
suffixes (e.g., v0.7.6-ai.1). This ensures compatibility during version
constraint filtering. Note that this logic should be removed when merging
into the master branch.

* core: Make the AI config take a big rat

* fix: add AIModels currency config field and fix pixelsPerUnit handling

This commit adds a new `currency` field to the `AIModelConfig` to specify the
currency. Additionally, it improves the AI startup code in `starter.go` to
correctly handle parsing of this currency while ensuring compatibility with
'offchain' mode. Further improvements to the AI startup code are deferred to
avoid conflicts with existing pull requests.

* fix(ai): temporarily disable arm64 builds

This commit disables the linux/arm64 for now as we haven't yet added support it.
This prevent the Docker CI from failing.

---------

Signed-off-by: kevincatty <[email protected]>
Signed-off-by: linghuying <[email protected]>
Signed-off-by: tongjicoder <[email protected]>
Co-authored-by: Victor Elias <[email protected]>
Co-authored-by: Rafał Leszko <[email protected]>
Co-authored-by: Thom Shutt <[email protected]>
Co-authored-by: Victor Elias <[email protected]>
Co-authored-by: kevincatty <[email protected]>
Co-authored-by: John | Elite Encoder <[email protected]>
Co-authored-by: linghuying <[email protected]>
Co-authored-by: tongjicoder <[email protected]>
Co-authored-by: Josh Allmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants