<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ariel Sandez on Medium]]></title>
        <description><![CDATA[Stories by Ariel Sandez on Medium]]></description>
        <link>https://medium.com/@arielsandez?source=rss-a9abbb3a66b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qqAeqf674k7wD8t_GKrs7g.jpeg</url>
            <title>Stories by Ariel Sandez on Medium</title>
            <link>https://medium.com/@arielsandez?source=rss-a9abbb3a66b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 00:47:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arielsandez/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Working with Truebit-OS using the API]]></title>
            <link>https://medium.com/truebit/working-with-truebit-os-using-the-api-1dc535343f17?source=rss-a9abbb3a66b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1dc535343f17</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[b2b]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[truebit]]></category>
            <dc:creator><![CDATA[Ariel Sandez]]></dc:creator>
            <pubDate>Tue, 31 Jan 2023 14:48:12 GMT</pubDate>
            <atom:updated>2023-01-31T14:48:12.985Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KPIMGf0WY5hojO9QVwaTzg.png" /></figure><p>AUTHOR: <a href="/service/mailto:ariel@truebit.io">Ariel Sandez</a></p><p>Developers can now work with the Truebit-OS Docker container via API. The following blog shows you how to get started by creating a local environment to interact with the API using a local fork.</p><p>For those who are new, a Rest API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services.</p><p>This latest release to the Truebit-OS provides new functionality for developers by allowing developers to interact with the full range of truebit commands using Rest API. In that way, you can operate Truebit remotely and, more importantly, by using scripts to automate your desired execution or to incorporate it into your application workflow.</p><p>For example, you can submit a task verification using the Rest API (Post method) from your application. However, another process could be checking the task status using Rest API get Task and deciding on the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/0*O7nQjUv8oNHzEt5T" /></figure><p><strong>STEPS TO BE TAKEN</strong></p><ol><li><a href="https://docs.google.com/document/d/1ZEjZcwGRo2naHxXY5w7FfpZ_U6eijZTYUvTx4CNdb8k/edit#heading=h.qp71s0hu2424"><strong>Clone the repo and build</strong></a><strong> or Pull the image from Docker hub</strong></li><li><a href="https://docs.google.com/document/d/1ZEjZcwGRo2naHxXY5w7FfpZ_U6eijZTYUvTx4CNdb8k/edit#heading=h.7gf8apvdng5e"><strong>Run the Docker image</strong></a></li><li><a href="https://docs.google.com/document/d/1ZEjZcwGRo2naHxXY5w7FfpZ_U6eijZTYUvTx4CNdb8k/edit#heading=h.ax38ga77tsal"><strong>Create Infura account and get the key</strong></a></li><li><a href="https://docs.google.com/document/d/1ZEjZcwGRo2naHxXY5w7FfpZ_U6eijZTYUvTx4CNdb8k/edit#heading=h.br2jou9vbpi2"><strong>Install and launch Ganache</strong></a></li><li><a href="https://docs.google.com/document/d/1ZEjZcwGRo2naHxXY5w7FfpZ_U6eijZTYUvTx4CNdb8k/edit#heading=h.k99ife8u84gc"><strong>Launch Truebit-OS with Infura and API publish</strong></a></li><li><a href="https://docs.google.com/document/d/1ZEjZcwGRo2naHxXY5w7FfpZ_U6eijZTYUvTx4CNdb8k/edit#heading=h.44d0ntt9ox8p"><strong>Interact with the API using Curl</strong></a></li><li><a href="https://docs.google.com/document/d/1ZEjZcwGRo2naHxXY5w7FfpZ_U6eijZTYUvTx4CNdb8k/edit#heading=h.blxjult0f4rw"><strong>API References</strong></a></li></ol><p><strong>Step 1: Clone the repo and build or Pull the image from Docker hub</strong></p><pre>git clone https://github.com/TruebitProtocol/truebit-eth</pre><pre>cd truebit-eth</pre><pre>docker build -t truebit-os:latest . –no-cache</pre><p>Pull the image from Docker Hub</p><pre>docker pull truebitprotocol/truebit-eth</pre><p><strong>Step 2: Run the Docker image (please follow the </strong><a href="https://truebit.io/guide/docker-execution-with-truebit/"><strong>Getting Started Guide</strong></a><strong>)</strong></p><pre>export mypass=secretclefpassword</pre><pre>export YYY=$HOME’/truebit-docker’</pre><pre>docker run -e TBPASS=$mypass -v $YYY/docker-clef:/root/.clef -v $YYY/docker-geth:/root/.ethereum -v $YYY/docker-ipfs:/root/.ipfs -v $YYY/docker-consensus:/root/.eth2 -p 3000:3000 — name truebit -dit truebitprotocol/truebit-eth:latest /bin/bash</pre><p><strong>Step 3: Create Infura account and get the key</strong></p><p>For this article, we chose Infura, but you can use an ethereum node already synchronized with Goerli. (in case you want to configure a node, please follow this <a href="https://medium.com/truebit/how-to-run-an-ethereum-node-after-the-merge-da20a239d007">link</a>)</p><p>Infura is a node provider that allows developers to “plug in” to the Ethereum blockchain via nodes managed by Infura itself, saving devs time, money, and work.</p><p><a href="https://app.infura.io/">https://app.infura.io/</a></p><p>Create a new key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/0*1o_JIN_Qi6ofKxMt" /></figure><p>Select MAINNET or Goerli and copy the URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*YLskOjWTjJ_Fsn94" /></figure><p><strong>Step 4: Install and launch ganache.</strong></p><p>Ganache is a private Ethereum blockchain environment that allows you to emulate the Ethereum blockchain to interact with smart contracts in your own private blockchain.</p><p>On your local machine, open a terminal and install Ganache.</p><pre>npx hardhat node — network hardhat</pre><p><strong>Launch Ganache</strong></p><pre>ganache — fork.url &lt;&lt;YOUR INFURA URL&gt;&gt; — miner.blockTime 10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xs2KooQsITpBqNKl" /></figure><p><strong>Step 5: Launch Truebit-Os with Infura and API publish</strong></p><p>Enter into the Docker instance.</p><pre>docker exec -it truebit /bin/bash</pre><p>Launch Truebit-OS with the API in Ganache</p><pre>./truebit-eth/truebit-linux — api ws://host.docker.internal:8545</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JLO43QKW9QwjQs0n" /></figure><p>Note: port 3000 is open for the API</p><p><strong>Step 6: Interact with the API using Curl</strong></p><p>We have everything set up at this point and can start interacting with Truebit. But first, we can check if the API is working.</p><p>Echo test</p><pre>curl http://127.0.0.1:3000/api/echo/testMessage!</pre><p>Example response</p><p>testMessage!</p><p><strong>Step 7: API References</strong></p><p>Methods: <a href="http://localhost:3000/">http://localhost:3000</a></p><p><strong>GET</strong>:</p><ul><li>/api/ Heath check</li><li>Example call: curl <a href="http://localhost:3000/api/">http://localhost:3000/api/</a></li><li>Response: OK</li><li>/api/echo/{MeSsAgE} Message test</li><li>Example call: curl <a href="http://localhost:3000/api/">http://localhost:3000/api/</a></li><li>Response: OK</li><li>/api/accounts List all the Ethereum accounts</li><li>Example call: curl <a href="http://localhost:3000/api/accounts">http://localhost:3000/api/accounts</a></li><li>Response: Json format, list of Ethereum addresses</li><li>/api/processes List all the started solver and verifiers</li><li>Example call: curl <a href="http://localhost:3000/api/processes">http://localhost:3000/api/processes</a></li><li>Response: Json format, solver and verifiers, index number and Ethereum address</li><li>/api/solver/status/{solver index}</li><li>Example call: <a href="http://localhost:3000/api/solver/status/0">http://localhost:3000/api/solver/status/0</a></li><li>Response: Json format, solver address and status</li><li>/api/solver/status/{:processNumber} Return the process status</li><li>Example call: <a href="http://localhost:3000/api/solver/status/0">http://localhost:3000/api/status/0</a></li><li>Response: Json format, process address and status</li><li>/api/tasks List all the running tasks</li><li>Example call: <a href="http://localhost:3000/api/tasks">http://localhost:3000/api/tasks</a></li><li>Response: List of task and operations</li><li>/api/verifier/status/{verfier index} Return verifier status</li><li>Example call: curl <a href="http://localhost:3000/api/verifier/status/0">http://localhost:3000/api/verifier/status/0</a></li><li>Response: Verifier account and status</li><li>/api/tasks/:taskHash/parameters Return parameters used for task execution</li><li>Example call: <a href="http://localhost:3000/api/tasks/%7B%7B">http://localhost:3000/api/tasks/{{</a> taskHash }}/parameters</li><li>Response: Json format, parameter list and values</li><li>/api/tasks/{{ taskHash }}/status Return status of a TaskHash</li><li>Example call: <a href="http://localhost:3000/api/tasks/%7B%7B">http://localhost:3000/api/tasks/{{</a> 0xffa9cad5f9a702548781e770e7873a94f54a4865ebf619d2d9ff996cd9826ea8}}/status</li><li>Response: Task status</li></ul><p><strong>POST</strong></p><ul><li>/api/solver/start Start new solver</li><li>Example call: curl -X POST <a href="http://localhost:3000/api/solver/start">http://localhost:3000/api/solver/start</a> -H ‘Content-Type: application/json’ -d ‘{ “account”:0, “test”: true, “limit”: 1, “recover”:-1, “price”:0 }’</li><li>Response: Account number and operation status</li><li>/api/solver/stop Stop existing solver</li><li>Example call: curl -X POST <a href="http://localhost:3000/api/solver/stop">http://localhost:3000/api/solver/stop</a> -H ‘Content-Type: application/json’ -d ‘{ “process”:0 }’</li><li>Response: Account number and operation status</li><li>/api/verifier/start Star new verifier</li><li>Example call: curl -X POST <a href="http://127.0.0.1:3000/api/verifier/start">http://127.0.0.1:3000/api/verifier/start</a> -H “Content-Type: application/json” -d ‘{“account”: 1, “test”: false, “limit”: 1, “recover”: -1, “price”: 0}’</li><li>Response: Account number and operation status</li><li>/api/solver/stop Stop existing verifier</li><li>Example call: curl -X POST <a href="http://localhost:3000/api/solver/stop">http://localhost:3000/api/verifier/stop</a> -H ‘Content-Type: application/json’ -d ‘{ “process”:0 }’</li><li>Response: Verifier number and operation status</li><li>/api/tasks/submit Submit Task</li><li>Example call: curl -X POST <a href="http://localhost:3000/api/tasks/submit">http://localhost:3000/api/tasks/submit</a> -H ‘Content-Type: application/json’ -d ‘{ “account”:0,”taskFile”: “factorial.json” }’</li><li>Response: Task Hash and operation status</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dc535343f17" width="1" height="1" alt=""><hr><p><a href="https://medium.com/truebit/working-with-truebit-os-using-the-api-1dc535343f17">Working with Truebit-OS using the API</a> was originally published in <a href="https://medium.com/truebit">Truebit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build a Docker image with Linux, Windows, and MacOS.]]></title>
            <link>https://medium.com/truebit/how-to-build-a-docker-image-with-linux-windows-and-macos-6bcb57fd59ba?source=rss-a9abbb3a66b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bcb57fd59ba</guid>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Ariel Sandez]]></dc:creator>
            <pubDate>Fri, 02 Dec 2022 19:36:00 GMT</pubDate>
            <atom:updated>2022-12-12T14:18:57.116Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VAIshuPWglt7jOXW" /></figure><p>The Truebit <a href="https://github.com/TruebitProtocol/truebit-eth">GitHub repo</a> is compatible with Linux, Windows, and MacOS. Our latest release is intended for developers who want to build the Docker image to test changes locally. Below you will find instructions on how to begin.</p><p><strong>Build the Docker image locally</strong></p><p><strong>Clone the repo</strong></p><p>git clone <a href="https://github.com/TruebitProtocol/truebit-eth">https://github.com/TruebitProtocol/truebit-eth</a></p><p>cd truebit-eth</p><p><strong>Build the image in Linux or Windows:</strong></p><p>docker build -t truebit-os:latest .</p><p><strong>Build the image in MacOS:</strong></p><p>1- Override default target platform with linux/amd64</p><p>2- Increase Docker Desktop Swap memory to 4gb</p><p>export DOCKER_DEFAULT_PLATFORM=linux/amd64</p><p>docker build -t truebit-os:latest .</p><p><strong>Run the image (please follow the </strong><a href="https://truebit.io/guide/docker-execution-with-truebit/"><strong>Getting Started Guide</strong></a><strong>)</strong></p><p>We encourage the community to extend its functionality using a pull request (PR). If you’re new to the idea, pull requests let you tell others about changes you’ve pushed to a branch in a repository on GitHub.</p><p>To initiate, fork the repo and create a PR in the master; please include a readme file to explain the change.</p><p>We will review the changes and let you know the decision on your GitHub account.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bcb57fd59ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/truebit/how-to-build-a-docker-image-with-linux-windows-and-macos-6bcb57fd59ba">How to build a Docker image with Linux, Windows, and MacOS.</a> was originally published in <a href="https://medium.com/truebit">Truebit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run an Ethereum node after the merge]]></title>
            <link>https://medium.com/truebit/how-to-run-an-ethereum-node-after-the-merge-da20a239d007?source=rss-a9abbb3a66b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/da20a239d007</guid>
            <dc:creator><![CDATA[Ariel Sandez]]></dc:creator>
            <pubDate>Tue, 11 Oct 2022 21:02:20 GMT</pubDate>
            <atom:updated>2022-12-06T20:39:57.093Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qLpijACH753bQmyOEhtefw.jpeg" /></figure><h3>Overview</h3><p>After the merge, Ethereum nodes comprise an execution client and a consensus client; both are needed to run a full Ethereum node and include some caveats. This article will cover the node detail structure after the merge, node selection depending on the specific use, options for sync, and how to check the sync state.</p><h3>Ethereum node and clients</h3><p>An Ethereum node is a computer running the software client connected to other computers with the same Ethereum software, creating a p2p network that verifies data against the protocol rules and keeps the network secure.</p><p>Post merge Ethereum main parts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*2FjZXrm_G1N2Fp0p4a2fnw.jpeg" /></figure><p><strong>Execution client:</strong> Listens to new transactions broadcasted in the network and executes them in the Ethereum virtual machine (EVM) and holds the latest state and database of all current Ethereum data.</p><p><strong>Consensus client:</strong> contain the Beacon Node that implements the proof of stake (POS) consensus algorithm, enabling the network to achieve agreement based on validated data from the execution client. The validator client is part of the consensus, handling the network synchronization, drawing consensus, and performing several other low-level functions. The role of validators is to stake ETH to perform block proposals, and attestations are an equally critical component of the Ethereum beacon chain.</p><p><strong>Bacon chain</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mL6dvaBfOe-TDPW2if31yw.jpeg" /></figure><p><strong>Beacon Block</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/170/1*6cTTuruhwpQPMWW8Hv78yw.jpeg" /></figure><p><strong>Ethereum Clients types</strong></p><p><strong>Nodes</strong></p><ul><li><strong>Full Node</strong></li></ul><p>The full node stores blockchain data (although this is periodically pruned, so a full node does not store all state data back to genesis). Participates in block validation and verifies all blocks and states.</p><ul><li><strong>Light Node</strong></li></ul><p>The light node was the most common mode in Ethereum 1 among applications running inside the node. After the merge, this option is not yet available, and some experimental clients are working to provide a solution. To speed up the syncing and reduce the storage size, some clients offer <strong>Optimistic sync</strong>, which imports the block even though it has not validated its execution payload. The other option is <strong>Checkpoint sync</strong> which speeds up the initial sync by beginning the syncing from a recently finalized checkpoint.</p><p><strong>Checkpoints</strong>:</p><p>Ethereum 1 had a block time around 14s. After the merge, the Beacon Chain has a tempo divided into slots (12 seconds) and epochs (32 slots). Every Epoch last 6.4 minutes, and the first slot in each epoch is a checkpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*FkMR0EeBMHQaeEnYZMTaxQ.jpeg" /></figure><p><a href="https://beaconscan.com/epochs">Epochs | Mainnet Beacon Chain (Phase 0) Ethereum 2.0 Explorer (beaconscan.com)</a></p><ul><li><strong>Archive Node</strong></li></ul><p>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 transactions set without mining them using tracing. Syncing this node could take several weeks and 4 TB of storage.</p><h4>Running a node according to the requirements.</h4><p>Two types of nodes (block-producing and non-block-producing). Both nodes will create and maintain two databases, one for client execution with all the transactions and interaction with the EVM, and the other database for consensus (beacon chain).</p><p><strong>Validator (block-producing)</strong></p><p>This node requires all the major components like Execution client and Consensus client with the client validator. To activate the validator is necessary to stake ETH into a smart contract in Ethereum. This staked ETH then acts as collateral that can be destroyed if the validator behaves dishonestly or lazily. The node should stay up and working 24x7 and avoid any downtime that could cost part of the stake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*UiVSNvXVJ4gLB3bS4z1gMQ.jpeg" /></figure><p><strong>Non-block-producing</strong></p><p>This type of node is used to install Ethereum applications that fully comply with decentralization. The ability for anyone to run their node is critical to maintaining the Ethereum network’s decentralization. To install a non-block-producing, consensus and execution clients are required without the validator client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*msLx0alDIOhwEsHKGwwWnA.jpeg" /></figure><h4>Execution clients</h4><ul><li><a href="https://geth.ethereum.org/">Go Ethereum(Geth)</a></li><li><a href="https://besu.hyperledger.org/en/stable/">Besu</a></li><li><a href="https://nethermind.io/">Nethermind</a></li><li><a href="https://github.com/ledgerwatch/erigon">Erigon</a></li><li><a href="https://openethereum.org/">OpenEthereum</a></li></ul><h4>Consensus clients</h4><ul><li><a href="https://lighthouse-book.sigmaprime.io/">Lighthouse</a>: written in Rust</li><li><a href="https://nimbus.team/">Nimbus</a>: written in Nim</li><li><a href="https://docs.prylabs.network/docs/install/install-with-script">Prysm</a>: written in Go</li><li><a href="https://pegasys.tech/teku">Teku</a>: written in Java</li><li><a href="https://github.com/ChainSafe/lodestar">Lodestar</a>: written in Typescript</li></ul><h3>Node Synchronization</h3><p>After the merge, a node sync means both clients, execution, and consensus doing the sync. For example, we will consider using Geth for execution and Prysm for consensus.</p><p><strong>How to check the sync state of your node</strong></p><p>curl <a href="http://localhost:3500/eth/v1/node/syncing">http://localhost:3500/eth/v1/node/syncing</a> | jq</p><p>This node has finished the consensus sync and is still syncing execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*MQqHeC9LShln_Iv7CP0HMg.png" /></figure><p>This node has finished both syncing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*Kmi7KauL9ppAJXAqCu8Ovg.png" /></figure><p><strong>Execution client</strong></p><p>Execution takes more time, and it´s possible to check the state. We will see examples of a syncing node end and node still syncing.</p><p>geth attach ipc:/root/.ethereum/geth.ipc</p><p>Execution sync active</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOxfhs955O40QdvyNxMj1g.png" /></figure><p>Execution client sync ended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mIkbtI5BIFHsHs9fQgMGqQ.png" /></figure><p><strong>References</strong></p><p><a href="https://ethereum.org/en/developers/docs/">https://ethereum.org/en/developers/docs/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da20a239d007" width="1" height="1" alt=""><hr><p><a href="https://medium.com/truebit/how-to-run-an-ethereum-node-after-the-merge-da20a239d007">How to run an Ethereum node after the merge</a> was originally published in <a href="https://medium.com/truebit">Truebit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>