<?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: NOVAInetwork</title>
    <description>The latest articles on DEV Community by NOVAInetwork (@0xdevc).</description>
    <link>https://dev.to/0xdevc</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%2F3898802%2Fe797d15e-1e95-4646-8ada-b97a915c30a8.png</url>
      <title>DEV Community: NOVAInetwork</title>
      <link>https://dev.to/0xdevc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/0xdevc"/>
    <language>en</language>
    <item>
      <title>I'm 18 and I built a Layer 1 blockchain from scratch in Rust</title>
      <dc:creator>NOVAInetwork</dc:creator>
      <pubDate>Mon, 27 Apr 2026 13:42:36 +0000</pubDate>
      <link>https://dev.to/0xdevc/im-18-and-i-built-a-layer-1-blockchain-from-scratch-in-rust-2e6n</link>
      <guid>https://dev.to/0xdevc/im-18-and-i-built-a-layer-1-blockchain-from-scratch-in-rust-2e6n</guid>
      <description>&lt;p&gt;I'm 18 and I'm building NOVAI, an AI-native Layer 1 blockchain written from scratch in Rust. This week I went open source and shipped a full set of developer docs. Here's everything that landed.&lt;/p&gt;




&lt;h2&gt;
  
  
  The project
&lt;/h2&gt;

&lt;p&gt;NOVAI is a Layer 1 blockchain where AI entities are protocol primitives, not smart contracts. Most "AI blockchains" bolt AI onto an existing VM through oracle calls or contract wrappers. NOVAI does it differently. AI entities exist at the same level as accounts and validators. They have on-chain identity, persistent memory, economic balance, and capability flags. All enforced at the protocol layer.&lt;/p&gt;

&lt;p&gt;There is no smart contract VM. No WASM runtime. Every transaction type is a native protocol operation.&lt;/p&gt;

&lt;p&gt;The entire codebase is clean-room. No code from Substrate, Tendermint, Cosmos SDK, or any other implementation. 65,000+ lines of Rust across 16 crates, 1,100+ tests, zero unsafe code.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/0x-devc/NOVAI-node" rel="noopener noreferrer"&gt;github.com/0x-devc/NOVAI-node&lt;/a&gt;&lt;br&gt;
Website: &lt;a href="https://novai.network" rel="noopener noreferrer"&gt;novai.network&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What makes NOVAI different
&lt;/h2&gt;

&lt;p&gt;On most blockchains, "AI integration" means an off-chain model that pokes the chain through oracle calls or contract wrappers. The AI runs somewhere else. The chain just stores the result.&lt;/p&gt;

&lt;p&gt;NOVAI puts AI entities inside the protocol. An entity is a first-class on-chain identity that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Holds its own balance and pays its own fees&lt;/li&gt;
&lt;li&gt;Has its own Ed25519 signing key and signs its own transactions&lt;/li&gt;
&lt;li&gt;Publishes signal commitments (anomaly, prediction, risk-score, and 4 more types)&lt;/li&gt;
&lt;li&gt;Owns persistent memory objects (chain summaries, statistics snapshots, anomaly logs)&lt;/li&gt;
&lt;li&gt;Has governance-controlled autonomy modes and capability flags&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The chain doesn't need to interpret bytecode to understand what an entity is doing. Every operation has known semantics at the protocol layer.&lt;/p&gt;




&lt;h2&gt;
  
  
  What shipped this week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Open source launch
&lt;/h3&gt;

&lt;p&gt;The full codebase went public under Apache 2.0. Git history was cleaned. CI is green on GitHub Actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Developer docs - 5 deliverables
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Quick Start Tutorial&lt;/strong&gt; - "Build Your First AI Entity on NOVAI in 10 Minutes"&lt;/p&gt;

&lt;p&gt;Step-by-step CLI walkthrough. Generate keys, fund from faucet, register an AI entity with its own signing key, publish a signal, create a memory object, query everything back. Every command and output block is real captured data from a live 4-node devnet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/0x-devc/NOVAI-node/blob/main/docs/tutorials/FIRST_AI_ENTITY.md" rel="noopener noreferrer"&gt;Read it on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. TypeScript SDK Tutorial&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;170-line working example. Connect to a node, fund an account, transfer tokens, register an AI entity, verify it on chain. Self-contained npm project. Just run &lt;code&gt;npm install &amp;amp;&amp;amp; npm start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/0x-devc/NOVAI-node/tree/main/sdk/novai-sdk-ts/examples/quick-start" rel="noopener noreferrer"&gt;See the example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Rust SDK Tutorial&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Same flow in idiomatic async Rust on tokio. Single file, runs with &lt;code&gt;cargo run --example quick-start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/0x-devc/NOVAI-node/tree/main/sdk/novai-sdk/examples/quick-start" rel="noopener noreferrer"&gt;See the example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. RPC Reference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;777 lines covering all 13 JSON-RPC endpoints. Each one has a description, parameter table, response shape, error table, and a real curl command with captured output.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/0x-devc/NOVAI-node/blob/main/docs/RPC_REFERENCE.md" rel="noopener noreferrer"&gt;Read it on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Architecture Deep Dive&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Crate-by-crate walkthrough of all 16 crates organized by dependency layer. Mermaid diagrams for the consensus flow and the transaction lifecycle. Three guided reading paths for newcomers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/0x-devc/NOVAI-node/blob/main/docs/ARCHITECTURE.md" rel="noopener noreferrer"&gt;Read it on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Block explorer
&lt;/h3&gt;

&lt;p&gt;React + Vite + Tailwind single-page app that calls the node's RPC endpoints. Live block list with 2-second polling, block detail page, account lookup, AI entity page with memory objects and signals, and a network stats dashboard. Developers run it locally against their devnet.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI entity demos
&lt;/h3&gt;

&lt;p&gt;Three runnable demos showing the AI-entity-as-protocol-primitive pattern.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Anomaly bot&lt;/strong&gt; - A TypeScript bot that registers itself as an on-chain entity, polls chain activity every 1.5 seconds, runs three heuristic detectors (empty block streaks, round spikes, stalled chains), and publishes an anomaly signal plus a memory object whenever one fires. Cooldowns prevent re-firing on the same condition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-entity demo&lt;/strong&gt; - Two bots interacting purely through the chain. Bot A (predictor) publishes prediction signals guessing future block tx counts. Bot B (risk-scorer) reads those predictions via on-chain memory objects, waits for the target block, compares predicted vs actual, and publishes a risk-score signal with the delta. No shared database. No API calls between them. Just on-chain data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CLI demo script&lt;/strong&gt; - Full entity lifecycle in bash with banner sections for blog posts or video recordings. Keygen, faucet, register, credit, signal publish, memory CRUD, query.&lt;/p&gt;

&lt;h3&gt;
  
  
  The bug fix that unblocked everything
&lt;/h3&gt;

&lt;p&gt;While building the tutorials I found that entity-signed signal and memory transactions were silently failing through the RPC path. The root cause was four handlers using the wrong lookup key. They did a primary-key lookup with an address value instead of using the reverse index that maps address to entity ID. The entity record was never found so every signal and memory transaction quietly returned an error that got swallowed.&lt;/p&gt;

&lt;p&gt;The fix was refactoring all four handlers into inner functions that take a pre-resolved entity. Added 7 regression tests that exercise the full dispatch path. Verified end-to-end on a live devnet.&lt;/p&gt;

&lt;p&gt;I wrote about a similar silent-failure bug in my first blog post: &lt;a href="https://dev.to/0xdevc/the-bug-that-silently-broke-my-entire-blockchain-how-a-single-function-rejected-trailing-bytes-4fij"&gt;The Bug That Silently Broke My Entire Blockchain&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;65,000+ lines of Rust&lt;/li&gt;
&lt;li&gt;16 crates in the workspace&lt;/li&gt;
&lt;li&gt;1,100+ tests passing&lt;/li&gt;
&lt;li&gt;30M+ blocks committed on the private testnet&lt;/li&gt;
&lt;li&gt;Zero unsafe code&lt;/li&gt;
&lt;li&gt;10 native transaction types&lt;/li&gt;
&lt;li&gt;4-validator private testnet running since early 2026&lt;/li&gt;
&lt;li&gt;HotStuff BFT consensus with 3-chain commit rule&lt;/li&gt;
&lt;li&gt;Sparse Merkle Tree state with deterministic 32-byte roots&lt;/li&gt;
&lt;li&gt;Ed25519 signatures, Blake3 hashing, Noise XX transport encryption&lt;/li&gt;
&lt;li&gt;Apache 2.0 licensed&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Public testnet. The private testnet runs on a shared VPS that causes state root divergence under sustained load. The fix is a dedicated CPU server. Once that's in place we'll have a public RPC with SSL, validator onboarding, and the block explorer deployed at explorer.novai.network.&lt;/p&gt;

&lt;p&gt;I'm also looking for a technical co-founder. I'm building this solo. If you're a Rust engineer interested in BFT consensus, on-chain AI primitives, or clean-room blockchain development, the codebase is open and PRs are welcome.&lt;/p&gt;




&lt;p&gt;Website: &lt;a href="https://novai.network" rel="noopener noreferrer"&gt;novai.network&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/0x-devc/NOVAI-node" rel="noopener noreferrer"&gt;github.com/0x-devc/NOVAI-node&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://x.com/NOVAInetwork" rel="noopener noreferrer"&gt;@NOVAInetwork&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>blockchain</category>
      <category>rust</category>
      <category>showdev</category>
    </item>
    <item>
      <title>The Bug That Silently Broke My Entire Blockchain How a single function rejected "trailing bytes" and made every block commit with zero transactions</title>
      <dc:creator>NOVAInetwork</dc:creator>
      <pubDate>Sun, 26 Apr 2026 13:29:55 +0000</pubDate>
      <link>https://dev.to/0xdevc/the-bug-that-silently-broke-my-entire-blockchain-how-a-single-function-rejected-trailing-bytes-4fij</link>
      <guid>https://dev.to/0xdevc/the-bug-that-silently-broke-my-entire-blockchain-how-a-single-function-rejected-trailing-bytes-4fij</guid>
      <description>&lt;p&gt;I spent two days debugging why my from-scratch Layer 1 blockchain committed every block with zero transactions, despite the mempool accepting them perfectly.&lt;/p&gt;

&lt;p&gt;This is the story of how I found it, what it taught me, and why silent failures are the hardest bugs in distributed systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;I'm building &lt;a href="https://github.com/0x-devc/NOVAI-node" rel="noopener noreferrer"&gt;NOVAI&lt;/a&gt;, a Layer 1 blockchain in Rust with HotStuff BFT consensus. No forks, no frameworks. Every crate written from scratch. Four validators running on a local devnet, producing blocks at around 75 per second.&lt;/p&gt;

&lt;p&gt;The chain worked perfectly. Blocks committed. QCs formed. Validators voted. Everything was green.&lt;/p&gt;

&lt;p&gt;Then I added transaction support. And every single block committed with tx_count=0.&lt;/p&gt;

&lt;h2&gt;
  
  
  The symptoms
&lt;/h2&gt;

&lt;p&gt;The RPC endpoint accepted transactions. Submitted, accepted, zero rejected. The mempool inserted them. &lt;code&gt;drain_ready&lt;/code&gt; pulled them into proposed blocks. But every committed block: zero transactions.&lt;/p&gt;

&lt;p&gt;No error logs. No panics. No warnings. The chain just kept producing empty blocks as if nothing was wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The investigation
&lt;/h2&gt;

&lt;p&gt;I started with the obvious: is the mempool shared between the RPC thread and the consensus loop? I compared Arc pointer addresses. Same instance. Same mempool.&lt;/p&gt;

&lt;p&gt;Then I checked timing. Maybe the leader's block was being replaced by an empty one from a different leader after a timeout. I found a race condition in the timeout handler where &lt;code&gt;round_start_time&lt;/code&gt; could be read before the state lock was acquired. Fixed it. Blocks still empty.&lt;/p&gt;

&lt;p&gt;Next hypothesis: only node 0 had the RPC endpoint. The other three validators had empty mempools. When they were leader (75% of the time), they proposed empty blocks. I added transaction gossip so all validators share transactions over P2P. Still empty.&lt;/p&gt;

&lt;p&gt;I added diagnostic logging at every stage of the pipeline. &lt;code&gt;PROPOSE_DIAG&lt;/code&gt;, &lt;code&gt;COMMIT_DIAG&lt;/code&gt;, &lt;code&gt;VERIFY_DIAG&lt;/code&gt;, &lt;code&gt;QC_DIAG&lt;/code&gt;. Every block showed tx_count=0 at the proposal stage. Transactions were being drained from the mempool into the proposed block, but somehow vanishing before the block reached other validators.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;Then I noticed something. The chain ran perfectly at around 75 blocks per second with empty blocks. But the moment a block contained even one transaction, the chain stalled. Timeouts fired. Round numbers escalated. No recovery.&lt;/p&gt;

&lt;p&gt;This wasn't a "transactions get lost" bug. This was a "transactions kill consensus" bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  The root cause
&lt;/h2&gt;

&lt;p&gt;Deep in the codec layer, there was a function called &lt;code&gt;decode_tx_v1_signed()&lt;/code&gt;. It decoded a single transaction from a byte buffer, then checked if there were any remaining bytes. If so, it rejected the input as "trailing bytes."&lt;/p&gt;

&lt;p&gt;This is correct behavior when decoding a standalone transaction from an RPC call. One transaction, one buffer, no leftovers.&lt;/p&gt;

&lt;p&gt;But inside &lt;code&gt;decode_block_v1()&lt;/code&gt;, the buffer contains multiple transactions concatenated together. The decoder would parse the first transaction, see the remaining transactions as "trailing bytes," and silently return an error.&lt;/p&gt;

&lt;p&gt;Every block with one or more transactions failed to decode at the network layer. Validators never received the proposal. They never voted. No quorum certificate formed. The chain stalled.&lt;/p&gt;

&lt;p&gt;The fix was one new function: &lt;code&gt;decode_tx_v1_signed_streaming()&lt;/code&gt;. It advances the cursor without checking for trailing bytes. Used exclusively inside block decoding. The original function is preserved for standalone transaction decoding where the trailing bytes check is correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened after the fix
&lt;/h2&gt;

&lt;p&gt;The chain immediately started committing blocks with transactions. All four validators reaching consensus. Transaction gossip working across the network. The chain has since committed over 16 million blocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Silent failures are the hardest bugs in distributed systems. There were no error logs, no panics, no stack traces. The chain just produced empty blocks and looked healthy. Every metric was green except the one that mattered.&lt;/p&gt;

&lt;p&gt;Systematic elimination is the only approach that works. I ruled out dual mempool instances, lock contention, timeout races, leader rotation, cache eviction, and codec round-trip failures, one by one. Each hypothesis was tested, disproved, and crossed off.&lt;/p&gt;

&lt;p&gt;The fix was 20 lines of code. The investigation was two days. The ratio between understanding and implementation is always lopsided in distributed systems, and that's fine. The understanding is the hard part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The technical details
&lt;/h2&gt;

&lt;p&gt;For anyone working on custom binary codecs in Rust: be careful with "trailing bytes" checks in your decoders. They're correct for standalone message parsing but catastrophically wrong when the same decoder is reused inside a container format where multiple messages are concatenated. The streaming pattern (advance cursor, don't check for leftovers) is the right approach for container decoding.&lt;/p&gt;

&lt;p&gt;The codebase is on GitHub: &lt;a href="https://github.com/0x-devc/NOVAI-node" rel="noopener noreferrer"&gt;github.com/0x-devc/NOVAI-node&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;65,000+ lines of Rust. 4,000+ tests. Zero unsafe code.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>opensource</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
