-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add terms of use acceptance requirement #7527
Add terms of use acceptance requirement #7527
Conversation
beacon-chain/main.go
Outdated
// verify if ToS accepted | ||
if accepted, err := tos.VerifyTosAcceptedOrPrompt(ctx); accepted != true { | ||
if err != nil { | ||
return err | ||
} | ||
return fmt.Errorf("you have to accept TERMS AND CONDITIONS in order to continue") | ||
} |
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.
I know it's probably not possible in your current implementation, but it would be safer to handle these values individually. If VerifyTosAcceptedOrPrompt ever returned true and an error, then your check would happily accept it. This could happen by misuse or accidental changes in the future.
Better to be safe than sorry, I think!
// verify if ToS accepted | |
if accepted, err := tos.VerifyTosAcceptedOrPrompt(ctx); accepted != true { | |
if err != nil { | |
return err | |
} | |
return fmt.Errorf("you have to accept TERMS AND CONDITIONS in order to continue") | |
} | |
accepted, err := tos.VerifyTosAcceptedOrPrompt(ctx); | |
if err != nil { | |
return err | |
} | |
if !accepted { | |
return errors.New("you have to accept Terms and Conditions in order to continue") | |
} |
shared/tos/tos.go
Outdated
acceptTosPromptText = ` | ||
Prysmatic Labs | ||
|
||
TERMS AND CONDITIONS: https://docs.prylabs.network/docs/licenses/prysmatic-labs | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
Type "yes" to accept this terms and conditions[yes/no]:` | ||
) |
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.
We have some specific copy for this.
Let us get back to you with it, tomorrow.
validator/main.go
Outdated
@@ -317,6 +318,14 @@ contract in order to activate the validator client`, | |||
app.Flags = appFlags | |||
|
|||
app.Before = func(ctx *cli.Context) error { | |||
// verify if ToS accepted | |||
if accepted, err := tos.VerifyTosAcceptedOrPrompt(ctx); accepted != true { |
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.
Same suggestion here please.
Codecov Report
@@ Coverage Diff @@
## master #7527 +/- ##
==========================================
- Coverage 61.71% 61.68% -0.04%
==========================================
Files 421 422 +1
Lines 29479 29451 -28
==========================================
- Hits 18193 18166 -27
- Misses 8371 8373 +2
+ Partials 2915 2912 -3 |
You need to add this flag for e2e as well: prysm/endtoend/components/beacon_node.go Line 56 in 492944d
|
…add-accept-tos
…add-accept-tos
…add-accept-tos
hi @bidlocode here are the terms of service. Please add it to a TERMS_OF_SERVICE.md file at the repo top-level and add a log that links users to that file: Terms of UseEffective as of Oct 14, 2020 By downloading, accessing or using the Prysm implementation (“Prysm”), you (referenced herein as “you” or the “user”) certify that you have read and agreed to the terms and conditions below (the “Terms”) which form a binding contract between you and Prysmatic Labs (referenced herein as “we” or “us”). If you do not agree to the Terms, do not download or use Prysm. About PrysmPrysm is a client implementation for Ethereum 2.0 Phase 0 protocol for a proof-of-stake blockchain. To participate in the network, a user must send ETH from Eth1.0 chain into a validator deposit contract, which will queue in the user as a validator in the system. Validators participate in proposing and voting on blocks in the protocol, and the network applies rewards/penalties based on their behavior. A detailed set of installation and usage instructions as well as breakdowns of each individual component are available in the official documentation portal, however, we do not warrant the accuracy, completeness or usefulness of this documentation. Any reliance you place on such information is strictly at your own risk. Licensing TermsPrysm is a fully open-source software program licensed pursuant to the GNU General Public License v3.0. The Prysmatic Labs name, the term “Prysm” and all related names, logos, product and service names, designs and slogans are trademarks of Prysmatic Labs or its affiliates or licensors. You must not use such marks without our prior written permission. Risks of Operating PrysmThe use of Prysm and acting as a validator on the Ethereum 2.0 network can lead to loss of money. Ethereum is still an experimental system and ETH remain a risky investment. You alone are responsible for your actions on Prysm including the security of your ETH and meeting any applicable minimum system requirements. Use of Prysm and the ability to receive rewards or penalties may be affected at any time by mistakes made by the user or other users, software problems such as bugs, errors, incorrectly constructed transactions, unsafe cryptographic libraries or malware affecting the network, technical failures in the hardware of a user, security problems experienced by a user and/or actions or inactions of third parties and/or events experienced by third parties, among other risks. We cannot and do not guarantee that any user of Prysm will make money, that the Prysm network will operate in accordance with the documentation or that transactions will be effective or secure. We make no claims that Prysm is appropriate or permitted for use in any specific jurisdiction. Access to Prysm may not be legal by certain persons or in certain jurisdictions or countries. If you access Prysm, you do so on your own initiative and are responsible for compliance with local laws. Some Internet plans will charge an additional amount for any excess upload bandwidth used that isn’t included in the plan and may terminate your connection without warning because of overuse. We advise that you check whether your Internet connection is subjected to such limitations and monitor your bandwidth use so that you can stop Prysm before you reach your upload limit. Warranty DisclaimerPRYSM IS PROVIDED ON AN “AS-IS” BASIS AND MAY INCLUDE ERRORS, OMISSIONS, OR OTHER INACCURACIES. PRYSMATIC LABS AND ITS CONTRIBUTORS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT PRYSM FOR ANY PURPOSE, AND HEREBY EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT OR ANY OTHER IMPLIED WARRANTY UNDER THE UNIFORM COMPUTER INFORMATION TRANSACTIONS ACT AS ENACTED BY ANY STATE. WE ALSO MAKE NO REPRESENTATIONS OR WARRANTIES THAT PRYSM WILL OPERATE ERROR-FREE, UNINTERRUPTED, OR IN A MANNER THAT WILL MEET YOUR REQUIREMENTS AND/OR NEEDS. THEREFORE, YOU ASSUME THE ENTIRE RISK REGARDING THE QUALITY AND/OR PERFORMANCE OF PRYSM AND ANY TRANSACTIONS ENTERED INTO THEREON. Limitation of LiabilityIn no event will Prysmatic Labs or any of its contributors be liable, whether in contract, warranty, tort (including negligence, whether active, passive or imputed), product liability, strict liability or other theory, breach of statutory duty or otherwise arising out of, or in connection with, your use of Prysm, for any direct, indirect, incidental, special or consequential damages (including any loss of profits or data, business interruption or other pecuniary loss, or damage, loss or other compromise of data, in each case whether direct, indirect, incidental, special or consequential) arising out of use Prysm, even if we or other users have been advised of the possibility of such damages. The foregoing limitations and disclaimers shall apply to the maximum extent permitted by applicable law, even if any remedy fails of its essential purpose. You acknowledge and agrees that the limitations of liability afforded us hereunder constitute a material and actual inducement and condition to entering into these Terms, and are reasonable, fair and equitable in scope to protect our legitimate interests in light of the fact that we are not receiving consideration from you for providing Prysm. IndemnificationTo the maximum extent permitted by law, you will defend, indemnify and hold Prysmatic Labs and its contributors harmless from and against any and all claims, actions, suits, investigations, or proceedings by any third party (including any party or purported party to or beneficiary or purported beneficiary of any transaction on Prysm), as well as any and all losses, liabilities, Compliance with Laws and Tax ObligationsYour use of Prysm is subject to all applicable laws of any governmental authority, including, without limitation, federal, state and foreign securities laws, tax laws, tariff and trade laws, ordinances, judgments, decrees, injunctions, writs and orders or like actions of any governmental authority and rules, regulations, orders, interpretations, licenses, and permits of any federal, MiscellaneousThese Terms will be construed and enforced in accordance with the laws of the Illinois as applied to agreements entered into and completely performed in Illinois. You agree to the personal jurisdiction by and venue in Illinois and waive any objection to such jurisdiction or venue. We reserve the right to revise these Terms, and your rights and obligations are at all times subject to the then-current Terms provided on Prysm. Your continued use of Prysm constitutes acceptance of such revised Terms. These Terms constitute the entire agreement between you and Prysmatic Labs regarding use of Prysm and will supersede all prior agreements whether, written or oral. No usage of trade or other regular practice or method of dealing between the parties will be used to modify, interpret, supplement, or alter the terms of these Terms. If any portion of these Terms is held invalid or unenforceable, such invalidity or enforceability will not affect the other provisions of these Terms, which will remain in full force and effect, and the invalid or unenforceable portion will be given effect to the greatest extent possible. The failure of a party to require performance of any provision will not affect that party’s right to require performance at any time thereafter, nor will a waiver of any breach or default of these Terms or any provision of these Terms constitute a waiver of any subsequent breach or default or a waiver of the provision itself. |
6b41800
to
ecf23b1
Compare
The flag does not work with validator.
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.
I think we should add this to slasher/main.go
just to be very safe
I just tested this flag with the validator and I got this error.
|
shared/cmd/flags.go
Outdated
@@ -203,6 +203,11 @@ var ( | |||
Usage: "Integer to define max recieve message call size (default: 4194304 (for 4MB))", | |||
Value: 1 << 22, | |||
} | |||
// AcceptTosFlag specifies user acceptance of ToS for non-interactive environments |
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.
// AcceptTosFlag specifies user acceptance of ToS for non-interactive environments | |
// AcceptTosFlag specifies user acceptance of ToS for non-interactive environments. |
shared/tos/tos.go
Outdated
TERMS AND CONDITIONS: https://github.com/prysmaticlabs/prysm/blob/master/TERMS_OF_SERVICE.md | ||
|
||
|
||
Type "accept" to accept this terms and conditions[accept/decline]:` |
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.
Type "accept" to accept this terms and conditions[accept/decline]:` | |
Type "accept" to accept this terms and conditions [accept/decline]:` |
shared/tos/tos.go
Outdated
log = logrus.WithField("prefix", "tos") | ||
) | ||
|
||
// VerifyTosAcceptedOrPrompt check if Tos was accepted before or asks to accept |
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.
// VerifyTosAcceptedOrPrompt check if Tos was accepted before or asks to accept | |
// VerifyTosAcceptedOrPrompt check if Tos was accepted before or asks to accept. |
Please add the flag to the validator e2e flags prysm/endtoend/components/validator.go Line 72 in 0a00738
and slasher e2e prysm/endtoend/components/slasher.go Line 37 in 0a00738
|
…add-accept-tos
# validator/BUILD.bazel # validator/main.go
@@ -71,6 +71,7 @@ var appFlags = []cli.Flag{ | |||
flags.BeaconRPCProviderFlag, | |||
flags.EnableHistoricalDetectionFlag, | |||
flags.SpanCacheSize, | |||
cmd.AcceptTosFlag, | |||
} | |||
|
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.
I think we want to add VerifyTosAcceptedOrPrompt
here as well
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.
Thanks!
What type of PR is this?
Add terms of use acceptance requirement to beacon chain and validator process.
What does this PR do? Why is it needed?