Skip to content

Commit d048d70

Browse files
committed
feat: add run-a-node quiz
1 parent 52ed9db commit d048d70

File tree

5 files changed

+211
-5
lines changed

5 files changed

+211
-5
lines changed

src/data/quizzes/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ const quizzes: RawQuizzes = {
4444
title: "scaling",
4545
questions: ["k001", "k002", "k003", "k004"],
4646
},
47+
"run-a-node": {
48+
title: "run-a-node",
49+
questions: ["l001", "l002", "l003", "l004", "l005", "l006"],
50+
},
4751
}
4852

4953
export const ethereumBasicsQuizzes: QuizzesSection[] = [
@@ -92,6 +96,11 @@ export const usingEthereumQuizzes: QuizzesSection[] = [
9296
{
9397
id: "layer-2",
9498
level: "intermediate",
99+
next: "run-a-node",
100+
},
101+
{
102+
id: "run-a-node",
103+
level: "intermediate",
95104
next: "solo-staking",
96105
},
97106
{

src/data/quizzes/questionBank.ts

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,154 @@ const questionBank: QuestionBank = {
12001200
},
12011201
],
12021202
correctAnswerId: "k004-b",
1203-
}
1203+
},
1204+
// Run a node
1205+
l001: {
1206+
prompt: "l001-prompt",
1207+
answers: [
1208+
{
1209+
id: "l001-a",
1210+
label: "l001-a-label",
1211+
explanation: "l001-a-explanation",
1212+
},
1213+
{
1214+
id: "l001-b",
1215+
label: "l001-b-label",
1216+
explanation: "l001-b-explanation",
1217+
},
1218+
{
1219+
id: "l001-c",
1220+
label: "l001-c-label",
1221+
explanation: "l001-c-explanation",
1222+
},
1223+
{
1224+
id: "l001-d",
1225+
label: "l001-d-label",
1226+
explanation: "l001-d-explanation",
1227+
},
1228+
],
1229+
correctAnswerId: "l001-a",
1230+
},
1231+
l002: {
1232+
prompt: "l002-prompt",
1233+
answers: [
1234+
{
1235+
id: "l002-a",
1236+
label: "l002-a-label",
1237+
explanation: "l002-a-explanation",
1238+
},
1239+
{
1240+
id: "l002-b",
1241+
label: "l002-b-label",
1242+
explanation: "l002-a-explanation",
1243+
},
1244+
{
1245+
id: "l002-c",
1246+
label: "l002-c-label",
1247+
explanation: "l002-a-explanation",
1248+
},
1249+
{
1250+
id: "l002-d",
1251+
label: "l002-d-label",
1252+
explanation: "l002-d-explanation",
1253+
},
1254+
],
1255+
correctAnswerId: "l002-a",
1256+
},
1257+
l003: {
1258+
prompt: "l003-prompt",
1259+
answers: [
1260+
{
1261+
id: "l003-a",
1262+
label: "l003-a-label",
1263+
explanation: "l003-a-explanation",
1264+
},
1265+
{
1266+
id: "l003-b",
1267+
label: "l003-b-label",
1268+
explanation: "l003-b-explanation",
1269+
},
1270+
{
1271+
id: "l003-c",
1272+
label: "l003-c-label",
1273+
explanation: "l003-c-explanation",
1274+
},
1275+
{
1276+
id: "l003-d",
1277+
label: "l003-d-label",
1278+
explanation: "l003-d-explanation",
1279+
},
1280+
],
1281+
correctAnswerId: "l003-d",
1282+
},
1283+
l004: {
1284+
prompt: "l004-prompt",
1285+
answers: [
1286+
{
1287+
id: "l004-a",
1288+
label: "l004-a-label",
1289+
explanation: "l004-a-explanation",
1290+
},
1291+
{
1292+
id: "l004-b",
1293+
label: "l004-b-label",
1294+
explanation: "l004-b-explanation",
1295+
},
1296+
{
1297+
id: "l004-c",
1298+
label: "l004-c-label",
1299+
explanation: "l004-c-explanation",
1300+
},
1301+
{
1302+
id: "l004-d",
1303+
label: "l004-d-label",
1304+
explanation: "l004-d-explanation",
1305+
},
1306+
],
1307+
correctAnswerId: "l004-c",
1308+
},
1309+
l005: {
1310+
prompt: "l005-prompt",
1311+
answers: [
1312+
{
1313+
id: "l005-a",
1314+
label: "l005-a-label",
1315+
explanation: "l005-a-explanation",
1316+
},
1317+
{
1318+
id: "l005-b",
1319+
label: "l005-b-label",
1320+
explanation: "l005-b-explanation",
1321+
},
1322+
{
1323+
id: "l005-c",
1324+
label: "l005-c-label",
1325+
explanation: "l005-c-explanation",
1326+
},
1327+
{
1328+
id: "l005-d",
1329+
label: "l005-d-label",
1330+
explanation: "l005-d-explanation",
1331+
},
1332+
],
1333+
correctAnswerId: "l005-a",
1334+
},
1335+
l006: {
1336+
prompt: "l006-prompt",
1337+
answers: [
1338+
{
1339+
id: "l006-a",
1340+
label: "l006-a-label",
1341+
explanation: "l006-a-explanation",
1342+
},
1343+
{
1344+
id: "l006-b",
1345+
label: "l006-b-label",
1346+
explanation: "l006-a-explanation",
1347+
},
1348+
],
1349+
correctAnswerId: "l006-b",
1350+
},
12041351
}
12051352

12061353
export default questionBank

src/intl/en/learn-quizzes.json

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,5 +431,52 @@
431431
"k004-c-label": "Make all rollups conform to the same method of security",
432432
"k004-c-explanation": "Ethereum benefits from having a wide range of approaches to security within its rollup ecosystem as a form of resiliency.",
433433
"k004-d-label": "Data oracles to confirm storage of transaction data on private servers",
434-
"k004-d-explanation": "Rollup data is stored on Ethereum, and does not rely on private servers or databases."
435-
}
434+
"k004-d-explanation": "Rollup data is stored on Ethereum, and does not rely on private servers or databases.",
435+
"l001-prompt": "What is required to run a node?",
436+
"l001-a-label": "Running client software with modest hardware while staying online.",
437+
"l001-a-explanation": "Operating a node consists of running software that communicates using the language of the Ethereum protocol with other computers doing the same. This software downloads a copy of the Ethereum blockchain, verifies the validity of every block, then keeps it up-to-date with new blocks and transactions, while helping others download and update their own copies.",
438+
"l001-b-label": "Deposit 32 ETH to earn rewards",
439+
"l001-b-explanation": "This is a requirement for staking—the process of becoming an active participant in network consensus. This is not required to simply run a sovereign copy of the blockchain, which requires NO ETH.",
440+
"l001-c-label": "Operate powerful ASIC mining machines to reach network consensus",
441+
"l001-c-explanation": "Although Ethereum previously used mining with powerful computers to reach consensus, this process has been replaced entirely by staking. Neither mining in the past, nor staking currently, are required to simply operate a sovereign copy of the blockchain.",
442+
"l001-d-label": "Work full time in blockchain infrastructure",
443+
"l001-d-explanation": "Software tooling has continued to improve over time making running a node from home as a novice much more approachable. Working full-time in blockchain infrastructure is by no means a requirement to get involved.",
444+
"l002-prompt": "How much ETH do you need to stake to run a node?",
445+
"l002-a-label": "0",
446+
"l002-a-explanation": "Operating an Ethereum node does not require any ETH. In contrast to operating a staking validator as part of a node setup, anyone is free to run client software and sync their own sovereign copy of the blockchain—no ETH required.",
447+
"l002-b-label": "8",
448+
"l002-c-label": "16",
449+
"l002-d-label": "32",
450+
"l002-d-explanation": "Operating an Ethereum node does not require any ETH. In contrast to the 32 ETH required to activate a staking validator that participates directly in network consensus, anyone is free to run client software and sync their own sovereign copy of the blockchain—no ETH required.",
451+
"l003-prompt": "What benefits do you get from running your own node?",
452+
"l003-a-label": "Censorship resistance",
453+
"l003-a-explanation": "This is a benefit to users, but is not the only one. By running node software that communicates directly with other peers on the network, your transactions get mixed in with every other transaction your node is propagating. As such, it's nearly impossible to differentiate and censor a valid transaction that your node has shared.",
454+
"l003-b-label": "Sovereignty",
455+
"l003-b-explanation": "This is a benefit to users, but not the only one. By having your own copy of the Ethereum blockchain, you no longer depend on any single external party to interact with the network. You never have to ask permission to look up your balance, or to execute a transaction, and all transactions are verified using software you're running yourself. When network upgrades occur, you're in charge of whether to support the upgrade or not.",
456+
"l003-c-label": "Privacy",
457+
"l003-c-explanation": "This is a benefit to users, but is not the only one. Without your own node, simply looking up your account balances typically requires sending a list of your accounts from your wallet, attached to your IP address, to a third-party provider who then is being trusted to provide you with the correct information.",
458+
"l003-d-label": "All of the above",
459+
"l003-d-explanation": "Running a node gives you full control and sovereignty over the data you're relying on, allowing you to privately view and verify the contents of the chain, and effectively guarantee that any valid transactions are not censored.",
460+
"l004-prompt": "What hard drive storage is required for an Ethereum node?",
461+
"l004-a-label": "512 GB SSD",
462+
"l004-a-explanation": "Currently, no client software is capable of storing the chain using only 512 GB",
463+
"l004-b-label": "2 TB Rotating",
464+
"l004-b-explanation": "Generally speaking, rotating hard disks do not support the read/write speeds needed to keep up with processing requirements for an Ethereum node, and an SSD drive is recommended",
465+
"l004-c-label": "2 TB SSD",
466+
"l004-c-explanation": "At time of writing, a 2 TB SSD drive should satisfy the storage and read/write speed requirements for a full Ethereum node.",
467+
"l004-d-label": "8 TB SSD",
468+
"l004-d-explanation": "At time of writing, a 2 TB SSD drive should satisfy the storage and read/write speed requirements for a full Ethereum node. An 8 TB SSD would allow for more future-proofing, and the ability to also sync layer 2 chains, but is not currently a requirement for Mainnet.",
469+
"l005-prompt": "What happens if your node goes offline?",
470+
"l005-a-label": "Your node drops out of sync with the current state of the network",
471+
"l005-a-explanation": "When your node is not available online, it is unable to receive new transactions and blocks from peers, and as such falls out-of-sync with the current state of the chain. Connecting back online will allow your node software to get synced back up to be fully functional again.",
472+
"l005-b-label": "The ETH in your cold storage is slashed",
473+
"l005-b-explanation": "ETH held in your cold storage has nothing to do with your node being online or not. If your node is offline, you won't be able to use it to look up the latest balance of your accounts, but being offline does not put your secured funds at risk. If you're also running validator software with your node as a staker, small penalties will be incurred to this validator balance while unavailable to the network.",
474+
"l005-c-label": "The energy used looking for proof-of-work is wasted",
475+
"l005-c-explanation": "Ethereum no longer uses proof-of-work, and this was never a requirement of all node operators. Being offline simply means your node is no longer in sync with the latest changes on the network, and can re-sync by returning online.",
476+
"l005-d-label": "Chain data is removed, and re-syncing from scratch is required",
477+
"l005-d-explanation": "Simply going offline does not typically delete any saved chain data. Connecting back to the internet will allow the software to resume where it left off to sync up with the latest transactions.",
478+
"l006-prompt": "Running a node earns network rewards",
479+
"l006-a-label": "True",
480+
"l006-a-explanation": "Simply running client software does not earn you rewards. To earn rewards, you must also be staking.",
481+
"l006-b-label": "False"
482+
}

src/lib/utils/translations.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const getRequiredNamespacesForPath = (path: string) => {
160160
primaryNamespace = "page-bug-bounty"
161161
}
162162

163-
if (path === "run-a-node") {
163+
if (path.startsWith("/run-a-node")) {
164164
primaryNamespace = "page-run-a-node"
165165
}
166166

@@ -189,6 +189,7 @@ const getRequiredNamespacesForPath = (path: string) => {
189189
path.startsWith("/nft") ||
190190
path.startsWith("/roadmap/merge") ||
191191
path.startsWith("/roadmap/scaling") ||
192+
path.startsWith("/run-a-node") ||
192193
path.startsWith("/security") ||
193194
path.startsWith("/staking/solo") ||
194195
path.startsWith("/wallets") ||

src/pages/run-a-node.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import OldHeading from "@/components/OldHeading"
3838
import Text from "@/components/OldText"
3939
import PageHero from "@/components/PageHero"
4040
import PageMetadata from "@/components/PageMetadata"
41+
import { StandaloneQuizWidget as QuizWidget } from "@/components/Quiz/QuizWidget"
4142
import Translation from "@/components/Translation"
4243

4344
import { existsNamespace } from "@/lib/utils/existsNamespace"
@@ -328,7 +329,7 @@ type RunANodeCard = {
328329
}
329330

330331
export const getStaticProps = (async ({ locale }) => {
331-
const requiredNamespaces = getRequiredNamespacesForPage("run-a-node")
332+
const requiredNamespaces = getRequiredNamespacesForPage("/run-a-node")
332333

333334
const contentNotTranslated = !existsNamespace(locale!, requiredNamespaces[1])
334335

@@ -917,6 +918,7 @@ const RunANodePage = () => {
917918
</ul>
918919
</Content>
919920
<Content>
921+
<QuizWidget quizKey="run-a-node" />
920922
<FeedbackCard />
921923
</Content>
922924
</GappedPage>

0 commit comments

Comments
 (0)