-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #512 from ethereum/client-diversity-warning
Extract and re-use ClientDiversityWarning [Fixes #508]
- Loading branch information
Showing
5 changed files
with
97 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Libary imports | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { FormattedMessage } from 'react-intl'; | ||
// Component imports | ||
import { Text } from './Text'; | ||
import { Link } from './Link'; | ||
|
||
const Container = styled(Text as any)` | ||
background: #ffdeb32e; | ||
border: 1px solid burlywood; | ||
padding: 30px; | ||
border-radius: 4px; | ||
`; | ||
|
||
export interface ClientDiversityWarningProps { | ||
children: React.ReactNode; | ||
className?: string; | ||
} | ||
|
||
export const ClientDiversityWarning = (props: ClientDiversityWarningProps) => { | ||
const { children, className } = props; | ||
return ( | ||
<Container className={className}> | ||
{!!children && <p>{children}</p>} | ||
<p> | ||
<FormattedMessage | ||
defaultMessage="Client diversity is extremely important for the network health of Ethereum: | ||
A bug in a client with a share of over 33% can cause Ethereum to go offline. If the client has | ||
a supermajority (>66%), a bug could cause the chain to incorrectly split, potentially leading to | ||
slashing." | ||
/> | ||
</p> | ||
<p> | ||
<FormattedMessage defaultMessage="If at all possible, consider running another client at this time to help protect yourself and the network." /> | ||
</p> | ||
<ul> | ||
<li> | ||
<Link | ||
to="https://ethereum.org/en/developers/docs/nodes-and-clients/client-diversity/" | ||
primary | ||
> | ||
<FormattedMessage defaultMessage="More on client diversity" /> | ||
</Link> | ||
</li> | ||
<li> | ||
<Link to="https://clientdiversity.org/" primary> | ||
<FormattedMessage defaultMessage="Latest data on network client usage" /> | ||
</Link> | ||
</li> | ||
</ul> | ||
</Container> | ||
); | ||
}; |
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
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
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
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