<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dave</title>
    <description>The latest articles on DEV Community by Dave (@sprtd).</description>
    <link>https://dev.to/sprtd</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F244099%2F20b8a967-7ac1-49ee-a8fb-a1060a094eb5.jpeg</url>
      <title>DEV Community: Dave</title>
      <link>https://dev.to/sprtd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sprtd"/>
    <language>en</language>
    <item>
      <title>How to Update Your Operational Account When Running a Starknet Validator</title>
      <dc:creator>Dave</dc:creator>
      <pubDate>Thu, 17 Jul 2025 14:22:46 +0000</pubDate>
      <link>https://dev.to/sprtd/how-to-update-your-operational-account-when-running-a-starknet-validator-488b</link>
      <guid>https://dev.to/sprtd/how-to-update-your-operational-account-when-running-a-starknet-validator-488b</guid>
      <description>&lt;p&gt;As Starknet progresses toward decentralization, adhering to operational best practices—particularly around key management—is becoming increasingly important for validators.&lt;/p&gt;

&lt;p&gt;If you're running a Starknet validator, one key improvement you can make is to separate your staking (validator) account from your operational (operator) account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Separate the Validator and Operational Accounts?
&lt;/h2&gt;

&lt;p&gt;By default, many node operators configure their validator using a single private key, often hardcoded or loaded into a JSON config file. This approach works; however, it introduces a serious security risk. In the event that such a config file is exposed, the private key of your staking account is compromised.&lt;/p&gt;

&lt;p&gt;By separating the validator account (which controls your staked 20,000 STRK tokens) and the operational account (used for signing attestations), you achieve better security and safer validator management. This operational account model, and yes Starknet supports it.&lt;/p&gt;

&lt;p&gt;Setting an operational account can be done via:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initial staking&lt;/li&gt;
&lt;li&gt;After staking&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Setting an operational account: Initial Staking:
&lt;/h2&gt;

&lt;p&gt;Using sncast, you can set an operational account while staking your STRK tokens to register as a validator&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast --account workshop_account invoke \
  --url http://localhost:6060 \
  --contract-address 0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1 \
  --function "stake" \
  --arguments 'Your-validator-address, Your-operational-address, 1000000000000000000, true, 500'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The stake function of the Starknet Staking contract accepts five arguments. Here's a breakdown of what each represents:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;reward_address&lt;/code&gt; — the address where staking rewards will be sent. This can be any address you choose.&lt;br&gt;
&lt;code&gt;operational_address&lt;/code&gt; — the address associated with your validator operations.&lt;br&gt;
&lt;code&gt;amount&lt;/code&gt; — the number of STRK tokens to stake, expressed in FRI (1 STRK = 1e18 FRI); this can be set to &lt;code&gt;20000000000000000000000&lt;/code&gt; for mainnet staking&lt;br&gt;
&lt;code&gt;pool_enabled&lt;/code&gt; — a boolean flag that enables delegation to your validator if set to true. When set to &lt;code&gt;true&lt;/code&gt;, others can delegate their STRK to your delegation pool and earn rewards.&lt;br&gt;
&lt;code&gt;commission&lt;/code&gt; the commission rate expressed in basis points. 500 represents a 5% commission (since 10000 = 100%). This value represents percentage with precision, where 10000 represents 100%. In our case, we specified 500 to set a 5% commission&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting an operational account: After staking
&lt;/h2&gt;

&lt;p&gt;You can activate the operational account model after initializing your validator. This allows you to update your staking operations state by assigning a separate account to sign attestations for your validator.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step-by-Step: Updating an Operational Account After Staking
&lt;/h3&gt;

&lt;p&gt;Here's how to use a different account as an operational address after staking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⁠Create a new operational wallet. Using &lt;code&gt;sncast&lt;/code&gt; CLI, you can do this:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast \
    account create \
    --url http://localhost:6060 \
    --name operational_account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Fund the operational account 100+ STRK tokens by transferring STRK from an existing account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy the newly created &lt;code&gt;operational_account&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast \
    account deploy \
    --url http://localhost:6060 \
    --name operational_account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Updating an operational account is a 2-step process that involves 2 accounts:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;operational account - executes the &lt;code&gt;declare_operational_address&lt;/code&gt; function&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;staking/validator account - executes &lt;code&gt;change_operational_address&lt;/code&gt; function to validate the operational account update transaction.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using this newly deployed operational account, you can call the staking contract's &lt;code&gt;declare_operational_address&lt;/code&gt; function by passing the validator_address as an argument. This can also be achieved using &lt;code&gt;sncast&lt;/code&gt; thus:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast --account operational_account invoke\
--contract-address 0x00ca1702e64c81d9a07b86bd2c540188d92a2c73cf5cc0e508d949015e7e84a7 \
--function "declare_operational_address" \
--arguments 'Your-validator-address'
--url http://localhost:6060 \
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Proceed to call the staking contract's &lt;code&gt;change_operational_address&lt;/code&gt; function using your staking account:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast --account validator_account invoke\
--contract-address 0x00ca1702e64c81d9a07b86bd2c540188d92a2c73cf5cc0e508d949015e7e84a7 \
--function "change_operational_address" \
--arguments 'Your-new-operational-address'
--url http://localhost:6060 \
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a mandatory step to finalize the change of operational address. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To execute the above steps, make sure you have successfully installed &lt;code&gt;sncast&lt;/code&gt;. This can be installed with &lt;code&gt;starkup&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;starkup&lt;/code&gt; - this command unpacks all the required binaries to run starknet-foundry including sncast. Verify that you have sncast by running:&lt;br&gt;
&lt;code&gt;which sncast&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to your staking-v2 folder in your machine then proceed to update your validator config &lt;code&gt;config.json&lt;/code&gt; thus:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "provider": {
      "http": "http://localhost:6060/v0_8",
      "ws": "ws://localhost:6061/v0_8"
  },
  "signer": {
      "operationalAddress": "Your-new-operational-address",
      "privateKey": "Your-operational-account-private-key"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  PS: &lt;code&gt;operationalAddress&lt;/code&gt; - is your new operational address
&lt;/h4&gt;

&lt;p&gt;With these latest changes and config, you’re now set to begin your attestation duties with your newly configured operational account. On another terminal, start your validator with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./build/validator --config config.json --log-level trace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🎉 You’re now using the operational model!
&lt;/h3&gt;

&lt;p&gt;Your validator is now securely configured to sign attestations using a dedicated operational account — improving your validator's resilience, security, and operational flexibility.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Run Your Starknet Node: All You Need To Get Started</title>
      <dc:creator>Dave</dc:creator>
      <pubDate>Thu, 12 Jun 2025 07:27:25 +0000</pubDate>
      <link>https://dev.to/sprtd/run-your-starknet-node-all-you-need-to-get-started-4bh7</link>
      <guid>https://dev.to/sprtd/run-your-starknet-node-all-you-need-to-get-started-4bh7</guid>
      <description>&lt;h3&gt;
  
  
  What is a Node?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A node is a computer running Ethereum software, often referred to as a 'client'&lt;/li&gt;
&lt;li&gt;This software (client) downloads a copy of the Ethereum blockchain and verifies the validity of every block, then keeps it up-to-date with new blocks and transactions, and helps others download and update their own copies.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Run a Node?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Censorship Resistance: There's possibility for 3rd-party nodes to reject transactions from specific IP addresses, or transactions that involve specific accounts, potentially blocking you from using the network when you need it. With your own node, there's  guarantees that your submitted transaction is broadcasted to the rest of the peer-to-peer network at any time. 
Eg: &lt;a href="https://x.com/infura_io/status/1499446960725512202" rel="noopener noreferrer"&gt;In March 2022, Infura, MetaMask's default Remote Procedure Call (RPC) provider in a bid to comply with U.S. sanctions, implemented access restrictions for users in certain regions, including Venezuela, thus making users in such regions not to be able to access Ethereum via MetaMask&lt;/a&gt;. &lt;a href="https://www.coindesk.com/business/2022/03/04/crypto-industrys-sanctions-woes-on-full-display-in-metamasks-venezuela-hiccup" rel="noopener noreferrer"&gt;Details here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Privacy and Security - When sending transactions using public nodes, personal information can be leaked to these third-party services such as your IP address and which Ethereum addresses you own. By pointing compatible wallets to your own node you can use your wallet to privately and securely interact with the blockchain. &lt;/li&gt;
&lt;li&gt;Promotes the decentralization promise of blockchains - Network resilience is achieved with more nodes, in geographically diverse locations, operated by more people of diverse backgrounds. As more people run their own node, reliance on centralized points of failure diminishes, making the network stronger. resists centralized points of failure. Centralized cloud servers can provide a lot of computing power, but they provide a target for nation-states or attackers looking to disrupt the network. A diverse set of nodes is important for Ethereum’s health, security and operational resiliency.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sovereignty: Most Ethereum wallets like Metamask, etc typically reach out to a 3rd-party node, such as Infura or Alchemy, when looking up your balances. Running your own node allows you to have your own copy of the Ethereum blockchain. An Ethereum wallet allows you to take full custody and control of your digital assets by holding the private keys to your addresses, but those keys don't tell you the current state of the blockchain, such as your wallet balance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Public RPC - you can provide your own custom RPC endpoints publicly to the community to help them avoid big centralized providers&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Categeries of Ethereum Clients/Softwares
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Execution client&lt;/li&gt;
&lt;li&gt;Consensus client&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Execution Client:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A software implementing the specification for the Execution Layer as it tracks network upgrades and implements core methods like &lt;code&gt;apply_fork&lt;/code&gt;, &lt;code&gt;get_last_256_block_hashes&lt;/code&gt;, &lt;code&gt;state_transition&lt;/code&gt; - apply a block to an existing block chain&lt;/li&gt;
&lt;li&gt;The Engine JSON-RPC API is a collection of methods that all execution clients implement. This interface allows the communication between consensus and execution layers of the two-component post-Merge Ethereum Client.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The execution client creates execution payloads:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; the list of transactions&lt;/li&gt;
&lt;li&gt; updated state trie&lt;/li&gt;
&lt;li&gt; and other execution-related data.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Examples of execution clients:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/ethereum/go-ethereum" rel="noopener noreferrer"&gt;Go-Ethereum (GETH)&lt;/a&gt; -  Go implementaion &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/NethermindEth/nethermind" rel="noopener noreferrer"&gt;Nethermind&lt;/a&gt; - C# implementation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/erigontech/erigon" rel="noopener noreferrer"&gt;Erigon&lt;/a&gt; - Go implementation &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/paradigmxyz/reth" rel="noopener noreferrer"&gt;Reth&lt;/a&gt; - Rust &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/hyperledger/besu" rel="noopener noreferrer"&gt;Besu&lt;/a&gt; - Java implementation &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Transition to Proof-of-Stake (PoS)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;On September 15, 2022, Ethereum transitioned from Proof-of-Work to Proof-of-Stake.&lt;/li&gt;
&lt;li&gt;The Beacon Chain now manages validator coordination and consensus.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Consensus Client:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A software implementing core consensus specs &lt;/li&gt;
&lt;li&gt;Core specifications for Ethereum proof-of-stake clients which  are divided into features&lt;/li&gt;
&lt;li&gt;These features are researched and developed in parallel, and then consolidated into sequential upgrades when ready: &lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Seq&lt;/th&gt;
&lt;th&gt;CodeName&lt;/th&gt;
&lt;th&gt;Fork Epoch&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Phase0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Altair&lt;/td&gt;
&lt;td&gt;74240&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Bellatrix&lt;/td&gt;
&lt;td&gt;144896&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Capella&lt;/td&gt;
&lt;td&gt;194048&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Deneb&lt;/td&gt;
&lt;td&gt;269568&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Electra&lt;/td&gt;
&lt;td&gt;364032&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Additional  standards outside of requisite client functionality include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Beacon APIs&lt;/li&gt;
&lt;li&gt;Engine APIs&lt;/li&gt;
&lt;li&gt;Beacon Metrics&lt;/li&gt;
&lt;li&gt;Builder Specs&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;The consensus client is further divided into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;beacon node (BN) 

&lt;ul&gt;
&lt;li&gt;peer to peer node&lt;/li&gt;
&lt;li&gt;responsible for networking, state transition, message validation, state storage&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;validator client (VC)

&lt;ul&gt;
&lt;li&gt;responsible for validator key management and duties&lt;/li&gt;
&lt;li&gt;not required unless staking&lt;/li&gt;
&lt;li&gt;interfaces with a beacon node via http&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Examples of consensus clients:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/sigp/lighthouse.git" rel="noopener noreferrer"&gt;Lighthouse&lt;/a&gt; - Rust implementaion&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/prysmaticlabs/prysm" rel="noopener noreferrer"&gt;Prysm&lt;/a&gt; - Go &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/prysmaticlabs/prysm" rel="noopener noreferrer"&gt;Lodestar&lt;/a&gt; - Typescript implementation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/Consensys/teku" rel="noopener noreferrer"&gt;Teku&lt;/a&gt; - Java implementation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/status-im/nimbus-eth2" rel="noopener noreferrer"&gt;Nimbus&lt;/a&gt; - Nim implementation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/grandinetech/grandine" rel="noopener noreferrer"&gt;Grandine&lt;/a&gt; - Rust&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Consensus and Execution
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffsxfk8t3niusper7xxnf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffsxfk8t3niusper7xxnf.png" alt="image" width="800" height="1021"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Execution Client&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Consensus Client&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Validator&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gossips transactions over its P2P network&lt;/td&gt;
&lt;td&gt;Gossips blocks and attestations over its P2P network&lt;/td&gt;
&lt;td&gt;Proposes blocks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Executes/re-executes transactions&lt;/td&gt;
&lt;td&gt;Runs the fork choice algorithm&lt;/td&gt;
&lt;td&gt;Accrues rewards/penalties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Verifies incoming state changes&lt;/td&gt;
&lt;td&gt;Keeps track of the head of the chain&lt;/td&gt;
&lt;td&gt;Makes attestations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manages state and receipts tries&lt;/td&gt;
&lt;td&gt;Manages the Beacon state (contains consensus and execution info)&lt;/td&gt;
&lt;td&gt;Requires 32 ETH to be staked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Creates execution payload&lt;/td&gt;
&lt;td&gt;Keeps track of accumulated randomness in RANDAO&lt;/td&gt;
&lt;td&gt;Can be slashed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exposes JSON-RPC API for interacting with Ethereum&lt;/td&gt;
&lt;td&gt;Keeps track of justification and finalization&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Hardware Requirements: Recommended Specifications
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CPU&lt;/strong&gt;: Fast processor with 4 or more cores
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAM&lt;/strong&gt;: 16 GB or more (minimum 8 GB)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage&lt;/strong&gt;: SSD with at least 2 TB capacity
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bandwidth&lt;/strong&gt;: 25+ MBit/s
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Storage Guidelines&lt;/strong&gt;&lt;br&gt;
The execution client relies heavily on &lt;strong&gt;IOPS&lt;/strong&gt; (Input/Output Operations Per Second).  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ &lt;strong&gt;HDDs (spinning disks)&lt;/strong&gt; will not work&lt;/li&gt;
&lt;li&gt;⚠️ &lt;strong&gt;SATA or USB 3.0+ SSDs&lt;/strong&gt; may work, but with varying performance&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;NVMe SSDs&lt;/strong&gt; are &lt;strong&gt;strongly preferred&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;15k + Read IOPS and 5k + Write IOPS&lt;/li&gt;
&lt;li&gt;Use a &lt;strong&gt;TLC/MLC/SLC-based NVMe SSD&lt;/strong&gt; with a &lt;strong&gt;DRAM cache&lt;/strong&gt; and &lt;strong&gt;high endurance&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tabular Comparison: NVMe vs SATA&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Interface&lt;/th&gt;
&lt;th&gt;Typical Speed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SATA&lt;/td&gt;
&lt;td&gt;~500 MB/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NVMe&lt;/td&gt;
&lt;td&gt;3,500+ MB/s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h2&gt;
  
  
  Note:
&lt;/h2&gt;

&lt;p&gt;For this guide, we’ll be using the following stack to run a Starknet node and staking validator setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Execution Client: Reth – a blazing-fast Ethereum execution client&lt;/li&gt;
&lt;li&gt;Consensus Client: Lighthouse – an Ethereum beacon node implementation in Rust&lt;/li&gt;
&lt;li&gt;Starknet Node: Juno – a full node implementation for Starknet&lt;/li&gt;
&lt;li&gt;Validator Client: starknet-staking-v2 – the new client for participating in Starknet’s proof-of-stake mechanism&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  🛠️ Setting up an L1 Ethereum Node from Source
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;For easy navigation, create an &lt;code&gt;eth_node&lt;/code&gt; folder in your machine. &lt;/li&gt;
&lt;li&gt;Create 2 sub folders, thus:

&lt;ul&gt;
&lt;li&gt;execution&lt;/li&gt;
&lt;li&gt;consensus&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;eth_node&lt;/code&gt; folder, create a JWT secret file; this file serves as a secure communication between the execution client and the consensus client:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;openssl rand -hex 32 | tr -d "\n" | tee jwt.hex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;You should have the following folder structure:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
├── consensus/
├── execution/
└── jwt.hex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Execution Client Setup (Reth)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;First, install Rust using rustup：
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Install the following Ubuntu packages:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install -y git gcc g++ make cmake pkg-config llvm-dev libclang-dev clang
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; into your &lt;code&gt;execution&lt;/code&gt; folder &lt;code&gt;~/eth_node/execution&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Clone &lt;code&gt;reth&lt;/code&gt; repo:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/paradigmxyz/reth
cd reth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Then, install Reth into your PATH directly via:&lt;br&gt;
&lt;code&gt;cargo install --locked --path bin/reth --bin reth&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After installing &lt;code&gt;reth&lt;/code&gt;, make sure the binary exists by running &lt;code&gt;which reth&lt;/code&gt; or &lt;code&gt;reth --version&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now that we have &lt;code&gt;reth&lt;/code&gt; installed, it's time to run our &lt;code&gt;reth&lt;/code&gt; execution client; open another terminal and run:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;reth node --chain sepolia --authrpc.jwtsecret ~/eth_node/jwt.hex --authrpc.addr 127.0.0.1 --authrpc.port 8551 --http --http.addr 0.0.0.0 --http.port 8545 --ws --ws.addr 0.0.0.0 --ws.port 8546
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Consensus Client  Setup (Lighthouse)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;First, make sure you have rust installed. You can follow the guide for installing rust while configuring your machine for &lt;code&gt;reth&lt;/code&gt; as described above
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Install the following Ubuntu packages:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install -y git gcc g++ make cmake pkg-config llvm-dev libclang-dev clang
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; into your &lt;code&gt;consensus&lt;/code&gt; folder &lt;code&gt;~/eth_node/consensus&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Clone the lighthouse repo:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/sigp/lighthouse.git
cd lighthouse
make
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After &lt;a href="https://lighthouse-book.sigmaprime.io/installation.html" rel="noopener noreferrer"&gt;installing &lt;code&gt;ligthouse&lt;/code&gt;&lt;/a&gt;, make sure the binary exists by running &lt;code&gt;which lighthouse&lt;/code&gt; or &lt;code&gt;lighthouse --version&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To run the beacon node of the lighthouse consensus client, use this command:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lighthouse bn --network sepolia --execution-endpoint http://localhost:8551 --execution-jwt ~/eth_node/jwt.hex --checkpoint-sync-url https://sepolia.beaconstate.info --http --http-address 0.0.0.0 --disable-deposit-contract-sync
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;With these, we have our L1 Ethereum full node running&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  FAQ: Can I share an execution node between multiple beacon nodes (many:1)?
&lt;/h4&gt;

&lt;p&gt;It is not possible to connect more than one beacon node to the same execution engine. There must be a 1:1 relationship between beacon nodes and execution nodes. The beacon node controls the execution node via the engine API, telling it which block is the current head of the chain. If multiple beacon nodes were to connect to a single execution node they could set conflicting head blocks, leading to frequent re-orgs on the execution node.In the future, there will be HTTP proxies available which allow node operators to nominate a single controlling beacon node, while allowing consistent updates from other beacon nodes.&lt;/p&gt;
&lt;h2&gt;
  
  
  🛠️ Running Your L2 Starknet Juno Node from Source
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62i086kdtgyn1sa2q9st.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62i086kdtgyn1sa2q9st.jpeg" alt="Starknet-Node-Architecture" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our Juno full node will run as a separate service on the existing L1 full node. &lt;/li&gt;
&lt;li&gt;Juno connects to our execution client at port &lt;code&gt;8546&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;This guide helps you build and run a &lt;a href="https://github.com/NethermindEth/juno" rel="noopener noreferrer"&gt;Juno&lt;/a&gt; node from source, including all prerequisites and step-by-step instructions.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  ⚙️ Prerequisites
&lt;/h3&gt;

&lt;p&gt;You need a fully synced L1 full node&lt;/p&gt;

&lt;p&gt;Ensure your system has the following installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Go&lt;/strong&gt; &lt;a href="https://dev.tosudo%20apt%20update%0Asudo%20apt%20install%20golang-go"&gt;1.23 or later&lt;/a&gt;  via &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rust&lt;/strong&gt; (via &lt;a href="https://rustup.rs" rel="noopener noreferrer"&gt;rustup.rs&lt;/a&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C compiler&lt;/strong&gt; (&lt;code&gt;gcc&lt;/code&gt; or &lt;code&gt;clang&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;jemalloc&lt;/strong&gt; memory allocator &lt;code&gt;sudo apt-get install -y libjemalloc-dev&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  On Ubuntu:
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; build-essential libjemalloc-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Important:&lt;/strong&gt; Install &lt;code&gt;libjemalloc-dev&lt;/code&gt; &lt;strong&gt;before&lt;/strong&gt; building the project, or the build will fail.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h4&gt;
  
  
  📦 Step 1: Clone the Repository
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a folder called &lt;code&gt;stark_node&lt;/code&gt; with 2 sub folders, thus:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;juno&lt;/li&gt;
&lt;li&gt;staking-validator&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should the following structure in your &lt;code&gt;stark_node&lt;/code&gt; folder&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
├── juno /
├── staking-validator /

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; into &lt;code&gt;juno&lt;/code&gt; and clone the juno repo and run this command:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/NethermindEth/juno.git
&lt;span class="nb"&gt;cd &lt;/span&gt;juno
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  🛠️ Step 2: Build the Binary
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make juno
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The binary will be available at: &lt;code&gt;./build/juno&lt;/code&gt;&lt;/p&gt;


&lt;h4&gt;
  
  
  📁 Step 3: Prepare the Snapshots Directory
&lt;/h4&gt;

&lt;p&gt;Create a directory to store the chain database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/snapshots/juno_sepolia
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  🚀 Step 4: Run the Node
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./build/juno &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--http&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--http-port&lt;/span&gt; 6060 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--http-host&lt;/span&gt; 0.0.0.0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--db-path&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/snapshots/juno_sepolia &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--ws&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--ws-port&lt;/span&gt; 6061 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--ws-host&lt;/span&gt; 0.0.0.0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--eth-node&lt;/span&gt; &amp;lt;ws://YOUR-EXECUTION-CLIENT-IP:8546&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can create a config &lt;code&gt;run.yml&lt;/code&gt; file with this this config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;log-level: info
network: mainnet
http: true
http-port: 6060
http-host: 0.0.0.0
eth-node: ws://127.0.0.1:8546
metrics: true
metrics-port: 26660
ws: true
ws-port: 6061
ws-host: 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;log-level&lt;/code&gt; - type of details to be logged while running juno. Either trace, debug, info, warn, error logs&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;network&lt;/code&gt; - the selected network to run Juno on whether mainnet, sepolia, sepolia-integration&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;http&lt;/code&gt; - enables the HTTP RPC server on the default port and interface&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;http-port&lt;/code&gt; - the port on which the HTTP server will listen for requests&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;http-host&lt;/code&gt; - interface on which the HTTP RPC server will listen for requests&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;eth-node&lt;/code&gt; - WebSocket endpoint of the Ethereum node. To verify the correctness of the L2 chain, Juno must connect to an Ethereum node and parse events in the Starknet contract&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;metrics&lt;/code&gt; - enables the Prometheus metrics endpoint on the default port&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;metrics-port&lt;/code&gt; - the port on which the Prometheus endpoint will listen for requests. Default port is 9090. However, you may need to specify a different port like &lt;code&gt;26660&lt;/code&gt; if port is already in use by Prometheus service &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ws&lt;/code&gt; - Enables the WebSocket RPC server on the default port&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ws-port&lt;/code&gt; - The port on which the WebSocket server will listen for requests; this port must be enabled at &lt;code&gt;6061&lt;/code&gt; for the validator to work.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ws-host&lt;/code&gt; - The interface on which the WebSocket RPC server will listen for requests&lt;/li&gt;
&lt;li&gt;To run Juno with this config:
&lt;code&gt;./build/juno --config run.yml&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 Note: Juno requires a WebSocket-based execution client (e.g. Geth or Nethermind, or Reth).&lt;br&gt;
Make sure you have WS enabled and it is reachable at the provided address.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--eth-node ws://127.0.0.1:8546
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  🧪 Step 5: Monitor the Logs
&lt;/h4&gt;

&lt;p&gt;If you're running it directly, logs will print to your terminal.&lt;/p&gt;

&lt;h4&gt;
  
  
  To retrieve the latest Starknet block, run:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl --location 'http://localhost:6060' --header 'Content-Type: application/json' --data '{
    "jsonrpc": "2.0",
    "method": "starknet_blockNumber",
    "params": [],
    "id": 1
}' | jq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Updating Juno (Standalone binary)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pull the latest updates to the codebase&lt;br&gt;
&lt;code&gt;git pull&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rebuild the binary:&lt;br&gt;
&lt;code&gt;make juno&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify the updated version &lt;br&gt;
&lt;code&gt;cd build &amp;amp;&amp;amp; ./juno --version&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fhackmd.io%2F_uploads%2FB1ZHI2UMeg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fhackmd.io%2F_uploads%2FB1ZHI2UMeg.png" alt="Screenshot 2025-05-30 at 05.37.35" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting Up A Validator
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;At the time of writing this documentation, Starknet sequencer is currently still centralized - &lt;a href="https://github.com/starkware-libs/sequencer/" rel="noopener noreferrer"&gt;Starkware Sequencer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is gradually moving towards employing a staking protocol, handing over the responsibilities of producing, attesting, and proving blocks to validators. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The process of becoming a validator involves three main steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running a Juno node: Ensure you have the latest version properly configured with adequate resources&lt;/li&gt;
&lt;li&gt;Acquiring STRK tokens: A minimum of 20,000 STRK is required for staking on mainnet (1 STRK is required for staking on Sepolia testnet), like a security deposit that ensures validators have "skin in the game"&lt;/li&gt;
&lt;li&gt;Staking tokens: Register as a validator through the Starknet staking contract

&lt;ul&gt;
&lt;li&gt;Pre-approve STRK transfer to the staking contract&lt;/li&gt;
&lt;li&gt;Call the stake function with your operational and reward addresses&lt;/li&gt;
&lt;li&gt;Set commission rates and enable pooling if desired&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Starknet’s staking protocol features two options for participation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Staking directly as validators: Staking a minimum of 20,000 STRK for mainnet (1 STRK for sepolia testnet) and earning rewards by handling any responsibilities the protocol requires&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Staking indirectly as delegators: Delegating STRKs to validators who allow delegation and sharing in their rewards without handling any of their responsibilities&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installation of &lt;code&gt;sncast&lt;/code&gt; installation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It's time to make network requests to Starknet via &lt;code&gt;sncast&lt;/code&gt; CLI.&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;sncast&lt;/code&gt; CLI is only possible if you have &lt;code&gt;starknet-foundry&lt;/code&gt; installed; this can be installed directly using &lt;a href="https://github.com/software-mansion/starkup" rel="noopener noreferrer"&gt;starkup&lt;/a&gt; by running this this command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;starkup&lt;/code&gt; - this command unpacks all the required binaries to run starknet-foundry including &lt;code&gt;sncast&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify that you have &lt;code&gt;sncast&lt;/code&gt; by running:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;which sncast
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To become a Starknet validator, you need: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Starknet account &lt;/li&gt;
&lt;li&gt;20000 STRK tokens (for Mainnet) or 1 STRK (for Sepolia) to successfully stake.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;If you have an existing account, you'll need the private key of such account, otherwise you can create one directly from your CLI using &lt;code&gt;sncast&lt;/code&gt;:&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast \
    account create \
    --url http://localhost:6060 \
    --name validator_account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The above command automatically creates an OpenZepellin-Standard account on Starknet's Sepolia testnet &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This newly created account must be funded via &lt;a href="https://starknet-faucet.vercel.app/" rel="noopener noreferrer"&gt;https://starknet-faucet.vercel.app/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;With the now account funded, next, we deploy this account:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast \
    account deploy \
    --url http://localhost:6060 \
    --name validator_account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You can now access the metadata of this account any time from your machine by running:
&lt;code&gt;cat ~/.starknet_accounts/starknet_open_zeppelin_accounts.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The above command outputs relevant details of the account housed in this json file like so:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "validator_account": {
      "address": "Your-address",
      "class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f",
      "deployed": true,
      "legacy": false,
      "private_key": "Your-private-key",
      "public_key": "Your-public-key",
      "salt": "Your-salt"
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Make sure NEVER TO:

&lt;ul&gt;
&lt;li&gt;expose your private key&lt;/li&gt;
&lt;li&gt;modify this json file. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  Approve and Stake &lt;code&gt;STRK&lt;/code&gt; tokens
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;We are done with creating and funding our account. &lt;/li&gt;
&lt;li&gt;To become a validator, you must grant &lt;code&gt;Starknet Staking&lt;/code&gt; &lt;a href="https://sepolia.starkscan.co/contract/0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1" rel="noopener noreferrer"&gt;contract&lt;/a&gt; permission by calling the &lt;code&gt;approve&lt;/code&gt; method on the &lt;code&gt;STRK&lt;/code&gt; token contract. To do this, we can use &lt;code&gt;sncast&lt;/code&gt; thus:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sncast --account workshop_account invoke --url http://localhost:6060 --contract-address 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d --function "approve" --arguments '0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1, 1000000000000000000'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;sncast&lt;/code&gt;, you can stake your STRK tokens to register as a validator:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sncast &lt;span class="nt"&gt;--account&lt;/span&gt; workshop_account invoke &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--url&lt;/span&gt; http://localhost:6060 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--contract-address&lt;/span&gt; 0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--function&lt;/span&gt; &lt;span class="s2"&gt;"stake"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--arguments&lt;/span&gt; &lt;span class="s1"&gt;'Your-validator-address, Your-validator-address, 1000000000000000000, true, 500'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The stake function of the Starknet Staking contract accepts five arguments. Here's a breakdown of what each represents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Your-validator-address&lt;/code&gt; (1st argument): &lt;code&gt;reward_address&lt;/code&gt; — the address where staking rewards will be sent. This can be any address you choose.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Your-validator-address&lt;/code&gt; (2nd argument): &lt;code&gt;operational_address&lt;/code&gt; — the address associated with your validator operations. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;1000000000000000000&lt;/code&gt; (3rd argument): &lt;code&gt;amount&lt;/code&gt; — the number of STRK tokens to stake, expressed in FRI (1 STRK = 1e18 FRI).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;true&lt;/code&gt; (4th argument): &lt;code&gt;pool_enabled&lt;/code&gt; — a boolean flag that enables delegation to your validator if set to true.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;500&lt;/code&gt; (5th argument): &lt;code&gt;commission&lt;/code&gt; — the commission rate expressed in basis points. 500 represents a 5% commission (since 10000 = 100%).
This value represents percentage with precision, where 10000 represents 100%. In our case, we specified &lt;code&gt;500&lt;/code&gt; to set a 5% commission&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Staking Validator Installation
&lt;/h3&gt;

&lt;p&gt;With our Juno up and running &amp;amp; our STRK tokens staked, it's time to install and run our validator client.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Netherminds's &lt;code&gt;Starknet-Staking-v2&lt;/code&gt; is a validator software that enables users to participate in Phase 2 of Starknet's staking protocol by performing block attestation. &lt;/li&gt;
&lt;li&gt;Validators attest to randomly assigned blocks during each epoch to prove they are actively tracking the network, which is essential preparation for future phases where validators will have full consensus responsibilities. &lt;/li&gt;
&lt;li&gt;We will be setting up this tool by building from source:&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; into the &lt;code&gt;staking-validator&lt;/code&gt; sub-folder within your &lt;code&gt;stark_node&lt;/code&gt; folder and  clone the &lt;code&gt;starknet-staking-v2&lt;/code&gt; thus:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/NethermindEth/starknet-staking-v2.git
cd starknet-staking-v2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Build the validator: &lt;code&gt;make validator&lt;/code&gt; - the binary will be available at &lt;code&gt;./build/validator&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify the installation:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./build/validator --help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create validator config
&lt;/h3&gt;

&lt;p&gt;In your machine create a config file, called &lt;code&gt;config.json&lt;/code&gt;, with the following config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "provider": {
      "http": "http://localhost:6060/v0_8",
      "ws": "ws://localhost:6061/v0_8"
  },
  "signer": {
      "operationalAddress": "Your-validator-address",
      "privateKey": "Your-Private-Key"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Running Your Staking Validator
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You’re now ready to begin your attestation duties as a validator on Starknet. On another terminal, start your validator with the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./build/validator --config config.json --log-level trace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If this runs successfully, you'll see logs of blocks received,&lt;code&gt;block_header&lt;/code&gt; metadata containing details of &lt;code&gt;block_hash&lt;/code&gt;, &lt;code&gt;parent_hash&lt;/code&gt;, &lt;code&gt;block_number&lt;/code&gt;, &lt;code&gt;new_root&lt;/code&gt;, &lt;code&gt;timestamp&lt;/code&gt;, &lt;code&gt;sequencer_address&lt;/code&gt;, attestation window capturing &lt;code&gt;start&lt;/code&gt; and &lt;code&gt;end&lt;/code&gt; blocks to be attested. &lt;/li&gt;
&lt;li&gt;There will be periodic attest transactions to be executed by your validator account. Make sure your validator account has enough gas to pay for such transactions.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After a given attestation, you will find the status of the attestation, and relevant metadata of this transaction including &lt;code&gt;transaction_hash&lt;/code&gt;, &lt;code&gt;finality_status&lt;/code&gt; and &lt;code&gt;execution_status&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Running Multiple Validators on a Single Juno Full Node
&lt;/h3&gt;

&lt;p&gt;Juno allows you to run multiple validator accounts on a single full node. To do this:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define a separate configuration file (.json) - Eg &lt;code&gt;validator_2.json&lt;/code&gt;, &lt;code&gt;validator_3.json&lt;/code&gt; - for each validator account, specifying a unique provider and signer in each config.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure that each account has staked the required amount of STRK tokens and that the corresponding private key is correctly included in its configuration file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once set up, each configured validator account will independently perform attestation duties through the same full node; Meaning on a different terminal within your &lt;code&gt;~/stark_node/staking-validator/starknet-staking-v2&lt;/code&gt; folder, you can run the following command to start your 2nd validator:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./build/validator --config validator_2.json --log-level trace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>web3infra</category>
      <category>starknetnode</category>
      <category>ethereumnode</category>
      <category>decentralizedinfra</category>
    </item>
  </channel>
</rss>
