<?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: XRPSCAN Engineering</title>
    <description>The latest articles on DEV Community by XRPSCAN Engineering (@xrpscan).</description>
    <link>https://dev.to/xrpscan</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%2F808491%2F9362b28d-cfd0-40c9-a4e2-62b176fca9db.jpg</url>
      <title>DEV Community: XRPSCAN Engineering</title>
      <link>https://dev.to/xrpscan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xrpscan"/>
    <language>en</language>
    <item>
      <title>XRPL Deep search platform - Developer preview</title>
      <dc:creator>XRPSCAN Engineering</dc:creator>
      <pubDate>Tue, 30 Jan 2024 20:19:00 +0000</pubDate>
      <link>https://dev.to/xrpscan/xrpl-deep-search-platform-developer-preview-35im</link>
      <guid>https://dev.to/xrpscan/xrpl-deep-search-platform-developer-preview-35im</guid>
      <description>&lt;p&gt;The &lt;a href="https://xrpscan.com" rel="noopener noreferrer"&gt;XRPScan&lt;/a&gt; team is pleased to announce the developer preview of &lt;a href="https://github.com/xrpscan/platform" rel="noopener noreferrer"&gt;Deep search platform&lt;/a&gt; back-end service (Platform), a data processing pipeline to store XRPL transactions in a distributed search and analytics platform.&lt;/p&gt;

&lt;p&gt;XRP Ledger exploration and reporting tools available today (rippled, clio and various explorer APIs) provide access to ledger data based on object's primary key such as ledger index, transaction hash, account address, NFT id, object ids etc.&lt;/p&gt;

&lt;p&gt;This project aims to provide deeper search capability such as filtering transactions by source/destination tags, range query over payment amounts, aggregate volumes and much more. This is enabled by indexing all properties of the transactions in an analytics engine.&lt;/p&gt;

&lt;p&gt;Platform requires access to a rippled server. Optionally, it can also back-fill older ledgers by connecting to a full-history server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&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%2F9unygxzy7974k6v76vqq.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%2F9unygxzy7974k6v76vqq.png" alt="Image description" width="800" height="836"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing platform
&lt;/h2&gt;

&lt;p&gt;Platform is known to run on Linux and macOS. Please follow the &lt;a href="https://github.com/xrpscan/platform?tab=readme-ov-file#installation" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt; to set it up on CentOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the service
&lt;/h2&gt;

&lt;p&gt;Run &lt;code&gt;bin/platform-server&lt;/code&gt; to start the service. It will subscribe to your rippled server and start indexing transactions, ledgers and validations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Back-filling data
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./bin/platform-cli backfill -verbose -from 82000000 -to 82999999
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Optionally, a custom full-history server URL may be provided via the command line&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./bin/platform-cli backfill -verbose -from 82000000 -to 82999999 -server wss://xrplcluster.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Searching transactions
&lt;/h2&gt;

&lt;p&gt;A front-end for searching transactions would be available in the future. In this developer preview, transactions can be searched by connecting to Elastisearch directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -k -u elastic:$ELASTICSEARCH_PASSWORD \
-H 'Content-type: application/json' \
-XPOST 'https://localhost:9200/platform.transactions/_search' \
-d '{"query":{"term":{"ctid":"C511CC0400850000" }}}' \
| jq .hits.hits
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
  {
    "_index": "platform.transactions-85m",
    "_id": "E7B699BA359C4E9E48D64DE17D2914BF97C922B32BF03493A1B95C48BC51CB8D",
    "_score": 15.314049,
    "_source": {
      "Account": "rMdG3ju8pgyVh29ELPWaDuA74CpWW6Fxns",
      "Amount": {
        "currency": "XRP",
        "value": 17805999000
      },
      "Destination": "rsyncTM4ojq33ZVJeBmDXvvJibVftJ2sPy",
      "Fee": 10,
      "Sequence": 3365263,
      "SigningPubKey": "0255EECA852E7C26C0219F0792D1229F1147366D4C936FF3ED83AC32354F6F8EF3",
      "TransactionType": "Payment",
      "TxnSignature": "304402203C4CF26B45FFB8DBB357421AD5E75C38C3CD3D5E290D2E3B0EA9F06548970904022063841E568F02BAE096775017EC7FFD9A12BEE2CD5858650D0870ECF491DD6B94",
      "ctid": "C511CC0400850000",
      "date": 757688782,
      "hash": "E7B699BA359C4E9E48D64DE17D2914BF97C922B32BF03493A1B95C48BC51CB8D",
      "ledger_index": 85052420,
      "meta": {
        "TransactionIndex": 133,
        "TransactionResult": "tesSUCCESS",
        "delivered_amount": {
          "currency": "XRP",
          "value": 17805999000
        }
      },
      "validated": true
    }
  }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Share your feedback
&lt;/h2&gt;

&lt;p&gt;We invite you to run Deep search platform and report your observations, bugs and feature requests. The project is available at &lt;a href="https://github.com/xrpscan/platform" rel="noopener noreferrer"&gt;https://github.com/xrpscan/platform&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xrpl</category>
      <category>xrp</category>
      <category>search</category>
      <category>datapipeline</category>
    </item>
    <item>
      <title>Online Delete support is now available in Hermes</title>
      <dc:creator>XRPSCAN Engineering</dc:creator>
      <pubDate>Wed, 08 Feb 2023 15:12:37 +0000</pubDate>
      <link>https://dev.to/xrpscan/online-delete-support-is-now-available-in-hermes-bpo</link>
      <guid>https://dev.to/xrpscan/online-delete-support-is-now-available-in-hermes-bpo</guid>
      <description>&lt;p&gt;TLDR: Online Delete support is now available in &lt;a href="https://github.com/xrpscan/hermes/releases/tag/v0.4.1" rel="noopener noreferrer"&gt;Hermes v0.4.1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/xrpscan/hermes" rel="noopener noreferrer"&gt;Hermes&lt;/a&gt; is a layer 2 messaging network for storing and relaying XRPL validation messages. Since its release in Aug 2022, several operators have volunteered to run Hermes nodes and participate in the P2P network.&lt;/p&gt;

&lt;p&gt;XRPL validators  generate millions of validation messages collectively every day. The online deletion feature lets the service delete validation messages from older ledgers to keep disk usage from rapidly growing over time. The default config lets the service store all validation messages indefinitely. In order to enable online deletion, set &lt;code&gt;ONLINE_DELETE&lt;/code&gt; setting in &lt;code&gt;.env&lt;/code&gt; file to the number of latest validated ledgers you wish to keep.&lt;/p&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%2Fuphk6k0lfhlyzfz0ug4o.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%2Fuphk6k0lfhlyzfz0ug4o.png" alt="ONLINE_DELETE" width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To store validations from the last 10 days approx, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ONLINE_DELETE = 250000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or, to store validations from the last 1 month approx, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ONLINE_DELETE = 660000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If needed, MongoDB collection may be compacted to free up disk space and return it back to the OS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm run online-delete compact
[online-delete] Compact validations collection: 344 MB freed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The XRPScan team is committed to running a long term Hermes node and will add disk capacity if possible. As of today, we store more than 676 Million validation messages and are happy to serve anyone who wishes to peer.&lt;/p&gt;

&lt;p&gt;However with this addition we hope the node operators would be able to have better control over their resource usage and associated costs.&lt;/p&gt;

</description>
      <category>xrpl</category>
      <category>xrp</category>
      <category>rippled</category>
      <category>hermes</category>
    </item>
    <item>
      <title>Hermes: XRPL Validation message service</title>
      <dc:creator>XRPSCAN Engineering</dc:creator>
      <pubDate>Sat, 20 Aug 2022 15:39:00 +0000</pubDate>
      <link>https://dev.to/xrpscan/hermes-xrpl-validation-message-service-29dp</link>
      <guid>https://dev.to/xrpscan/hermes-xrpl-validation-message-service-29dp</guid>
      <description>&lt;p&gt;&lt;a href="https://xrpscan.com/" rel="noopener noreferrer"&gt;XRPScan&lt;/a&gt; is one of the most popular XRPL explorer and network analysis platform. Our &lt;a href="https://xrpscan.com/amendments" rel="noopener noreferrer"&gt;Amendments&lt;/a&gt; and &lt;a href="https://xrpscan.com/validators" rel="noopener noreferrer"&gt;Validators&lt;/a&gt; registry is widely used by the community to keep track of the state of the XRP Ledger.&lt;/p&gt;

&lt;p&gt;Validator agreement data is generated on the basis of validations emitted by the validators. However, these validations are not on-ledger. There are a few sources that track validator agreement, but none that we're aware of are 100% resilient or supported.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Hermes (Beta)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/xrpscan/hermes" rel="noopener noreferrer"&gt;Hermes&lt;/a&gt; is a layer 2 messaging network for storing and relaying XRPL validation messages. Hermes servers can be linked together to create a P2P network to spool &lt;code&gt;validationReceived&lt;/code&gt; messages emitted by rippled.&lt;/p&gt;

&lt;p&gt;Validation messages are ephemeral, therefore they must be saved as soon as they're emitted. If a service processing XRPL Validation messages need to be momentarily offline (due to an outage, service restart or upgrade), it can fetch missing Validation messages from the Hermes network. Hermes server offers data access via REST and gRPC endpoints.&lt;/p&gt;

&lt;p&gt;Access to historical validation messages opens the possibility of evaluating validators for their robustness or for inclusion/exclusion from UNLs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&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%2F20jo7jwbi1zo5bxhgv8w.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%2F20jo7jwbi1zo5bxhgv8w.png" alt="Hermes architecture" width="800" height="646"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Hermes server is tested on Linux. It needs &lt;strong&gt;OpenSSL&lt;/strong&gt; binaries, &lt;strong&gt;MongoDB&lt;/strong&gt;, access to &lt;strong&gt;rippled&lt;/strong&gt; and &lt;strong&gt;Node.js&lt;/strong&gt; runtime.&lt;/p&gt;

&lt;p&gt;Please follow &lt;a href="https://github.com/xrpscan/hermes#installation" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt; to run Hermes locally and peer with other nodes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommendations
&lt;/h2&gt;

&lt;p&gt;Assuming 3.85 seconds ledger interval time, polling every 1 hour and fetching 2000 ledger validations may provide a good balance between data coverage and network traffic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PEERSYNC_ENABLED = true
PEERSYNC_POLL_INTERVAL = 3600
PEERSYNC_FETCH_DEPTH = 2000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance test
&lt;/h2&gt;

&lt;p&gt;XRPL closes roughly &lt;strong&gt;21,500&lt;/strong&gt; ledgers a day. To do this, it generates more than &lt;strong&gt;3.4 Million&lt;/strong&gt; (mainnet and other nets) validation messages every day. We performed a simple test on our test server to measure how much time it takes to sync mainnet validation messages from the p2p network.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Range&lt;/th&gt;
&lt;th&gt;Ledgers&lt;/th&gt;
&lt;th&gt;Validations&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1 hour&lt;/td&gt;
&lt;td&gt;898&lt;/td&gt;
&lt;td&gt;117,021&lt;/td&gt;
&lt;td&gt;0m3.051s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 day&lt;/td&gt;
&lt;td&gt;21,501&lt;/td&gt;
&lt;td&gt;2,791,281&lt;/td&gt;
&lt;td&gt;1m1.338s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;all&lt;/td&gt;
&lt;td&gt;391,058&lt;/td&gt;
&lt;td&gt;34,322,489&lt;/td&gt;
&lt;td&gt;13m11.065s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Beta participants
&lt;/h2&gt;

&lt;p&gt;Following Hermes servers are available for beta testing. If you're willing to run an instance and would like to peer with us, use this endpoint:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://vms.test.xrpscan.com/" rel="noopener noreferrer"&gt;vms.test.xrpscan.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What can be improved
&lt;/h2&gt;

&lt;p&gt;Hermes servers collect validation messages directly from the rippled servers they're connected to, therefore a lot of peersync response contains duplicate validation messages. To optimize data transferred over the p2p network, Hermes would need to add a de-duplication strategy at the request time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We hope this project provides a way to persist validation messages and allow granular access to validator performance data. Our goal is to provide high-quality validation data, so the network operators can make objective decisions about their UNLs.&lt;/p&gt;

&lt;p&gt;If you're running a Hermes server, we'd love to peer with your node. Please &lt;a href="https://twitter.com/xrpscan" rel="noopener noreferrer"&gt;contact us&lt;/a&gt; and we'd get peering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thank you
&lt;/h2&gt;

&lt;p&gt;Thank you to &lt;a href="https://xrplgrants.org/" rel="noopener noreferrer"&gt;XPRL Grants&lt;/a&gt; for sponsoring this project. A special thank you to &lt;a href="https://foundation.xrpl.org/" rel="noopener noreferrer"&gt;XRPL Foundation&lt;/a&gt; for providing testing infrastructure, and to &lt;a href="https://twitter.com/nixerFFM" rel="noopener noreferrer"&gt;nixerFFM&lt;/a&gt; for independently running various Hermes prototypes.&lt;/p&gt;




</description>
    </item>
  </channel>
</rss>
