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
pm, server: broadcaster deposit & withdrawround self-check #1212
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yondonfu
requested changes
Nov 29, 2019
yondonfu
requested changes
Dec 4, 2019
yondonfu
reviewed
Jan 24, 2020
kyriediculous
force-pushed
the
nv/b-deposit-withdrawround-check
branch
2 times, most recently
from
January 24, 2020 22:03
11be6ab
to
1cec746
Compare
yondonfu
reviewed
Jan 24, 2020
yondonfu
reviewed
Jan 24, 2020
yondonfu
reviewed
Jan 24, 2020
yondonfu
reviewed
Jan 27, 2020
yondonfu
reviewed
Jan 27, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good - let's rebase
kyriediculous
force-pushed
the
nv/b-deposit-withdrawround-check
branch
from
January 27, 2020 22:11
3b14e74
to
7ab94f6
Compare
rebased ! |
yondonfu
approved these changes
Jan 27, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pm, server: close RTMP connection when sender validation fails
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this pull request do? Explain your changes. (required)
Currently, a broadcaster in on-chain mode will alert a user that a broadcast session cannot be started if the deposit is 0, we now expand this functionality to also check whether a broadcaster has unlocked it's reserve & deposit and is nearing its
WithdrawRound
In addition we now favor using cached values (using
SenderWatcher
) over RPC calls to a remote ethereum node to do these checksSpecific updates (required)
Validate()
method topm.Sender
(perhaps "SelfValidate" is a better name?)pm.Sender.Validate
inLivepeerServer.registerConnection()
return an error if self validation fails and prevent from sending segments to O'sHow did you test each of these updates (required)
ran unit tests
Does this pull request close any open issues?
Fixes #1184
Checklist:
./test.sh
passAlternatives Considered
pm.Sender.StartSession
so we don't have to expand the API surface. We would have to change the signature to return an error when validation logic fails. This will result in an empty sessions list and transcoding will not happen. Harder to propagate the correct error here though.pm.NewSender
and return when we hit an error, this will however shut down the node and prevents a B from re-locking or re-depositing through the CLI