Merge pull request #24 from ethereum/downloads-desktop

Downloads desktop
pull/26459/head^2
Nicolás Quiroz 2 years ago committed by GitHub
commit e398c08f76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/components/UI/Header.tsx
  2. 144
      src/components/UI/downloads/DownloadsHero.tsx
  3. 43
      src/components/UI/downloads/DownloadsSection.tsx
  4. 42
      src/components/UI/downloads/SpecificVersionsSection.tsx
  5. 1
      src/components/UI/downloads/index.ts
  6. 2
      src/components/UI/homepage/HomeHero.tsx
  7. 11
      src/components/UI/icons/DiscordIcon.tsx
  8. 11
      src/components/UI/icons/GitHubIcon.tsx
  9. 11
      src/components/UI/icons/TwitterIcon.tsx
  10. 6
      src/components/UI/icons/index.ts
  11. 21
      src/components/layouts/Footer.tsx
  12. 2
      src/components/layouts/Layout.tsx
  13. 61
      src/pages/docs/developers/evm-tracing/built-in-tracers.md
  14. 2
      src/pages/docs/developers/evm-tracing/custom-tracer.md
  15. 18
      src/pages/docs/developers/evm-tracing/index.md
  16. 3
      src/pages/docs/developers/geth-developer/dev-guide.md
  17. 13
      src/pages/docs/fundamentals/account-management.md
  18. 3
      src/pages/docs/fundamentals/logs.md
  19. 2
      src/pages/docs/fundamentals/node-architecture.md
  20. 7
      src/pages/docs/fundamentals/sync-modes.md
  21. 2
      src/pages/docs/interacting-with-geth/javascript-console.md
  22. 47
      src/pages/docs/interacting-with-geth/javascript-console_contracts.md
  23. 4
      src/pages/docs/interacting-with-geth/rpc/ns-eth.md
  24. 218
      src/pages/downloads.tsx
  25. 13
      src/theme/components/Button.ts
  26. 8
      src/theme/foundations/textStyles.ts

@ -17,14 +17,12 @@ export const Header: FC = () => {
p={4}
justifyContent='center'
alignItems='flex-start'
borderRight={{ base: 'none', sm: '2px solid #11866f'}}
borderRight={{ base: 'none', sm: '2px solid #11866f' }}
flexGrow={2}
>
<NextLink href={'/'} passHref>
<Link _hover={{ textDecoration: 'none' }}>
<Text textStyle='header-font'>
go-ethereum
</Text>
<Text textStyle='header-font'>go-ethereum</Text>
</Link>
</NextLink>
</Stack>
@ -96,10 +94,7 @@ export const Header: FC = () => {
</Stack>
{/* DARK MODE SWITCH */}
<Box
p={4}
borderRight={{ base: '2px solid #11866f', md: 'none' }}
>
<Box p={4} borderRight={{ base: '2px solid #11866f', md: 'none' }}>
<MoonIcon />
</Box>

@ -1,4 +1,14 @@
import { Box, Button, Image, Link, Stack, HStack, Text } from '@chakra-ui/react';
import {
Box,
Center,
Button,
Grid,
Image,
Link,
Stack,
HStack,
Text
} from '@chakra-ui/react';
import { FC } from 'react';
import NextLink from 'next/link';
@ -29,61 +39,101 @@ export const DownloadsHero: FC<DownloadsHero> = ({
DOWNLOAD_HEADER_BUTTONS.sourceCode.buildURL = sourceCodeURL;
return (
<Stack border='3px solid' borderColor='brand.light.primary' py={4} px={4}>
<Stack alignItems='center'>
<Image src='/images/pages/gopher-downloads-front-light.svg' alt='Gopher plugged in' />
</Stack>
<Grid
border='3px solid'
borderColor='brand.light.primary'
p={4}
templateColumns={{ base: 'repeat(1, 1fr)', lg: '1fr 430px' }}
gap={4}
>
<Stack>
<Grid
mb={4}
templateColumns={{ base: 'repeat(1, 1fr)', md: '1fr 300px', lg: '1fr' }}
gap={4}
p={4}
>
<Stack>
<Box as='h1' textStyle='h1'>
Download go-ethereum
</Box>
<Box mb={4}>
<Box as='h1' textStyle='h1'>
Download go-ethereum
</Box>
<Text
// TODO: move text style to theme
fontFamily='"JetBrains Mono", monospace'
lineHeight='21px'
mb={{base: '4 !important', md: '8 !important'}}
>
{currentBuildName} ({currentBuildVersion})
</Text>
<Text
// TODO: move text style to theme
fontFamily='"JetBrains Mono", monospace'
lineHeight='21px'
mb={8}
>
{currentBuildName} ({currentBuildVersion})
</Text>
<Text mb={4}>
You can download the latest 64-bit stable release of Geth for our primary platforms
below. Packages for all supported platforms, as well as develop builds, can be found
further down the page. If you&apos;re looking to install Geth and/or associated tools
via your favorite package manager, please check our installation guide.
</Text>
</Stack>
<Text mb={4}>
You can download the latest 64-bit stable release of Geth for our primary platforms below.
Packages for all supported platforms, as well as develop builds, can be found further down
the page. If you&apos;re looking to install Geth and/or associated tools via your favorite
package manager, please check our installation guide.
</Text>
<Stack
py={{ base: 0 }}
px={{ base: 8 }}
flex={{ base: 'none' }}
display={{ base: 'block', lg: 'none' }}
order={{base: -1, md: 1}}
>
<Center>
<Image
src='/images/pages/gopher-downloads-front-light.svg'
alt='Gopher plugged in'
w={{ md: 72 }}
/>
</Center>
</Stack>
</Grid>
{Object.keys(DOWNLOAD_HEADER_BUTTONS).map((key: string) => {
return (
<NextLink key={key} href={DOWNLOAD_HEADER_BUTTONS[key].buildURL} passHref>
<Button as='a' variant='primary' width={{ base: '100%' }} p={8} mb={4}>
<HStack spacing={4}>
<Stack alignItems='center'>
<Image
src={DOWNLOAD_HEADER_BUTTONS[key].image}
alt={DOWNLOAD_HEADER_BUTTONS[key].imageAlt}
/>
</Stack>
<Box>
<Text textStyle='downloads-button-label'>
For {DOWNLOAD_HEADER_BUTTONS[key].name}
</Text>
<Text textStyle='downloads-button-label'>geth {currentBuildName}</Text>
</Box>
</HStack>
</Button>
</NextLink>
);
})}
<Grid templateColumns={{ base: 'repeat(1, 1fr)', md: 'repeat(2, 1fr)' }} gap={4} mb={4}>
{Object.keys(DOWNLOAD_HEADER_BUTTONS).map((key: string) => {
return (
<NextLink key={key} href={DOWNLOAD_HEADER_BUTTONS[key].buildURL} passHref>
<Button as='a' variant='downloadsHeader' width={{ base: '100%' }} h={16}>
<HStack spacing={4}>
<Stack alignItems='center'>
<Image
src={DOWNLOAD_HEADER_BUTTONS[key].image}
alt={DOWNLOAD_HEADER_BUTTONS[key].imageAlt}
h='44px'
/>
</Stack>
<Box>
<Text textStyle='downloads-button-label'>
For {DOWNLOAD_HEADER_BUTTONS[key].name}
</Text>
<Text textStyle='downloads-button-sublabel'>geth {currentBuildVersion}</Text>
</Box>
</HStack>
</Button>
</NextLink>
);
})}
</Grid>
<Box textAlign={'center'}>
<Link href={releaseNotesURL} isExternal variant='light'>
Release notes for {currentBuildName} {currentBuildVersion}
</Link>
</Box>
</Box>
</Stack>
</Stack>
<Center
display={{ base: 'none', lg: 'flex' }}
>
<Image
src='/images/pages/gopher-downloads-front-light.svg'
alt='Gopher plugged in'
w={96}
/>
</Center>
</Grid>
);
};

@ -1,4 +1,4 @@
import { Box, Image, Stack } from '@chakra-ui/react';
import { Center, Flex, Image, Stack, Text } from '@chakra-ui/react';
import { FC } from 'react';
interface Props {
@ -6,10 +6,18 @@ interface Props {
id: string;
imgSrc?: string;
imgAltText?: string;
sectionDescription?: React.ReactNode;
sectionTitle: string;
}
export const DownloadsSection: FC<Props> = ({ children, imgSrc, imgAltText, sectionTitle, id }) => {
export const DownloadsSection: FC<Props> = ({
children,
imgSrc,
imgAltText,
sectionDescription,
sectionTitle,
id
}) => {
return (
<Stack border='2px solid' borderColor='brand.light.primary' id={id}>
{!!imgSrc && (
@ -19,18 +27,33 @@ export const DownloadsSection: FC<Props> = ({ children, imgSrc, imgAltText, sect
</Stack>
)}
<Stack
p={4}
<Flex
borderBottom='2px solid'
borderColor='brand.light.primary'
sx={{ mt: '0 !important' }}
flexDirection={{ base: 'column', md: 'row' }}
>
<Box as='h2' textStyle='h2'>
{sectionTitle}
</Box>
</Stack>
<Flex p={4} sx={{ mt: '0 !important' }} flex='none'>
<Center>
<Text as='h2' textStyle='h2'>
{sectionTitle}
</Text>
</Center>
</Flex>
{sectionDescription && (
<Center
p={4}
borderLeft={{ base: 'none', md: '2px solid #11866f' }}
borderTop={{ base: '2px solid #11866f', md: 'none' }}
>
{sectionDescription}
</Center>
)}
</Flex>
<Stack spacing={4}>{children}</Stack>
<Stack spacing={4} sx={{ mt: '0 !important' }}>
{children}
</Stack>
</Stack>
);
};

@ -0,0 +1,42 @@
import { Box, Flex, Image, Stack } from '@chakra-ui/react';
import { FC } from 'react';
interface Props {
children: React.ReactNode;
}
export const SpecificVersionsSection: FC<Props> = ({ children }) => {
return (
<Flex
id='specificversions'
border='2px solid'
borderColor='brand.light.primary'
flexDir={{ base: 'column', md: 'row' }}
>
<Flex
p={4}
alignItems='center'
justifyContent='center'
borderBottom={{ base: '2px solid #11866f', md: 'none' }}
borderRight={{ base: 'none', md: '2px solid #11866f' }}
flex='none'
>
{/* TODO: use NextImage */}
<Image src='/images/pages/gopher-home-side-desktop.svg' alt='Gopher facing right' />
</Flex>
<Flex flexDir='column'>
<Stack
p={4}
borderBottom='2px solid'
borderColor='brand.light.primary'
sx={{ mt: '0 !important' }}
>
<Box as='h2' textStyle='h2'>
Specific Versions
</Box>
</Stack>
{children}
</Flex>
</Flex>
);
};

@ -1,3 +1,4 @@
export * from './DownloadsHero';
export * from './DownloadsSection';
export * from './DownloadsTable';
export * from './SpecificVersionsSection';

@ -19,7 +19,7 @@ export const HomeHero: FC = () => {
textStyle='h1'
mb={{ base: 2, md: 4 }}
textAlign={{ base: 'center', md: 'left' }}
fontSize={{ base: '3rem', md: '6rem'}}
fontSize={{ base: '5xl', md: '8xl' }}
lineHeight={{ md: '6rem' }}
fontWeight='500'
>

@ -2,10 +2,13 @@ import { createIcon } from '@chakra-ui/icons';
export const DiscordIcon = createIcon({
displayName: 'DiscordIcon',
viewBox:"0 0 32 24",
viewBox: '0 0 32 24',
path: (
<svg width="32" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M26.9846 2.02697C26.9758 2.01 26.9612 1.99671 26.9435 1.98947C24.8961 1.05243 22.7354 0.384243 20.5157 0.00163895C20.4955 -0.00210093 20.4747 0.000597065 20.4561 0.00934923C20.4376 0.0181014 20.4223 0.0324621 20.4124 0.0503891C20.1182 0.583045 19.8511 1.13017 19.6122 1.68968C17.2194 1.32737 14.7855 1.32737 12.3927 1.68968C12.1522 1.12875 11.8808 0.581488 11.5799 0.0503891C11.5696 0.0328517 11.5542 0.0188217 11.5357 0.0101264C11.5173 0.0014311 11.4967 -0.0015265 11.4765 0.00163895C9.25655 0.38344 7.09577 1.05167 5.0486 1.98952C5.03107 1.99693 5.01629 2.00958 5.00628 2.02573C0.912331 8.12422 -0.209155 14.0728 0.341008 19.9476C0.342556 19.962 0.346991 19.976 0.354049 19.9886C0.361107 20.0013 0.370644 20.0124 0.382093 20.0213C2.76596 21.7819 5.43234 23.1259 8.26746 23.9957C8.28743 24.0017 8.30875 24.0014 8.32855 23.9949C8.34836 23.9885 8.36571 23.9761 8.37825 23.9595C8.98718 23.133 9.52673 22.2579 9.99142 21.3429C9.9978 21.3304 10.0014 21.3166 10.0021 21.3026C10.0028 21.2885 10.0005 21.2745 9.99528 21.2614C9.99011 21.2483 9.98221 21.2364 9.97212 21.2266C9.96202 21.2167 9.94994 21.2091 9.93669 21.2043C9.08586 20.8796 8.26216 20.4881 7.47331 20.0336C7.45898 20.0252 7.44695 20.0134 7.43827 19.9993C7.42959 19.9851 7.42454 19.9691 7.42356 19.9525C7.42257 19.936 7.42569 19.9194 7.43264 19.9044C7.43958 19.8893 7.45014 19.8762 7.46338 19.8661C7.6289 19.7424 7.79453 19.6138 7.95258 19.4838C7.96662 19.4723 7.98362 19.4649 8.00164 19.4624C8.01967 19.46 8.03802 19.4627 8.05462 19.4701C13.2227 21.8228 18.8178 21.8228 23.9247 19.4701C23.9414 19.4622 23.9599 19.4592 23.9782 19.4614C23.9965 19.4636 24.0138 19.4709 24.028 19.4826C24.1861 19.6125 24.3517 19.7424 24.5185 19.8661C24.5318 19.8761 24.5424 19.8891 24.5495 19.9041C24.5565 19.9191 24.5598 19.9356 24.5589 19.9522C24.5581 19.9687 24.5531 19.9848 24.5446 19.999C24.536 20.0132 24.524 20.0251 24.5098 20.0336C23.7227 20.4919 22.8983 20.8832 22.0452 21.2031C22.032 21.2081 22.0199 21.2159 22.0099 21.2259C21.9999 21.2358 21.9921 21.2478 21.987 21.261C21.9819 21.2742 21.9797 21.2884 21.9805 21.3025C21.9813 21.3166 21.985 21.3304 21.9915 21.3429C22.464 22.2528 23.0027 23.1268 23.6034 23.958C23.6156 23.9751 23.6329 23.9879 23.6528 23.9946C23.6727 24.0014 23.6942 24.0017 23.7142 23.9955C26.5544 23.1287 29.2255 21.7846 31.6123 20.0213C31.624 20.0128 31.6336 20.002 31.6407 19.9895C31.6478 19.977 31.6521 19.9632 31.6534 19.9489C32.3121 13.1569 30.5507 7.25711 26.9846 2.02697ZM10.7632 16.3704C9.20726 16.3704 7.92519 14.9461 7.92519 13.1969C7.92519 11.4477 9.18239 10.0233 10.7632 10.0233C12.3564 10.0233 13.6261 11.4601 13.6012 13.1968C13.6012 14.9461 12.344 16.3704 10.7632 16.3704ZM21.2563 16.3704C19.7004 16.3704 18.4183 14.9461 18.4183 13.1969C18.4183 11.4477 19.6755 10.0233 21.2563 10.0233C22.8496 10.0233 24.1192 11.4601 24.0943 13.1968C24.0943 14.9461 22.8496 16.3704 21.2563 16.3704Z" fill="#11866F"/>
<svg width='32' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M26.9846 2.02697C26.9758 2.01 26.9612 1.99671 26.9435 1.98947C24.8961 1.05243 22.7354 0.384243 20.5157 0.00163895C20.4955 -0.00210093 20.4747 0.000597065 20.4561 0.00934923C20.4376 0.0181014 20.4223 0.0324621 20.4124 0.0503891C20.1182 0.583045 19.8511 1.13017 19.6122 1.68968C17.2194 1.32737 14.7855 1.32737 12.3927 1.68968C12.1522 1.12875 11.8808 0.581488 11.5799 0.0503891C11.5696 0.0328517 11.5542 0.0188217 11.5357 0.0101264C11.5173 0.0014311 11.4967 -0.0015265 11.4765 0.00163895C9.25655 0.38344 7.09577 1.05167 5.0486 1.98952C5.03107 1.99693 5.01629 2.00958 5.00628 2.02573C0.912331 8.12422 -0.209155 14.0728 0.341008 19.9476C0.342556 19.962 0.346991 19.976 0.354049 19.9886C0.361107 20.0013 0.370644 20.0124 0.382093 20.0213C2.76596 21.7819 5.43234 23.1259 8.26746 23.9957C8.28743 24.0017 8.30875 24.0014 8.32855 23.9949C8.34836 23.9885 8.36571 23.9761 8.37825 23.9595C8.98718 23.133 9.52673 22.2579 9.99142 21.3429C9.9978 21.3304 10.0014 21.3166 10.0021 21.3026C10.0028 21.2885 10.0005 21.2745 9.99528 21.2614C9.99011 21.2483 9.98221 21.2364 9.97212 21.2266C9.96202 21.2167 9.94994 21.2091 9.93669 21.2043C9.08586 20.8796 8.26216 20.4881 7.47331 20.0336C7.45898 20.0252 7.44695 20.0134 7.43827 19.9993C7.42959 19.9851 7.42454 19.9691 7.42356 19.9525C7.42257 19.936 7.42569 19.9194 7.43264 19.9044C7.43958 19.8893 7.45014 19.8762 7.46338 19.8661C7.6289 19.7424 7.79453 19.6138 7.95258 19.4838C7.96662 19.4723 7.98362 19.4649 8.00164 19.4624C8.01967 19.46 8.03802 19.4627 8.05462 19.4701C13.2227 21.8228 18.8178 21.8228 23.9247 19.4701C23.9414 19.4622 23.9599 19.4592 23.9782 19.4614C23.9965 19.4636 24.0138 19.4709 24.028 19.4826C24.1861 19.6125 24.3517 19.7424 24.5185 19.8661C24.5318 19.8761 24.5424 19.8891 24.5495 19.9041C24.5565 19.9191 24.5598 19.9356 24.5589 19.9522C24.5581 19.9687 24.5531 19.9848 24.5446 19.999C24.536 20.0132 24.524 20.0251 24.5098 20.0336C23.7227 20.4919 22.8983 20.8832 22.0452 21.2031C22.032 21.2081 22.0199 21.2159 22.0099 21.2259C21.9999 21.2358 21.9921 21.2478 21.987 21.261C21.9819 21.2742 21.9797 21.2884 21.9805 21.3025C21.9813 21.3166 21.985 21.3304 21.9915 21.3429C22.464 22.2528 23.0027 23.1268 23.6034 23.958C23.6156 23.9751 23.6329 23.9879 23.6528 23.9946C23.6727 24.0014 23.6942 24.0017 23.7142 23.9955C26.5544 23.1287 29.2255 21.7846 31.6123 20.0213C31.624 20.0128 31.6336 20.002 31.6407 19.9895C31.6478 19.977 31.6521 19.9632 31.6534 19.9489C32.3121 13.1569 30.5507 7.25711 26.9846 2.02697ZM10.7632 16.3704C9.20726 16.3704 7.92519 14.9461 7.92519 13.1969C7.92519 11.4477 9.18239 10.0233 10.7632 10.0233C12.3564 10.0233 13.6261 11.4601 13.6012 13.1968C13.6012 14.9461 12.344 16.3704 10.7632 16.3704ZM21.2563 16.3704C19.7004 16.3704 18.4183 14.9461 18.4183 13.1969C18.4183 11.4477 19.6755 10.0233 21.2563 10.0233C22.8496 10.0233 24.1192 11.4601 24.0943 13.1968C24.0943 14.9461 22.8496 16.3704 21.2563 16.3704Z'
fill='#11866F'
/>
</svg>
)
});
});

@ -2,10 +2,13 @@ import { createIcon } from '@chakra-ui/icons';
export const GitHubIcon = createIcon({
displayName: 'GitHubIcon',
viewBox:"0 0 26 24",
viewBox: '0 0 26 24',
path: (
<svg width="26" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.82878 19.3248C8.82878 19.424 8.71193 19.5034 8.56459 19.5034C8.39693 19.5183 8.28007 19.4389 8.28007 19.3248C8.28007 19.2255 8.39693 19.1461 8.54427 19.1461C8.69669 19.1312 8.82878 19.2106 8.82878 19.3248ZM7.2487 19.1014C7.21314 19.2007 7.31475 19.3148 7.46717 19.3446C7.59927 19.3942 7.75169 19.3446 7.78217 19.2454C7.81265 19.1461 7.71612 19.032 7.5637 18.9873C7.43161 18.9526 7.28427 19.0022 7.2487 19.1014ZM9.49435 19.0171C9.34701 19.0518 9.2454 19.1461 9.26064 19.2603C9.27588 19.3595 9.40798 19.424 9.5604 19.3893C9.70774 19.3545 9.80935 19.2603 9.79411 19.161C9.77886 19.0667 9.64169 19.0022 9.49435 19.0171ZM12.8374 0C5.79056 0 0.399994 5.22573 0.399994 12.109C0.399994 17.6126 3.94628 22.3222 9.01169 23.9798C9.66201 24.0939 9.89064 23.7019 9.89064 23.3793C9.89064 23.0716 9.8754 21.3744 9.8754 20.3322C9.8754 20.3322 6.31895 21.0766 5.57209 18.8533C5.57209 18.8533 4.9929 17.4092 4.15967 17.037C4.15967 17.037 2.9962 16.2578 4.24096 16.2727C4.24096 16.2727 5.50604 16.372 6.20209 17.5531C7.31475 19.4687 9.17935 18.9178 9.90588 18.5903C10.0227 17.7963 10.353 17.2454 10.7188 16.9179C7.8787 16.6102 5.01322 16.2082 5.01322 11.4341C5.01322 10.0693 5.39935 9.38447 6.21225 8.51103C6.08015 8.18846 5.6483 6.85846 6.34435 5.14136C7.4062 4.81878 9.84999 6.48129 9.84999 6.48129C10.8661 6.20338 11.9585 6.05946 13.0406 6.05946C14.1228 6.05946 15.2152 6.20338 16.2313 6.48129C16.2313 6.48129 18.6751 4.81382 19.7369 5.14136C20.433 6.86342 20.0011 8.18846 19.869 8.51103C20.6819 9.38943 21.1798 10.0743 21.1798 11.4341C21.1798 16.2231 18.1873 16.6052 15.3473 16.9179C15.8147 17.3099 16.211 18.0543 16.211 19.2205C16.211 20.893 16.1957 22.9624 16.1957 23.3694C16.1957 23.6919 16.4294 24.084 17.0747 23.9699C22.1553 22.3222 25.6 17.6126 25.6 12.109C25.6 5.22573 19.8843 0 12.8374 0ZM5.33838 17.1164C5.27233 17.166 5.28757 17.2801 5.37395 17.3744C5.45524 17.4538 5.57209 17.4886 5.63814 17.424C5.70419 17.3744 5.68895 17.2603 5.60257 17.166C5.52128 17.0866 5.40443 17.0518 5.33838 17.1164ZM4.78967 16.7144C4.75411 16.7789 4.80491 16.8583 4.90653 16.9079C4.98782 16.9576 5.08943 16.9427 5.12499 16.8732C5.16056 16.8087 5.10975 16.7293 5.00814 16.6796C4.90653 16.6499 4.82524 16.6648 4.78967 16.7144ZM6.4358 18.4811C6.35451 18.5456 6.38499 18.6945 6.50185 18.7888C6.6187 18.9029 6.76604 18.9178 6.83209 18.8384C6.89814 18.7739 6.86765 18.625 6.76604 18.5307C6.65427 18.4166 6.50185 18.4017 6.4358 18.4811ZM5.85661 17.7516C5.77532 17.8012 5.77532 17.9302 5.85661 18.0444C5.9379 18.1585 6.07507 18.2082 6.14112 18.1585C6.22241 18.094 6.22241 17.965 6.14112 17.8508C6.06999 17.7367 5.9379 17.6871 5.85661 17.7516Z" fill="#11866F"/>
<svg width='26' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M8.82878 19.3248C8.82878 19.424 8.71193 19.5034 8.56459 19.5034C8.39693 19.5183 8.28007 19.4389 8.28007 19.3248C8.28007 19.2255 8.39693 19.1461 8.54427 19.1461C8.69669 19.1312 8.82878 19.2106 8.82878 19.3248ZM7.2487 19.1014C7.21314 19.2007 7.31475 19.3148 7.46717 19.3446C7.59927 19.3942 7.75169 19.3446 7.78217 19.2454C7.81265 19.1461 7.71612 19.032 7.5637 18.9873C7.43161 18.9526 7.28427 19.0022 7.2487 19.1014ZM9.49435 19.0171C9.34701 19.0518 9.2454 19.1461 9.26064 19.2603C9.27588 19.3595 9.40798 19.424 9.5604 19.3893C9.70774 19.3545 9.80935 19.2603 9.79411 19.161C9.77886 19.0667 9.64169 19.0022 9.49435 19.0171ZM12.8374 0C5.79056 0 0.399994 5.22573 0.399994 12.109C0.399994 17.6126 3.94628 22.3222 9.01169 23.9798C9.66201 24.0939 9.89064 23.7019 9.89064 23.3793C9.89064 23.0716 9.8754 21.3744 9.8754 20.3322C9.8754 20.3322 6.31895 21.0766 5.57209 18.8533C5.57209 18.8533 4.9929 17.4092 4.15967 17.037C4.15967 17.037 2.9962 16.2578 4.24096 16.2727C4.24096 16.2727 5.50604 16.372 6.20209 17.5531C7.31475 19.4687 9.17935 18.9178 9.90588 18.5903C10.0227 17.7963 10.353 17.2454 10.7188 16.9179C7.8787 16.6102 5.01322 16.2082 5.01322 11.4341C5.01322 10.0693 5.39935 9.38447 6.21225 8.51103C6.08015 8.18846 5.6483 6.85846 6.34435 5.14136C7.4062 4.81878 9.84999 6.48129 9.84999 6.48129C10.8661 6.20338 11.9585 6.05946 13.0406 6.05946C14.1228 6.05946 15.2152 6.20338 16.2313 6.48129C16.2313 6.48129 18.6751 4.81382 19.7369 5.14136C20.433 6.86342 20.0011 8.18846 19.869 8.51103C20.6819 9.38943 21.1798 10.0743 21.1798 11.4341C21.1798 16.2231 18.1873 16.6052 15.3473 16.9179C15.8147 17.3099 16.211 18.0543 16.211 19.2205C16.211 20.893 16.1957 22.9624 16.1957 23.3694C16.1957 23.6919 16.4294 24.084 17.0747 23.9699C22.1553 22.3222 25.6 17.6126 25.6 12.109C25.6 5.22573 19.8843 0 12.8374 0ZM5.33838 17.1164C5.27233 17.166 5.28757 17.2801 5.37395 17.3744C5.45524 17.4538 5.57209 17.4886 5.63814 17.424C5.70419 17.3744 5.68895 17.2603 5.60257 17.166C5.52128 17.0866 5.40443 17.0518 5.33838 17.1164ZM4.78967 16.7144C4.75411 16.7789 4.80491 16.8583 4.90653 16.9079C4.98782 16.9576 5.08943 16.9427 5.12499 16.8732C5.16056 16.8087 5.10975 16.7293 5.00814 16.6796C4.90653 16.6499 4.82524 16.6648 4.78967 16.7144ZM6.4358 18.4811C6.35451 18.5456 6.38499 18.6945 6.50185 18.7888C6.6187 18.9029 6.76604 18.9178 6.83209 18.8384C6.89814 18.7739 6.86765 18.625 6.76604 18.5307C6.65427 18.4166 6.50185 18.4017 6.4358 18.4811ZM5.85661 17.7516C5.77532 17.8012 5.77532 17.9302 5.85661 18.0444C5.9379 18.1585 6.07507 18.2082 6.14112 18.1585C6.22241 18.094 6.22241 17.965 6.14112 17.8508C6.06999 17.7367 5.9379 17.6871 5.85661 17.7516Z'
fill='#11866F'
/>
</svg>
)
});
});

@ -2,10 +2,13 @@ import { createIcon } from '@chakra-ui/icons';
export const TwitterIcon = createIcon({
displayName: 'TwitterIcon',
viewBox:"0 0 28 22",
viewBox: '0 0 28 22',
path: (
<svg width="28" height="22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.7247 5.48279C24.7418 5.72341 24.7418 5.96407 24.7418 6.20469C24.7418 13.5437 19.1739 22 8.99749 22C5.86232 22 2.94989 21.089 0.5 19.5078C0.945449 19.5594 1.37371 19.5766 1.83629 19.5766C4.42319 19.5766 6.80458 18.7 8.70624 17.2047C6.27349 17.1531 4.23477 15.5547 3.53234 13.3547C3.87501 13.4062 4.21763 13.4406 4.57744 13.4406C5.07425 13.4406 5.57112 13.3718 6.03365 13.2516C3.49812 12.7359 1.5964 10.5016 1.5964 7.80312V7.73439C2.33305 8.14689 3.18973 8.4047 4.09766 8.43904C2.60717 7.44214 1.63068 5.7406 1.63068 3.81559C1.63068 2.78436 1.90474 1.83904 2.38447 1.01404C5.10848 4.38278 9.20305 6.58275 13.7944 6.82341C13.7087 6.41091 13.6573 5.98127 13.6573 5.55157C13.6573 2.49216 16.1244 0 19.191 0C20.7843 0 22.2233 0.670311 23.2341 1.75312C24.4847 1.51251 25.684 1.04843 26.7462 0.412503C26.335 1.70159 25.4613 2.78441 24.3135 3.47186C25.4271 3.35161 26.5064 3.04216 27.5 2.61252C26.7463 3.71247 25.804 4.69212 24.7247 5.48279Z" fill="#11866F"/>
<svg width='28' height='22' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M24.7247 5.48279C24.7418 5.72341 24.7418 5.96407 24.7418 6.20469C24.7418 13.5437 19.1739 22 8.99749 22C5.86232 22 2.94989 21.089 0.5 19.5078C0.945449 19.5594 1.37371 19.5766 1.83629 19.5766C4.42319 19.5766 6.80458 18.7 8.70624 17.2047C6.27349 17.1531 4.23477 15.5547 3.53234 13.3547C3.87501 13.4062 4.21763 13.4406 4.57744 13.4406C5.07425 13.4406 5.57112 13.3718 6.03365 13.2516C3.49812 12.7359 1.5964 10.5016 1.5964 7.80312V7.73439C2.33305 8.14689 3.18973 8.4047 4.09766 8.43904C2.60717 7.44214 1.63068 5.7406 1.63068 3.81559C1.63068 2.78436 1.90474 1.83904 2.38447 1.01404C5.10848 4.38278 9.20305 6.58275 13.7944 6.82341C13.7087 6.41091 13.6573 5.98127 13.6573 5.55157C13.6573 2.49216 16.1244 0 19.191 0C20.7843 0 22.2233 0.670311 23.2341 1.75312C24.4847 1.51251 25.684 1.04843 26.7462 0.412503C26.335 1.70159 25.4613 2.78441 24.3135 3.47186C25.4271 3.35161 26.5064 3.04216 27.5 2.61252C26.7463 3.71247 25.804 4.69212 24.7247 5.48279Z'
fill='#11866F'
/>
</svg>
)
});
});

@ -1,6 +1,6 @@
export * from './DiscordIcon'
export * from './GitHubIcon'
export * from './DiscordIcon';
export * from './GitHubIcon';
export * from './HamburguerIcon';
export * from './LensIcon';
export * from './MoonIcon';
export * from './TwitterIcon'
export * from './TwitterIcon';

@ -8,23 +8,16 @@ import {
GETH_DISCORD_URL,
GETH_REPO_URL,
GETH_TWITTER_URL
} from '../../constants'
} from '../../constants';
import {
DiscordIcon,
GitHubIcon,
TwitterIcon
} from '../UI/icons';
import { DiscordIcon, GitHubIcon, TwitterIcon } from '../UI/icons';
export const Footer: FC = () => {
return (
<Flex
mt={4}
direction={{ base: 'column', lg: 'row'}}
>
<Flex mt={4} direction={{ base: 'column', lg: 'row' }}>
<Flex
direction={{ base: 'column', md: 'row'}}
justifyContent={{md: 'space-between'}}
direction={{ base: 'column', md: 'row' }}
justifyContent={{ md: 'space-between' }}
border='2px solid'
borderColor='brand.light.primary'
>
@ -177,5 +170,5 @@ export const Footer: FC = () => {
<Text textStyle='footer-text'>{`© 2013–${new Date().getFullYear()}. The go-ethereum Authors.`}</Text>
</Stack>
</Flex>
)
}
);
};

@ -4,7 +4,7 @@ import { FC } from 'react';
// Components
import { Header } from '../UI';
import { Footer } from './Footer'
import { Footer } from './Footer';
interface Props {
children?: React.ReactNode;

@ -3,7 +3,7 @@ title: Built-in tracers
description: Explanation of the tracers that come bundled in Geth as part of the tracing API.
---
Geth comes bundled with a choice of tracers that can be invoked via the [tracing API](/docs/rpc/ns-debug). Some of these built-in tracers are implemented natively in Go, and others in Javascript. The default tracer is the opcode logger (otherwise known as struct logger) which is the default tracer for all the methods. Other tracers have to be specified by passing their name to the `tracer` parameter in the API call.
Geth comes bundled with a choice of tracers that can be invoked via the [tracing API](/docs/rpc/ns-debug). Some of these built-in tracers are implemented natively in Go, and others in Javascript. The default tracer is the opcode logger (otherwise known as struct logger) which is the default tracer for all the methods. Other tracers have to be specified by passing their name to the `tracer` parameter in the API call.
## Struct/opcode logger
@ -85,7 +85,7 @@ Return:
}
},
...
...
```
@ -93,7 +93,6 @@ Return:
The following tracers are implement in Go. This means they are much more performant than other tracers that are written in Javascript. The tracers are selected by passing their name to the `tracer` parameter when invoking a tracing API method, e.g. `debug.traceTransaction(<txhash>, { tracer: 'callTracer' })`.
### 4byteTracer
Solidity contract functions are [addressed](https://docs.soliditylang.org/en/develop/abi-spec.html#function-selector) using the first four four byte of the Keccak-256 hash of their signature. Therefore when calling the function of a contract, the caller must send this function selector as well as the ABI-encoded arguments as call data.
@ -135,7 +134,6 @@ The `callTracer` tracks all the call frames executed during a transaction, inclu
| error | string | error, if any |
| calls | []callframe | list of sub-calls |
Example Call:
```sh
@ -178,7 +176,6 @@ Things to note about the call tracer:
- Calls to precompiles are also included in the result
- In case a frame reverts, the field `output` will contain the raw return data, unlike [revertReasonTracer](#revertreasontracer) which parses the data and returns the revert message
### prestateTracer
The prestate tracer has two modes: `prestate` and `diff`. The `prestate` mode returns the accounts necessary to execute a given transaction. `diff` mode returns the differences between the transaction's pre and post-state (i.e. what changed because the transaction happened). The `prestateTracer` defaults to `prestate` mode. It reexecutes the given transaction and tracks every part of state that is touched. This is similar to the concept of a [stateless witness](https://ethresear.ch/t/the-stateless-client-concept/172), the difference being this tracer doesn't return any cryptographic proof, rather only the trie leaves. The result is an object. The keys are addresses of accounts. The value is an object with the following fields:
@ -195,7 +192,15 @@ To run this tracer in `diff` mode, pass `tracerConfig: {diffMode: true}` in the
Example:
```js
debug.traceCall({from: "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0", to: "0xc8ba32cab1757528daf49033e3673fae77dcf05d", data: "0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000"}, 'latest', {tracer: 'prestateTracer'})
debug.traceCall(
{
from: '0x35a9f94af726f07b5162df7e828cc9dc8439e7d0',
to: '0xc8ba32cab1757528daf49033e3673fae77dcf05d',
data: '0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000'
},
'latest',
{ tracer: 'prestateTracer' }
);
```
Return:
@ -244,7 +249,6 @@ Return (same call with `{diffMode: True}`):
}
```
### revertReasonTracer
The `revertReasonTracer` is useful for analyzing failed transactions. If the transaction reverted, the reason for the revert (according to the Solidity contract) is returned. For any other failure, the error message is returned.
@ -265,7 +269,6 @@ Returns:
This tracer is noop. It returns an empty object and is only meant for testing the setup.
## Javascript tracers
There are also a set of tracers written in Javascript. These are less performant than the Go native tracers because of overheads associated with interpreting the Javascript in Geth's Go environment.
@ -277,7 +280,15 @@ There are also a set of tracers written in Javascript. These are less performant
Example:
```js
debug.traceCall({from: "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0", to: "0xc8ba32cab1757528daf49033e3673fae77dcf05d", data: "0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000"}, 'latest', {tracer: 'bigramTracer'})
debug.traceCall(
{
from: '0x35a9f94af726f07b5162df7e828cc9dc8439e7d0',
to: '0xc8ba32cab1757528daf49033e3673fae77dcf05d',
data: '0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000'
},
'latest',
{ tracer: 'bigramTracer' }
);
```
Returns:
@ -371,7 +382,15 @@ Returns:
Example:
```js
debug.traceCall({from: "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0", to: "0xc8ba32cab1757528daf49033e3673fae77dcf05d", data: "0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000"}, 'latest', {tracer: 'opcountTracer'})
debug.traceCall(
{
from: '0x35a9f94af726f07b5162df7e828cc9dc8439e7d0',
to: '0xc8ba32cab1757528daf49033e3673fae77dcf05d',
data: '0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000'
},
'latest',
{ tracer: 'opcountTracer' }
);
```
Returns:
@ -381,15 +400,25 @@ Returns:
```
### trigram
`trigramTracer` counts the opcode trigrams. Trigrams are the possible combinations of three opcodes this tracer reports how many times each combination is seen during execution.
Example:
```js
debug.traceCall({from: "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0", to: "0xc8ba32cab1757528daf49033e3673fae77dcf05d", data: "0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000"}, 'latest', {tracer: 'trigramTracer'})
debug.traceCall(
{
from: '0x35a9f94af726f07b5162df7e828cc9dc8439e7d0',
to: '0xc8ba32cab1757528daf49033e3673fae77dcf05d',
data: '0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000'
},
'latest',
{ tracer: 'trigramTracer' }
);
```
Returns:
```terminal
{
--PUSH1: 1,
@ -414,17 +443,18 @@ Returns:
}
```
### unigram
`unigramTracer` counts the frequency of occurrance of each opcode.
Example:
```js
> debug.traceCall({from: "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0", to: "0xc8ba32cab1757528daf49033e3673fae77dcf05d", data: "0xd1a2eab2000000000000000000000000000000000000000000000000000000000024aea100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000204895cd480cc8412691a880028a25aec86786f1ed2aa5562bc400000000000000c6403c14f35be1da6f433eadbb6e9178a47fbc7c6c1d568d2f2b876e929089c8d8db646304fd001a187dc8a600000000000000000000000000000000"}, 'latest', {tracer: 'unigramTracer'})
```
Returns:
```terminal
{
ADD: 36,
@ -447,10 +477,9 @@ Returns:
## State overrides
It is possible to give temporary state modifications to Geth in order to simulate the effects of `eth_call`. For example, some new byetcode could be deployed to some address *temporarily just for the duration of the execution* and then a transaction interacting with that address canm be traced. This can be used for scenario testing or determining the outcome of some hypothetical transaction before executing for real.
It is possible to give temporary state modifications to Geth in order to simulate the effects of `eth_call`. For example, some new byetcode could be deployed to some address _temporarily just for the duration of the execution_ and then a transaction interacting with that address canm be traced. This can be used for scenario testing or determining the outcome of some hypothetical transaction before executing for real.
To do this, the tracer is written as normal, but the parameter `stateOverrides` is passed an address and some bytecode.
To do this, the tracer is written as normal, but the parameter `stateOverrides` is passed an address and some bytecode.
```js
var code = //contract bytecode
@ -460,4 +489,4 @@ debug.traceCall({from: , to: , input: }, 'latest', {stateOverrides: {'0x...': {c
## Summary
This page showed how to use the tracers that come bundled with Geth. There are a set written in Go and a set written in Javascript. They are invoked by passing their names when calling an API method.
This page showed how to use the tracers that come bundled with Geth. There are a set written in Go and a set written in Javascript. They are invoked by passing their names when calling an API method.

@ -411,4 +411,4 @@ Every method of the [EVMLogger interface](https://pkg.go.dev/github.com/ethereum
## Summary
This page described how to write custom tracers for Geth. Custom tracers can be written in Javascript or Go.
This page described how to write custom tracers for Geth. Custom tracers can be written in Javascript or Go.

@ -4,8 +4,10 @@ description: Introduction to tracing EVM transactions using Geth
---
---
title: EVM Tracing
sort-key: A
---
Tracing allows users to examine precisely what was executed by the EVM during some specific transaction or set of transactions. There are two different types of [transactions](https://ethereum.org/en/developers/docs/transactions) in Ethereum: value transfers and contract executions. A value transfer just moves ETH from one account to another. A contract interaction executes some code stored at a contract address which can include altering stored data and transacting multiple times with other contracts and externally-owned accounts. A contract execution transaction can therefore be a complicated web of interactions that can be difficult to unpick. The transaction receipt contains a status code that shows whether the transaction succeeded or failed, but more detailed information is not readily available, meaning it is very difficult to know what a contract execution actually did, what data was modified and which addresses were touched. This is the problem that EVM tracing solves. Geth traces transactions by re-running them locally and collecting data about precisely what was executed by the EVM.
@ -33,13 +35,12 @@ This means there are limits on the transactions that can be traced imposed by th
availability **cannot** be reasonably assumed.
![state pruning options](/public/images/state-pruning.png)
*This image shows the state stored by each sync-mode - red indicates stored state. The full width of each line represents origin to present head*
_This image shows the state stored by each sync-mode - red indicates stored state. The full width of each line represents origin to present head_
More detailed information about syncing is available on the [sync modes page](/pages/docs/fundamentals/sync-modes.md).
When a trace of a specific transaction is executed, the state is prepared by fetching the state of the parent block from the database. If it is not available, Geth will crawl backwards in time to find the next available state but only up to a limit defined in the `reexec` parameter which defaults to 128 blocks. If no state is available within the `reexec` window then the trace fails with `Error: required historical state unavailable` and the `reexec` parameter must be increased. If a valid state *is* found in the `reexec` window, then Geth sequentially re-executes the transcations in each block between the last available state and the target block. The greater the value of `reexec` the longer the tracing will take because more blocks have to be re-executed to regenerate the target state.
When a trace of a specific transaction is executed, the state is prepared by fetching the state of the parent block from the database. If it is not available, Geth will crawl backwards in time to find the next available state but only up to a limit defined in the `reexec` parameter which defaults to 128 blocks. If no state is available within the `reexec` window then the trace fails with `Error: required historical state unavailable` and the `reexec` parameter must be increased. If a valid state _is_ found in the `reexec` window, then Geth sequentially re-executes the transcations in each block between the last available state and the target block. The greater the value of `reexec` the longer the tracing will take because more blocks have to be re-executed to regenerate the target state.
The `debug_getAccessibleStates` endpoint is a useful tool for estimating a suitable value for `reexec`. Passing the number of the block that contains the target transaction and a search distance to this endpoint will return the number of blocks behind the current head where the most recent available state exists. This value can be passed to the tracer as `re-exec`.
@ -51,14 +52,13 @@ _There are exceptions to the above rules when running batch traces of entire blo
### Built-in tracers
The tracing API accepts an optional `tracer` parameter that defines how the data returned to the API call should be processed. If this parameter is ommitted the default tracer is used. The default is the struct (or 'opcode') logger. These raw opcode traces are sometimes useful, but the returned data is very low level and can be too extensive and awkward to read for many use-cases. A full opcode trace can easily go into the hundreds of megabytes, making them very resource intensive to get out of the node and process externally. For these reasons, there are a set of non-default built-in tracers that can be named in the API call to return different data from the method. Under the hood, these tracers are Go or Javascript
The tracing API accepts an optional `tracer` parameter that defines how the data returned to the API call should be processed. If this parameter is ommitted the default tracer is used. The default is the struct (or 'opcode') logger. These raw opcode traces are sometimes useful, but the returned data is very low level and can be too extensive and awkward to read for many use-cases. A full opcode trace can easily go into the hundreds of megabytes, making them very resource intensive to get out of the node and process externally. For these reasons, there are a set of non-default built-in tracers that can be named in the API call to return different data from the method. Under the hood, these tracers are Go or Javascript
functions that do some specific preprocessing on the trace data before it is returned.
More information about Geth's built-in tracers is available on the
[built-in tracers](/pages/docs/developers/evm-tracing/built-in-tracers.md)
More information about Geth's built-in tracers is available on the
[built-in tracers](/pages/docs/developers/evm-tracing/built-in-tracers.md)
page.
### Custom tracers
In addition to built-in tracers, it is possible to provide custom code that hooks to events in the EVM to process and return data in a consumable format. Custom tracers can be written either in Javascript or Go. JS tracers are good for quick prototyping and experimentation as well as for less intensive applications. Go tracers are performant but require the tracer to be compiled together with the Geth source code. This means developers only have to gather the data they actually need, and do any processing at the source.
@ -67,4 +67,4 @@ More information about custom tracers is available on the [custom tracers](/page
## Summary
This page gave an introduction to the concept of tracing and explained issues around state availability. More detailed information on Geth's built-in and custom tracers can be found on their dedicated pages. on their dedicated pages.
This page gave an introduction to the concept of tracing and explained issues around state availability. More detailed information on Geth's built-in and custom tracers can be found on their dedicated pages. on their dedicated pages.

@ -83,7 +83,8 @@ created by github.com/ethereum/go-ethereum/p2p.newDialScheduler
github.com/ethereum/go-ethereum/p2p/dial.go:179 +0x425
```
and
and
```sh
debug.stacks("consolecmd.go")
```

@ -50,10 +50,9 @@ geth --sepolia --datadir sepolia <other flags> --signer=sepolia-data/clef/clef.i
Remember that it is also necessary to have a consensus client running too, which requires `--http` and several `authrpc` values to be provided to Geth. A complete set of startup commands for the Geth-Lodestar client combinaton plus Clef is provided as an example in this [Gist](https://gist.github.com/jmcook1186/ea5de9215ecedb1b0105bcfa9c30d44c) - adapt it for different client combinations and configurations.
## Interacting with Clef
There are two modes of interaction with Clef. One is direct interaction, which is achieved by passing requests by HTTP or IPC with JSON-RPC data as defined in Clef's external API. This is the way to do things in Clef that don't require Geth, such as creating and listing accounts, or signing data offline. The other way is via Geth. With Geth started with Clef as an external signer, requests made to Geth that touch account data will route via Clef for approval. By default, the user approves or denies interactions manually by typing `y` or `n` into the Clef console when prompted, but custom rules can also be created to automate common tasks.
There are two modes of interaction with Clef. One is direct interaction, which is achieved by passing requests by HTTP or IPC with JSON-RPC data as defined in Clef's external API. This is the way to do things in Clef that don't require Geth, such as creating and listing accounts, or signing data offline. The other way is via Geth. With Geth started with Clef as an external signer, requests made to Geth that touch account data will route via Clef for approval. By default, the user approves or denies interactions manually by typing `y` or `n` into the Clef console when prompted, but custom rules can also be created to automate common tasks.
### Creating accounts
@ -70,6 +69,7 @@ The same can be achieved using raw JSON requests (this example send the request
```shell
curl -X POST --data '{"id": 0, "jsonrpc": "2.0", "method": "account_new", "params": []}' http://localhost:8550 -H "Content-Type: application/json"
```
The console will hang because Clef is waiting for manual approval. Switch to the Clef terminal and approve the action. Clef will prompt for a account password and then confirm the account creation in the terminal logs. A new keyfile has been added to the keystore in `go-ethereum/sepolia-data`. A JSON response is returned to the terminal the request originated from, containing the new account address in the `result` field.
```terminal
@ -84,7 +84,6 @@ The newly generated key files can be viewed in `<datadir>/keystore/`. The file n
`UTC--2022-05-19T12-34-36.47413510Z--0b85e5a13e118466159b1e1b6a4234e5f9f784bb`
An account can also be created by importing a raw private key (hex string) using `clef importraw` as follows:
```sh
@ -94,18 +93,17 @@ clef importraw <hexkey>
The terminal will respond with the following message, indicating the account has been created successfully:
```terminal
## Info
## Info
Key imported:
Address 0x9160DC9105f7De5dC5E7f3d97ef11DA47269BdA6
Keystore file: /home/user/.ethereum/keystore/UTC--2022-10-28T12-03-13.976383602Z--9160dc9105f7de5dc5e7f3d97ef11da47269bda6
The key is now encrypted; losing the password will result in permanently losing
The key is now encrypted; losing the password will result in permanently losing
access to the key and all associated funds!
Make sure to backup keystore and passwords in a safe location.
```
### Listing accounts
The accounts in the keystore can be listed to the terminal using a simple CLI command as follows:
@ -196,7 +194,7 @@ Clef can be used to set and remove passwords for an existing keystore file. To s
clef setpw a94f5374fce5edbc8e2a8697c15331677e6ebf0b
```
This will cause Clef to prompt for a new password, twice, and then the Clef master password to decrypt the keyfile.
This will cause Clef to prompt for a new password, twice, and then the Clef master password to decrypt the keyfile.
Geth's `account update` subcommand can also be used to update the account password:
@ -216,7 +214,6 @@ Updating the account using `geth account update` replaces the original file with
With Clef, indiscriminate account unlocking is no longer a feature. Instead, Clef unlocks are locked until actions are explicitly approved manually by a user, unless they conform to some specific scenario that has been encoded in a ruleset. Please refer to our Clef docs for instructions for how to create rulesets.
### Transactions
Transactions can be sent using raw JSON requests to Geth or using `web3js` in the Javascript console. Either way, with Clef acting as the signer the transactions will not get sent until approval is given in Clef. The following code snippet shows how a transaction could be sent between two accounts in the keystore using the Javascript console.

@ -159,7 +159,6 @@ The sync can be confirmed using [`eth.syncing`](https://ethereum.org/en/develope
}
```
There are other log messages that are commonly seen during syncing. For example:
```sh
@ -207,10 +206,10 @@ WARN [10-03 |13:10:26.499] Beacon client online, but never received consensus up
The message above indicates that a consensus client is present but not working correctly. The most likely reason for this is that the client is not yet in sync. Waiting for the consensus client to sync should solve the issue.
```sh
WARN [10-03 | 13:15:56.543] Dropping unsynced node during sync id = e2fdc0d92d70953 conn = ...
```
This message indicates that a peer is being dropped because it is not fully synced. This is normal - the necessary data will be requested from an alternative peer instead.
## Summary

@ -4,6 +4,7 @@ description: Introduction to how Ethereum nodes are organized and where Geth fit
---
## Node architecture
An Ethereum node is composed of two clients: an [execution client](https://ethereum.org/en/developers/docs/nodes-and-clients/#execution-clients) and a [consensus client](https://ethereum.org/en/developers/docs/nodes-and-clients/#consensus-clients). Geth is an [execution client](https://ethereum.org/en/developers/docs/nodes-and-clients/#execution-clients). Originally, an execution client alone was enough to run a full Ethereum node. However, ever since Ethereum turned off [proof-of-work](https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/) and implemented [proof-of-stake](https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/), Geth has needed to be coupled to another piece of software called a [“consensus client”](https://ethereum.org/en/developers/docs/nodes-and-clients/#consensus-clients) in order to keep track of the Ethereum blockchain.
The execution client (Geth) is responsible for transaction handling, transaction gossip, state management and supporting the Ethereum Virtual Machine ([EVM])(https://ethereum.org/en/developers/docs/evm/). However, Geth is **not** responsible for block building, block gossiping or handling consensus logic. These are in the remit of the consensus client.
@ -29,4 +30,3 @@ The consensus client deals with all the logic that enables a node to stay in syn
Validators can be added to consensus clients if 32 ETH have been sent to the deposit contract. The validator client comes bundled with the consensus client and can be added to a node at any time. The validator handles attestations and block proposals. They enable a node to accrue rewards or lose ETH via penalties or slashing. Running the validator software also makes a node eligible to be selected to propose a new block.
Read more about [proof-of-stake](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/).

@ -3,7 +3,7 @@ title: Sync modes
description: Introduction to Geth's sync modes
---
Syncing is the process by which Geth catches up to the latest Ethereum block and current global state. There are several ways to sync a Geth node that differ in their speed, storage requirements and trust assumptions. Now that Ethereum uses proof-of-stake based consensus, a consensus client is required for Geth to sync.
Syncing is the process by which Geth catches up to the latest Ethereum block and current global state. There are several ways to sync a Geth node that differ in their speed, storage requirements and trust assumptions. Now that Ethereum uses proof-of-stake based consensus, a consensus client is required for Geth to sync.
## Full nodes
@ -13,7 +13,7 @@ There are two types of full node that use different mechanisms to sync up to the
A snap sync'd node holds the most recent 128 block states in memory, so transactions in that range are always quickly accessible. However, snap-sync only starts processing from a relatively recent block (as opposed to genesis for a full node). Between the initial sync block and the 128 most recent blocks, the node stores occasional checkpoints that can be used to rebuild the state on-the-fly. This means transactions can be traced back as far as the block that was used for the initial sync. Tracing a single transaction requires reexecuting all preceding transactions in the same block **and** all preceding blocks until the previous stored snapshot. Snap-sync'd nodes are therefore full nodes, with the only difference being the initial synchronization required a checkpoint block to sync from instead of independently verifying the chain all the way from genesis. Snap sync then only verifies the proof-of-work and ancestor-child block progression and assumes that the state transitions are correct rather than re-executing the transactions in each block to verify the state changes. Snap sync is much faster than block-by-block sync. To start a node with snap sync pass `--syncmode snap` at startup.
Snap sync starts by downloading the headers for a chunk of blocks. Once the headers have been verified, the block bodies and receipts for those blocks are downloaded. In parallel, Geth also sync begins state-sync. In state-sync, Geth first downloads the leaves of the state trie for each block without the intermediate nodes along with a range proof. The state trie is then regenerated locally. The state download is the part of the snap-sync that takes the most time to complete and the progress can be monitored using the ETA values in the log messages. However, the blockchain is also progressing at the same time and invalidating some of the regenerated state data. This means it is also necessary to have a 'healing' phase where errors in the state are fixed. It is not possible to monitor the progress of the state heal because the extent of the errors cannot be known until the current state has already been regenerated. Geth regularly reports `Syncing, state heal in progress` regularly during state heal - this informs the user that state heal has not finished. It is also possible to confirm this using `eth.syncing` - if this command returns `false` then the node is in sync. If it returns anything other than `false` then syncing is still in progress.
Snap sync starts by downloading the headers for a chunk of blocks. Once the headers have been verified, the block bodies and receipts for those blocks are downloaded. In parallel, Geth also sync begins state-sync. In state-sync, Geth first downloads the leaves of the state trie for each block without the intermediate nodes along with a range proof. The state trie is then regenerated locally. The state download is the part of the snap-sync that takes the most time to complete and the progress can be monitored using the ETA values in the log messages. However, the blockchain is also progressing at the same time and invalidating some of the regenerated state data. This means it is also necessary to have a 'healing' phase where errors in the state are fixed. It is not possible to monitor the progress of the state heal because the extent of the errors cannot be known until the current state has already been regenerated. Geth regularly reports `Syncing, state heal in progress` regularly during state heal - this informs the user that state heal has not finished. It is also possible to confirm this using `eth.syncing` - if this command returns `false` then the node is in sync. If it returns anything other than `false` then syncing is still in progress.
The healing has to outpace the growth of the blockchain, otherwise the node will never catch up to the current state. There are some hardware factors that determine the speed of the state healing (speed of disk read/write and internet connection) and also the total gas used in each block (more gas means more changes to the state that have to be handled).
@ -23,10 +23,8 @@ To summarize, snap sync progresses in the following sequence:
- download block bodies and receipts. In parallel, download raw state data and build state trie
- heal state trie to account for newly arriving data
**Note** Snap sync is the default behaviour, so if the `--syncmode` value is not passed to Geth at startup, Geth will use snap sync. A node that is started using `snap` will switch to block-by-block sync once it has caught up to the head of the chain.
### Full
A full sync generates the current state by executing every block starting from the genesis block. A full sync indendently verifies proof-of-work and block provenance as well as all state transitions by re-executing the transactions in the entire historical sequence of blocks. Only the most recent 128 block states are stored in a full node - older block states are pruned periodically and represented as a series of checkpoints from which any previous state can be regenerated on request. 128 blocks is about 25.6 minutes of history with a block time of 12 seconds.
@ -69,7 +67,6 @@ Alternatively, the consensus client can grab a checkpoint from a trusted source
Please see the pages on [syncing](/docs/interface/sync-modes.md) for more detail. For troubleshooting, please see the `Syncing` section on the [console log messages](/docs/interface/logs.md) page.
## Summary
There are several ways to sync a Geth node. The default is to use snap sync to create a full node. This verifies all blocks using some recent block that is old enough to be safe from re-orgs as a sync target. A trust-minimized alternative is full-sync, which verifies every block since genesis. These modes drop state data older than 128 blocks, keeping only checkpoints that enable on-request regeneration of historical states. For rapid queries of historical data an archive node is required. Archive nodes keep local copies of all historical data right back to genesis - currently about 12 TB and growing. The opposite extreme is a light node that doesn't store any blockchain data - it requests everything from full nodes. These configurations are controlled by passing `full`, `snap` or `light` to `--syncmode` at startup. For an archive node, `--syncmode` should be `full` and `--gcmode` should be set to `archive`. Currently, due to the transition to proof-of-stake, light-sync does not work (new light client protocols are being developed).

@ -15,7 +15,7 @@ This returns a result which is also a JSON object, with values expressed as hexa
{"id":2,"jsonrpc":"2.0","result":"0x1639e49bba16280000"}
```
This is a low level and rather error-prone way to interact with Geth. Most developers prefer to use convenience libraries that abstract away some of the more tedious and awkward tasks such as converting values from hexadecimal strings into numbers, or converting between denominations of ether (Wei, Gwei, etc). One such library is [Web3.js](https://web3js.readthedocs.io/en/v1.7.3/).
This is a low level and rather error-prone way to interact with Geth. Most developers prefer to use convenience libraries that abstract away some of the more tedious and awkward tasks such as converting values from hexadecimal strings into numbers, or converting between denominations of ether (Wei, Gwei, etc). One such library is [Web3.js](https://web3js.readthedocs.io/en/v1.7.3/).
The purpose of Geth's Javascript console is to provide a built-in environment to use a subset of the Web3.js libraries to interact with a Geth node.
{% include note.html content="The web3.js version that comes bundled with Geth is not up to date with the official Web3.js documentation. There are several Web3.js libraries that are not available in the Geth Javascript Console. There are also administrative APIs included in the Geth console that are not documented in the Web3.js documentation. The full list of libraries available in the Geth console is available on the [JSON-RPC API page](/docs/rpc/server)." %}

@ -3,7 +3,7 @@ title: JavaScript Console 2: Contracts
description: Instructions for working with contracts in the Javascript console.
---
The [Introduction to the Javascript console](src/pages/docs/interacting-with-geth/javascript-console.md) page outlined how a Javascript console can be attached to Geth to provide a more user-friendly interface to Ethereum than interacting directly with the JSON-RPC API. This page will describe how to deploy contracts and interact with contracts using the attached console. This page will assume the Javascript console is attached to a running Geth instance using IPC. Clef should be used to manage accounts.
The [Introduction to the Javascript console](src/pages/docs/interacting-with-geth/javascript-console.md) page outlined how a Javascript console can be attached to Geth to provide a more user-friendly interface to Ethereum than interacting directly with the JSON-RPC API. This page will describe how to deploy contracts and interact with contracts using the attached console. This page will assume the Javascript console is attached to a running Geth instance using IPC. Clef should be used to manage accounts.
## Deploying a contract
@ -17,7 +17,7 @@ pragma solidity ^0.8.0;
contract Storage{
uint256 value = 5;
function set(uint256 number) public{
value = number;
}
@ -48,33 +48,49 @@ The outputs look as follows:
[{"inputs":[],"name":"retrieve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"name":"store","outputs":[],"stateMutability":"nonpayable","type":"function"}]
```
These are all the data required to deploy the contract using the Geth Javascript console. Open the Javascript console using `./geth attach geth.ipc`.
These are all the data required to deploy the contract using the Geth Javascript console. Open the Javascript console using `./geth attach geth.ipc`.
Now, for convenice we can store the abi and bytecode in variables in the console:
```js
var abi = [{"inputs":[],"name":"retrieve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"name":"store","outputs":[],"stateMutability":"nonpayable","type":"function"}]
var bytecode = "608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100a1565b60405180910390f35b610073600480360381019061006e91906100ed565b61007e565b005b60008054905090565b8060008190555050565b6000819050919050565b61009b81610088565b82525050565b60006020820190506100b66000830184610092565b92915050565b600080fd5b6100ca81610088565b81146100d557600080fd5b50565b6000813590506100e7816100c1565b92915050565b600060208284031215610103576101026100bc565b5b6000610111848285016100d8565b9150509291505056fea264697066735822122031443f2fb748bdb27e539fdbeb0c6f575aec50508baaa7e4dbeb08577ef19b3764736f6c63430008110033"
var abi = [
{
inputs: [],
name: 'retrieve',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'uint256', name: 'number', type: 'uint256' }],
name: 'store',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
}
];
var bytecode =
'608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100a1565b60405180910390f35b610073600480360381019061006e91906100ed565b61007e565b005b60008054905090565b8060008190555050565b6000819050919050565b61009b81610088565b82525050565b60006020820190506100b66000830184610092565b92915050565b600080fd5b6100ca81610088565b81146100d557600080fd5b50565b6000813590506100e7816100c1565b92915050565b600060208284031215610103576101026100bc565b5b6000610111848285016100d8565b9150509291505056fea264697066735822122031443f2fb748bdb27e539fdbeb0c6f575aec50508baaa7e4dbeb08577ef19b3764736f6c63430008110033';
```
The ABI can be used to create an instance of the contract:
```js
var contract = eth.contract(abi)
var contract = eth.contract(abi);
```
This contract instance can then be deployed to the blockchain. This is done using `eth.sendTransaction`, passing the contract bytecode in the `data` field. For convenience we can create a transaction JSON object first, then pass it to `eth.sendTransaction` later. Let's use the first account in `eth.accounts` as the sender. The amount of gas to include can be determined using `eth.estimateGas`:
```js
var gas = eth.estimateGas({data: bytecode})
var gas = eth.estimateGas({ data: bytecode });
```
Note that each command that touches accounts will require **approval in Clef** unless a custom rule has been implemented. The bytecode, gas and address of the sender can be bundled together into an object that will be passed to the contract's `new()` method which deploys the contract.
```js
var tx = {'from': eth.accounts[0], data: bytecode, gas: gas}
var deployed_contract = contract.new(tx)
var tx = { from: eth.accounts[0], data: bytecode, gas: gas };
var deployed_contract = contract.new(tx);
```
The transaction hash and deployment address can now been viewed in the console by entering the variable name (in this case `deployed_contract`):
@ -105,14 +121,13 @@ The transaction hash and deployment address can now been viewed in the console b
Passing the transaction hash to `eth.getTransaction()` returns the deployment transaction details including the contract bytecode in the `input` field. To interact with the contract, create an instance by passing the deployment address to `contract.at` then call the methods.
```js
var instance = contract.at("0x2d6505f8b1130a22a5998cd31788bf6c751247f")
var instance = contract.at('0x2d6505f8b1130a22a5998cd31788bf6c751247f');
// store() alters the state and therefore requires sendTransaction()
contract.set.sendTransaction(42, {from: eth.accounts[0], gas: 1000000})
contract.set.sendTransaction(42, { from: eth.accounts[0], gas: 1000000 });
// retrieve does not alter state so it can be executed using call()
contract.retrieve().call()
>> 2
contract.retrieve().call() >> 2;
```
## Summary
## Summary
This page demonstrated how to create, compile, deploy and interact with an Ethereum smart contract using Geth's Javascript console.

@ -3,8 +3,7 @@ title: eth Namespace
description: Documentation for the JSON-RPC API "eth" namespace
---
Documentation for the API methods in the `eth` namespace can be found on [ethereum.org](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_protocolversion). Geth provides several extensions to the standard "eth" JSON-RPC namespace that are defined below.
Documentation for the API methods in the `eth` namespace can be found on [ethereum.org](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_protocolversion). Geth provides several extensions to the standard "eth" JSON-RPC namespace that are defined below.
### eth_subscribe, eth_unsubscribe
@ -65,6 +64,7 @@ Example:
The method returns a single `Binary` consisting the return value of the executed contract call.
#### Simple example
**note that this example uses the Rinkeby network, which is now deprecated**
With a synced Rinkeby node with RPC exposed on localhost (`geth --rinkeby --http`) we can make a call against the [CheckpointOracle](https://rinkeby.etherscan.io/address/0xebe8efa441b9302a0d7eaecc277c09d20d684540) to retrieve the list of administrators:

@ -1,8 +1,13 @@
import { Code, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react';
import { Center, Code, Flex, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react';
import type { NextPage } from 'next';
import { useState } from 'react';
import { DownloadsHero, DownloadsSection, DownloadsTable } from '../components/UI/downloads';
import {
DownloadsHero,
DownloadsSection,
DownloadsTable,
SpecificVersionsSection
} from '../components/UI/downloads';
import { DataTable } from '../components/UI';
import {
@ -51,12 +56,7 @@ const DownloadsPage: NextPage = () => {
}
/>
<DownloadsSection
imgSrc='/images/pages/gopher-home-side-desktop.svg'
imgAltText='Gopher facing right'
sectionTitle='Specific Versions'
id='specificversions'
>
<SpecificVersionsSection>
<Stack p={4}>
<Text textStyle='quick-link-text'>
If you&apos;re looking for a specific release, operating system or architecture,
@ -92,10 +92,11 @@ const DownloadsPage: NextPage = () => {
Signatures for details).
</Text>
</Stack>
</DownloadsSection>
</SpecificVersionsSection>
<DownloadsSection sectionTitle='Stable releases' id='stablereleases'>
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'>
<DownloadsSection
id='stablereleases'
sectionDescription={
<Text textStyle='quick-link-text'>
These are the current and previous stable releases of go-ethereum, updated
automatically when a new version is tagged in our{' '}
@ -103,28 +104,48 @@ const DownloadsPage: NextPage = () => {
GitHub repository.
</Link>
</Text>
</Stack>
}
sectionTitle='Stable releases'
>
{/* TODO: swap test data for real data */}
<DownloadsTable data={testDownloadData.slice(0, amountStableReleases)} />
<Stack sx={{ mt: '0 !important' }}>
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}>
<Text
fontFamily='"JetBrains Mono", monospace'
fontWeight={700}
textTransform='uppercase'
textAlign='center'
p={4}
>
Show older releases
</Text>
</Link>
</Stack>
<Flex
sx={{ mt: '0 !important' }}
flexDirection={{ base: 'column', md: 'row' }}
justifyContent='space-between'
>
<Stack p={4} display={{ base: 'none', md: 'block' }}>
<Center>
{/* TODO: swap testDownloadData with actual data */}
<Text>
Showing {amountStableReleases} latest releases of a total{' '}
{testDownloadData.length} releases
</Text>
</Center>
</Stack>
<Stack
sx={{ mt: '0 !important' }}
borderLeft={{ base: 'none', md: '2px solid #11866f' }}
>
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}>
<Text
fontFamily='"JetBrains Mono", monospace'
fontWeight={700}
textTransform='uppercase'
textAlign='center'
p={4}
>
Show older releases
</Text>
</Link>
</Stack>
</Flex>
</DownloadsSection>
<DownloadsSection sectionTitle='Develop builds' id='developbuilds'>
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'>
<DownloadsSection
id='developbuilds'
sectionDescription={
<Text textStyle='quick-link-text'>
These are the develop snapshots of go-ethereum, updated automatically when a new
commit is pushed into our{' '}
@ -132,33 +153,54 @@ const DownloadsPage: NextPage = () => {
GitHub repository.
</Link>
</Text>
</Stack>
}
sectionTitle='Develop builds'
>
{/* TODO: swap for real data */}
<DownloadsTable data={testDownloadData.slice(0, amountDevelopBuilds)} />
<Stack sx={{ mt: '0 !important' }}>
<Link as='button' variant='button-link-secondary' onClick={showMoreDevelopBuilds}>
<Text
fontFamily='"JetBrains Mono", monospace'
fontWeight={700}
textTransform='uppercase'
textAlign='center'
p={4}
>
Show older releases
</Text>
</Link>
</Stack>
<Flex
sx={{ mt: '0 !important' }}
flexDirection={{ base: 'column', md: 'row' }}
justifyContent='space-between'
>
<Stack p={4} display={{ base: 'none', md: 'block' }}>
<Center>
{/* TODO: swap testDownloadData with actual data */}
<Text>
Showing {amountDevelopBuilds} latest releases of a total{' '}
{testDownloadData.length} releases
</Text>
</Center>
</Stack>
<Stack
sx={{ mt: '0 !important' }}
borderLeft={{ base: 'none', md: '2px solid #11866f' }}
>
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}>
<Text
fontFamily='"JetBrains Mono", monospace'
fontWeight={700}
textTransform='uppercase'
textAlign='center'
p={4}
>
Show older releases
</Text>
</Link>
</Stack>
</Flex>
</DownloadsSection>
<DownloadsSection sectionTitle='OpenPGP Signatures' id='pgpsignatures'>
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'>
<DownloadsSection
id='pgpsignatures'
sectionDescription={
<Text textStyle='quick-link-text'>
All the binaries available from this page are signed via our build server PGP keys:
</Text>
</Stack>
}
sectionTitle='OpenPGP Signatures'
>
{/* TODO: swap for real data */}
<Stack borderBottom='2px solid' borderColor='brand.light.primary'>
<DataTable columnHeaders={DOWNLOAD_OPENPGP_BUILD_HEADERS} data={pgpBuildTestData} />
@ -173,37 +215,67 @@ const DownloadsPage: NextPage = () => {
</Stack>
</DownloadsSection>
<DownloadsSection sectionTitle='Importing keys and verifying builds' id='importingkeys'>
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'>
<Text textStyle='quick-link-text'>
You can import the build server public keys by grabbing the individual keys directly
from the keyserver network:
</Text>
<DownloadsSection id='importingkeys' sectionTitle='Importing keys and verifying builds'>
<Flex
p={4}
borderBottom='2px solid'
borderColor='brand.light.primary'
gap={4}
flexDirection={{ base: 'column', md: 'row' }}
>
<Stack flex={1}>
<Text textStyle='quick-link-text'>
You can import the build server public keys by grabbing the individual keys
directly from the keyserver network:
</Text>
</Stack>
{/* TODO: These keys depends on the binary */}
<Code p={4}>gpg --recv-keys F9585DE6 C2FF8BBF 9BA28146 7B9E2481 D2A67EAC</Code>
</Stack>
<Stack flex={1} w={'100%'}>
{/* TODO: These keys depends on the binary */}
<Code p={4}>gpg --recv-keys F9585DE6 C2FF8BBF 9BA28146 7B9E2481 D2A67EAC</Code>
</Stack>
</Flex>
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'>
<Text textStyle='quick-link-text'>
Similarly you can import all the developer public keys by grabbing them directly
from the keyserver network:
</Text>
<Flex
p={4}
borderBottom='2px solid'
borderColor='brand.light.primary'
gap={4}
flexDirection={{ base: 'column', md: 'row' }}
>
<Stack flex={1}>
<Text textStyle='quick-link-text'>
Similarly you can import all the developer public keys by grabbing them directly
from the keyserver network:
</Text>
</Stack>
{/* TODO: These are developer keys, do we need to change? */}
<Code p={4}>gpg --recv-keys E058A81C 05A5DDF0 1CCB7DD2</Code>
</Stack>
<Stack flex={1} w={'100%'}>
{/* TODO: These are developer keys, do we need to change? */}
<Code p={4}>gpg --recv-keys E058A81C 05A5DDF0 1CCB7DD2</Code>
</Stack>
</Flex>
<Stack p={4}>
<Text textStyle='quick-link-text'>
From the download listings above you should see a link both to the downloadable
archives as well as detached signature files. To verify the authenticity of any
downloaded data, grab both files and then run:
</Text>
<Flex
p={4}
borderBottom='2px solid'
borderColor='brand.light.primary'
gap={4}
flexDirection={{ base: 'column', md: 'row' }}
>
<Stack flex={1}>
<Text textStyle='quick-link-text'>
From the download listings above you should see a link both to the downloadable
archives as well as detached signature files. To verify the authenticity of any
downloaded data, grab both files and then run:
</Text>
</Stack>
{/* TODO: These keys depends on the binary */}
<Code p={4}>gpg --verify geth-linux-amd64-1.5.0-d0c820ac.tar.gz.asc</Code>
</Stack>
<Stack flex={1} w={'100%'}>
{/* TODO: These keys depends on the binary */}
<Code p={4}>gpg --verify geth-linux-amd64-1.5.0-d0c820ac.tar.gz.asc</Code>
</Stack>
</Flex>
</DownloadsSection>
</Stack>
</main>

@ -12,6 +12,19 @@ export const Button = {
boxShadow: 'inset 0 0 0 2px #06fece !important'
},
_active: { borderTop: '4px solid', borderColor: 'green.200', pt: '4px' }
},
downloadsHeader: {
py: '8px',
px: '32px',
borderRadius: 0,
width: { base: '188px', md: 'auto' },
bg: 'brand.light.primary',
_hover: { bg: 'brand.light.secondary' },
_focus: {
bg: 'brand.light.primary',
boxShadow: 'inset 0 0 0 2px #06fece !important'
},
_active: { borderTop: '4px solid', borderColor: 'green.200' }
}
}
};

@ -67,7 +67,13 @@ export const textStyles = {
'downloads-button-label': {
fontFamily: '"JetBrains Mono", monospace',
color: 'yellow.50',
fontSize: 'xs',
fontSize: {base: 'md', lg: 'xl'},
textTransform: 'uppercase'
},
'downloads-button-sublabel': {
fontFamily: '"JetBrains Mono", monospace',
color: 'yellow.50',
fontSize: {base: 'xs', lg: 'sm'},
textTransform: 'uppercase'
},
'download-tab-label': {

Loading…
Cancel
Save