<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:tt="http://teletype.in/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Lucius Cornelius</title><generator>teletype.in</generator><description><![CDATA[Lucius Cornelius]]></description><image><url>https://img4.teletype.in/files/f4/a5/f4a5db74-7288-49ce-ae3e-ae0d3b8a1196.png</url><title>Lucius Cornelius</title><link>https://teletype.in/@cornelius</link></image><link>https://teletype.in/@cornelius?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=cornelius</link><atom:link rel="self" type="application/rss+xml" href="https://teletype.in/rss/cornelius?offset=0"></atom:link><atom:link rel="next" type="application/rss+xml" href="https://teletype.in/rss/cornelius?offset=10"></atom:link><atom:link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></atom:link><pubDate>Mon, 23 Nov 2026 13:40:24 GMT</pubDate><lastBuildDate>Mon, 23 Nov 2026 13:40:24 GMT</lastBuildDate><item><guid isPermaLink="true">https://teletype.in/@cornelius/O-ayPkp8pz8</guid><link>https://teletype.in/@cornelius/O-ayPkp8pz8?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=cornelius</link><comments>https://teletype.in/@cornelius/O-ayPkp8pz8?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=cornelius#comments</comments><dc:creator>cornelius</dc:creator><title>Stake Wars Challenges</title><pubDate>Thu, 11 Aug 2022 09:57:19 GMT</pubDate><description><![CDATA[sudo apt update &amp;&amp; sudo apt upgrade -y]]></description><content:encoded><![CDATA[
  <h2 id="hDfO" data-align="center">Übung 1</h2>
  <p id="Ji5j"><code>sudo apt update &amp;&amp; sudo apt upgrade -y</code></p>
  <p id="tlru"><code>curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -  <br />sudo apt install build-essential nodejs<br />PATH=&quot;$PATH&quot;</code></p>
  <p id="t3Xx"><code>sudo npm install -g near-cli</code></p>
  <p id="VnOq"><code>echo &#x27;export NEAR_ENV=shardnet&#x27; &gt;&gt; ~/.bashrc<br />echo &#x27;export NEAR_ENV=shardnet&#x27; &gt;&gt; ~/.bash_profile<br />source $HOME/.bash_profile</code></p>
  <p id="fA2k">Befehle für den Client</p>
  <p id="wTJG">Das Angebot des Validierers gibt an, dass er in das Set des Validierers aufgenommen werden möchte, damit das Angebot akzeptiert wird, muss es den Mindestplatzpreis erfüllen.<br /><code>near proposals</code></p>
  <p id="rnTQ">Dies zeigt die Liste der aktiven Validatoren in der aktuellen Epoche, die Anzahl der produzierten Blöcke, die Anzahl der ausstehenden Blöcke und die Online-Geschwindigkeit. Wird verwendet, um zu überwachen, ob der Validator Probleme hat.<br /><code>near validators current</code></p>
  <p id="ZMGW">Hier sind die Prüfer gezeigt, deren Vorschlag vor einer Epoche akzeptiert wurde und die in der nächsten Epoche in den Satz von Prüfern aufgenommen werden.<br /><code>near validators next</code></p>
  <h2 id="nTUQ" data-align="center">Übung 2</h2>
  <p id="Qouh"><code>sudo apt install -y git binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake gcc g++ python docker protobuf-compiler libssl-dev pkg-config clang llvm cargo</code></p>
  <p id="zUTA">Wenn Sie Probleme haben, python oder docker.io auf Ubuntu zu installieren, versuchen Sie diesen Befehl:<br /><code>sudo apt install python3<br />sudo apt install docker-ce</code></p>
  <p id="4o1t">Wenn nicht, dann gehen Sie direkt hierher.<br /><code>sudo apt install python3-pip<br />USER_BASE_BIN=$(python3 -m site --user-base)/bin<br />export PATH=&quot;$USER_BASE_BIN:$PATH&quot;</code></p>
  <p id="p580"><code>sudo apt install clang build-essential make</code></p>
  <p id="5qcx"><code>curl --proto &#x27;=https&#x27; --tlsv1.2 -sSf https://sh.rustup.rs | sh<br />source $HOME/.cargo/env</code></p>
  <p id="j8xQ"><code>git clone https://github.com/near/nearcore<br />cd nearcore<br />git fetch<br />git checkout 68bfa84ed1455f891032434d37ccad696e91e4f5</code></p>
  <p id="sekK"><code>cargo build -p neard --release --features shardnet<br />cd $HOME</code></p>
  <p id="enjb"><code>sudo apt-get install awscli -y<br />~/nearcore/target/release/neard --home ~/.near init --chain-id shardnet --download-genesis<br />rm ~/.near/config.json ~/.near/genesis.json<br />wget -O ~/.near/config.json https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/shardnet/config.json<br />wget -O ~/.near/genesis.json https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/shardnet/genesis.json</code></p>
  <p id="Dud1">Gehen Sie im Browser zum Wallet und erstellen Sie eine Test-Wallet-Adresse<br /><a href="https://wallet.shardnet.near.org/" target="_blank">https://wallet.shardnet.near.org/</a></p>
  <p id="I8td">Wir erhalten einen Login-Link im Terminal, folgen Sie ihm im Browser<br />in der Nähe von Login</p>
  <p id="nhKM">Wir warten auf das Fehlen einer Verbindung im Browser und geben den vollständigen Namen Ihrer Brieftasche im Terminal ein<br />Wenn die validator_key.json im Ordner $HOME/.near nicht automatisch generiert wurde, erstellen wir sie selbst<br /><code>cp ~/.near-credentials/shardnet/!YOUR_WALLET!.json ~/.near/validator_key.json</code></p>
  <blockquote id="yzaJ">Ändern Sie „account_id“ =&gt; xx.factory.shardnet.near, wobei xx der PoolName ist<br />Ändern Sie private_key in secret_key<br />Warnung: account_id muss mit dem Vertragsnamen des Staking-Pools identisch sein, sonst signieren Sie keine Blöcke<br />Der Inhalt von validator_key.json sollte wie folgt aussehen:&#x60;<br />{<br />  &quot;account_id&quot;: &quot;xx.factory.shardnet.near&quot;,<br />  &quot;public_key&quot;: &quot;ed25519:HeaBJ3xLgvZacQWmEctTeUqyfSU4SDEnEwckWxd92W2G&quot;,<br />  &quot;secret_key&quot;: &quot;ed25519:****&quot;<br />}</blockquote>
  <p id="7un8"><code>sudo tee /etc/systemd/system/neard.service &gt; /dev/null &lt;&lt;EOF<br />[Unit]<br />Description=NEARd Daemon Service<br />[Service]<br />Type=simple<br />User=$USER<br />Group=near<br />WorkingDirectory=$HOME/.near<br />ExecStart=$HOME/nearcore/target/release/neard run<br />Restart=on-failure<br />RestartSec=30<br />KillSignal=SIGINT<br />TimeoutStopSec=45<br />KillMode=mixed<br />[Install]<br />WantedBy=multi-user.target<br />EOF</code></p>
  <p id="QVE1"><code>sudo systemctl daemon-reload<br />sudo systemctl enable neard<br />sudo systemctl start neard &amp;&amp; journalctl -f -u neard</code></p>
  <h2 id="L62p" data-align="center">Übung 3</h2>
  <p id="hmh5"><br />Erweiterung unseres Staking-Pool-Vertrags<br /><code>near call factory.shardnet.near create_staking_pool &#x27;{&quot;staking_pool_id&quot;: &quot;&lt;pool id&gt;&quot;, &quot;owner_id&quot;: &quot;&lt;accountId&gt;&quot;, &quot;stake_public_key&quot;: &quot;&lt;public key&gt;&quot;, &quot;reward_fee_fraction&quot;: {&quot;numerator&quot;: 5, &quot;denominator&quot;: 100}, &quot;code_hash&quot;:&quot;DD428g9eqLL8fWUxv8QSpVFzyHi1Qd16P8ephYCTmMSZ&quot;}&#x27; --accountId=&quot;&lt;accountId&gt;&quot; --amount=30 --gas=300000000000000</code><br /></p>
  <blockquote id="uFvK">Beispiel<br />near call factory.shardnet.near create_staking_pool &#x27;{&quot;staking_pool_id&quot;: &quot;example&quot;, &quot;owner_id&quot;: &quot;example.shardnet.near&quot;, &quot;stake_public_key&quot;: &quot;ed25519:your key&quot;, &quot;reward_fee_fraction&quot;: {&quot;Zähler&quot;: 5, &quot;Nenner&quot;: 100}, &quot;code_hash&quot;: &quot;DD428g9eqLL8fWUxv8QSpVFzyHi1Qd16P8ephYCTmMSZ&quot;}&#x27; --accountId=&quot;example.shardnet.near&quot; --amount=30 --gas=300000000000000</blockquote>
  <h3 id="pe3O">Transaktionsleitfaden</h3>
  <p id="D9eS">Einzahlung und Wette<br />near call &lt;pool_id&gt; deposit_and_stake --amount &lt;amount&gt; --accountId &lt;accountId&gt; --gas=300000000000000</p>
  <p id="XZpF">Wette stornieren<br />near call &lt;pool_id&gt; unstake &#x27;{&quot;amount&quot;: &quot;&lt;amount yoctoNEAR&gt;&quot;}&#x27; --accountId &lt;accountId&gt; --gas=300000000000000</p>
  <p id="zSC6">Um die gesamte Wette zu stornieren, gehen Sie wie folgt vor:<br />near call &lt;pool_id&gt; unstake_all --accountId &lt;accountId&gt; --gas=300000000000000</p>
  <p id="1IEi">Das Aufheben des Einsatzes dauert 2-3 Epochen, danach können Sie alles aus dem Pool zurückziehen.<br />near call &lt;pool_id&gt; withdraw &#x27;{&quot;amount&quot;: &quot;&lt;amount yoctoNEAR&gt;&quot;}&#x27; --accountId &lt;accountId&gt; --gas=300000000000000</p>
  <p id="9WCi">Alle Befehle anzeigen<br />near call &lt;pool_id&gt; withdraw_all --accountId &lt;accountId&gt; --gas=300000000000000</p>
  <p id="ndxr">Ping (Es ist besser, es zu automatisieren, da Sie jede Stunde pingen müssen)<br />Ping erstellt ein neues Angebot und aktualisiert die Gebotssalden für Ihre Delegierten. Ein Ping sollte jede Epoche gesendet werden, um die Belohnungen auf dem neuesten Stand zu halten.<br />near call &lt;pool_id&gt; ping &#x27;{}&#x27; --accountId &lt;accountId&gt; --gas=300000000000000</p>
  <p id="pE7c">Balances<br />near view &lt;pool_id&gt; get_account_total_balance &#x27;{&quot;account_id&quot;: &quot;&lt;accountId&gt;&quot;}&#x27;</p>
  <p id="l59E">Balance-Rate<br />near view &lt;pool_id&gt; get_account_staked_balance &#x27;{&quot;account_id&quot;: &quot;&lt;accountId&gt;&quot;}&#x27;</p>
  <p id="Umd8">Неразмещенный баланс<br />near view &lt;pool_id&gt; get_account_unstaked_balance &#x27;{&quot;account_id&quot;: &quot;&lt;accountId&gt;&quot;}&#x27;</p>
  <p id="8cKG">Unplatzierter Saldo<br />near view &lt;pool_id&gt; is_account_unstaked_balance_available &#x27;{&quot;account_id&quot;: &quot;&lt;accountId&gt;&quot;}&#x27;</p>
  <p id="f21a">Wetten pausieren/fortsetzen</p>
  <p id="8brZ">Pause<br />near call &lt;pool_id&gt; pause_staking &#x27;{}&#x27; --accountId &lt;accountId&gt;</p>
  <p id="ml9i">Fortfahren<br />near call &lt;pool_id&gt; resume_staking &#x27;{}&#x27; --accountId &lt;accountId&gt;</p>
  <h2 id="7uDt" data-align="center">Übung 4</h2>
  <p id="wVec">sudo apt install ccze<br />journalctl -f -u neard | ccze -A</p>
  <blockquote id="sY8Y">INFO-Statistiken: 85079829 H1GUabkB7TW2K2yhZqZ7G47gnpS7ESqicDMNyb9EE6tf Validator 73 Validatoren 30 Peers ⬇ 506,1 kiB/s ⬆ 428,3 kiB/s 1,20 bps 62,08 Tgas/s CPU: 23 %, Arbeitsspeicher: 7,4 GiB<br />Validator: „Validator“ zeigt an, dass Sie ein aktiver Validator sind.<br />73 Validatoren: Es gibt insgesamt 73 Validatoren im Netzwerk.<br />30 Peers: Sie haben derzeit 30 Peers. Sie benötigen mindestens 3 Peers, um einen Konsens zu erzielen und mit der Validierung zu beginnen<br />46199418 : block - beobachten Sie, wie sich die Blöcke bewegen</blockquote>
  <p id="Y5Uq">sudo apt install curl jq</p>
  <p id="BQJf">Allgemeine Befehle:<br /> Проверьте версию вашего узла: Команда:<br />curl -s http://127.0.0.1:3030/status | jq .version</p>
  <p id="AKb1"> Überprüfung der Delegierenden und Bewertungsteams:<br />near view &lt;your pool&gt;.factory.shardnet.near get_accounts &#x27;{&quot;from_index&quot;: 0, &quot;limit&quot;: 10}&#x27; --accountId &lt;accountId&gt;.shardnet.near</p>
  <p id="SJBj">Überprüfen Sie die Fehlerursache des Validators Befehl:<br />curl -s -d &#x27;{&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;validators&quot;, &quot;id&quot;: &quot;dontcare&quot;, &quot;params&quot;: [null]}&#x27; -H &#x27;Content-Type: application/json&#x27; 127.0.0.1:3030 | jq -c &#x27;.result.prev_epoch_kickout[] | select(.account_id | contains (&quot;&lt;POOL_ID&gt;&quot;))&#x27; | jq .reason</p>
  <p id="oBRD">Befehl „Erstellte/ausstehende Blöcke prüfen“:<br />curl -r -s -d &#x27;{&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;validators&quot;, &quot;id&quot;: &quot;dontcare&quot;, &quot;params&quot;: [null]}&#x27; -H &#x27;Content-Type: application/json&#x27; 127.0.0.1:3030 | jq -c &#x27;.result.current_validators[] | select(.account_id | contains (&quot;POOL_ID&quot;))&#x27;</p>

]]></content:encoded></item></channel></rss>