diff --git a/.all-contributorsrc b/.all-contributorsrc index 3f541ff9285..2ee717d0b3a 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -12838,6 +12838,215 @@ "contributions": [ "maintenance" ] + }, + { + "login": "CXYZTW", + "name": "@karelxfi", + "avatar_url": "https://avatars.githubusercontent.com/u/54091831?v=4", + "profile": "https://github.com/CXYZTW", + "contributions": [ + "tool" + ] + }, + { + "login": "gorbatiukcom", + "name": "Oleg Gorbatiuk", + "avatar_url": "https://avatars.githubusercontent.com/u/35546483?v=4", + "profile": "https://www.linkedin.com/in/gorbatiuk/", + "contributions": [ + "content" + ] + }, + { + "login": "deca12x", + "name": "deca", + "avatar_url": "https://avatars.githubusercontent.com/u/74135582?v=4", + "profile": "https://github.com/deca12x", + "contributions": [ + "eventOrganizing" + ] + }, + { + "login": "Anish-Gupta1", + "name": "Anish Gupta ", + "avatar_url": "https://avatars.githubusercontent.com/u/180473292?v=4", + "profile": "https://github.com/Anish-Gupta1", + "contributions": [ + "code" + ] + }, + { + "login": "rohitt-gupta", + "name": "Rohit Gupta", + "avatar_url": "https://avatars.githubusercontent.com/u/81370462?v=4", + "profile": "https://rohitt.in", + "contributions": [ + "code" + ] + }, + { + "login": "rvmz", + "name": "Roman Mazurenko", + "avatar_url": "https://avatars.githubusercontent.com/u/92804957?v=4", + "profile": "https://github.com/rvmz", + "contributions": [ + "maintenance" + ] + }, + { + "login": "standstaff", + "name": "ZhengXingRu", + "avatar_url": "https://avatars.githubusercontent.com/u/163401255?v=4", + "profile": "https://github.com/standstaff", + "contributions": [ + "maintenance" + ] + }, + { + "login": "imbarty", + "name": "barty", + "avatar_url": "https://avatars.githubusercontent.com/u/191963641?v=4", + "profile": "https://github.com/imbarty", + "contributions": [ + "bug" + ] + }, + { + "login": "futreall", + "name": "futreall", + "avatar_url": "https://avatars.githubusercontent.com/u/86553580?v=4", + "profile": "https://github.com/futreall", + "contributions": [ + "translation", + "bug" + ] + }, + { + "login": "0xshikhar", + "name": "Shikhar Singh", + "avatar_url": "https://avatars.githubusercontent.com/u/64684053?v=4", + "profile": "https://github.com/0xshikhar", + "contributions": [ + "code", + "content" + ] + }, + { + "login": "clacladev", + "name": "clacla", + "avatar_url": "https://avatars.githubusercontent.com/u/161903?v=4", + "profile": "https://github.com/clacladev", + "contributions": [ + "maintenance" + ] + }, + { + "login": "baumstern", + "name": "Daehyun Paik", + "avatar_url": "https://avatars.githubusercontent.com/u/1610146?v=4", + "profile": "https://a30a.dev/", + "contributions": [ + "bug" + ] + }, + { + "login": "dbarabashh", + "name": "Dima Barabash", + "avatar_url": "https://avatars.githubusercontent.com/u/10253529?v=4", + "profile": "https://dbarabashh.com", + "contributions": [ + "code" + ] + }, + { + "login": "YashIIT0909", + "name": "Yash Agarwal", + "avatar_url": "https://avatars.githubusercontent.com/u/182656811?v=4", + "profile": "https://github.com/YashIIT0909", + "contributions": [ + "bug" + ] + }, + { + "login": "tomrpl", + "name": "Reppelin Tom", + "avatar_url": "https://avatars.githubusercontent.com/u/75627352?v=4", + "profile": "http://www.linkedin.com/in/tom-reppelin", + "contributions": [ + "tool" + ] + }, + { + "login": "mdqst", + "name": "Dmitry", + "avatar_url": "https://avatars.githubusercontent.com/u/98899785?v=4", + "profile": "https://mdqst.com", + "contributions": [ + "bug" + ] + }, + { + "login": "3eph1r0th", + "name": "Sephiroth", + "avatar_url": "https://avatars.githubusercontent.com/u/26237289?v=4", + "profile": "https://github.com/3eph1r0th", + "contributions": [ + "tool" + ] + }, + { + "login": "IlyaSmiyukha", + "name": "Ilya Smiyukha", + "avatar_url": "https://avatars.githubusercontent.com/u/39830587?v=4", + "profile": "https://ilyasmiyukha.github.io/", + "contributions": [ + "maintenance" + ] + }, + { + "login": "jorgesumle", + "name": "Jorge", + "avatar_url": "https://avatars.githubusercontent.com/u/14212780?v=4", + "profile": "https://github.com/jorgesumle", + "contributions": [ + "bug" + ] + }, + { + "login": "CryptoDelirium", + "name": "Crypto Delirium", + "avatar_url": "https://avatars.githubusercontent.com/u/6353394?v=4", + "profile": "https://github.com/CryptoDelirium", + "contributions": [ + "content" + ] + }, + { + "login": "alinobrasil", + "name": "AK", + "avatar_url": "https://avatars.githubusercontent.com/u/1214559?v=4", + "profile": "https://github.com/alinobrasil", + "contributions": [ + "maintenance" + ] + }, + { + "login": "0xumarkhatab", + "name": "0xumarkhatab", + "avatar_url": "https://avatars.githubusercontent.com/u/71306738?v=4", + "profile": "https://github.com/0xumarkhatab", + "contributions": [ + "maintenance" + ] + }, + { + "login": "alcueca", + "name": "Alberto Cuesta Cañada", + "avatar_url": "https://avatars.githubusercontent.com/u/38806121?v=4", + "profile": "https://www.linkedin.com/in/albertocuesta/", + "contributions": [ + "maintenance" + ] } ], "contributorsPerLine": 7, diff --git a/.storybook/main.ts b/.storybook/main.ts index 7fc65a2c201..77c9d745242 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -61,6 +61,11 @@ const config: StorybookConfig = { if (imageRule) { imageRule["exclude"] = /\.svg$/ } + // Configure yaml files to be loaded with yaml-loader + config.module.rules.push({ + test: /\.ya?ml$/, + use: "yaml-loader", + }) // Configure .svg files to be loaded with @svgr/webpack config.module.rules.push({ diff --git a/.storybook/next-intl.ts b/.storybook/next-intl.ts index 4d2a7844b37..a28a2bdad7c 100644 --- a/.storybook/next-intl.ts +++ b/.storybook/next-intl.ts @@ -17,6 +17,7 @@ export const ns = [ "page-learn", "page-upgrades", "page-developers-index", + "page-roadmap-vision", "page-what-is-ethereum", "page-upgrades-index", "page-wallets-find-wallet", diff --git a/README.md b/README.md index 68d59514760..fc586436734 100644 --- a/README.md +++ b/README.md @@ -1999,6 +1999,37 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d otc group
otc group

🚧 Savio
Savio

🚧 fuder.eth
fuder.eth

🚧 + @karelxfi
@karelxfi

🔧 + + + Oleg Gorbatiuk
Oleg Gorbatiuk

🖋 + deca
deca

📋 + Anish Gupta
Anish Gupta

💻 + Rohit Gupta
Rohit Gupta

💻 + Roman Mazurenko
Roman Mazurenko

🚧 + ZhengXingRu
ZhengXingRu

🚧 + barty
barty

🐛 + + + futreall
futreall

🌍 🐛 + Shikhar Singh
Shikhar Singh

💻 🖋 + clacla
clacla

🚧 + Daehyun Paik
Daehyun Paik

🐛 + Dima Barabash
Dima Barabash

💻 + Yash Agarwal
Yash Agarwal

🐛 + Reppelin Tom
Reppelin Tom

🔧 + + + Dmitry
Dmitry

🐛 + Sephiroth
Sephiroth

🔧 + Ilya Smiyukha
Ilya Smiyukha

🚧 + Jorge
Jorge

🐛 + Crypto Delirium
Crypto Delirium

🖋 + AK
AK

🚧 + 0xumarkhatab
0xumarkhatab

🚧 + + + Alberto Cuesta Cañada
Alberto Cuesta Cañada

🚧 diff --git a/app/[locale]/10years/_components/CurrentTorchHolderCard.tsx b/app/[locale]/10years/_components/CurrentTorchHolderCard.tsx deleted file mode 100644 index fb282e9284f..00000000000 --- a/app/[locale]/10years/_components/CurrentTorchHolderCard.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import { Avatar } from "@/components/ui/avatar" -import { ButtonLink } from "@/components/ui/buttons/Button" -import { - Card, - CardContent, - CardFooter, - CardHeader, - CardTitle, -} from "@/components/ui/card" -import { BaseLink } from "@/components/ui/Link" - -import { cn } from "@/lib/utils/cn" - -import Curved10YearsText from "./10y.svg" - -import { - extractTwitterHandle, - formatAddress, - getAvatarImage, - getTxEtherscanUrl, - type TorchHolderEvent, -} from "@/lib/torch" - -interface CurrentTorchHolderCardProps { - currentHolder: TorchHolderEvent | null - isBurned?: boolean - className?: string -} - -const CurrentTorchHolderCard = ({ - currentHolder, - isBurned = false, - className, -}: CurrentTorchHolderCardProps) => { - return ( - - -
- {/* Torch/flame video */} -
-
-
- - - {/* Curved text */} - - -
- - {/* Bottom section: torchbearer info */} - - {currentHolder ? ( -
- - -
- {/* Name */} -
- {currentHolder.name || formatAddress(currentHolder.address)} -
- {/* Description */} -
{currentHolder.role || "Current torchbearer"}
- {/* Verify onchain link */} - - View on Etherscan - -
-
- ) : isBurned ? ( -
-
- 🔥 Torch Burned 🔥 -
-
- The Ethereum Torch has been burned to celebrate the 10-year - anniversary! -
-
- ) : ( -
-
🤐 Unknown Bearer
-
- The current torch bearer's identity is not publicly - available. -
-
- )} -
- - - See all torchbearers - - - - ) -} - -export default CurrentTorchHolderCard diff --git a/app/[locale]/10years/page.tsx b/app/[locale]/10years/page.tsx index 53e195fe55a..c55757ed5d2 100644 --- a/app/[locale]/10years/page.tsx +++ b/app/[locale]/10years/page.tsx @@ -30,7 +30,6 @@ import { BASE_TIME_UNIT } from "@/lib/constants" import Curved10YearsText from "./_components/10y.svg" import AdoptionSwiper from "./_components/AdoptionSwiper/lazy" import CountDown from "./_components/CountDown/lazy" -import CurrentTorchHolderCard from "./_components/CurrentTorchHolderCard" import { adoptionStyles } from "./_components/data" import InnovationSwiper from "./_components/InnovationSwiper/lazy" import NFTMintCardWrapper from "./_components/NFTMintCardWrapper" @@ -53,7 +52,6 @@ import { getHolderEvents, getTransferEvents, isAddressFiltered, - isTorchBurned, type TorchHolder, } from "@/lib/torch" import TenYearLogo from "@/public/images/10-year-anniversary/10-year-logo.png" @@ -97,7 +95,7 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => { const adoptionCards = await getAdoptionCards() // Torch NFT data fetching logic - const transferEvents = await getTransferEvents() + const transferEvents = getTransferEvents() const torchHolderMap: Record = allTorchHolders.reduce( @@ -113,13 +111,6 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => { transferEvents ) - let isBurned = false - try { - isBurned = await isTorchBurned() - } catch (error) { - console.error("Error fetching torch burned status:", error) - } - // Filter out events where the address is in the filtered list const torchHolders = torchHoldersEvents.filter( (holder) => !isAddressFiltered(holder.address) @@ -161,15 +152,7 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
- {showNFTMint ? ( - - ) : ( - - )} +
diff --git a/app/[locale]/dapps/_components/dapps.tsx b/app/[locale]/dapps/_components/dapps.tsx index c85d659c2ca..f5fbbd2f22c 100644 --- a/app/[locale]/dapps/_components/dapps.tsx +++ b/app/[locale]/dapps/_components/dapps.tsx @@ -69,6 +69,7 @@ import lido from "@/public/images/dapps/lido.png" import matcha from "@/public/images/dapps/matcha.png" import meeds from "@/public/images/dapps/meeds.png" import mirror from "@/public/images/dapps/mirror.png" +import morpho from "@/public/images/dapps/morpho.png" import nexus from "@/public/images/dapps/nexus.png" import nifty from "@/public/images/dapps/nifty.png" import opensea from "@/public/images/dapps/opensea.png" @@ -487,6 +488,13 @@ const DappsPage = ({ image: aave, alt: t("page-dapps-aave-logo-alt"), }, + { + title: "Morpho", + description: t("page-dapps-dapp-description-morpho"), + link: "https://morpho.org/", + image: morpho, + alt: t("page-dapps-morpho-logo-alt"), + }, { title: "Compound", description: t("page-dapps-dapp-description-compound"), diff --git a/app/[locale]/enterprise/_components/FeatureCard.tsx b/app/[locale]/enterprise/_components/FeatureCard.tsx index ed1b499bf64..aabb0ae2984 100644 --- a/app/[locale]/enterprise/_components/FeatureCard.tsx +++ b/app/[locale]/enterprise/_components/FeatureCard.tsx @@ -48,7 +48,7 @@ const FeatureCard = ({

{header}

{content.map((p, i) => ( -

+

{p}

))} diff --git a/app/[locale]/enterprise/page.tsx b/app/[locale]/enterprise/page.tsx index f28a4941ca9..2733a8c0414 100644 --- a/app/[locale]/enterprise/page.tsx +++ b/app/[locale]/enterprise/page.tsx @@ -118,7 +118,7 @@ const Page = async ({ params }: { params: { locale: Lang } }) => { }, { label: "Upgrades", - state: { value: "15" }, // TODO: Calculate from upgrades list + state: { value: "16" }, // TODO: Calculate from upgrades list }, { label: "Downtime", diff --git a/app/[locale]/learn/page.tsx b/app/[locale]/learn/page.tsx index 95d7799b4ef..dc843bbdefe 100644 --- a/app/[locale]/learn/page.tsx +++ b/app/[locale]/learn/page.tsx @@ -692,6 +692,15 @@ export default async function Page({ params }: { params: Promise }) { {t("bankless-description")} +

{t("about-ethereum-video-series")}

+ + + + {t("ethereum-basics-title")} + {" "} + {t("ethereum-basics-description")} + + diff --git a/app/[locale]/resources/page.tsx b/app/[locale]/resources/page.tsx index 588b7efb55c..69434cd04d0 100644 --- a/app/[locale]/resources/page.tsx +++ b/app/[locale]/resources/page.tsx @@ -75,7 +75,7 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => { /> -
+
{t("page-resources-whats-on-this-page")}
diff --git a/docs/deploy-process.md b/docs/deploy-process.md index bf11ef24675..2c95cfb176f 100644 --- a/docs/deploy-process.md +++ b/docs/deploy-process.md @@ -6,7 +6,7 @@ Ethereum.org follows a [Gitflow](https://www.atlassian.com/git/tutorials/compari The current process for deployment involves a 2-day QA cycle to test a release candidate. A release candidate is created on Tuesday, will have 2 days of testing, and then released to production on Thursday assuming no blocking bugs are found. -The typical workflow will be as follows: +The typical workflow is as follows: 1. A branch is created off of the `dev` branch, and pull requests for the branch are created into `dev` 2. Pull requests are reviewed, and merged into `dev` diff --git a/docs/event-tracking.md b/docs/event-tracking.md index d6a3e0e2f1d..b6eb5458b00 100644 --- a/docs/event-tracking.md +++ b/docs/event-tracking.md @@ -37,7 +37,7 @@ It's helpful to ask yourself how the results of what we track and measure might Broadly, events should be grouped by specific topic (e.g. L2 page external links, selected bridge, selected cex). -## Each event comprises of 4 hierarchical values: +## Each event comprises 4 hierarchical values: 1. Category (other events may share the same category if one feature has several actions) 2. Action diff --git a/docs/typescript.md b/docs/typescript.md index 78884f9b141..bdccb06e0f9 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -14,7 +14,7 @@ const someVar: string = 'string' const someVar = 'string' ``` -Do declare a type for an unassigned variable when a type can not be inferred. +Do declare a type for an unassigned variable when a type cannot be inferred. ``` const someVar: string diff --git a/package.json b/package.json index 3c5d02889af..efdc3a53b44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ethereum-org-website", - "version": "10.8.0", + "version": "10.9.0", "license": "MIT", "private": true, "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a73147f708..0c656b2b733 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7244,6 +7244,11 @@ packages: resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} hasBin: true + sha.js@2.4.12: + resolution: {integrity: sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==} + engines: {node: '>= 0.10'} + hasBin: true + sharp@0.32.6: resolution: {integrity: sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==} engines: {node: '>=14.15.0'} @@ -7713,6 +7718,10 @@ packages: to-buffer@1.1.1: resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} + to-buffer@1.2.1: + resolution: {integrity: sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==} + engines: {node: '>= 0.4'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -9279,7 +9288,7 @@ snapshots: eventemitter3: 5.0.1 keccak: 3.0.4 preact: 10.26.9 - sha.js: 2.4.11 + sha.js: 2.4.12 transitivePeerDependencies: - supports-color @@ -17187,6 +17196,12 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 + sha.js@2.4.12: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + to-buffer: 1.2.1 + sharp@0.32.6: dependencies: color: 4.2.3 @@ -17784,6 +17799,12 @@ snapshots: to-buffer@1.1.1: {} + to-buffer@1.2.1: + dependencies: + isarray: 2.0.5 + safe-buffer: 5.2.1 + typed-array-buffer: 1.0.3 + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 diff --git a/public/content/defi/index.md b/public/content/defi/index.md index c3f30156fb2..10e54046e1e 100644 --- a/public/content/defi/index.md +++ b/public/content/defi/index.md @@ -140,7 +140,7 @@ This allows you to borrow money without credit checks or handing over private in #### Access to global funds {#access-global-funds} -When you use a decentralized lender you have access to funds deposited from all over the globe, not just the funds in the custody of your chosen bank or institution. This make loans more accessible and improves the interest rates. +When you use a decentralized lender you have access to funds deposited from all over the globe, not just the funds in the custody of your chosen bank or institution. This makes loans more accessible and improves the interest rates. #### Tax-efficiencies {#tax-efficiencies} diff --git a/public/content/developers/docs/accounts/index.md b/public/content/developers/docs/accounts/index.md index 83dc26d1e80..5572ced5329 100644 --- a/public/content/developers/docs/accounts/index.md +++ b/public/content/developers/docs/accounts/index.md @@ -4,7 +4,7 @@ description: An explanation of Ethereum accounts – their data structures and t lang: en --- -An Ethereum account is an entity with an ether (ETH) balance that can send transactions on Ethereum. Accounts can be user-controlled or deployed as smart contracts. +An Ethereum account is an entity with an ether (ETH) balance that can send messages on Ethereum. Accounts can be user-controlled or deployed as smart contracts. ## Prerequisites {#prerequisites} @@ -34,7 +34,7 @@ Both account types have the ability to: **Contract** - Creating a contract has a cost because you're using network storage -- Can only send transactions in response to receiving a transaction +- Can only send messages in response to receiving a transaction - Transactions from an external account to a contract account can trigger code which can execute many different actions, such as transferring tokens or even creating a new contract - Contract accounts don't have private keys. Instead, they are controlled by the logic of the smart contract code diff --git a/public/content/developers/docs/apis/javascript/index.md b/public/content/developers/docs/apis/javascript/index.md index c0c5139cac9..6613422cf87 100644 --- a/public/content/developers/docs/apis/javascript/index.md +++ b/public/content/developers/docs/apis/javascript/index.md @@ -26,6 +26,8 @@ These libraries abstract away much of the complexity of interacting directly wit Using providers, these libraries allow you to connect to Ethereum and read its data, whether that's over JSON-RPC, INFURA, Etherscan, Alchemy or MetaMask. +> **Warning:** Web3.js was archived on March 4, 2025. [Read the announcement](https://blog.chainsafe.io/web3-js-sunset/). Consider using alternative libraries like ethers.js or viem for new projects. + **Ethers example** ```js diff --git a/public/content/developers/docs/apis/json-rpc/index.md b/public/content/developers/docs/apis/json-rpc/index.md index fb7e356d71a..6b85f335185 100755 --- a/public/content/developers/docs/apis/json-rpc/index.md +++ b/public/content/developers/docs/apis/json-rpc/index.md @@ -58,9 +58,9 @@ Here are some examples: - WRONG: 0xf0f0f (must be even number of digits) - WRONG: 004200 (must be prefixed 0x) -### The default block parameter {#default-block} +### The block parameter {#block-parameter} -The following methods have an extra default block parameter: +The following methods have a block parameter: - [eth_getBalance](#eth_getbalance) - [eth_getCode](#eth_getcode) @@ -68,9 +68,9 @@ The following methods have an extra default block parameter: - [eth_getStorageAt](#eth_getstorageat) - [eth_call](#eth_call) -When requests are made that act on the state of Ethereum, the last default block parameter determines the height of the block. +When requests are made that query the state of Ethereum, the provided block parameter determines the height of the block. -The following options are possible for the defaultBlock parameter: +The following options are possible for the block parameter: - `HEX String` - an integer block number - `String "earliest"` for the earliest/genesis block @@ -303,6 +303,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[] Returns an object with data about the sync status or `false`. + + Try endpoint in playground + + **Parameters** None @@ -387,6 +391,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1} Returns the client coinbase address. + + Try endpoint in playground + + > **Note:** This method has been deprecated as of **v1.14.0** and is no longer supported. Attempting to use this method will result in a "Method not supported" error. **Parameters** @@ -414,6 +422,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":6 Returns the chain ID used for signing replay-protected transactions. + + Try endpoint in playground + + **Parameters** None @@ -439,6 +451,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67 Returns `true` if client is actively mining new blocks. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/). + + Try endpoint in playground + + **Parameters** None @@ -464,6 +480,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":71} Returns the number of hashes per second that the node is mining with. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/). + + Try endpoint in playground + + **Parameters** None @@ -489,6 +509,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":7 Returns an estimate of the current price per gas in wei. For example, the Besu client examines the last 100 blocks and returns the median gas unit price by default. + + Try endpoint in playground + + **Parameters** None @@ -514,6 +538,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":7 Returns a list of addresses owned by client. + + Try endpoint in playground + + **Parameters** None @@ -539,6 +567,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1 Returns the number of most recent block. + + Try endpoint in playground + + **Parameters** None @@ -564,10 +596,14 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id Returns the balance of the account of given address. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 20 Bytes - address to check for balance. -2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"`, or `"finalized"`, see the [default block parameter](/developers/docs/apis/json-rpc/#default-block) +2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"`, or `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter) ```js params: ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"] @@ -594,11 +630,15 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407 Returns the value from a storage position at a given address. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 20 Bytes - address of the storage. 2. `QUANTITY` - integer of the position in the storage. -3. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"`, `"finalized"`, see the [default block parameter](/developers/docs/apis/json-rpc/#default-block) +3. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"`, `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter) **Returns** @@ -662,10 +702,14 @@ curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": [ Returns the number of transactions _sent_ from an address. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 20 Bytes - address. -2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [default block parameter](/developers/docs/apis/json-rpc/#default-block) +2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter) ```js params: [ @@ -695,6 +739,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params Returns the number of transactions in a block from a block matching the given block hash. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 32 Bytes - hash of a block @@ -724,9 +772,13 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHa Returns the number of transactions in a block matching the given block number. + + Try endpoint in playground + + **Parameters** -1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block). +1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter). ```js params: [ @@ -755,6 +807,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNu Returns the number of uncles in a block from a block matching the given block hash. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 32 Bytes - hash of a block @@ -784,9 +840,13 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","p Returns the number of uncles in a block from a block matching the given block number. + + Try endpoint in playground + + **Parameters** -1. `QUANTITY|TAG` - integer of a block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [default block parameter](/developers/docs/apis/json-rpc/#default-block) +1. `QUANTITY|TAG` - integer of a block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter) ```js params: [ @@ -815,10 +875,14 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber", Returns code at a given address. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 20 Bytes - address -2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [default block parameter](/developers/docs/apis/json-rpc/#default-block) +2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter) ```js params: [ @@ -994,6 +1058,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params" Executes a new message call immediately without creating a transaction on the blockchain. Often used for executing read-only smart contract functions, for example the `balanceOf` for an ERC-20 contract. + + Try endpoint in playground + + **Parameters** 1. `Object` - The transaction call object @@ -1005,7 +1073,7 @@ Executes a new message call immediately without creating a transaction on the bl - `value`: `QUANTITY` - (optional) Integer of the value sent with this transaction - `input`: `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI in the Solidity documentation](https://docs.soliditylang.org/en/latest/abi-spec.html). -2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [default block parameter](/developers/docs/apis/json-rpc/#default-block) +2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter) **Returns** @@ -1028,6 +1096,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{see above}] Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance. + + Try endpoint in playground + + **Parameters** See [eth_call](#eth_call) parameters, except that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit. @@ -1053,6 +1125,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{see Returns information about a block by hash. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 32 Bytes - Hash of a block. @@ -1072,13 +1148,13 @@ params: [ - `number`: `QUANTITY` - the block number. `null` when its pending block. - `hash`: `DATA`, 32 Bytes - hash of the block. `null` when its pending block. - `parentHash`: `DATA`, 32 Bytes - hash of the parent block. -- `nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block. +- `nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block, `0x0` for proof-of-stake blocks (since The Merge) - `sha3Uncles`: `DATA`, 32 Bytes - SHA3 of the uncles data in the block. - `logsBloom`: `DATA`, 256 Bytes - the bloom filter for the logs of the block. `null` when its pending block. - `transactionsRoot`: `DATA`, 32 Bytes - the root of the transaction trie of the block. - `stateRoot`: `DATA`, 32 Bytes - the root of the final state trie of the block. - `receiptsRoot`: `DATA`, 32 Bytes - the root of the receipts trie of the block. -- `miner`: `DATA`, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. +- `miner`: `DATA`, 20 Bytes - the address of the beneficiary to whom the block rewards were given. - `difficulty`: `QUANTITY` - integer of the difficulty for this block. - `totalDifficulty`: `QUANTITY` - integer of the total difficulty of the chain until this block. - `extraData`: `DATA` - the "extra data" field of this block. @@ -1130,9 +1206,13 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0 Returns information about a block by block number. + + Try endpoint in playground + + **Parameters** -1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block). +1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter). 2. `Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. ```js @@ -1158,6 +1238,10 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash) Returns the information about a transaction requested by transaction hash. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 32 Bytes - hash of a transaction @@ -1217,6 +1301,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","param Returns information about a transaction by block hash and transaction index position. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 32 Bytes - hash of a block. @@ -1245,9 +1333,13 @@ Result see [eth_getTransactionByHash](#eth_gettransactionbyhash) Returns information about a transaction by block number and transaction index position. + + Try endpoint in playground + + **Parameters** -1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block). +1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter). 2. `QUANTITY` - the transaction index position. ```js @@ -1341,6 +1433,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","para Returns information about a uncle of a block by hash and uncle index position. + + Try endpoint in playground + + **Parameters** 1. `DATA`, 32 Bytes - The hash of a block. @@ -1371,9 +1467,13 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash) Returns information about a uncle of a block by number and uncle index position. + + Try endpoint in playground + + **Parameters** -1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"`, `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block). +1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"`, `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter). 2. `QUANTITY` - the uncle's index position. ```js @@ -1623,7 +1723,7 @@ Returns an array of all logs matching a given filter object. - `toBlock`: `QUANTITY|TAG` - (optional, default: `"latest"`) Integer block number, or `"latest"` for the last proposed block, `"safe"` for the latest safe block, `"finalized"` for the latest finalized block, or `"pending"`, `"earliest"` for transactions not yet in a block. - `address`: `DATA|Array`, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate. - `topics`: `Array of DATA`, - (optional) Array of 32 Bytes `DATA` topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. -- `blockhash`: `DATA`, 32 Bytes - (optional, **future**) With the addition of EIP-234, `blockHash` will be a new filter option which restricts the logs returned to the single block with the 32-byte hash `blockHash`. Using `blockHash` is equivalent to `fromBlock` = `toBlock` = the block number with hash `blockHash`. If `blockHash` is present in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed. +- `blockHash`: `DATA`, 32 Bytes - (optional, **future**) With the addition of EIP-234, `blockHash` will be a new filter option which restricts the logs returned to the single block with the 32-byte hash `blockHash`. Using `blockHash` is equivalent to `fromBlock` = `toBlock` = the block number with hash `blockHash`. If `blockHash` is present in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed. ```js params: [ diff --git a/public/content/developers/docs/data-and-analytics/block-explorers/index.md b/public/content/developers/docs/data-and-analytics/block-explorers/index.md index acb58e1a1e5..7079143563a 100644 --- a/public/content/developers/docs/data-and-analytics/block-explorers/index.md +++ b/public/content/developers/docs/data-and-analytics/block-explorers/index.md @@ -25,7 +25,6 @@ You should understand the basic concepts of Ethereum so you can make sense of th - [Ethplorer](https://ethplorer.io/) -_Also available in Chinese, Spanish, French, Turkish, Russian, Korean and Vietnamese_ - [EthVM](https://www.ethvm.com/) - [OKLink](https://www.oklink.com/eth) -- [Rantom](https://rantom.app/) - [Ethseer](https://ethseer.io) ## Open source tools {#open-source-tools} @@ -244,7 +243,6 @@ The consensus layer top-level data includes the following: - [Blockchair](https://blockchair.com/ethereum) - the most private Ethereum explorer. Also for sorting and filtering (mempool) data - [Etherchain](https://www.etherchain.org/) - a block explorer for the Ethereum Mainnet - [Ethplorer](https://ethplorer.io/) - a block explorer with a focus on tokens for the Ethereum Mainnet and the Kovan testnet -- [Rantom](https://rantom.app/) - A user-friendly open-source DeFi & NFT transaction viewer for detailed insights - [Ethernow](https://www.ethernow.xyz/) - a real-time transaction explorer that enables you to see the Ethereum Mainnet pre-chain layer ## Further reading {#further-reading} diff --git a/public/content/developers/docs/data-and-analytics/index.md b/public/content/developers/docs/data-and-analytics/index.md index bb70c170901..ba56fb3366c 100644 --- a/public/content/developers/docs/data-and-analytics/index.md +++ b/public/content/developers/docs/data-and-analytics/index.md @@ -24,11 +24,17 @@ Developers can then process and transform this data to give their users unique i ## The Graph {#the-graph} -The [Graph Network](https://thegraph.com/) is a decentralized indexing protocol for organizing blockchain data. Instead of building and managing offchain and centralized data stores to aggregate onchain data, with The Graph, developers can build serverless applications that run entirely on public infrastructure. +[The Graph](https://thegraph.com/) is an indexing protocol that provides an easy way to query blockchain data through open APIs known as subgraphs. -Using [GraphQL](https://graphql.org/), developers can query any of the curated open APIs, known as sub-graphs, to acquire the necessary information they need to drive their dapp. By querying these indexed sub-graphs, Reports and dapps not only get performance and scalability benefits but also the built in accuracy provided by network consensus. As new improvements and/or sub-graphs are added to the network, your projects can rapidly iterate to take advantage of these enhancements. +With The Graph, developers can benefit from: -## Client diversity +- Decentralized indexing: Enables indexing blockchain data through multiple indexers, thus eliminating any single point of failure +- GraphQL queries: Provides a powerful GraphQL interface for querying indexed data, making data retrieval super simple +- Customization: Define your own logic for transforming & storing blockchain data, and reuse subgraphs published by other developers on The Graph Network + +Follow this [quick-start](https://thegraph.com/docs/en/quick-start/) guide to create, deploy, and query a subgraph within 5 minutes. + +## Client diversity {#client-diversity} [Client diversity](/developers/docs/nodes-and-clients/client-diversity/) is important for the overall health of the Ethereum network because it provides resilience to bugs and exploits. There are now several client diversity dashboards including [clientdiversity.org](https://clientdiversity.org/), [rated.network](https://www.rated.network), [supermajority.info](https://supermajority.info//) and [Ethernodes](https://ethernodes.org/). @@ -36,6 +42,12 @@ Using [GraphQL](https://graphql.org/), developers can query any of the curated o [Dune Analytics](https://dune.com/) pre-processes blockchain data into relational database (DuneSQL) tables, allows users to query blockchain data using SQL and build dashboards based on query results. Onchain data are organized into 4 raw tables: `blocks`, `transactions`, (event) `logs` and (call) `traces`. Popular contracts and protocols have been decoded, and each has its own set of event and call tables. Those event and call tables are processed further and organized into abstraction tables by the type of protocols, for example, dex, lending, stablecoins, etc. +## SQD {#sqd} + +[SQD](https://sqd.dev/) is a decentralized hyper-scalable data platform optimized for providing efficient, permissionless access to large volumes of data. It currently serves historical on-chain data, including event logs, transaction receipts, traces, and per-transaction state diffs. SQD offers a powerful toolkit for creating custom data extraction and processing pipelines, achieving an indexing speed of up to 150k blocks per second. + +To get started, visit the [documentation](https://docs.sqd.dev/) or see [EVM examples](https://github.com/subsquid-labs/squid-evm-examples) of what you can build with SQD. + ## SubQuery Network {#subquery-network} [SubQuery](https://subquery.network/) is a leading data indexer that gives developers fast, reliable, decentralized, and customized APIs for their web3 projects. SubQuery empower developers from over 165+ ecosystems (including Ethereum) with rich indexed data to build an intuitive and immersive experiences for their users. The SubQuery Network powers your unstoppable apps with a resilient and decentralized infrastructure network. Use SubQuery's blockchain developer toolkit to build the web3 applications of the future, without spending time building a custom backend for data processing activities. @@ -43,16 +55,21 @@ Using [GraphQL](https://graphql.org/), developers can query any of the curated o To start, visit the [Ethereum quick start guide](https://academy.subquery.network/quickstart/quickstart_chains/ethereum-gravatar.html) to start indexing Ethereum blockchain data in minutes in a local Docker environment for testing before going live on a [SubQuery's managed service](https://managedservice.subquery.network/) or on [SubQuery's decentralised network](https://app.subquery.network/dashboard). ## Ethernow - Mempool Data Program {#ethernow} + [Blocknative](https://www.blocknative.com/) provides open access to its Ethereum historical [mempool data archive](https://www.ethernow.xyz/mempool-data-archive). This enables researchers and community good projects to explore the pre-chain layer of Ethereum Mainnet. The data set is actively maintained and represents the most comprehensive historical record of mempool transaction events within the Ethereum ecosystem. Learn more at [Ethernow](https://www.ethernow.xyz/). -## EVM Query Language +## EVM Query Language {#evm-query-language} + EVM Query Language (EQL) is an SQL-like language designed to query EVM (Ethereum Virtual Machine) chains. EQL's ultimate goal is to support complex relational queries on EVM chain first-class citizens (blocks, accounts, and transactions) while providing developers and researchers with an ergonomic syntax for everyday use. With EQL, developers can fetch blockchain data using familiar SQL-like syntax and eliminate the need for complex boilerplate code. EQL supports standard blockchain data requests (e.g., retrieving an account's nonce and balance on Ethereum or fetching the current block size and timestamp) and is continually adding support for more complex requests and featuresets. ## Further Reading {#further-reading} + - [Exploring Crypto Data I: Data Flow Architectures](https://research.2077.xyz/exploring-crypto-data-1-data-flow-architectures) - [Graph Network Overview](https://thegraph.com/docs/en/about/) - [Graph Query Playground](https://thegraph.com/explorer/subgraph/graphprotocol/graph-network-mainnet?version=current) - [API code examples on EtherScan](https://etherscan.io/apis#contracts) - [Beaconcha.in Beacon Chain explorer](https://beaconcha.in) - [Dune Basics](https://docs.dune.com/#dune-basics) +- [SubQuery Ethereum Quick Start Guide](https://academy.subquery.network/indexer/quickstart/quickstart_chains/ethereum-gravatar.html) +- [SQD Network Overview](https://docs.sqd.dev/) - [EVM Query Language](https://eql.sh/blog/alpha-release-notes) diff --git a/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md b/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md index 64cbe232033..fce9985f2d2 100644 --- a/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md +++ b/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md @@ -5,17 +5,17 @@ lang: en sidebarDepth: 2 --- -The state of Ethereum (the totality of all accounts, balances, and smart contracts), is encoded into a special version of the data structure known generally in computer science as a Merkle Tree. This structure is useful for many applications in cryptography because it creates a verifiable relationship between all the individual pieces of data entangled in the tree, resulting in a single **root** value that can be used to prove things about the data. +The state of Ethereum (the totality of all accounts, balances, and smart contracts), is encoded into a special version of the data structure known generally in computer science as a Merkle Tree. This structure is useful for many applications in cryptography because it creates a verifiable relationship between all the individual pieces of data entangled in the tree, resulting in a single **root** value that can be used to prove things about the data. -Ethereum's data structure is a 'modified Merkle-Patricia Trie', named so because it borrows some features of PATRICIA (the Practical Algorithm To Retrieve Information Coded in Alphanumeric), and because it is designed for efficient data re**trie**val of items that comprise the Ethereum state. +Ethereum's data structure is a 'modified Merkle-Patricia Trie', named so because it borrows some features of PATRICIA (the Practical Algorithm To Retrieve Information Coded in Alphanumeric), and because it is designed for efficient data re**trie**val of items that comprise the Ethereum state. -A Merkle-Patricia trie is deterministic and cryptographically verifiable: The only way to generate a state root is by computing it from each individual piece of the state, and two states that are identical can be easily proven so by comparing the root hash and the hashes that led to it (_a Merkle proof_). Conversely, there is no way to create two different states with the same root hash, and any attempt to modify state with different values will result in a different state root hash. Theoretically, this structure provides the 'holy grail' of `O(log(n))` efficiency for inserts, lookups and deletes. +A Merkle-Patricia trie is deterministic and cryptographically verifiable: The only way to generate a state root is by computing it from each individual piece of the state, and two states that are identical can be easily proven so by comparing the root hash and the hashes that led to it (_a Merkle proof_). Conversely, there is no way to create two different states with the same root hash, and any attempt to modify state with different values will result in a different state root hash. Theoretically, this structure provides the 'holy grail' of `O(log(n))` efficiency for inserts, lookups and deletes. -In the near future, Ethereum plans to migrate to a [Verkle Tree](https://ethereum.org/en/roadmap/verkle-trees) structure, which will open up many new possibilities for future protocol improvements. +In the near future, Ethereum plans to migrate to a [Verkle Tree](https://ethereum.org/en/roadmap/verkle-trees) structure, which will open up many new possibilities for future protocol improvements. ## Prerequisites {#prerequisites} -To better understand this page, it would be helpful to have basic knowledge of [hashes](https://en.wikipedia.org/wiki/Hash_function), [Merkle trees](https://en.wikipedia.org/wiki/Merkle_tree), [tries](https://en.wikipedia.org/wiki/Trie) and [serialization](https://en.wikipedia.org/wiki/Serialization). This article begins with a description of a basic [radix tree](https://en.wikipedia.org/wiki/Radix_tree), then gradually introduces the modifications necessary for Ethereum's more optimized data structure. +To better understand this page, it would be helpful to have basic knowledge of [hashes](https://en.wikipedia.org/wiki/Hash_function), [Merkle trees](https://en.wikipedia.org/wiki/Merkle_tree), [tries](https://en.wikipedia.org/wiki/Trie) and [serialization](https://en.wikipedia.org/wiki/Serialization). This article begins with a description of a basic [radix tree](https://en.wikipedia.org/wiki/Radix_tree), then gradually introduces the modifications necessary for Ethereum's more optimized data structure. ## Basic radix tries {#basic-radix-tries} @@ -33,11 +33,11 @@ There is a difference between looking something up in the 'trie' and the underly The update and delete operations for radix tries can be defined as follows: -``` +```python def update(node_hash, path, value): - curnode = db.get(node_hash) if node_hash else [ NULL ] * 17 + curnode = db.get(node_hash) if node_hash else [NULL] * 17 newnode = curnode.copy() - if path == '': + if path == "": newnode[-1] = value else: newindex = update(curnode[path[0]], path[1:], value) @@ -51,7 +51,7 @@ The update and delete operations for radix tries can be defined as follows: else: curnode = db.get(node_hash) newnode = curnode.copy() - if path == '': + if path == "": newnode[-1] = NULL else: newindex = delete(curnode[path[0]], path[1:]) @@ -95,69 +95,72 @@ When traversing paths in nibbles, we may end up with an odd number of nibbles to The flagging of both _odd vs. even remaining partial path length_ and _leaf vs. extension node_ as described above reside in the first nibble of the partial path of any 2-item node. They result in the following: - | hex char | bits | node type partial | path length | - | -------- | ---- | ------------------ | ----------- | - | 0 | 0000 | extension | even | - | 1 | 0001 | extension | odd | - | 2 | 0010 | terminating (leaf) | even | - | 3 | 0011 | terminating (leaf) | odd | +| hex char | bits | node type partial | path length | +| -------- | ---- | ------------------ | ----------- | +| 0 | 0000 | extension | even | +| 1 | 0001 | extension | odd | +| 2 | 0010 | terminating (leaf) | even | +| 3 | 0011 | terminating (leaf) | odd | For even remaining path length (`0` or `2`), another `0` "padding" nibble will always follow. -``` +```python def compact_encode(hexarray): term = 1 if hexarray[-1] == 16 else 0 - if term: hexarray = hexarray[:-1] + if term: + hexarray = hexarray[:-1] oddlen = len(hexarray) % 2 flags = 2 * term + oddlen if oddlen: hexarray = [flags] + hexarray else: hexarray = [flags] + [0] + hexarray - // hexarray now has an even length whose first nibble is the flags. - o = '' - for i in range(0,len(hexarray),2): - o += chr(16 * hexarray[i] + hexarray[i+1]) + # hexarray now has an even length whose first nibble is the flags. + o = "" + for i in range(0, len(hexarray), 2): + o += chr(16 * hexarray[i] + hexarray[i + 1]) return o ``` Examples: -``` - > [ 1, 2, 3, 4, 5, ...] +```python + > [1, 2, 3, 4, 5, ...] '11 23 45' - > [ 0, 1, 2, 3, 4, 5, ...] + > [0, 1, 2, 3, 4, 5, ...] '00 01 23 45' - > [ 0, f, 1, c, b, 8, 10] + > [0, f, 1, c, b, 8, 10] '20 0f 1c b8' - > [ f, 1, c, b, 8, 10] + > [f, 1, c, b, 8, 10] '3f 1c b8' ``` Here is the extended code for getting a node in the Merkle Patricia trie: -``` - def get_helper(node_hash,path): - if path == []: return node_hash - if node_hash == '': return '' +```python + def get_helper(node_hash, path): + if path == []: + return node_hash + if node_hash == "": + return "" curnode = rlp.decode(node_hash if len(node_hash) < 32 else db.get(node_hash)) if len(curnode) == 2: (k2, v2) = curnode k2 = compact_decode(k2) - if k2 == path[:len(k2)]: - return get(v2, path[len(k2):]) + if k2 == path[: len(k2)]: + return get(v2, path[len(k2) :]) else: - return '' + return "" elif len(curnode) == 17: - return get_helper(curnode[path[0]],path[1:]) + return get_helper(curnode[path[0]], path[1:]) - def get(node_hash,path): + def get(node_hash, path): path2 = [] for i in range(len(path)): path2.push(int(ord(path[i]) / 16)) path2.push(ord(path[i]) % 16) path2.push(16) - return get_helper(node_hash,path2) + return get_helper(node_hash, path2) ``` ### Example Trie {#example-trie} @@ -205,7 +208,7 @@ There is one global state trie, and it is updated every time a client processes Storage trie is where _all_ contract data lives. There is a separate storage trie for each account. To retrieve values at specific storage positions at a given address the storage address, integer position of the stored data in the storage, and the block ID are required. These can then be passed as arguments to the `eth_getStorageAt` defined in the JSON-RPC API, e.g. to retrieve the data in storage slot 0 for address `0x295a70b2de5e3953354a6a8344e616ed314d7251`: -``` +```bash curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}' localhost:8545 {"jsonrpc":"2.0","id":1,"result":"0x00000000000000000000000000000000000000000000000000000000000004d2"} @@ -214,7 +217,7 @@ curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": [ Retrieving other elements in storage is slightly more involved because the position in the storage trie must first be calculated. The position is calculated as the `keccak256` hash of the address and the storage position, both left-padded with zeros to a length of 32 bytes. For example, the position for the data in storage slot 1 for address `0x391694e7e0b0cce554cb130d723a9d27458f9298` is: -``` +```python keccak256(decodeHex("000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298" + "0000000000000000000000000000000000000000000000000000000000000001")) ``` @@ -229,7 +232,7 @@ undefined The `path` is therefore `keccak256(<6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9>)`. This can now be used to retrieve the data from the storage trie as before: -``` +```bash curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "latest"], "id": 1}' localhost:8545 {"jsonrpc":"2.0","id":1,"result":"0x000000000000000000000000000000000000000000000000000000000000162e"} @@ -241,7 +244,7 @@ Note: The `storageRoot` for an Ethereum account is empty by default if it's not There is a separate transactions trie for every block, again storing `(key, value)` pairs. A path here is: `rlp(transactionIndex)` which represents the key that corresponds to a value determined by: -``` +```python if legacyTx: value = rlp(tx) else: diff --git a/public/content/developers/docs/intro-to-ethereum/index.md b/public/content/developers/docs/intro-to-ethereum/index.md index 56cbee11a9b..44626627cee 100644 --- a/public/content/developers/docs/intro-to-ethereum/index.md +++ b/public/content/developers/docs/intro-to-ethereum/index.md @@ -109,6 +109,14 @@ A reusable snippet of code (a program) which a developer publishes into EVM stat - [Ethereum Whitepaper](/whitepaper/) - [How does Ethereum work, anyway?](https://medium.com/@preethikasireddy/how-does-ethereum-work-anyway-22d1df506369) - _Preethi Kasireddy_ (**NB** this resource is still valuable but be aware that it predates [The Merge](/roadmap/merge) and therefore still refers to Ethereum's proof-of-work mechanism - Ethereum is actually now secured using [proof-of-stake](/developers/docs/consensus-mechanisms/pos)) +### More of a visual learner? {#visual-learner} + +This video series offers a thorough exploration of foundational topics: + + + +[Ethereum Basics Playlist](https://youtube.com/playlist?list=PLqgutSGloqiJyyoL0zvLVFPS-GMD2wKa5&si=kZTf5I7PKGTXDsOZ) + _Know of a community resource that helped you? Edit this page and add it!_ ## Related tutorials {#related-tutorials} diff --git a/public/content/developers/docs/nodes-and-clients/client-diversity/index.md b/public/content/developers/docs/nodes-and-clients/client-diversity/index.md index 4e234ecca24..789f2193d40 100644 --- a/public/content/developers/docs/nodes-and-clients/client-diversity/index.md +++ b/public/content/developers/docs/nodes-and-clients/client-diversity/index.md @@ -56,7 +56,7 @@ Until now, the conversation around client diversity has focused mainly on the co ## Use a minority client {#use-minority-client} -Addressing client diversity requires more than individual users to choose minority clients - it requires mining/validator pools and institutions like the major dapps and exchanges to switch clients too. However, all users can do their part in redressing the current imbalance and normalizing the use of all the available Ethereum software. After The Merge, all node operators will be required to run an execution client and a consensus client. Choosing combinations of the clients suggested below will help increase client diversity. +Addressing client diversity requires more than individual users to choose minority clients - it requires validator pools and institutions like the major dapps and exchanges to switch clients too. However, all users can do their part in redressing the current imbalance and normalizing the use of all the available Ethereum software. After The Merge, all node operators will be required to run an execution client and a consensus client. Choosing combinations of the clients suggested below will help increase client diversity. ### Execution clients {#execution-clients} @@ -92,7 +92,8 @@ Several dashboards give real-time client diversity statistics for the execution - [Rated.network](https://www.rated.network/) - [clientdiversity.org](https://clientdiversity.org/) - **Execution layer:** + +**Execution layer:** - [supermajority.info](https://supermajority.info//) - [Ethernodes](https://ethernodes.org/) diff --git a/public/content/developers/docs/nodes-and-clients/index.md b/public/content/developers/docs/nodes-and-clients/index.md index a74fec8a1bf..fe95fc21430 100644 --- a/public/content/developers/docs/nodes-and-clients/index.md +++ b/public/content/developers/docs/nodes-and-clients/index.md @@ -49,6 +49,7 @@ Multiple trackers offer a real-time overview of nodes in the Ethereum network. N - [Ethernodes](https://ethernodes.org/) by Bitfly - [Nodewatch](https://www.nodewatch.io/) by Chainsafe, crawling consensus nodes - [Monitoreth](https://monitoreth.io/) - by MigaLabs, A distributed network monitoring tool +- [Weekly Network Health Reports](https://probelab.io) - by ProbeLab, Using the [Nebula crawler](https://github.com/dennis-tra/nebula) and other tools ## Node types {#node-types} @@ -67,7 +68,7 @@ Full nodes do a block-by-block validation of the blockchain, including downloadi Archive nodes are full nodes that verify every block from genesis and never delete any of the downloaded data. -- Stores everything kept in the full node and builds an archive of historical states. It is needed if you want to query something like an account balance at block #4,000,000, or simply and reliably test your own transactions set without mining them using tracing. +- Stores everything kept in the full node and builds an archive of historical states. It is needed if you want to query something like an account balance at block #4,000,000, or simply and reliably test your own transactions set without validating them using tracing. - This data represents units of terabytes, which makes archive nodes less attractive for average users but can be handy for services like block explorers, wallet vendors, and chain analytics. Syncing clients in any mode other than archive will result in pruned blockchain data. This means, there is no archive of all historical states but the full node is able to build them on demand. @@ -76,7 +77,7 @@ Learn more about [Archive nodes](/developers/docs/nodes-and-clients/archive-node ### Light node {#light-node} -Instead of downloading every block, light nodes only download block headers. These headers contain summary information about the contents of the blocks. Any other information the light node requires gets requested from a full node. The light node can then independently verify the data they receive against the state roots in the block headers. Light nodes enable users to participate in the Ethereum network without the powerful hardware or high bandwidth required to run full nodes. Eventually, light nodes might run on mobile phones or embedded devices. The light nodes do not participate in consensus (i.e. they cannot be miners/validators), but they can access the Ethereum blockchain with the same functionality and security guarantees as a full node. +Instead of downloading every block, light nodes only download block headers. These headers contain summary information about the contents of the blocks. Any other information the light node requires gets requested from a full node. The light node can then independently verify the data they receive against the state roots in the block headers. Light nodes enable users to participate in the Ethereum network without the powerful hardware or high bandwidth required to run full nodes. Eventually, light nodes might run on mobile phones or embedded devices. The light nodes do not participate in consensus (i.e. they cannot be validators), but they can access the Ethereum blockchain with the same functionality and security guarantees as a full node. Light clients are an area of active development for Ethereum and we expect to see new light clients for the consensus layer and execution layer soon. There are also potential routes to providing light client data over the [gossip network](https://www.ethportal.net/). This is advantageous because the gossip network could support a network of light nodes without requiring full nodes to serve requests. diff --git a/public/content/developers/docs/nodes-and-clients/node-architecture/index.md b/public/content/developers/docs/nodes-and-clients/node-architecture/index.md index f914047bc8c..5986b52a043 100644 --- a/public/content/developers/docs/nodes-and-clients/node-architecture/index.md +++ b/public/content/developers/docs/nodes-and-clients/node-architecture/index.md @@ -14,7 +14,7 @@ The diagram below shows the relationship between the two Ethereum clients. The t _There are several options for the execution client including Erigon, Nethermind, and Besu_. -For this two-client structure to work, consensus clients must pass bundles of transactions to the execution client. The execution client executes the transactions locally to validate that the transactions do not violate any Ethereum rules and that the proposed update to Ethereum’s state is correct. When a node is selected to be a block producer its consensus client instance requests bundles of transactions from the execution client to include in the new block and execute them to update the global state. The consensus client drives the execution client via a local RPC connection using the [Engine API](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md). +For this two-client structure to work, consensus clients must pass bundles of transactions to the execution client. The execution client executes the transactions locally to validate that the transactions do not violate any Ethereum rules and that the proposed update to Ethereum’s state is correct. When a node is selected to be a block producer its consensus client instance requests bundles of transactions from the execution client to include in the new block and execute them to update the global state. The consensus client drives the execution client via a local RPC connection using the [Engine API](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md). ## What does the execution client do? {#execution-client} @@ -37,20 +37,20 @@ The consensus client does not participate in attesting to or proposing blocks - ## Validators {#validators} -Staking and running the validator software makes a node eligible to be selected to propose a new block. Node operators can add a validator to their consensus clients by depositing 32 ETH in 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. It also enables a node to accrue rewards or lose ETH via penalties or slashing. +Staking and running the validator software makes a node eligible to be selected to propose a new block. Node operators can add a validator to their consensus clients by depositing 32 ETH in 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. It also enables a node to accrue rewards or lose ETH via penalties or slashing. [More on staking](/staking/). ## Components of a node comparison {#node-comparison} -| Execution Client | Consensus Client | Validator | -| -------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------- | -| Gossips transactions over its P2P network | Gossips blocks and attestations over its P2P network | Proposes blocks | -| Executes/re-executes transactions | Runs the fork choice algorithm | Accrues rewards/penalties | -| Verifies incoming state changes | Keeps track of the head of the chain | Makes attestations | -| Manages state and receipts tries | Manages the Beacon state (contains consensus and execution info) | Requires 32 ETH to be staked | -| Creates execution payload | Keeps track of accumulated randomness in RANDAO | Can be slashed | -| Exposes JSON-RPC API for interacting with Ethereum | Keeps track of justification and finalization | | +| Execution Client | Consensus Client | Validator | +| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | +| Gossips transactions over its P2P network | Gossips blocks and attestations over its P2P network | Proposes blocks | +| Executes/re-executes transactions | Runs the fork choice algorithm | Accrues rewards/penalties | +| Verifies incoming state changes | Keeps track of the head of the chain | Makes attestations | +| Manages state and receipts tries | Manages the Beacon state (contains consensus and execution info) | Requires 32 ETH to be staked | +| Creates execution payload | Keeps track of accumulated randomness in RANDAO (an algorithm that provides verifiable randomness for validator selection and other consensus operations) | Can be slashed | +| Exposes JSON-RPC API for interacting with Ethereum | Keeps track of justification and finalization | | ## Further reading {#further-reading} diff --git a/public/content/developers/docs/nodes-and-clients/nodes-as-a-service/index.md b/public/content/developers/docs/nodes-and-clients/nodes-as-a-service/index.md index c2f9ae7a281..483e225cacb 100644 --- a/public/content/developers/docs/nodes-and-clients/nodes-as-a-service/index.md +++ b/public/content/developers/docs/nodes-and-clients/nodes-as-a-service/index.md @@ -64,6 +64,19 @@ Here is a list of some of the most popular Ethereum node providers, feel free to - Integrated testnet faucet access - Active Discord builder community with 18k users +- [**Allnodes**](https://www.allnodes.com/) + - [Docs](https://docs.allnodes.com/) + - Features + - No rate limits with PublicNode token created on the Allnodes portfolio page. + - Privacy focused free rpc endpoints (100+ blockchains) on [PublicNode](https://www.publicnode.com) + - Dedicated nodes without rate limits for 90+ blockchains + - Dedicated archive nodes for 30+ blockchains + - Available in 3 regions (US, EU, Asia) + - Snapshots for 100+ blockchains on [PublicNode](https://www.publicnode.com/snapshots) + - 24/7 technical support with 99.90%-99.98% uptime SLA (depends on plan). + - Pay-per-hour pricing + - Pay with Credit Card, PayPal or Crypto + - [**All That Node**](https://allthatnode.com/) - [Docs](https://docs.allthatnode.com/) - Features diff --git a/public/content/developers/docs/nodes-and-clients/run-a-node/index.md b/public/content/developers/docs/nodes-and-clients/run-a-node/index.md index f520754ca2b..d05d92c4300 100644 --- a/public/content/developers/docs/nodes-and-clients/run-a-node/index.md +++ b/public/content/developers/docs/nodes-and-clients/run-a-node/index.md @@ -129,6 +129,7 @@ Multiple user-friendly projects aim to improve the experience of setting up a cl Below are a few projects which can help you install and control clients just with a few clicks: - [DappNode](https://docs.dappnode.io/docs/user/getting-started/choose-your-path) - DappNode doesn't come only with a machine from a vendor. The software, the actual node launcher and control center with many features can be used on arbitrary hardware. +- [EthPillar](https://www.coincashew.com/coins/overview-eth/ethpillar) - Quickest and easiest way to setup a full node. One-liner setup tool and node management TUI. Free. Open source. Public goods for Ethereum by solo stakers. ARM64 and AMD64 support. - [eth-docker](https://eth-docker.net/) - Automated setup using Docker focused on easy and secure staking, requires basic terminal and Docker knowledge, recommended for a bit more advanced users. - [Stereum](https://stereum.net/ethereum-node-setup/) - Launcher for installing clients on a remote server via SSH connection with a GUI setup guide, control center, and many other features. - [NiceNode](https://www.nicenode.xyz/) - Launcher with a straightforward user experience to run a node on your computer. Just choose clients and start them with a few clicks. Still in development. @@ -467,8 +468,9 @@ As part of your monitoring, make sure to keep an eye on your machine's performan ## Further reading {#further-reading} - [Ethereum Staking Guides](https://github.com/SomerEsat/ethereum-staking-guides) - _Somer Esat, updated often_ -- [Guide | How to setup a validator for Ethereum staking on mainnet](https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet) _– CoinCashew, updated regularly_ +- [Guide | How to setup a validator for Ethereum staking on mainnet](https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet) _– CoinCashew, updated often_ - [ETHStaker guides on running validators on testnets](https://github.com/remyroy/ethstaker#guides) – _ETHStaker, updated regularly_ +- [Sample AWS Blockchain Node Runner app for Ethereum Nodes](https://aws-samples.github.io/aws-blockchain-node-runners/docs/Blueprints/Ethereum) - _AWS, updated often_ - [The Merge FAQ for node operators](https://notes.ethereum.org/@launchpad/node-faq-merge) - _July 2022_ - [Analyzing the hardware requirements to be an Ethereum full validated node](https://medium.com/coinmonks/analyzing-the-hardware-requirements-to-be-an-ethereum-full-validated-node-dc064f167902) _– Albert Palau, 24 September 2018_ - [Running Ethereum Full Nodes: A Guide for the Barely Motivated](https://medium.com/@JustinMLeroux/running-ethereum-full-nodes-a-guide-for-the-barely-motivated-a8a13e7a0d31) _– Justin Leroux, 7 November 2019_ diff --git a/public/content/developers/docs/standards/tokens/erc-20/index.md b/public/content/developers/docs/standards/tokens/erc-20/index.md index 674c31db3b2..47e4560ab50 100644 --- a/public/content/developers/docs/standards/tokens/erc-20/index.md +++ b/public/content/developers/docs/standards/tokens/erc-20/index.md @@ -151,6 +151,8 @@ print("Addr Balance:", addr_balance) ### ERC-20 token reception issue {#reception-issue} +**As of 06/20/2024 at least $83,656,418 worth of ERC-20 tokens were lost due to this issue. Note that a pure ERC-20 implementation is prone to this problem unless you implement a set of additional restrictions on top of the standard as listed below.** + When ERC-20 tokens are sent to a smart contract that is not designed to handle ERC-20 tokens, those tokens can be permanently lost. This happens because the receiving contract does not have the functionality to recognize or respond to the incoming tokens, and there’s no mechanism in the ERC-20 standard to notify the receiving contract about the incoming tokens. The main ways this issue takes form is through: 1. Token transfer mechanism @@ -162,6 +164,15 @@ When ERC-20 tokens are sent to a smart contract that is not designed to handle E 3. No built-in handling - The ERC-20 standard does not include a mandatory function for receiving contracts to implement, leading to a situation where many contracts are unable to manage incoming tokens properly +**Possible Solutions** + +While it is not possible to prevent this issue with ERC-20 completely there are methods that would allow to significantly reduce the possibility of a tokens loss for the end user: + +- The most common problem is when a user sends tokens to the token contract address itself (e.g. USDT deposited to the address of USDT token contract). It is recommended to restrict `transfer(..)` function to revert such transfer attempts. Consider adding `require(_to != address(this));` check within the implementation of the `transfer(..)` function. +- The `transfer(..)` function in general is not designed for depositing tokens to contracts. `approve(..) & transferFrom(..)` pattern is used to deposit ERC-20 tokens to contracts instead. It is possible to restrict the transfer function to disallow depositing tokens to any contracts with it, however it may break compatibility with contracts that assume tokens can be deposited to contracts with the `trasnfer(..)` function (e.g. Uniswap liqudity pools). +- Always assume that ERC-20 tokens can end up in your contract even if your contract is not supposed to ever receive any. There is no way to prevent or reject accidental deposits on the recipients end. It is recommended to implement a function that would allow to extract accidentally deposited ERC-20 tokens. +- Consider using alternative token standards. + Some alternative standards have come out of this issue such as [ERC-223](/developers/docs/standards/tokens/erc-223) ## Further reading {#further-reading} diff --git a/public/content/developers/docs/standards/tokens/erc-4626/index.md b/public/content/developers/docs/standards/tokens/erc-4626/index.md index d14199ae755..88d4a9b62a8 100644 --- a/public/content/developers/docs/standards/tokens/erc-4626/index.md +++ b/public/content/developers/docs/standards/tokens/erc-4626/index.md @@ -78,7 +78,7 @@ This function returns the amount of `assets` that would be exchanged by the vaul function maxDeposit(address receiver) public view returns (uint256 maxAssets) ``` -This function returns the maximum amount of underlying assets that can be deposited in a single [`deposit`](#deposit) call by the `receiver`. +This function returns the maximum amount of underlying assets that can be deposited in a single [`deposit`](#deposit) call, with the shares minted for the `receiver`. #### previewDeposit {#previewdeposit} @@ -102,7 +102,7 @@ This function deposits `assets` of underlying tokens into the vault and grants o function maxMint(address receiver) public view returns (uint256 maxShares) ``` -This function returns the maximum amount of shares that can be minted in a single [`mint`](#mint) call by the `receiver`. +This function returns the maximum amount of shares that can be minted in a single [`mint`](#mint) call, with the shares minted for the `receiver`. #### previewMint {#previewmint} diff --git a/public/content/developers/docs/transactions/index.md b/public/content/developers/docs/transactions/index.md index 687df036351..b526ba072e3 100644 --- a/public/content/developers/docs/transactions/index.md +++ b/public/content/developers/docs/transactions/index.md @@ -217,7 +217,7 @@ Based on the `TransactionType` value, a transaction can be classified as: 3. **Type 2 Transactions**, commonly referred to as EIP-1559 transactions, are transactions introduced in [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559), in Ethereum's [London Upgrade](/history/#london). They have become the standard transaction type on the Ethereum network. These transactions introduce a new fee market mechanism that improves predictability by separating the transaction fee into a base fee and a priority fee. They start with the byte `0x02` and include fields such as `maxPriorityFeePerGas` and `maxFeePerGas`. Type 2 transactions are now the default due to their flexibility and efficiency, especially favored during periods of high network congestion for their ability to help users manage transaction fees more predictably. The TransactionType value for these transactions is `0x2`. - +4. **Type 3 (Blob) Transactions** were introduced in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) as part of Ethereum's [Dencun Upgrade](/history/#dencun). These transactions are designed to handle "blob" data (Binary Large Objects) more efficiently, particularly benefiting Layer 2 rollups by providing a way to post data to the Ethereum network at a lower cost. Blob transactions include additional fields such as `blobVersionedHashes`, `maxFeePerBlobGas`, and `blobGasPrice`. They start with the byte `0x03`, and their TransactionType value is `0x3`. Blob transactions represent a significant improvement in Ethereum's data availability and scaling capabilities. ## Further reading {#further-reading} diff --git a/public/content/smart-contracts/index.md b/public/content/smart-contracts/index.md index c41be977982..ab974f2d8cc 100644 --- a/public/content/smart-contracts/index.md +++ b/public/content/smart-contracts/index.md @@ -84,3 +84,7 @@ They can perform computations, create currency, store data, mint [NFTs](/glossar - [Smart contracts for developers](/developers/docs/smart-contracts/) - [Learn to write smart-contracts](/developers/learning-tools/) - [Mastering Ethereum - What is a Smart Contract?](https://github.com/ethereumbook/ethereumbook/blob/develop/07smart-contracts-solidity.asciidoc#what-is-a-smart-contract) + + + + \ No newline at end of file diff --git a/public/content/staking/solo/index.md b/public/content/staking/solo/index.md index 24df7e16c90..372c34e774a 100644 --- a/public/content/staking/solo/index.md +++ b/public/content/staking/solo/index.md @@ -134,9 +134,13 @@ A validator is a virtual entity that lives on Ethereum and participates -Each key-pair associated with a validator requires exactly 32 ETH to be activated. More ETH deposited to a single set of keys does not increase rewards potential, as each validator is limited to an effective balance of 32 ETH. This means that staking is done in 32 ETH increments, each with it's own set of keys and balance. +Yes, modern validator accounts are capable of holding up to 2048 ETH. Additional ETH over 32 will compound in a step-wise manner, increasing in whole-number increments as your true balance increases. This is known as your effective balance. -Do not deposit more than 32 ETH for a single validator. It will not increase your rewards. If a withdrawal address has been set for the validator, excess funds over 32 ETH will be automatically withdrawn to this address during the next validator sweep. +To increase the effective balance of an account, and thus increase rewards, a buffer of 0.25 ETH above any full-ETH threshold must be crossed. For example, an account with a true balance of 32.9 and an effective balance of 32 would need to earn another 0.35 ETH to bring it's true balance above 33.25 before triggering an increase in effective balance. + +This buffer prevents also prevents an effective balance from dropping until it has gone 0.25 ETH below it's current effective balance. + +Each key-pair associated with a validator requires at least 32 ETH to be activated. Any balance above this may be withdrawn to the associated withdrawal address at any time via a transaction signed by this address. Any funds over the maximum effective balance will automatically be withdrawn on a periodic basis. If home staking seems too demanding for you, consider using a staking-as-a-service provider, or if you're working with less than 32 ETH, check out the staking pools. diff --git a/public/content/translations/ms/dao/index.md b/public/content/translations/ms/dao/index.md index 1fe0bfab0fd..cccc5bf10dc 100644 --- a/public/content/translations/ms/dao/index.md +++ b/public/content/translations/ms/dao/index.md @@ -34,7 +34,7 @@ Ini membuka begitu banyak peluang baharu untuk kerjasama dan penyelarasan global | Undian diperlukan oleh ahli untuk sebarang perubahan dilaksanakan. | Bergantung kepada struktur, perubahan boleh dituntut daripada parti tunggal, atau undian boleh ditawarkan. | | Undi dikira, dan hasil dilaksanakan secara automatik tanpa perantara yang dipercayai. | Jika undi dibenarkan, undian akan dikira secara dalaman, dan hasil undian mesti dikendalikan secara manual. | | Perkhidmatan yang ditawarkan dikendalikan secara automatik dengan cara terdesentralisasi (contohnya pengedaran dana dermawan). | Memerlukan pengendalian manusia, atau automasi terkawal secara pusat, terdedah pada manipulasi. | -| Semua aktiviti iadalah telus dan umum sepenuhnya. | Aktiviti biasanya peribadi, dan terhad kepada orang ramai. | +| Semua aktiviti adalah telus dan umum sepenuhnya. | Aktiviti biasanya peribadi, dan terhad kepada orang ramai. | ### Contoh DAO {#dao-examples} diff --git a/public/content/translations/ms/defi/index.md b/public/content/translations/ms/defi/index.md index e20fa104c9f..c2078e574fe 100644 --- a/public/content/translations/ms/defi/index.md +++ b/public/content/translations/ms/defi/index.md @@ -139,7 +139,7 @@ Ini membolehkan anda meminjam wang tanpa semakan kredit atau menyerahkan makluma #### Akses kepada dana global {#access-global-funds} -Apabila anda menggunakan pemberi pinjaman teragih, anda mempunyai akses kepada dana yang didepositkan dari seluruh dunia, bukan hanya dana dalam jagaan bank atau institusi pilihan anda. Ini menjadikan pinjaman lebih mudah diakses dan manjadikan kadar faedah lebih baik. +Apabila anda menggunakan pemberi pinjaman teragih, anda mempunyai akses kepada dana yang didepositkan dari seluruh dunia, bukan hanya dana dalam jagaan bank atau institusi pilihan anda. Ini menjadikan pinjaman lebih mudah diakses dan menjadikan kadar faedah lebih baik. #### Kecekapan cukai {#tax-efficiencies} @@ -245,7 +245,7 @@ Contoh yang baik ialah [dana DeFi Pulse Index (DPI)](https://defipulse.com/blog/ ### Biayai idea anda {#crowdfunding} -Ethereum ialah platform yang cermerlang untuk pendanaan awam: +Ethereum ialah platform yang cemerlang untuk pendanaan awam: - Pembiaya yang berpotensi boleh datang dari mana-mana sahaja – Ethereum dan tokennya terbuka kepada sesiapa sahaja, di mana-mana sahaja di dunia. - Ia telus supaya pengumpul dana dapat membuktikan jumlah wang yang telah dikumpulkan. Anda juga boleh menjejaki cara dana dibelanjakan kemudiannya. diff --git a/public/images/dapps/buidlbox.png b/public/images/dapps/buidlbox.png new file mode 100644 index 00000000000..114a4d75bf9 Binary files /dev/null and b/public/images/dapps/buidlbox.png differ diff --git a/public/images/dapps/gitcoin.png b/public/images/dapps/gitcoin.png index 0450d7d0f72..6d17effcf09 100644 Binary files a/public/images/dapps/gitcoin.png and b/public/images/dapps/gitcoin.png differ diff --git a/public/images/dapps/matcha.png b/public/images/dapps/matcha.png index a765d5dd630..f0ac62a6a51 100644 Binary files a/public/images/dapps/matcha.png and b/public/images/dapps/matcha.png differ diff --git a/public/images/dapps/morpho.png b/public/images/dapps/morpho.png new file mode 100644 index 00000000000..529bfd6f0da Binary files /dev/null and b/public/images/dapps/morpho.png differ diff --git a/public/images/dev-tools/cyfrin-updraft.png b/public/images/dev-tools/cyfrin-updraft.png index bc7b9923603..1f6fd7dba7f 100644 Binary files a/public/images/dev-tools/cyfrin-updraft.png and b/public/images/dev-tools/cyfrin-updraft.png differ diff --git a/public/images/developers/resources-banner.png b/public/images/developers/resources-banner.png index 5283abcc5f2..d04a9f8b901 100644 Binary files a/public/images/developers/resources-banner.png and b/public/images/developers/resources-banner.png differ diff --git a/src/components/Contributors/Contributors.stories.tsx b/src/components/Contributors/Contributors.stories.tsx new file mode 100644 index 00000000000..288263c7055 --- /dev/null +++ b/src/components/Contributors/Contributors.stories.tsx @@ -0,0 +1,101 @@ +import { Meta, StoryObj } from "@storybook/react" + +import ContributorsComponent, { type Contributor } from "." + +const meta = { + title: "Molecules / Display Content / Contributors", + component: ContributorsComponent, + parameters: { + layout: "fullscreen", + }, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +} satisfies Meta + +export default meta + +type Story = StoryObj + +const mockContributors: Contributor[] = [ + { + login: "carlfairclough", + name: "Carl Fairclough", + avatar_url: "https://avatars1.githubusercontent.com/u/4670881?v=4", + profile: "http://carlfairclough.me", + contributions: ["design", "code", "bug"], + }, + { + login: "RichardMcSorley", + name: "Richard McSorley", + avatar_url: "https://avatars2.githubusercontent.com/u/6407008?v=4", + profile: "https://github.com/RichardMcSorley", + contributions: ["code"], + }, + { + login: "ajsantander", + name: "Alejandro Santander", + avatar_url: "https://avatars2.githubusercontent.com/u/550409?v=4", + profile: "http://ajsantander.github.io/", + contributions: ["content"], + }, + { + login: "Lililashka", + name: "Lililashka", + avatar_url: "https://avatars1.githubusercontent.com/u/28689401?v=4", + profile: "http://impermanence.co", + contributions: ["design", "bug"], + }, + { + login: "chriseth", + name: "chriseth", + avatar_url: "https://avatars2.githubusercontent.com/u/9073706?v=4", + profile: "https://github.com/chriseth", + contributions: ["content", "review"], + }, + { + login: "fzeoli", + name: "Franco Zeoli", + avatar_url: "https://avatars2.githubusercontent.com/u/232174?v=4", + profile: "https://nomiclabs.io", + contributions: ["content", "review"], + }, + { + login: "P1X3L0V4", + name: "Anna Karpińska", + avatar_url: "https://avatars2.githubusercontent.com/u/3372341?v=4", + profile: "https://github.com/P1X3L0V4", + contributions: ["translation"], + }, + { + login: "vrde", + name: "vrde", + avatar_url: "https://avatars1.githubusercontent.com/u/134680?v=4", + profile: "https://github.com/vrde", + contributions: ["content"], + }, + { + login: "AlexandrouR", + name: "Rousos Alexandros", + avatar_url: "https://avatars1.githubusercontent.com/u/21177075?v=4", + profile: "https://github.com/AlexandrouR", + contributions: ["content"], + }, + { + login: "eswarasai", + name: "Eswara Sai", + avatar_url: "https://avatars2.githubusercontent.com/u/5172086?v=4", + profile: "https://eswarasai.com", + contributions: ["code"], + }, +] + +export const Contributors: Story = { + args: { + contributors: mockContributors, + }, +} diff --git a/src/components/Contributors.tsx b/src/components/Contributors/index.tsx similarity index 82% rename from src/components/Contributors.tsx rename to src/components/Contributors/index.tsx index 079be617024..2b5c3cb01ba 100644 --- a/src/components/Contributors.tsx +++ b/src/components/Contributors/index.tsx @@ -20,12 +20,20 @@ export interface Contributor { const allContributors = JSON.parse(data) -const Contributors = () => { +interface ContributorsProps { + contributors?: Contributor[] +} + +const Contributors = ({ contributors }: ContributorsProps) => { const [contributorsList, setContributorsList] = useState([]) useEffect(() => { - setContributorsList(shuffle(allContributors.contributors)) - }, []) + if (contributors) { + setContributorsList(contributors) + } else { + setContributorsList(shuffle(allContributors.contributors)) + } + }, [contributors]) return ( <> @@ -44,6 +52,9 @@ const Contributors = () => { className="h-[132px] w-[132px]" src={contributor.avatar_url} alt={contributor.name} + width={132} + height={132} + sizes="132px" />

diff --git a/src/components/DataTable/index.tsx b/src/components/DataTable/index.tsx index 9205c33f5e7..1b6d973d7a2 100644 --- a/src/components/DataTable/index.tsx +++ b/src/components/DataTable/index.tsx @@ -137,7 +137,7 @@ const DataTable = ({

diff --git a/src/components/DeveloperDocsLinks/DeveloperDocsLinks.stories.tsx b/src/components/DeveloperDocsLinks/DeveloperDocsLinks.stories.tsx new file mode 100644 index 00000000000..236821ee33a --- /dev/null +++ b/src/components/DeveloperDocsLinks/DeveloperDocsLinks.stories.tsx @@ -0,0 +1,47 @@ +import { Meta, StoryObj } from "@storybook/react" + +import { langViewportModes } from "../../../.storybook/modes" + +import DeveloperDocsLinksComponent from "." + +const meta = { + title: "Molecules / Navigation / DeveloperDocsLinks", + component: DeveloperDocsLinksComponent, + parameters: { + layout: "fullscreen", + chromatic: { + modes: { + ...langViewportModes, + }, + }, + }, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +} satisfies Meta + +export default meta + +type Story = StoryObj + +export const FoundationalTopics: Story = { + args: { + headerId: "foundational-topics", + }, +} + +export const EthereumStack: Story = { + args: { + headerId: "ethereum-stack", + }, +} + +export const Advanced: Story = { + args: { + headerId: "advanced", + }, +} diff --git a/src/components/DeveloperDocsLinks.tsx b/src/components/DeveloperDocsLinks/index.tsx similarity index 94% rename from src/components/DeveloperDocsLinks.tsx rename to src/components/DeveloperDocsLinks/index.tsx index d614cac67df..f7b327fef30 100644 --- a/src/components/DeveloperDocsLinks.tsx +++ b/src/components/DeveloperDocsLinks/index.tsx @@ -4,8 +4,8 @@ import Translation from "@/components/Translation" import docLinks from "@/data/developer-docs-links.yaml" -import InlineLink from "./ui/Link" -import { ListItem, UnorderedList } from "./ui/list" +import InlineLink from "../ui/Link" +import { ListItem, UnorderedList } from "../ui/list" export type DeveloperDocsLinksProps = { headerId: string diff --git a/src/components/Faq/Faq.stories.tsx b/src/components/Faq/Faq.stories.tsx new file mode 100644 index 00000000000..63fdf874f8e --- /dev/null +++ b/src/components/Faq/Faq.stories.tsx @@ -0,0 +1,59 @@ +import { Meta, StoryObj } from "@storybook/react" + +import { Faq as FaqComponent, FaqContent, FaqItem, FaqTrigger } from "." + +const meta = { + title: "Molecules / Display Content / Faq", + component: FaqComponent, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +} satisfies Meta + +export default meta + +export const Faq: StoryObj = { + render: () => ( + + + +

+ Why is there no 'official' Ethereum L2? +

+
+ + + Just as there is no 'official' Ethereum client, there is no + 'official' Ethereum layer 2. Ethereum is permissionless - + technically anyone can create a layer 2! Multiple teams will implement + their version of a layer 2, and the ecosystem as a whole will benefit + from a diversity of design approaches that are optimized for different + use cases. Much like we have multiple Ethereum clients developed by + multiple teams in order to have diversity in the network, this too + will be how layer 2s develop in the future. + +
+ + +

+ Why is there no 'official' Ethereum L2? +

+
+ + Just as there is no 'official' Ethereum client, there is no + 'official' Ethereum layer 2. Ethereum is permissionless - + technically anyone can create a layer 2! Multiple teams will implement + their version of a layer 2, and the ecosystem as a whole will benefit + from a diversity of design approaches that are optimized for different + use cases. Much like we have multiple Ethereum clients developed by + multiple teams in order to have diversity in the network, this too + will be how layer 2s develop in the future. + +
+
+ ), +} diff --git a/src/components/Faq/index.tsx b/src/components/Faq/index.tsx new file mode 100644 index 00000000000..d341d72f0fe --- /dev/null +++ b/src/components/Faq/index.tsx @@ -0,0 +1,91 @@ +import React from "react" +import * as AccordionPrimitive from "@radix-ui/react-accordion" + +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/components/ui/accordion" + +import { cn } from "@/lib/utils/cn" + +const FaqTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + {children} + +)) +FaqTrigger.displayName = AccordionPrimitive.Trigger.displayName + +const Faq = ({ + children, + type, + ...props +}: AccordionPrimitive.AccordionSingleProps) => { + return ( + + {children} + + ) +} + +const FaqItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +FaqItem.displayName = "AccordionItem" + +const FaqContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + +
+ {children} +
+
+)) + +FaqContent.displayName = AccordionPrimitive.Content.displayName + +export { Faq, FaqContent, FaqItem, FaqTrigger } diff --git a/src/components/FeedbackWidget/FixedDot.tsx b/src/components/FeedbackWidget/FixedDot.tsx index 746b00c9885..2337e759708 100644 --- a/src/components/FeedbackWidget/FixedDot.tsx +++ b/src/components/FeedbackWidget/FixedDot.tsx @@ -44,7 +44,7 @@ const FixedDot = forwardRef( >