<?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"><channel><title><![CDATA[Celestia Thailand]]></title><description><![CDATA[Celestia Thailand]]></description><link>https://celestia-thailand.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 20 Jun 2026 02:55:32 GMT</lastBuildDate><atom:link href="https://celestia-thailand.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[EP 1: From CLI to Code — Bring Your Data to Celestia DA]]></title><description><![CDATA[จากบทความที่แล้ว เราได้ลองไปเล่น DA บน Celestia Network ผ่าน CLI กันไปบ้างแล้วใช่ไหม ใครยังไม่ได้ลอง อ่านรายละเอียดได้จากที่นี้เลย https://celestia-thailand.hashnode.dev/submit-blob-celestia

คราวนี้เราจะนำ DA ของ Celestia ไปต่อยอดละ โดยจะนำไปพัฒนา d...]]></description><link>https://celestia-thailand.hashnode.dev/on-chain-todo-celestia-da-ep1</link><guid isPermaLink="true">https://celestia-thailand.hashnode.dev/on-chain-todo-celestia-da-ep1</guid><category><![CDATA[celestia-thailand]]></category><category><![CDATA[Celestia]]></category><dc:creator><![CDATA[POR ContributionDAO]]></dc:creator><pubDate>Mon, 13 Oct 2025 06:19:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1760336317255/6b5b7294-ad40-4683-a74a-36531b7eee41.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>จากบทความที่แล้ว เราได้ลองไปเล่น DA บน Celestia Network ผ่าน CLI กันไปบ้างแล้วใช่ไหม ใครยังไม่ได้ลอง อ่านรายละเอียดได้จากที่นี้เลย <a target="_blank" href="https://celestia-thailand.hashnode.dev/submit-blob-celestia">https://celestia-thailand.hashnode.dev/submit-blob-celestia</a></p>
<hr />
<p>คราวนี้เราจะนำ DA ของ Celestia ไปต่อยอดละ โดยจะนำไปพัฒนา dApp ง่ายที่พวกเราน่าจะคุ้นเคยกันอยู่ แล้วนั้นคือ TODO dApp นั้นเอง โดยข้อมูลทั้งหมดเราจะเก็บขึ้น on-chain ทั้งหมด พร้อมแล้วไปเริ่มกันเลย</p>
<p><strong>เตรียมตัวกันก่อน</strong></p>
<ul>
<li><p>Celestia light node (Testnet network) จากบทความก่อนหน้า ติดตั้งให้เรียบร้อย ทำหน้าที่เป็นเหมือน Database onchain เพื่อเก็บข้อมูลของ Todo แล้วเรายังสามารถเรียกข้อมูลกลับมาเมื่อไหร่ก็ได้ โดยที่ข้อมูลนั้นจะไม่เปลี่ยนไป หรือมีใครมาแก้ไขมันได้</p>
</li>
<li><p>Go lang ติดตั้งให้เรียบร้อย เราจะใช้เป็น Logic ให้กับ Application เป็นเหมือนคนคอยจัดการข้อมูลก่อนส่งไปที่ Data Layer</p>
</li>
</ul>
<h1 id="heading-kirguydgukpgultguyjgukhguydguilgulxguklgujnguylguitguyrgujtguihgulhgujkqkg"><strong>เริ่มเขียนโค๊ดกัน</strong></h1>
<p><strong>Initialize Golang module</strong></p>
<pre><code class="lang-bash">go mod init todois-dapp
</code></pre>
<p><strong>ติดตั้ง package</strong></p>
<pre><code class="lang-bash">go get github.com/celestiaorg/celestia-openrpc@v0.5.0
</code></pre>
<p>สำหรับ packgage <a target="_blank" href="http://github.com/celestiaorg/celestia-openrpc%60"><code>github.com/celestiaorg/celestia-openrpc</code></a> จะมีการลง package ที่ทาง celestia เป็นคนทำขึ้นมา ดังนั้นเราจะต้องทำการ replace package เพื่อให้ Application ของเราสามารถทำงานได้ ซึ่งต้องไปแก้ไขในไฟล์ <code>go.mod</code></p>
<pre><code class="lang-go">replace (
 github.com/cosmos/cosmos-sdk =&gt; github.com/celestiaorg/cosmos-sdk v1<span class="hljs-number">.28</span><span class="hljs-number">.2</span>-sdk-v0<span class="hljs-number">.46</span><span class="hljs-number">.16</span>
 github.com/filecoin-project/dagstore =&gt; github.com/celestiaorg/dagstore v0<span class="hljs-number">.0</span><span class="hljs-number">.0</span><span class="hljs-number">-20230824094345</span><span class="hljs-number">-537</span>c012aa403
 github.com/gogo/protobuf =&gt; github.com/regen-network/protobuf v1<span class="hljs-number">.3</span><span class="hljs-number">.3</span>-alpha.regen<span class="hljs-number">.1</span>
 github.com/ipfs/boxo =&gt; github.com/celestiaorg/boxo v0<span class="hljs-number">.29</span><span class="hljs-number">.0</span>-fork
 github.com/syndtr/goleveldb =&gt; github.com/syndtr/goleveldb v1<span class="hljs-number">.0</span><span class="hljs-number">.1</span><span class="hljs-number">-0.20210819022825</span><span class="hljs-number">-2</span>ae1ddf74ef7
 github.com/tendermint/tendermint =&gt; github.com/celestiaorg/celestia-core v1<span class="hljs-number">.51</span><span class="hljs-number">.0</span>-tm-v0<span class="hljs-number">.34</span><span class="hljs-number">.35</span>
)
</code></pre>
<p>เสร็จจากตรงนี้ เราก็มีเตรียมตัวพร้อมที่จะไปเขียนในส่วนของ Logic ในการนำข้อมูลจาก TODO ขึ้น DA ของ Celestia Network</p>
<p><strong>ส่งข้อมูลขึ้น DA ของ Celestia network</strong></p>
<p>เริ่มจากเราต้องมี Light node ก่อน (ดูจากบทความที่แล้วได้นะ) เพื่อเป็นตัวกลางในการคุยกับ Celestia Data Availability แล้วเราจะได้ Light node endpoint มา</p>
<p>กำหนด Light node URL</p>
<pre><code class="lang-go">url := <span class="hljs-string">"http://localhost:26658"</span>
</code></pre>
<p>สร้าง Celestia client</p>
<pre><code class="lang-go"> ctx, cancel := context.WithTimeout(context.Background(), <span class="hljs-number">5</span>*time.Minute)
 <span class="hljs-keyword">defer</span> cancel()

 <span class="hljs-comment">// สร้าง Celestia Client</span>
 c, err := client.NewClient(ctx, url, <span class="hljs-string">""</span>)
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> err
 }
 <span class="hljs-keyword">defer</span> c.Close()
</code></pre>
<p>กำหนด Namespace ให้กับข้อมูลของเรา</p>
<pre><code class="lang-go"><span class="hljs-comment">// กำหนด application namespace</span>
namespace := <span class="hljs-string">"todoist"</span>

<span class="hljs-comment">// convert เป็น byte</span>
namespaceBytes := []<span class="hljs-keyword">byte</span>(namespace)

<span class="hljs-comment">// convert ให้เป้น namespace id</span>
 ns, err := share.NewBlobNamespaceV0([]<span class="hljs-keyword">byte</span>(d.Namespace()))
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> err
 }
</code></pre>
<p>ทำการสร้างข้อมูล (เป็นตัวอย่างก่อนนะ)</p>
<pre><code class="lang-go"> data := <span class="hljs-string">`[{ "title": "todo 1"}]`</span>

<span class="hljs-comment">// สร้าง blob จาก string โดยใช้เป็น v0</span>
 b, err := blob.NewBlobV0(ns, data)
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> err
 }
</code></pre>
<p>เมื่อนำทุกอย่างมารวมร่างกัน</p>
<pre><code class="lang-go"><span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">SubmitData</span><span class="hljs-params">()</span> <span class="hljs-title">uint64</span>, <span class="hljs-title">error</span></span> {
 url := <span class="hljs-string">"http://localhost:26658"</span>
 token := <span class="hljs-string">""</span>

 ctx, cancel := context.WithTimeout(context.Background(), <span class="hljs-number">5</span>*time.Minute)
 <span class="hljs-keyword">defer</span> cancel()

 c, err := client.NewClient(ctx, url, token)
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>, err
 }
 <span class="hljs-keyword">defer</span> c.Close()

 ns, err := share.NewBlobNamespaceV0([]<span class="hljs-keyword">byte</span>(d.Namespace()))
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>, err
 }

 <span class="hljs-comment">// Submit the data as a blob</span>
 b, err := blob.NewBlobV0(ns, data)
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>, err
 }

 opts := &amp;blob.SubmitOptions{}
 height, err := c.Blob.Submit(ctx, []*blob.Blob{b}, opts)
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>, err
 }

  <span class="hljs-comment">// ส่ง height กลับไป เพื่อใช้ในการดึงข้อมูล</span>
  <span class="hljs-comment">// height = 10485</span>
  <span class="hljs-keyword">return</span> height, <span class="hljs-literal">nil</span>
}
</code></pre>
<p>จากตรงนี้เราก็จะได้ function ในการส่งข้อมูลขึ้นไปเก็บที่ Celestia network แล้ว</p>
<p><strong>อ่านข้อมูลจาก DA</strong></p>
<p>กำหนด Light node URL</p>
<pre><code class="lang-go">url := <span class="hljs-string">"http://localhost:26658"</span>
</code></pre>
<p>สร้าง Celestia Client เหมือนเดิม</p>
<pre><code class="lang-go"> ctx, cancel := context.WithTimeout(context.Background(), <span class="hljs-number">5</span>*time.Minute)
 <span class="hljs-keyword">defer</span> cancel()

 c, err := client.NewClient(ctx, url, <span class="hljs-string">""</span>)
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>, err
 }
 <span class="hljs-keyword">defer</span> c.Close()
</code></pre>
<p>กำหนด Namespace ที่เราจะใช้อ่านข้อมูลจาก Celestia network</p>
<pre><code class="lang-go"><span class="hljs-comment">// กำหนด application namespace</span>
namespace := <span class="hljs-string">"todoist"</span>
<span class="hljs-comment">// convert เป็น byte</span>
namespaceBytes := []<span class="hljs-keyword">byte</span>(namespace)

<span class="hljs-comment">// convert ให้เป้น namespace id</span>
 ns, err := share.NewBlobNamespaceV0([]<span class="hljs-keyword">byte</span>(d.Namespace()))
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> err
 }
</code></pre>
<p>เรียกข้อมูล โดยเราจะอ้างอิงจาก Height จากขั้นตอนแรก</p>
<pre><code class="lang-go">height := <span class="hljs-number">10485</span>

 got, err := c.Blob.GetAll(ctx, height, []share.Namespace{ns})
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>, err
 }

 <span class="hljs-keyword">if</span> <span class="hljs-built_in">len</span>(got) == <span class="hljs-number">0</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>, fmt.Errorf(<span class="hljs-string">"no blobs found"</span>)
 }

 data := got[<span class="hljs-number">0</span>].Data
</code></pre>
<p>นำทุกอย่างมารวมกันอีกครั้ง</p>
<pre><code class="lang-go"><span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">Get</span><span class="hljs-params">()</span> <span class="hljs-params">(<span class="hljs-keyword">string</span>, error)</span></span> {
 url := <span class="hljs-string">"http://localhost:26658"</span>
 token := <span class="hljs-string">""</span>

 <span class="hljs-comment">// height จากการ submit data</span>
 height := <span class="hljs-number">10485</span>

 ctx, cancel := context.WithTimeout(context.Background(), <span class="hljs-number">5</span>*time.Minute)
 <span class="hljs-keyword">defer</span> cancel()

 c, err := client.NewClient(ctx, url, token)
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>, err
 }
 <span class="hljs-keyword">defer</span> c.Close()

 ns, err := share.NewBlobNamespaceV0([]<span class="hljs-keyword">byte</span>(d.Namespace()))
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>, err
 }

 got, err := c.Blob.GetAll(ctx, height, []share.Namespace{ns})
 <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>, err
 }

 <span class="hljs-keyword">if</span> <span class="hljs-built_in">len</span>(got) == <span class="hljs-number">0</span> {
  <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>, fmt.Errorf(<span class="hljs-string">"no blobs found"</span>)
 }

 <span class="hljs-keyword">return</span> <span class="hljs-keyword">string</span>(got[<span class="hljs-number">0</span>].Data), <span class="hljs-literal">nil</span>
}
</code></pre>
<p>จากทั้งหมดนี้ เราจะได้ function ทั้งหมดละ ในการส่งข้อมูล เเละอ่านข้อมูลจาก DA ของ Celestia ขั้นตอนถัดไปเราจะสร้าง HTTP server (API) เพื่อเรียกใช้งาน function ดังกล่าว ลองเอาไปเล่นกันดูนะ เดียวรอบหน้าเราจะมาประกอบล่างกันต่อ</p>
<p>เจอกันครับ</p>
<p><em>by NUT | ContributionDAO</em></p>
]]></content:encoded></item><item><title><![CDATA[🧱 ก้าวแรกกับ Blob บน Celestia Network]]></title><description><![CDATA[สวัสดี Celestia คืออะไร… เราจะไม่พูดถึงกันละนะ เพราะทุกคนพอจะเข้าใจหลักการพื้นฐานละ แต่ถ้าจะสรุปง่ายๆ คือ
Celestia คือบล็อกเชนแบบ Modular ที่ทำหน้าที่เก็บและยืนยันความถูกต้องของข้อมูล (Data Availability) เพื่อให้บล็อกเชนอื่นหรือ Rollup สามารถโฟกัสที่...]]></description><link>https://celestia-thailand.hashnode.dev/submit-blob-celestia</link><guid isPermaLink="true">https://celestia-thailand.hashnode.dev/submit-blob-celestia</guid><category><![CDATA[lightnode]]></category><category><![CDATA[celestiathailand]]></category><category><![CDATA[Celestia]]></category><category><![CDATA[blob]]></category><dc:creator><![CDATA[POR ContributionDAO]]></dc:creator><pubDate>Thu, 09 Oct 2025 09:09:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1760022272412/aa67dfef-140d-45cc-bf5b-8d7025b696d6.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>สวัสดี Celestia คืออะไร… เราจะไม่พูดถึงกันละนะ เพราะทุกคนพอจะเข้าใจหลักการพื้นฐานละ แต่ถ้าจะสรุปง่ายๆ คือ</p>
<p>Celestia คือบล็อกเชนแบบ Modular ที่ทำหน้าที่เก็บและยืนยันความถูกต้องของข้อมูล (Data Availability) เพื่อให้บล็อกเชนอื่นหรือ Rollup สามารถโฟกัสที่การประมวลผลธุรกรรมได้โดยไม่ต้องสร้างระบบเก็บข้อมูลเอง</p>
<p>ถ้าอยากศึกษาข้อมูลเพิ่มเติม เราช่วยเปิดวาปให้ได้</p>
<ul>
<li><p><a target="_blank" href="https://www.encodeclub.com/programmes/camp-mamo">https://www.encodeclub.com/programmes/camp-mamo</a> สมัครได้เลย เนื้อหาเเน่น</p>
</li>
<li><p><a target="_blank" href="https://x.com/CryptolyticLabs/status/1951231510406942730?t=2jX1MSXjpxvyPKqzgA-p2g&amp;s=19">https://x.com/CryptolyticLabs/status/1951231510406942730?t=2jX1MSXjpxvyPKqzgA-p2g&amp;s=19</a> ข้อมูลเขิงลึก เอาแบบอ่านให้มึนกันไปข้างนึง</p>
</li>
</ul>
<hr />
<p>เอาละ มาดูกันว่าระบบ Data Availability (DA) ของ Celestia นั้น เราจะ ใช้งานจริง ได้อย่างไร — วันนี้เราจะลองมาส่ง ก้อนข้อมูล (Blob) ขึ้นไปเก็บไว้บนเครือข่าย Celestia ด้วยคำสั่ง CLI กันแบบ step-by-step</p>
<p>📦 Blob Data คืออะไร?</p>
<p>ใน Celestia คำว่า Blob ก็คือ ก้อนข้อมูล ที่เราต้องการส่งไปเก็บบน DA Layer</p>
<p>Blob อาจเป็นข้อมูลธุรกรรม, ข้อมูลจาก Rollup, หรือข้อมูลที่ต้องการให้ทุกคนในระบบสามารถเข้าถึงได้ โดยไม่จำเป็นต้องรู้เนื้อหาภายใน เพราะฉะนั้นมาเข้าเนื้อหาหลักกัน วันนี้เรามาเรียนรู้กันเเบบง่ายๆว่า เราจะส่ง ก้อนข้อมูล เหล่านั้นขึ้นไปเก็บยัง Celestia network ได้อย่างไร</p>
<p>ขั้นตอนทั้งหมด เราทำผ่าน ubuntu นะ ง่ายดี ถ้าใคร window, osx ก็ลองปรับกันดูนะ</p>
<ol>
<li><p><strong>ติดตั้ง Celestia binary</strong></p>
<pre><code class="lang-bash"> <span class="hljs-comment"># รันสคริปต์ติดตั้ง (จะ detect OS &amp; architecture ให้)</span>
 bash -c <span class="hljs-string">"<span class="hljs-subst">$(curl -sL https://docs.celestia.org/celestia-node.sh)</span>"</span> -- -v v0.27.3-mocha
</code></pre>
<p> หรือดูข้อมูลได้จากที่นี้นะ <a target="_blank" href="https://docs.celestia.org/how-to-guides/celestia-node?utm_source=chatgpt.com">https://docs.celestia.org/how-to-guides/celestia-node?utm_source=chatgpt.com</a> ซึ่งเราจะไปกันที่ Testnet กันก่อนนะ (Testnet ก็เหมือน Dev Env นั้นเอง) หลังติดตั้งแล้ว ให้ตรวจสอบข้อมูลว่าติดตั้งสำเร็จหรือไม่</p>
<pre><code class="lang-bash"> celestia version
 <span class="hljs-comment">#ตัวอย่างผลลัพธ์ที่ได้</span>
 Semantic version: 0.26.4
 Commit: 1b84e2b3f0df39a6f2197096fb2a58d9cd250687
 Build Date: 2025-10-06T12:07:26Z
 System version: arm64/darwin
 Golang version: go1.24.7
</code></pre>
</li>
<li><p><strong>รัน light node</strong></p>
<p> Light Node คือ โหนดขนาดเล็ก ของ Celestia ที่สามารถ ตรวจสอบความถูกต้องของข้อมูล (Data Availability) ได้โดย ไม่ต้องโหลดบล็อกทั้งหมดเหมือน Full Node เพราะต้องโหลดข้อมูลขนาดใหญ่ ซึ่งจะทำให้เราสามารถ</p>
<ul>
<li><p>ตรวจสอบว่า Blob ที่ถูกส่งขึ้นมานั้น มีอยู่จริง</p>
</li>
<li><p>ทดสอบการส่งข้อมูลผ่าน CLI ได้โดยไม่ต้องรัน full node</p>
</li>
<li><p>ใช้ในการเชื่อมต่อกับ DApp หรือ Rollup เพื่ออ่านข้อมูลได้</p>
</li>
</ul>
</li>
</ol>
<pre><code class="lang-bash">    <span class="hljs-comment">#กำหนดค่าเริ่มต้นสำหรับ Testnet</span>
    celestia light init --p2p.network mocha
</code></pre>
<p>    มีข้อพึ่งระวังหน่อยในขั้นตอน init เราต้องเก็บข้อมูลชุดรหัสลับของกระเป๋าเราให้ดีๆนะ ซึ่งจะมีลักษณะข้อมูลเเบบนี้ พยายามเก็บอย่าให้หายเด็ดขาด เพราะถ้าหาย เราจะไม่สามารถเข้าถึงกระเป๋านี้ได้อีกต่อไป</p>
<pre><code class="lang-bash">    NAME: my_celes_key
    ADDRESS: celestia1cv5mxev9c90my8wu8cfvejyrgc36ul9t3qpuy8
    MNEMONIC (save this somewhere safe!!!):
</code></pre>
<p>    สั่ง Start light node เพื่อทำการซิงค์ข้อมูล</p>
<pre><code class="lang-bash">    celestia light start --core.ip rpc-mocha.pops.one --core.port 9090 --p2p.network mocha
</code></pre>
<p>    ใน Log เราจะเห็นหน้าตาประมาณนี้</p>
<pre><code class="lang-bash">    2025-10-08T14:02:25.459Z    INFO    header/store    store/store.go:614    new head    {<span class="hljs-string">"height"</span>: 7849464, <span class="hljs-string">"hash"</span>: <span class="hljs-string">"0097389D9D4B7D4B5E252D4ED5F4A7D56EEEEB3333A0F13211AE3E20C5ED99DA"</span>}
    2025-10-08T14:02:25.546Z    INFO    das    das/worker.go:95    finished sampling headers    {<span class="hljs-string">"type"</span>: <span class="hljs-string">"catchup"</span>, <span class="hljs-string">"from"</span>: 7808648, <span class="hljs-string">"to"</span>: 7808747, <span class="hljs-string">"errors"</span>: 0, <span class="hljs-string">"# of headers skipped as outside of sampling window"</span>: 0, <span class="hljs-string">"finished (s)"</span>: 2.653042843}
    ...
    ...
    2025-10-08T14:13:07.960Z    INFO    header/store    store/store.go:614    new head    {<span class="hljs-string">"height"</span>: 7899622, <span class="hljs-string">"hash"</span>: <span class="hljs-string">"F5E27D74FD2FEDA93BA9AB87772EAEF951FE46C35F7D0E47E81F830CE9551F9E"</span>}
    2025-10-08T14:13:08.432Z    INFO    das    das/worker.go:164    sampled header    {<span class="hljs-string">"type"</span>: <span class="hljs-string">"recent"</span>, <span class="hljs-string">"height"</span>: 7899622, <span class="hljs-string">"hash"</span>: <span class="hljs-string">"F5E27D74FD2FEDA93BA9AB87772EAEF951FE46C35F7D0E47E81F830CE9551F9E"</span>, <span class="hljs-string">"EDS square width"</span>: 4, <span class="hljs-string">"data root"</span>: <span class="hljs-string">"B65FAD9FD404E88ABE6886CC64929899C0FCA5449F83C942E6AC72788F54B8C3"</span>, <span class="hljs-string">"finished (s)"</span>: 0.472149806}
</code></pre>
<p>    ซึ่งเราสามารถนำ height ไปเช็คได้ว่าเราทำซิงค์เสร็จสิ้นแล้วหรือยัง</p>
<ul>
<li><p><a target="_blank" href="https://www.mintscan.io/celestia">https://www.mintscan.io/celestia</a> สำหรับ Mainnet</p>
</li>
<li><p><a target="_blank" href="https://www.mintscan.io/celestia-testnet">https://www.mintscan.io/celestia-testnet</a> สำหรับ Testnet</p>
</li>
</ul>
<ol start="3">
<li><p><strong>ส่งก้อนข้อมูลขึ้น Celestia network</strong></p>
<p> เมื่อทุกอย่างพร้อมแล้ว เราต้องมี TIA token ก่อนเพื่อเป็น gas (ค่าธรรมเนียมในการธุรกรรม) สามารถหาซื้อ TIA ได้จากกระดานเทรด หรือกรณี Testnet สามารถขอได้จาก Discord ของ Celestia ที่นี้ <a target="_blank" href="https://discord.gg/e3ZxQRv9">https://discord.gg/e3ZxQRv9</a></p>
<p> โอเครเมื่อมีทุกอย่างพร้อมแล้วมาลุยเลย เราจะส่งก้อนข้อมูลผ่านคำสั่งอย่างง่ายตามตัวอย่างด้านล่าง</p>
<pre><code class="lang-bash"> celestia blob submit [namespace] [blobData]
</code></pre>
<p> มาดูกันว่าแต่ละข้อมูลคืออะไรบ้าง</p>
<ul>
<li><p>namesapce จะเป็นส่วนของการจัดกลุ่มของข้อมูล หรือการอ้างอิงข้อมูลนั้นเอง ซึ่งส่วนประกอบของ namesapce จะประกอบไปด้วย</p>
<ul>
<li><p>version: 1 ไบต์ บอกรูปแบบของ namespace</p>
</li>
<li><p>id: ไบต์ยาว 28 ไบต์ ที่เป็นตัวระบุ namespace จริง</p>
<p>  ตัวอย่างเช่น</p>
<pre><code class="lang-bash">  00000000000000000000000000000000000042690c204d39600fddd3
</code></pre>
<ul>
<li><p>ข้อมูลชุดแรก <code>000000000000000000000000000000000000</code> ซึ่งจะเป็น version อยู่ในรูปแบบของ Hex</p>
</li>
<li><p>ข้อมูลชุดที่สอง <code>42690c204d39600fddd3</code> จะเป็น id อยู่ในรูปแบบของ Hex</p>
</li>
</ul>
</li>
<li><p>blobData คือกลุ่มข้อมูลที่จะส่งไปนั้นเอง</p>
</li>
</ul>
</li>
<li><p>มาเริ่มส่งข้อมูลกัน</p>
<pre><code class="lang-json">  celestia blob submit <span class="hljs-number">0x63656c65737469617468</span> <span class="hljs-string">"Hello Celestia Thailand"</span>
</code></pre>
<pre><code class="lang-json">  {
    <span class="hljs-attr">"result"</span>: {
      <span class="hljs-attr">"height"</span>: <span class="hljs-number">8345883</span>,
      <span class="hljs-attr">"commitments"</span>: [
        <span class="hljs-string">"0x3bb22be1da941acd080ebcaae66ecefe2369c6128410bd595baba362b9c2aff9"</span>
      ]
    }
  }
</code></pre>
</li>
</ul>
</li>
</ol>
<p>    เรียบร้อยข้อมูลของเราได้ถูกส่งไปยัง Celestia network แล้ว :)</p>
<ol start="4">
<li><p><strong>เรียกดูข้อมูล</strong></p>
<p> หลังจากที่เราได้ทำการส่งข้อมูลไปที่ Celestia network แล้วเราก็สามารถเรียกดูข้อมูลเหล่านั้นได้ด้วยคำส่งด้านล่างนี้</p>
<pre><code class="lang-json"> celestia blob get-all [height] [namespace]
</code></pre>
<p> เพราะฉะนั้นจากข้อมูลก่อนหน้านี้คำสั่งที่เราจะเรียกดูข้อมูลจะเป็น</p>
<pre><code class="lang-json"> celestia blob get-all <span class="hljs-number">7912490</span> <span class="hljs-number">0x63656c65737469617468</span>
</code></pre>
<p> ผลลัพธ์ที่ได้จะเป็น</p>
<pre><code class="lang-json"> {
   <span class="hljs-attr">"result"</span>: [
     {
       <span class="hljs-attr">"namespace"</span>: <span class="hljs-string">"0x63656c65737469617468"</span>,
       <span class="hljs-attr">"data"</span>: <span class="hljs-string">"0xHello Celestia Thailand"</span>,
       <span class="hljs-attr">"share_version"</span>: <span class="hljs-number">0</span>,
       <span class="hljs-attr">"commitment"</span>: <span class="hljs-string">"0x3bb22be1da941acd080ebcaae66ecefe2369c6128410bd595baba362b9c2aff9"</span>,
       <span class="hljs-attr">"index"</span>: <span class="hljs-number">1</span>
     }
   ]
 }
</code></pre>
<p> เห็นไหมครับ ง่ายมาก 🎉 Blob ของเราถูกบันทึกไว้ใน Data Availability layer ของ Celestia แล้ว หมายความว่าข้อมูลนี้ เข้าถึงได้ตลอดเวลา และ ยืนยันความถูกต้องได้ หรือจะดูข้อมูลผ่าน explorer ก็ทำได้เช่นที่ <a target="_blank" href="https://mocha.celenium.io/tx/107bab7426bc49e8ca20782bd8c12b9c6639294cc3df9c9dd6f11d621cba6f31?tab=messages">https://mocha.celenium.io/tx/107bab7426bc49e8ca20782bd8c12b9c6639294cc3df9c9dd6f11d621cba6f31?tab=messages</a></p>
</li>
</ol>
<p>วันนี้พอกันแค่นี้ก่อนนะ แค่อยากยกตัวอย่างเเบบง่ายๆทให้เห็นการใช้งาน รอบหน้าเราจะมาพัฒนา dApp ที่ทำการส่งข้อมูลไปเก็บบน Celestia กัน</p>
]]></content:encoded></item></channel></rss>