<?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: Malek</title>
    <description>The latest articles on DEV Community by Malek (@syriandeveloper).</description>
    <link>https://dev.to/syriandeveloper</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F156048%2F56d1ff84-a7fa-49dd-9567-df04eedde356.png</url>
      <title>DEV Community: Malek</title>
      <link>https://dev.to/syriandeveloper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/syriandeveloper"/>
    <language>en</language>
    <item>
      <title>One validator finalized a block the network dropped</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Wed, 25 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/one-validator-finalized-a-block-the-network-dropped-hk</link>
      <guid>https://dev.to/syriandeveloper/one-validator-finalized-a-block-the-network-dropped-hk</guid>
      <description>&lt;p&gt;On 24 November 2026, at block #304,884, one validator on Janzeer mainnet finalized a block that the other validators had dropped. The network went on with a different block at that height. No transaction was lost: the dropped block held only its block reward. But "a block with a commit quorum is final" is the promise of this chain, and for one block on one node it did not hold. This is what happened, why, and what we changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a block becomes final here
&lt;/h2&gt;

&lt;p&gt;Every 15 seconds one validator proposes a block. The validators vote twice: PREPARE, then COMMIT. A block is final when two thirds plus one of them have voted COMMIT. That day there were eight validators, so six votes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The timeline
&lt;/h2&gt;

&lt;p&gt;One validator was offline that morning, so seven were voting. Two of the seven sit behind the same home internet connection.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UTC&lt;/th&gt;
&lt;th&gt;What happened&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;11:22:52&lt;/td&gt;
&lt;td&gt;One of the two home validators proposes block #304,884. All seven vote PREPARE, then COMMIT.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11:22:5x&lt;/td&gt;
&lt;td&gt;The home connection breaks. The other home validator has already received five COMMIT votes; with its own that is six. It finalizes the block. The two home validators' own COMMIT votes never reach the five validators in the data centre: each of those holds five votes, one short.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11:23:07&lt;/td&gt;
&lt;td&gt;The slot is over. The next validator proposes a new block at the same height. Five vote for it; the home validators are unreachable. No quorum.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11:23:22&lt;/td&gt;
&lt;td&gt;The same again.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11:23:37&lt;/td&gt;
&lt;td&gt;The proposer of block #304,884 is back online. A third new block gets six votes and is final.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The validator that had finalized the first block now held a block nobody else had. It rejected every later block, because none of them built on its tip, and it could not go back. Its operator had to rebuild the ledger.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule that was missing
&lt;/h2&gt;

&lt;p&gt;Look at the five validators in the data centre. Each of them had signed COMMIT for the first block. Forty-five seconds later each of them voted for a different block at the same height. Nothing in the node forbade it: when a slot ended, a validator forgot every vote of that slot.&lt;/p&gt;

&lt;p&gt;Every published protocol of this family has a rule against exactly this. In Tendermint it is the lock: a validator that has seen a block prepared stays with that block at that height. Our two voting rounds came from that family; the lock across slots did not come with them. Eight weeks of mainnet never hit it, because it takes a network break that lands inside the second or so between two rounds of votes, with the validator set close to its quorum.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Four rules, from node &lt;code&gt;0.1.15&lt;/code&gt; and active from block #357,023:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lock.&lt;/strong&gt; A validator that sees a PREPARE quorum for a block casts COMMIT and is locked on that block for that height. The lock is written to disk before the vote is sent, so a restart does not lose it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vote the prepared block.&lt;/strong&gt; In every later slot at that height, validators vote for the prepared block again and not for a new proposal. The slot owner builds no new block while one is prepared.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A commit certificate is final whenever it arrives.&lt;/strong&gt; Before, a certificate that arrived after its slot was thrown away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proof on request.&lt;/strong&gt; A node keeps the commit certificate of its newest block and shows it to any peer that proposes another block at that height.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With these rules, the same break on 24 November costs a pause of about forty seconds: the five locked validators keep voting for the first block, the sixth vote arrives when the proposer reconnects, and the block that already had its quorum is the one that becomes final. One chain.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we tested it
&lt;/h2&gt;

&lt;p&gt;We could not test this on a live network: the fault needs a link to break in a one-second window. So we built a simulation that runs the node's real voting code for a set of virtual validators, on a virtual clock, over a network we script: cut a validator off, lose messages in one direction only, cut in the middle of a slot, restart a validator, then heal everything.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The replay of 24 November: the old rules split exactly as mainnet did; the new rules end on one chain.&lt;/li&gt;
&lt;li&gt;Random schedules: on the old rules, finality splits in about a third of them. On the new rules it never splits, and the chain recovers after every one.&lt;/li&gt;
&lt;li&gt;The random schedules also found a mistake in our first version of the fix (a validator could lock on a block that was already final, and the chain stalled). That is what they are for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then four real nodes on PostgreSQL: ten rounds of hard kills at random moments of a slot, four of them taking away the quorum, with the four ledgers compared block by block after every round. And an upgrade rehearsal across an activation height, with one node left on the old version.&lt;/p&gt;

&lt;p&gt;Last, the release binary itself: four nodes for six hours with one of them killed every 30 minutes. 1,410 heights compared across the four ledgers, no two different blocks at any height.&lt;/p&gt;

&lt;h2&gt;
  
  
  What else changed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A short rollback.&lt;/strong&gt; A node could not take back even one block, so the stranded validator had to replay more than 300,000 blocks. Nodes now keep an undo journal for their newest 100 blocks, and an operator can take the ledger back a few blocks and sync forward.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logs.&lt;/strong&gt; The minutes of the incident left almost no trace: the nodes logged nothing about votes at their normal level. Each decision now has a line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alerts.&lt;/strong&gt; A validator that produces no block for ten minutes is reported, whoever runs it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  For operators
&lt;/h2&gt;

&lt;p&gt;Node &lt;code&gt;0.1.15&lt;/code&gt; is mandatory before block #357,023 (about 4 December 2026, 21:00 UTC). Until that block it behaves exactly like the previous version, so you can upgrade at any time. From that block on, a node that was not upgraded is disconnected and its log says why.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we take from it
&lt;/h2&gt;

&lt;p&gt;A network of ten validators runs close to its quorum whenever two or three are offline, and two validators behind one home connection fail together. Both are normal for a small network that people run at home. The protocol has to be safe in exactly those conditions, and now it has the rule and the tests for it.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>distributedsystems</category>
      <category>bft</category>
      <category>postmortem</category>
    </item>
    <item>
      <title>How we check a validator before we pay for its seat</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Sun, 22 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/how-we-check-a-validator-before-we-pay-for-its-seat-3jad</link>
      <guid>https://dev.to/syriandeveloper/how-we-check-a-validator-before-we-pay-for-its-seat-3jad</guid>
      <description>&lt;p&gt;On Janzeer, anyone can become a validator. There is no stake and no vote. You run a node, you send one registration transaction with a 2,000 JNZ deposit that is not returned, and your node joins the producer set at the start of the next epoch. &lt;a href="https://janzeer.org/blog/why-no-staking" rel="noopener noreferrer"&gt;An earlier article&lt;/a&gt; explains why the deposit replaces staking.&lt;/p&gt;

&lt;p&gt;The deposit is the barrier we want: it makes a seat cost something. It also stops the people we most want to see, operators who would run a node well but have no JNZ yet. So in October the project opened a &lt;a href="https://janzeer.org/validators#grant" rel="noopener noreferrer"&gt;validator grant&lt;/a&gt;. The first ten outside operators who keep a synchronized, reachable mainnet node for seven days receive 2,003 JNZ from the ecosystem wallet: the 2,000 deposit plus 3 JNZ for the fee.&lt;/p&gt;

&lt;p&gt;That raised a practical question. Before we pay, what do we actually check?&lt;/p&gt;

&lt;h2&gt;
  
  
  What a grant must prove
&lt;/h2&gt;

&lt;p&gt;A grant pays for one seat, so three things must be true:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The node exists and stays up.&lt;/strong&gt; It answers on its peer-to-peer port on the day of the application and again seven days later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The node is on the right chain and keeps up.&lt;/strong&gt; It is on Janzeer mainnet, not a fork or a test network, and it is synchronized at the tip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The applicant owns the node key.&lt;/strong&gt; The registration names a node key. If we pay someone who copied another node's public key from the explorer, we have paid for nothing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first two are easy to see from the outside. The third one is where our first plan failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The check that did not prove what we thought
&lt;/h2&gt;

&lt;p&gt;The written procedure said: start a throw-away node on the dev box, point it only at the applicant's address, and read its log. The handshake between Janzeer nodes is a signed challenge and response bound to the network id and the genesis, so a node on the wrong chain is refused at the greeting. If our node synchronized through that peer, we had proof.&lt;/p&gt;

&lt;p&gt;On the first real application, on 14 November, both parts turned out weaker than written:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The node logged no peer key at any level.&lt;/strong&gt; The handshake did check the key, but it never said which key it had checked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The node found other peers within seconds.&lt;/strong&gt; Every peer shares the addresses it knows, so our throw-away node synchronized from one of the project's own nodes, not from the applicant's node.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the check only proved that a Janzeer mainnet node answered at that address. It did not prove whose node it was.&lt;/p&gt;

&lt;h2&gt;
  
  
  A signature instead
&lt;/h2&gt;

&lt;p&gt;The fix for key ownership needed no node change. We sent the applicant 32 random bytes and asked them to sign them with the node's private key, using the command-line client that ships in every node bundle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 -c &lt;span class="s1"&gt;'import json;print(json.load(open("data/config.json"))["nodePrivateKey"])'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; ./jz key sign --hash &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;the 32 bytes we sent&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --private-key-stdin

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The private key goes from the node's own config file into &lt;code&gt;jz&lt;/code&gt; on standard input. It never appears on screen, in a file or in the reply. The applicant sends back only the Base64 signature, and we check it against the public node key from the application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jz key verify --hash &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;the 32 bytes&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --signature &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;their signature&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --public-key &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;node key&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The answer is &lt;code&gt;valid&lt;/code&gt; or &lt;code&gt;invalid&lt;/code&gt;. Only the holder of the private key can produce a valid signature for bytes we chose at random a few minutes earlier.&lt;/p&gt;

&lt;p&gt;The second application added one more case. The applicant named their node's built-in wallet as the address to pay. That wallet has its own key, separate from the node key, so we asked for a second signature with the wallet key. We also asked for the wallet's public key and derived the address from it. Both matched.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seven days later
&lt;/h2&gt;

&lt;p&gt;The day-7 check repeats the first one. The node must still answer on its port, still be synchronized, and still hold the key.&lt;/p&gt;

&lt;p&gt;By then the node itself had improved. After the first application we added one log line on both sides of the handshake: "Peer&lt;/p&gt;

&lt;p&gt;proved node key ". The key check now reads that line in our own nodes' logs. Our home validator on a Raspberry Pi had the applicant's node as a direct peer, and the line showed the applicant's address with the applicant's key, again and again over the previous day. That change is in the next node release for everyone.&lt;/p&gt;

&lt;p&gt;On 21 November grant #1 passed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The port was open and the node answered as a mainnet node.&lt;/li&gt;
&lt;li&gt;The handshake proved node key &lt;code&gt;039eb1d8…6016&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The node's own API reported &lt;code&gt;SYNCHRONIZED&lt;/code&gt; at the network tip, block #288,718 at the time of the check.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;The money, in public&lt;/h2&gt;

&lt;p&gt;The payment and the registration are both on the chain, and anyone can check them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Grant paid, 21 November.&lt;/strong&gt; 2,003 JNZ from the ecosystem wallet to the applicant's wallet, final in block #288,878: &lt;a href="https://explorer.janzeer.org/tx/1b35444a8ec3e7d161c1adb0b1a7b22658e973ca26f2826c52ddf075bf89ddbe" rel="noopener noreferrer"&gt;transaction 1b35444a…ddbe&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validator registered, the next day.&lt;/strong&gt; From the same wallet, a registration with the 2,000 JNZ deposit and the 3 JNZ fee, final in block #291,174: &lt;a href="https://explorer.janzeer.org/tx/638208b45021d104ab975eaf91083aba7c268c51c94350b3b32d33c185c71811" rel="noopener noreferrer"&gt;transaction 638208b4…1811&lt;/a&gt;. The wallet's balance after it is exactly zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Joins the producer set at block #306,018,&lt;/strong&gt; the start of the next epoch, about 24 November. Until then the &lt;a href="https://explorer.janzeer.org/validators" rel="noopener noreferrer"&gt;validators page&lt;/a&gt; lists it as &lt;code&gt;PENDING&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every step is also posted in the application's &lt;a href="https://github.com/janzeerOrg/janzeer-node/issues/1" rel="noopener noreferrer"&gt;public issue&lt;/a&gt;: day 0, day 7, the payment and the registration.&lt;/p&gt;

&lt;h2&gt;What this changes&lt;/h2&gt;

&lt;p&gt;Before this grant, every validator on Janzeer was either a project anchor or a node run by the people around the project. This is the first seat paid for by the grant and held by an operator we had never met. The node key, the wallet and the registration all belong to them. The project only paid for the seat.&lt;/p&gt;

&lt;p&gt;Here is the procedure as it stands now, for anyone who wants to apply:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Day 0.&lt;/strong&gt; Open an issue with your node key, your host and port, and a wallet address. We check the port and send you 32 random bytes to sign.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Days 1–7.&lt;/strong&gt; Keep the node online and synchronized.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Day 7.&lt;/strong&gt; We check the port, the handshake key and the sync status again. If all three pass, we send 2,003 JNZ to your wallet and post the transaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Within 7 days of the payment.&lt;/strong&gt; Register from that wallet and post the registration transaction. Your node produces blocks from the next epoch.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two of the ten grants are taken. The second applicant passed the same checks, was paid on 23 November and registered on 24 November (&lt;a href="https://explorer.janzeer.org/tx/9617b1a20f149bba97b084d46ac062233db14cba8a78f1c0d0974878082cc6e9" rel="noopener noreferrer"&gt;transaction 9617b1a2…c6e9&lt;/a&gt;), so both nodes join the producer set at block #306,018. Eight are open until 1 January 2027. The rules and the application form are on &lt;a href="https://janzeer.org/validators#grant" rel="noopener noreferrer"&gt;the validators page&lt;/a&gt;, and the node runs on a 2 GB server or &lt;a href="https://janzeer.org/blog/raspberry-pi-3-mainnet-validator" rel="noopener noreferrer"&gt;a Raspberry Pi&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>validators</category>
      <category>opensource</category>
      <category>security</category>
    </item>
    <item>
      <title>Five SDKs, one conformance kit: keeping five languages byte for byte the same</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Thu, 19 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/five-sdks-one-conformance-kit-keeping-five-languages-byte-for-byte-the-same-2dga</link>
      <guid>https://dev.to/syriandeveloper/five-sdks-one-conformance-kit-keeping-five-languages-byte-for-byte-the-same-2dga</guid>
      <description>&lt;p&gt;&lt;a href="https://janzeer.org/blog/non-custodial-by-design" rel="noopener noreferrer"&gt;The last article&lt;/a&gt; ended on a risk: Janzeer keys and signatures are made in the user's own software, never by the node, so that software has to get every byte right. There are five official SDKs, a web wallet, a mobile wallet, a game and a command-line client. That is nine places where the same cryptography is written again in another language.&lt;/p&gt;

&lt;p&gt;This article is about the small public repository that keeps those nine in step: &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-conformance" rel="noopener noreferrer"&gt;janzeer-sdk-conformance&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "almost the same" is not good enough
&lt;/h2&gt;

&lt;p&gt;A Janzeer transaction is signed over an exact sequence of bytes: the network id, the timestamp, the fee, the nonce, the sender, then the payload. The node rebuilds that sequence from the fields it receives, hashes it twice with SHA-256 and checks the signature. One byte of difference and the transaction is rejected.&lt;/p&gt;

&lt;p&gt;The places where languages quietly disagree are well known:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rounding.&lt;/strong&gt; An amount has eight decimals and is signed as a whole number of units. &lt;code&gt;0.123456785&lt;/code&gt; must become &lt;code&gt;12345679&lt;/code&gt;, rounded half up. A language that rounds half to even, or goes through a floating-point number, signs a different amount.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integer width and byte order.&lt;/strong&gt; Every number in the signed bytes is eight bytes, big-endian. JavaScript has no 64-bit integer by default; Dart on the web has none either.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signatures.&lt;/strong&gt; The node expects a deterministic signature (RFC 6979), in its low-S form, DER-encoded, then Base64. Most libraries can produce four or five variants of "an ECDSA signature".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key derivation.&lt;/strong&gt; As the last article showed, the derivation looks like the Bitcoin and Ethereum one but uses the chain's own constants, so a standard library produces a valid-looking but wrong address.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these fail loudly. They produce a transaction that looks fine and is refused, or an address that looks fine and belongs to nobody.&lt;/p&gt;

&lt;h2&gt;
  
  
  One file of vectors, made by the node
&lt;/h2&gt;

&lt;p&gt;The answer is one JSON file, 6.7 KB, generated by a test in the node itself from the node's own cryptography. The node is the only judge of what is valid on the network, so it is also the only author of the expected values. It holds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one recovery phrase with its seed, private key, public key and address, so the whole derivation path is pinned;&lt;/li&gt;
&lt;li&gt;one raw private key with its address;&lt;/li&gt;
&lt;li&gt;three addresses in lowercase and in their mixed-case display form;&lt;/li&gt;
&lt;li&gt;six amounts with their scaled values, including the rounding case above and the smallest unit, &lt;code&gt;0.00000001&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;six signed transactions, one for every kind a client can send: a transfer with a memo, a transfer without one, a validator registration, a validator exit, a token creation and a token transfer. Each comes with its fields, the exact signed bytes in hex, the hash and the signature.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A second, smaller file is an encrypted wallet blob with its password, so that a wallet saved by one SDK opens in the other four.&lt;/p&gt;

&lt;p&gt;Every SDK carries a copy of both files in its tests and must reproduce every value exactly: the same 136 signed bytes for the first transfer, the same hash, the same signature. Nothing is compared "approximately".&lt;/p&gt;

&lt;h2&gt;
  
  
  Stopping the copies from drifting
&lt;/h2&gt;

&lt;p&gt;Nine copies of a file is nine chances for one to go stale. Two things prevent it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The kit publishes a &lt;code&gt;SHA256SUMS&lt;/code&gt; file. Each SDK checks its copy against those checksums in CI, so an edited or outdated vector file fails the build.&lt;/li&gt;
&lt;li&gt;When the node's cryptography or a transaction layout changes, one script regenerates the vectors from the node, copies them to all nine consumers and refreshes the checksums. A change that reaches only some of them cannot be committed quietly, because the check fails in the rest.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can run the same check yourself. The &lt;code&gt;jz&lt;/code&gt; command-line client ships the vectors inside its binary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tap"&gt;&lt;code&gt;$ &lt;span class="n"&gt;jz&lt;/span&gt; &lt;span class="n"&gt;vectors&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="n"&gt;scaled&lt;/span&gt; &lt;span class="n"&gt;amounts&lt;/span&gt;
  &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="n"&gt;transferTx&lt;/span&gt;
  &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="n"&gt;transferNoMemoTx&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="n"&gt;tokenTransferTx&lt;/span&gt;
  &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="n"&gt;vault&lt;/span&gt; &lt;span class="n"&gt;fixture&lt;/span&gt; &lt;span class="n"&gt;decrypts&lt;/span&gt;

&lt;span class="mi"&gt;14&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt; &lt;span class="n"&gt;checks&lt;/span&gt; &lt;span class="n"&gt;passed&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vendored&lt;/span&gt; &lt;span class="n"&gt;vectors&lt;/span&gt; &lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The second half: one flow against a real network
&lt;/h2&gt;

&lt;p&gt;Vectors prove that an SDK can produce the right bytes. They do not prove that it can talk to a node. So the kit also defines a flow of 14 steps that every SDK implements as a test against a real four-validator network on a developer machine. In short:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Derive the test wallet and check its address.&lt;/li&gt;
&lt;li&gt;Read the node's version and network id, and sign for that network.&lt;/li&gt;
&lt;li&gt;Read the balance and the next nonce.&lt;/li&gt;
&lt;li&gt;Open a WebSocket to a &lt;em&gt;different&lt;/em&gt; node than the one the transaction will be sent to, and subscribe to the recipient's address.&lt;/li&gt;
&lt;li&gt;Build and sign a transfer, submit it, then submit the same transaction again by the other API and check that it is accepted once, not twice.&lt;/li&gt;
&lt;li&gt;Wait until it is final, then check the sender's balance to the last unit: the old balance minus the amount minus the fee, compared as exact decimals.&lt;/li&gt;
&lt;li&gt;Check that the notification arrived over the WebSocket, which proves the block travelled between nodes.&lt;/li&gt;
&lt;li&gt;Three deliberate failures: a nonce that skips ahead, a signature copied from another transaction, a malformed address. Each must be refused with the specific error the SDK documents.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each SDK's README quickstart is the same flow, trimmed. The documentation is therefore code that runs before every release. A release goes out only when the vectors and all 14 steps pass in that language.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the kit did not catch
&lt;/h2&gt;

&lt;p&gt;It would be easy to stop here and call the SDKs proven. Three bugs from the past weeks say otherwise, and each one was outside what the kit measures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Digits that were not digits.&lt;/strong&gt; The Python SDK's amount check used a pattern that, in Python, also matches Arabic-Indic and other Unicode digits. An amount typed as &lt;code&gt;١٠&lt;/code&gt; was accepted, normalised and signed as 10. The vectors only contain ASCII digits, so they passed. A code review found it; the fix accepts ASCII digits only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A method nobody called.&lt;/strong&gt; The TypeScript SDK's &lt;code&gt;getGenesis()&lt;/code&gt; threw on every call against a real node from the day it was added, because it expected a different answer shape. The 14 steps never call that method, so the flow stayed green. It was found when &lt;a href="https://janzeer.org/blog/first-week-of-work-bounties" rel="noopener noreferrer"&gt;an outside contributor's pull request&lt;/a&gt; made us run the call against mainnet. The Dart SDK now has a test for every typed method.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Behaviour over time.&lt;/strong&gt; After a dropped connection, a WebSocket subscription asked the node to replay blocks from its original starting height instead of resuming where it stopped. No vector and no single clean run shows that; it took a review of the reconnect code in all five SDKs.&lt;/p&gt;

&lt;p&gt;The lesson we took is narrow: the kit proves the bytes and one honest path through the API. It does not replace tests for each method, reviews, or running real code against the live network. It only makes sure that when those find a problem, the problem is not in the cryptography.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using it for your own client
&lt;/h2&gt;

&lt;p&gt;The kit is public under Apache-2.0 and contains no node code. If you are writing a Janzeer client in a language we do not cover, copy the two vector files into your tests, reproduce every value, and implement the 14 steps. When all of that is green, your client signs exactly what the node expects.&lt;/p&gt;

&lt;p&gt;Today the chain is past block 270,000 with seven validators. Next: &lt;code&gt;jz&lt;/code&gt;, the command-line client that fits in a 38 MB native binary.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Every number here is from the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live chain&lt;/a&gt; and the public repositories, and the text is mine. JNZ is the network's unit, it is not listed anywhere, and nothing here is financial advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>softwaretesting</category>
      <category>sdk</category>
      <category>opensource</category>
    </item>
    <item>
      <title>What the first week of work bounties built</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Tue, 17 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/what-the-first-week-of-work-bounties-built-f27</link>
      <guid>https://dev.to/syriandeveloper/what-the-first-week-of-work-bounties-built-f27</guid>
      <description>&lt;p&gt;On 12 November the Janzeer repositories started paying for work. Five days later, outside contributors had shipped a Windows package manifest, a Homebrew formula, typed API wrappers in three SDKs and three new examples, and every payment for it is public on the chain. This is what happened, including the parts that did not go well.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the bounties work
&lt;/h2&gt;

&lt;p&gt;A bounty is an ordinary GitHub issue with an amount in its title, for example &lt;code&gt;[50 JNZ] Homebrew formula for macOS&lt;/code&gt;. The rules fit on one page, &lt;a href="https://github.com/janzeerOrg/janzeer-cli/blob/master/BOUNTIES.md" rel="noopener noreferrer"&gt;BOUNTIES.md&lt;/a&gt;, the same in the CLI and the five SDK repositories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;20 JNZ&lt;/strong&gt; for an example or a guide, &lt;strong&gt;50 JNZ&lt;/strong&gt; for a small API addition, a package or a translation, &lt;strong&gt;100 JNZ&lt;/strong&gt; for a larger API addition. Bug reports are paid 20 to 100 JNZ depending on what they find.&lt;/li&gt;
&lt;li&gt;Comment on the issue to claim it; a claim holds for seven days. Then open a pull request.&lt;/li&gt;
&lt;li&gt;Payment is made &lt;strong&gt;after the merge&lt;/strong&gt; , in JNZ, to a Janzeer address the contributor posts in the pull request. Nothing has to be agreed beforehand and there is nothing to sign up for.&lt;/li&gt;
&lt;li&gt;The programme pays at most 1,000 JNZ a month.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every payment comes from the project's ecosystem account and the transaction is posted in the pull request, so anyone can check it in the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;explorer&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What got built
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Scoop manifest: &lt;code&gt;jz&lt;/code&gt; on Windows (janzeer-cli): &lt;strong&gt;50 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Homebrew formula: &lt;code&gt;jz&lt;/code&gt; on macOS, tested on a real Mac (janzeer-cli): &lt;strong&gt;50 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Example: follow new blocks over the WebSocket (janzeer-sdk-ts): &lt;strong&gt;20 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Typed RPC wrappers for tokens, transactions by address, raw transactions, the method list and the genesis document (janzeer-sdk-go): &lt;strong&gt;100 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;getGenesis()&lt;/code&gt; and tests for every typed node method (janzeer-sdk-dart): &lt;strong&gt;100 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;getGenesis()&lt;/code&gt; and its coroutine variant (janzeer-sdk-kotlin): &lt;strong&gt;50 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Example: follow new blocks over the WebSocket (janzeer-sdk-dart): &lt;strong&gt;20 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Example: follow new blocks over the WebSocket (janzeer-sdk-kotlin): &lt;strong&gt;20 JNZ&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is &lt;strong&gt;410 JNZ&lt;/strong&gt; paid in eight transactions to two contributors, plus 20 JNZ waiting for an asyncio guide in the Python SDK, merged on 12 November, until its author posts an address. The work went out as six releases on 15 and 16 November: Dart 0.1.10 and 0.1.11, Go v0.1.6, Kotlin 0.1.9 and 0.1.10, and TypeScript 0.1.9.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a pull request gets merged
&lt;/h2&gt;

&lt;p&gt;Every bounty pull request goes through the same steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read the diff against the code&lt;/strong&gt; , not against the description. The description says what the author meant; the diff says what will ship.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run the project's own checks&lt;/strong&gt; on our side: &lt;code&gt;gofmt&lt;/code&gt;, &lt;code&gt;go vet&lt;/code&gt; and &lt;code&gt;go test -race&lt;/code&gt; for Go; &lt;code&gt;dart analyze --fatal-infos&lt;/code&gt; and &lt;code&gt;dart test&lt;/code&gt; for Dart; &lt;code&gt;./gradlew build&lt;/code&gt; with the public-API check for Kotlin; tests and lint for TypeScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Call the new code against the live mainnet node.&lt;/strong&gt; Unit tests run against fake answers that the author wrote; the node is the only judge of what the answers really look like.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge with the author's commits kept&lt;/strong&gt; , release, and post the payment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 3 is the one that mattered most this week.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the reviews found
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Token amounts are not coin amounts.&lt;/strong&gt; The first version of the Go wrappers typed a token's cap, supply and balances as &lt;code&gt;Amount&lt;/code&gt;, the SDK's type for JNZ. On mainnet, &lt;code&gt;janzeer_listTokens&lt;/code&gt; answers &lt;code&gt;"decimals": 2, "cap": 20000000&lt;/code&gt;: whole numbers in the token's own units. &lt;code&gt;Amount&lt;/code&gt; would have scaled them by 10⁸. They are now &lt;code&gt;*big.Int&lt;/code&gt;, as the TypeScript SDK uses &lt;code&gt;bigint&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The genesis call returns a document, not a block.&lt;/strong&gt; Three of the new &lt;code&gt;getGenesis&lt;/code&gt; methods first decoded the answer as a genesis &lt;em&gt;block&lt;/em&gt;. The live node returns the genesis &lt;em&gt;document&lt;/em&gt;: network id, signer key, anchors and their balances. All three were changed to return the document as JSON.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two Go names collided with existing ones.&lt;/strong&gt; A new &lt;code&gt;Token&lt;/code&gt; model clashed with the token transaction builder, and a new &lt;code&gt;Methods()&lt;/code&gt; method was hidden by a field of the same name on the client. Neither compiled. Both were caught by running the tests rather than reading the pull request text, and both were fixed by the contributor in under an hour.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The worst bug was ours.&lt;/strong&gt; While checking the genesis question, we called the published TypeScript SDK's &lt;code&gt;getGenesis()&lt;/code&gt; against mainnet. It threw on every call: since the method was added in October, it had expected a block. An outside pull request led us straight to a bug in our own code. TypeScript 0.1.9 fixes it, and all five SDKs now return the same thing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two of our issues were wrong.&lt;/strong&gt; The Dart issue listed eight missing methods when seven already existed, and the Kotlin issue told contributors to return the block model. The contributor who took the Dart issue noticed, added the one real method plus tests for the other seven, and said so. Both bounties were paid in full: when an issue is wrong, that is the project's mistake, not the contributor's.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was not merged
&lt;/h2&gt;

&lt;p&gt;Six pull requests were closed without a merge, each with a comment saying why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;two that added only a &lt;code&gt;SOLUTION.md&lt;/code&gt; file describing a change instead of making it;&lt;/li&gt;
&lt;li&gt;two that deleted existing public API, including most of a models file and the SDK's own &lt;code&gt;send&lt;/code&gt; methods, which would not have built;&lt;/li&gt;
&lt;li&gt;one that rewrote a manifest that was already merged and paid, and removed changelog entries;&lt;/li&gt;
&lt;li&gt;one that rewrote a README with wrong descriptions and asked for payment in another currency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three more were closed on 16 November because another pull request for the same issue was merged first: the contributor who had commented on the issue got there before them.&lt;/p&gt;

&lt;p&gt;Most of the six came from one account that answers bounty issues with the same template; the same account also had a pull request merged and paid once it was fixed. The rules handle them without arguing: the first pull request merged for an issue is the one that is paid, payment is in JNZ only, and nothing is agreed in comments. Every closing comment points at the exact problem, so a real contributor can fix it and come back.&lt;/p&gt;

&lt;h2&gt;
  
  
  What comes next
&lt;/h2&gt;

&lt;p&gt;New bounty issues go up this week, from packages (&lt;code&gt;.deb&lt;/code&gt;, Nix) to examples each SDK still lacks and Arabic translations of the SDK guides. They are all listed with the &lt;code&gt;bounty&lt;/code&gt; label: &lt;a href="https://github.com/search?q=org%3AjanzeerOrg+label%3Abounty+state%3Aopen&amp;amp;type=issues" rel="noopener noreferrer"&gt;open bounties across the Janzeer repositories&lt;/a&gt;. If you write Go, Dart, Kotlin, Python or TypeScript, one of them takes an evening.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The amounts, blocks and releases here are from the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live chain&lt;/a&gt; and the public repositories, and the text is mine. JNZ is the network's unit, it is not listed anywhere, and nothing here is financial advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>blockchain</category>
      <category>janzeer</category>
      <category>community</category>
    </item>
    <item>
      <title>Non-custodial by design: how Janzeer keys are made, and why the address is not an Ethereum address</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Mon, 16 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/non-custodial-by-design-how-janzeer-keys-are-made-and-why-the-address-is-not-an-ethereum-address-3pif</link>
      <guid>https://dev.to/syriandeveloper/non-custodial-by-design-how-janzeer-keys-are-made-and-why-the-address-is-not-an-ethereum-address-3pif</guid>
      <description>&lt;p&gt;&lt;a href="https://janzeer.org/blog/one-native-binary" rel="noopener noreferrer"&gt;The last article&lt;/a&gt; was about the people who run the network. This one is about the people who use it, and the one rule that shapes every tool they touch: the keys never leave the user's device.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;Janzeer is non-custodial everywhere. In practice that means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The node never sees a private key.&lt;/strong&gt; Its API can read balances, nonces and transactions, and it accepts transactions that are already signed. There is no endpoint that creates a key, stores one or signs for you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every wallet signs locally.&lt;/strong&gt; The mobile and desktop wallet, the web wallet in the explorer, the wallet inside Telegram and the &lt;code&gt;jz&lt;/code&gt; command-line client all derive keys and sign on the device, then send only the signed bytes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Services built on top follow the same rule.&lt;/strong&gt; The &lt;a href="https://t.me/janzeerwallet_bot" rel="noopener noreferrer"&gt;Telegram tip bot&lt;/a&gt; that went live this week never holds a coin: it prepares a payment, your own wallet signs it, and the bot confirms it only after reading it on the chain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cost is the usual one: if you lose your recovery words, nobody can restore your account. The benefit is that there is no place where everyone's keys sit together waiting to be stolen.&lt;/p&gt;

&lt;h2&gt;
  
  
  From twelve words to a key
&lt;/h2&gt;

&lt;p&gt;A new wallet starts with a recovery phrase of 12 or 24 words from the standard BIP39 word list. The words are the only thing you need to back up; everything else is computed from them, the same way on every device.&lt;/p&gt;

&lt;p&gt;The steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Words to seed.&lt;/strong&gt; The phrase is stretched into a 64-byte seed with PBKDF2-HMAC-SHA512 and 2,048 rounds. An optional passphrase can be added, which turns the same words into a completely different wallet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seed to master key.&lt;/strong&gt; An HMAC-SHA512 of the seed gives a master private key and a chain code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Master key to account key.&lt;/strong&gt; The wallet derives the key at path &lt;code&gt;m/0/0/0&lt;/code&gt; on the secp256k1 curve, the same curve Bitcoin and Ethereum use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two of these steps use the string &lt;code&gt;@_Janzeer_Blockchain_@&lt;/code&gt; where the BIP39 and BIP32 standards use &lt;code&gt;mnemonic&lt;/code&gt; and &lt;code&gt;Bitcoin seed&lt;/code&gt;. That is deliberate: a Janzeer phrase typed into another chain's wallet produces unrelated keys, and the reverse is true too. A recovery phrase belongs to one network, which removes a whole class of mix-ups.&lt;/p&gt;

&lt;h2&gt;
  
  
  From key to address
&lt;/h2&gt;

&lt;p&gt;The address is the first 20 bytes of the Keccak-256 hash of the 33-byte compressed public key, written as &lt;code&gt;0x&lt;/code&gt; and 40 hex characters.&lt;/p&gt;

&lt;p&gt;It looks exactly like an Ethereum address, and that is the trap. Ethereum hashes the 64-byte uncompressed key and takes the last 20 bytes. So the same private key gives one address on Ethereum and a different one on Janzeer. An Ethereum wallet, library or exchange that "supports addresses like this" will compute the wrong address and sign the wrong bytes. Janzeer is not EVM-compatible and does not pretend to be.&lt;/p&gt;

&lt;p&gt;Mixed-case addresses work the way Ethereum's checksum does: the case of each letter encodes a check, so a typo in a mixed-case address is caught before sending. The network itself stores addresses in lower case and accepts both forms.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a signature covers
&lt;/h2&gt;

&lt;p&gt;A transaction is signed over its exact bytes: the network id, a timestamp, the fee, the sender's nonce, the sender's address and the transfer itself (amount, recipient, memo). The signature is a deterministic ECDSA signature with a canonical low-S value, so the same transaction always signs to the same bytes, and nobody can produce a second valid variant of it.&lt;/p&gt;

&lt;p&gt;Two details protect users without their noticing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The network id is part of what is signed.&lt;/strong&gt; A transaction signed for the test network cannot be replayed on mainnet, or the other way round.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The nonce is part of what is signed.&lt;/strong&gt; Each transaction from an account carries the next number in sequence, so a signed transaction can be applied once and never again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Five SDKs, one set of answers
&lt;/h2&gt;

&lt;p&gt;Re-implementing cryptography in five languages is how small chains lose money: one SDK rounds an amount differently, or hashes one byte more, and its signatures fail, or worse. The Janzeer node's code is the single source of truth, and a shared file of test vectors records the expected output of every step for fixed inputs: seed, keys, address, checksum, every transaction type's bytes, hash and signature.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;TypeScript, Dart, Kotlin, Python and Go SDKs&lt;/a&gt; and every wallet must reproduce that file byte for byte before a release. You can check one yourself: the test phrase &lt;code&gt;abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about&lt;/code&gt; must give the address &lt;code&gt;0x06e1c0fa9955a700876f8cb0acc7f13fba9fb8ba&lt;/code&gt; in every one of them. Never send coins to it; everyone knows its key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the words safe on a device
&lt;/h2&gt;

&lt;p&gt;The wallets store the recovery phrase encrypted, never in plain text: the password is stretched with PBKDF2-SHA256 over 250,000 rounds and the phrase is sealed with AES-256-GCM. The encrypted format is shared by the SDKs and &lt;code&gt;jz&lt;/code&gt;, so a wallet file exported from one of them opens in another with the same password.&lt;/p&gt;

&lt;p&gt;The habits that matter most are not cryptographic: write the words on paper, keep them off cloud notes and screenshots, and never type them into a website that asks for them. No Janzeer service will ever ask for your recovery phrase.&lt;/p&gt;

&lt;p&gt;Today the chain is past block 250,000 with seven validators. Next: five SDKs and one conformance kit, or how the test vectors above keep five languages in step.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Every number here is from the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live chain&lt;/a&gt; and the &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;public documentation&lt;/a&gt;, and the text is mine. JNZ is the network's unit, it is not listed anywhere, and nothing in this series is financial advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>cryptography</category>
      <category>wallets</category>
      <category>security</category>
    </item>
    <item>
      <title>One native binary: a Layer-1 node on a 2 GB VPS and a Raspberry Pi 3</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Sun, 15 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/one-native-binary-a-layer-1-node-on-a-2-gb-vps-and-a-raspberry-pi-3-4k98</link>
      <guid>https://dev.to/syriandeveloper/one-native-binary-a-layer-1-node-on-a-2-gb-vps-and-a-raspberry-pi-3-4k98</guid>
      <description>&lt;p&gt;&lt;a href="https://janzeer.org/blog/one-block-finality" rel="noopener noreferrer"&gt;The last article&lt;/a&gt; explained why a Janzeer block is final once five of the seven validators have committed it. That raises the practical question: what does it take to be one of those seven?&lt;/p&gt;

&lt;p&gt;The answer we aimed for from the start: a machine you already have. Not a rack, not a cloud account with a monthly bill in three digits, not a staked fortune. Today five validators run together on one rented 2 GB server, and two run on single-board computers in people's homes, one of them a Raspberry Pi 3 from 2016.&lt;/p&gt;

&lt;h2&gt;
  
  
  One file, no runtime
&lt;/h2&gt;

&lt;p&gt;The node is written in Kotlin on Spring Boot: a peer-to-peer layer, the consensus engine, a database, a REST and JSON-RPC API, and the block explorer's web pages. A normal Java service like that needs a Java runtime and starts in tens of seconds.&lt;/p&gt;

&lt;p&gt;Janzeer ships it as a GraalVM native image instead. The whole node is compiled ahead of time into one executable file of about 250 MB. There is nothing else to install: no Java, no database server (it brings an embedded database, or uses PostgreSQL if you have one), no container runtime. On the 2 GB server it starts in about 3 seconds; on the Pi 3 in about 30.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://janzeer.org/validators" rel="noopener noreferrer"&gt;download page&lt;/a&gt; has the same node for Linux x64, Linux arm64 (Raspberry Pi and other boards), Windows, an Arch Linux package and a Docker image. Every release carries a &lt;code&gt;SHA256SUMS&lt;/code&gt; file signed with the project's key, so you can check that what you downloaded is what was released before you run it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What running one looks like
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Download the bundle for your machine and verify the signature.&lt;/li&gt;
&lt;li&gt;Unpack it and run &lt;code&gt;./start.sh&lt;/code&gt;. The node creates its own identity, connects to the network and synchronises the chain from block one, checking every block itself.&lt;/li&gt;
&lt;li&gt;When it reports &lt;code&gt;SYNCHRONIZED&lt;/code&gt;, it is a full watch-only node: it follows and verifies the chain, and its API answers your wallet or your scripts.&lt;/li&gt;
&lt;li&gt;To validate, open the P2P port and send one registration transaction with a one-time 2,000 JNZ deposit, as described in &lt;a href="https://janzeer.org/blog/why-no-staking" rel="noopener noreferrer"&gt;the article about validators&lt;/a&gt;. The node joins the set at the next epoch boundary, about three days later.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The bundle also contains &lt;code&gt;update.sh&lt;/code&gt;, which checks for a newer signed release and installs it, and &lt;code&gt;jz&lt;/code&gt;, the command-line client, so &lt;code&gt;./jz node status&lt;/code&gt; tells you how the node is doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the binary matters on small machines
&lt;/h2&gt;

&lt;p&gt;Memory decides what fits. A Java process grows its heap towards a share of the machine's physical memory unless you stop it; five of them next to a database would not fit in 2 GB. The native image starts small, its heap is capped at 256 MB, and its code pages are shared between processes. On the server, five validator nodes, PostgreSQL, the explorer, a Telegram game and a mail server share 2 GB. Before we rented that server, we proved it on a desktop by running the same binaries inside a memory cage of the same size for six hours.&lt;/p&gt;

&lt;p&gt;The Pi 3 has 1 GB, of which 905 MB are usable. A synced node sits at about 370 MB there. That leaves room, but not much, and the board found every place where the node used memory carelessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the smallest machine taught the node
&lt;/h2&gt;

&lt;p&gt;Running on a 1 GB board turned up problems that a big server hides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A cleanup step loaded 287 MB of staged blocks into a 256 MB heap&lt;/strong&gt; when a sync was restarted. On the server nobody noticed; on the Pi the sync thread died. The cleanup now deletes in the database without loading anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Temporary files went to &lt;code&gt;/tmp&lt;/code&gt;&lt;/strong&gt; , which on Raspberry Pi OS lives in RAM. A bulk database statement wrote 405 MB there. The node now keeps its temporary files on its own disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An unclean stop costs a long check at the next boot&lt;/strong&gt; , because the node re-validates its last two epochs when it cannot prove it was stopped cleanly. On the server that took 2.5 minutes, on the Pi 22. The node now writes a marker on every clean shutdown and skips the check when the marker matches.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every one of these became a fix in the node, released for everyone, not a special Pi build. The full story, with the numbers, is in &lt;a href="https://janzeer.org/blog/raspberry-pi-3-mainnet-validator" rel="noopener noreferrer"&gt;the Raspberry Pi article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the operator learns
&lt;/h2&gt;

&lt;p&gt;Some lessons have nothing to do with code. Use a proper power supply: an under-powered Pi drops its Wi-Fi without a word, and a validator that is silent for hours loses its seat. A board without a real-time clock boots with the wrong time after a power cut, and a node does not produce blocks until its clock is correct, because slots are assigned by time. And restart a validator right after its own block, not in the middle of its turn.&lt;/p&gt;

&lt;p&gt;The server side has its own story: &lt;a href="https://janzeer.org/blog/bft-chain-on-a-2gb-vps" rel="noopener noreferrer"&gt;running the whole network on one 2 GB VPS&lt;/a&gt;, what broke in the seven-day acceptance test before launch, and how upgrades now restart the validators one by one so that no block is missed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it is worth it
&lt;/h2&gt;

&lt;p&gt;A network whose validators need a data centre ends up run by data centres. A network whose validators run on a Pi in a living room can be run by anyone who cares to. Today the chain is at block 248,850, with seven validators. The &lt;a href="https://janzeer.org/validators#grant" rel="noopener noreferrer"&gt;grant programme&lt;/a&gt; pays the 2,000 JNZ deposit for the first ten outside operators, and the first application arrived this week.&lt;/p&gt;

&lt;p&gt;Next: non-custodial by design, or how keys are derived and why a Janzeer address is not an Ethereum address.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Janzeer is built with AI assistance (Claude Code); every number here is from the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live chain&lt;/a&gt; and the project's own release notes and incident reports, and the text is mine. JNZ is the network's unit, it is not listed anywhere, and nothing in this series is financial advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>graalvm</category>
      <category>raspberrypi</category>
      <category>selfhosting</category>
    </item>
    <item>
      <title>The first token: one transaction type, five operations, and an afternoon on mainnet</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Sat, 14 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/the-first-token-one-transaction-type-five-operations-and-an-afternoon-on-mainnet-21df</link>
      <guid>https://dev.to/syriandeveloper/the-first-token-one-transaction-type-five-operations-and-an-afternoon-on-mainnet-21df</guid>
      <description>&lt;p&gt;&lt;a href="https://janzeer.org/blog/why-no-staking" rel="noopener noreferrer"&gt;Yesterday&lt;/a&gt; was about validators. Today is a detour I did not plan, because something happened on the chain on 9 November that is worth telling while it is fresh: the first token was created on Janzeer mainnet, and every rule the token system has was exercised in one afternoon.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a token is here
&lt;/h2&gt;

&lt;p&gt;Most chains get tokens from smart contracts: a program holds a table of balances, and "sending a token" means calling that program. Janzeer has no virtual machine, on purpose. Tokens are a native feature of the ledger, specified as one transaction type with an operation byte, called JZT-1. The five operations are &lt;strong&gt;create&lt;/strong&gt; , &lt;strong&gt;mint&lt;/strong&gt; , &lt;strong&gt;burn&lt;/strong&gt; , &lt;strong&gt;set cap&lt;/strong&gt; and &lt;strong&gt;transfer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A token has a symbol, a name, a number of display decimals, a maximum supply (the cap) and an issuer. Its identity is the hash of the transaction that created it, so there is no registry to squat and no name to fight over; two tokens may share a symbol, and the id tells them apart. Every token is its own ledger: minting a billion units of something changes nothing about the fixed 100,000,000 JNZ supply, the treasury or the block rewards. Fees for token operations are paid in JNZ like any other fee.&lt;/p&gt;

&lt;p&gt;Three rules give the system its shape:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Only a registered validator's wallet can create a token.&lt;/strong&gt; The fee is an exact 5 JNZ. This is a spam gate, not a privilege: anyone who runs a node and pays the 2,000 JNZ deposit described &lt;a href="https://janzeer.org/blog/why-no-staking" rel="noopener noreferrer"&gt;yesterday&lt;/a&gt; may issue tokens. An ordinary wallet that tries is refused at submission, before a block is wasted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only the issuer can mint, burn or change the cap&lt;/strong&gt; , and the ledger enforces two invariants on every path, live or during sync: the supply can never exceed the cap, and the cap can never drop below the minted supply.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anyone can hold and send a token.&lt;/strong&gt; A transfer costs the normal minimum fee of 0.01 JNZ and is final in one block like a JNZ transfer.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What happened on 9 November
&lt;/h2&gt;

&lt;p&gt;I had never created a token on mainnet; the feature had only run in the automated integration test and on the local developer network. So I did it the way a user would, from the web wallet inside the explorer, using the wallet that registered one of my validators.&lt;/p&gt;

&lt;p&gt;The result is called &lt;strong&gt;DEMO&lt;/strong&gt; , "Janzeer Demo Token", two decimals, a cap of one million, an initial supply of one hundred thousand. &lt;a href="https://explorer.janzeer.org/tokens/a125c23c403f992c36a472050e5709a43b359dda6bc9113e2bc39050ba8a19c6" rel="noopener noreferrer"&gt;Its page on the explorer&lt;/a&gt; shows everything below.&lt;/p&gt;

&lt;p&gt;Then I ran through the operations in an order chosen to hit the rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sent 1,000 DEMO to a second wallet. Transfers from the &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-python" rel="noopener noreferrer"&gt;Python SDK&lt;/a&gt; and the &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-ts" rel="noopener noreferrer"&gt;TypeScript SDK&lt;/a&gt; moved some of it on to two more addresses, final in blocks 221,511 and 221,514.&lt;/li&gt;
&lt;li&gt;Minted 100,000. Supply 150,000.&lt;/li&gt;
&lt;li&gt;Burned 50,000. Supply back to 100,000.&lt;/li&gt;
&lt;li&gt;Tried to set the cap to 100,000 while the supply stood above it. &lt;strong&gt;Refused&lt;/strong&gt; : "cap below the minted supply". No fee, because the node rejects it at the door.&lt;/li&gt;
&lt;li&gt;Set the cap to 200,000. Accepted.&lt;/li&gt;
&lt;li&gt;Tried to mint 60,000, which would have pushed the supply past the new cap. &lt;strong&gt;Refused&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Minted 50,000. Supply 200,000, exactly at the cap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every acceptance and every refusal matched the specification. The explorer's token page lists the holders and the operations in order, and the SDKs read the same numbers through REST and JSON-RPC. The whole run is recorded in the project's test guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it cost and what it is worth
&lt;/h2&gt;

&lt;p&gt;Creating the token cost 5 JNZ. The six accepted operations cost 0.01 JNZ each. The two refusals cost nothing.&lt;/p&gt;

&lt;p&gt;DEMO itself is worth nothing, and I want to be plain about that. It exists so that the feature has a real example that anyone can look at, send, and build against. It is not for sale, it will not be listed anywhere, and if someone offers you DEMO for money they are not from this project.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned from the wallet
&lt;/h2&gt;

&lt;p&gt;Doing it as a user found two rough edges in the web wallet within minutes, which the test suite could never have shown me. After each operation the Tokens panel kept showing the old balances until I reloaded the page, because the wallet never re-read the chain after a submit, and a transaction lands one or two slots after it is accepted. And the assets list had no way to copy a token id. Both are fixed: the wallet now re-reads the chain every few seconds until the committed state changes, shows a small "waiting for the next block" line while it does, and every asset row has a copy button. They ship with the next node release, since the explorer is built into the node binary.&lt;/p&gt;

&lt;p&gt;The mobile wallet, which had tokens switched off since launch, got them back in &lt;a href="https://github.com/janzeerOrg/janzeer-wallet/releases/tag/v1.2.8" rel="noopener noreferrer"&gt;version 1.2.8&lt;/a&gt; the same evening: a Tokens tab that shows what you hold, a send page with paste, scan and a review step, and receive at your usual address. The issuer operations are one level deeper, behind an "Issuer tools" link, because most people will only ever send and receive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The DEMO token is on the explorer, and if you hold a few JNZ for fees any of the five SDKs, the &lt;code&gt;jz&lt;/code&gt; command-line client or the wallet can send it. A transfer is about twenty lines in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;janzeer&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Account&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;JanzeerClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;TxBuilder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;wait_for_finality&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="no"&gt;NODE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://explorer.janzeer.org"&lt;/span&gt;
&lt;span class="no"&gt;TOKEN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"a125c23c403f992c36a472050e5709a43b359dda6bc9113e2bc39050ba8a19c6"&lt;/span&gt; &lt;span class="c1"&gt;# DEMO&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rpc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JanzeerClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;me&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Account&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_mnemonic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"MNEMONIC"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sign_tx&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;TxBuilder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transfer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;# 25.00 DEMO, in base units&lt;/span&gt;
    &lt;span class="n"&gt;recipient&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"0x598b1301acef3baba6ce25e38dd17b723f7b98b1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;nonce&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;network_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"networkId"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;submit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;final&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;wait_for_finality&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rpc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"final in block"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;final&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"blockHeight"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That script, recorded live, is the &lt;a href="https://www.youtube.com/@janzeerorg" rel="noopener noreferrer"&gt;one-minute token video&lt;/a&gt;. The token section of the &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;developer guide&lt;/a&gt; has the byte layout and every rule.&lt;/p&gt;

&lt;p&gt;Tomorrow we return to the plan: what happens inside those fifteen seconds, and why a committed block is final.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Every number here is from the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live chain&lt;/a&gt;, and the text is mine. JNZ is the network's unit, it is not listed anywhere, DEMO has no value, and nothing in this series is financial advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>tokens</category>
      <category>python</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Final in one block: 15-second slots and the two-phase BFT vote</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Sat, 14 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/final-in-one-block-15-second-slots-and-the-two-phase-bft-vote-1jeo</link>
      <guid>https://dev.to/syriandeveloper/final-in-one-block-15-second-slots-and-the-two-phase-bft-vote-1jeo</guid>
      <description>&lt;p&gt;&lt;a href="https://janzeer.org/blog/first-token-on-mainnet" rel="noopener noreferrer"&gt;The last article&lt;/a&gt; took a detour through the first token on mainnet. Back to the protocol. This one is about the question an exchange or a shop asks first: when is a payment really done?&lt;/p&gt;

&lt;p&gt;On many chains the answer is a number of confirmations. You wait for six blocks, or twelve, or thirty, because a block can still be replaced by a longer competing chain. On Janzeer the answer is one block. Once a transaction is in a committed block, it is final. There are no confirmation counts and no reorganisations. Here is how that works, and what it costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time is cut into slots
&lt;/h2&gt;

&lt;p&gt;Every 15 seconds is one slot: a 12-second window to produce and vote, then a 3-second pause. Each slot has exactly one owner, a validator chosen round-robin from the active set. Every node works out the owner from the wall clock and the start time of the current epoch, so nobody has to announce whose turn it is.&lt;/p&gt;

&lt;p&gt;That is also why clocks matter. A node whose clock drifts more than 250 milliseconds from NTP time stops producing blocks. It keeps following the chain, but it does not take its turn until its clock is right again.&lt;/p&gt;

&lt;p&gt;If the owner of a slot is offline, the slot passes empty and the next owner continues. A validator that misses its slots is removed from the set at the next epoch boundary, and it can come back later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two rounds of votes
&lt;/h2&gt;

&lt;p&gt;The slot owner builds a block from pending transactions and sends it to the other validators. Then two rounds of voting follow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;PREPARE.&lt;/strong&gt; Each validator checks the block and signs a PREPARE vote for it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;COMMIT.&lt;/strong&gt; When a validator has seen enough PREPARE votes, it re-executes every transaction in the block, checks the resulting state against the block's merkle roots, and signs a COMMIT vote.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;"Enough" is a quorum: more than two thirds of the active validators. With N validators the quorum is ⌊2N/3⌋ + 1. Today there are &lt;a href="https://explorer.janzeer.org/validators" rel="noopener noreferrer"&gt;seven validators&lt;/a&gt;, so the quorum is five. When five COMMIT votes exist, the block is final, and every node adds it to its chain.&lt;/p&gt;

&lt;p&gt;Votes are signed messages, and at first every validator sends every vote to every other one. When a round reaches its quorum, the votes are bundled into one quorum certificate and that single message is passed on. This keeps traffic small on home connections and Raspberry Pis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why one block is enough
&lt;/h2&gt;

&lt;p&gt;Two facts make a committed block permanent.&lt;/p&gt;

&lt;p&gt;First, any two quorums overlap. Five of seven and another five of seven always share at least three validators. For two different blocks to be committed at the same height, those shared validators would have had to vote for both of them.&lt;/p&gt;

&lt;p&gt;Second, voting twice is provable. A validator may cast one vote per slot per round. If it signs two different votes for the same slot, both signed messages together are a proof, and anyone can submit that proof to the chain. A validator proven twice is banned for good, and the reporter receives 5 JNZ from the treasury.&lt;/p&gt;

&lt;p&gt;So a second block at the same height would need at least three validators to cheat, and each of them would leave signed evidence. With seven validators the network tolerates two faulty or malicious ones. The general rule is f faulty validators out of 3f + 1.&lt;/p&gt;

&lt;p&gt;On top of that, every node that adds a block re-executes it. A node does not trust the producer, the votes, or the peer it syncs from. If a block's state does not match what the transactions produce, the node refuses the block.&lt;/p&gt;

&lt;h2&gt;
  
  
  The price: when too many are silent, the chain stops
&lt;/h2&gt;

&lt;p&gt;The same rule works the other way. If fewer than five of the seven validators are online and voting, no block reaches a quorum, and no block is produced. The chain does not split into two histories; it waits. When enough validators return, block production resumes from the last final block.&lt;/p&gt;

&lt;p&gt;This is a deliberate choice of safety over liveness. A payment can be delayed, but it can never be undone. It is also not theoretical. In late October the network stopped twice for about four hours: once because too many validators were offline at the same time, and once because of a bug in how votes were counted for a slot. Both are described, with the fixes, in the &lt;a href="https://janzeer.org/incidents" rel="noopener noreferrer"&gt;incident reports&lt;/a&gt; and in a longer post-mortem on &lt;a href="https://dev.to/syriandeveloper/three-ways-a-bft-chain-goes-quiet-a-week-of-incidents-on-a-small-layer-1-315k"&gt;dev.to&lt;/a&gt;. The lesson was not to weaken the quorum. It was to add more independent validators and to make silent failures visible. A fifth project validator was added the same week.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it means if you build on it
&lt;/h2&gt;

&lt;p&gt;For anyone who accepts JNZ, the rules are short:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Credit a transaction when its status is &lt;code&gt;FINAL&lt;/code&gt; and its receipt is successful. Never credit a &lt;code&gt;PENDING&lt;/code&gt; one.&lt;/li&gt;
&lt;li&gt;There is nothing more to wait for. A committed block is not rolled back.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;janzeer_waitForFinality&lt;/code&gt; in the JSON-RPC API waits for exactly that moment. Each of the five SDKs wraps it in one call.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://janzeer.org/docs/pdf/en/integration-guide.pdf" rel="noopener noreferrer"&gt;integration guide&lt;/a&gt; has the full checklist for an exchange or a payment service.&lt;/p&gt;

&lt;p&gt;In numbers, as of today: block 247,358, epoch 15, seven validators, one new block every 15 seconds. Everything in this article can be checked against the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live explorer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next: one native binary, and what it takes to run a Layer-1 node on a 2 GB VPS and on a Raspberry Pi 3.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Every number here is from the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live chain&lt;/a&gt; and the protocol facts in the &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;public documentation&lt;/a&gt;, and the text is mine. JNZ is the network's unit, it is not listed anywhere, and nothing in this series is financial advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>consensus</category>
      <category>byzantinefaulttolera</category>
      <category>finality</category>
    </item>
    <item>
      <title>Turn a callback WebSocket feed into a Kotlin Flow with callbackFlow (with a live feed to try it on)</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Fri, 13 Nov 2026 04:08:49 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/turn-a-callback-websocket-feed-into-a-kotlin-flow-with-callbackflow-with-a-live-feed-to-try-it-on-lj0</link>
      <guid>https://dev.to/syriandeveloper/turn-a-callback-websocket-feed-into-a-kotlin-flow-with-callbackflow-with-a-live-feed-to-try-it-on-lj0</guid>
      <description>&lt;p&gt;Most APIs that push data hand you a callback. Kotlin code would rather have a &lt;code&gt;Flow&lt;/code&gt;. &lt;code&gt;callbackFlow&lt;/code&gt; is the bridge, and&lt;br&gt;
it is short, but two details decide whether your version leaks sockets: where the cleanup goes, and whether the Flow is&lt;br&gt;
cold.&lt;/p&gt;

&lt;p&gt;To have something real to wrap, this article uses a public blockchain network that emits a block every 15 seconds over&lt;br&gt;
a WebSocket. It needs no API key and no account, so the code runs as written. You do not need to know anything about&lt;br&gt;
the chain; treat it as a server that pushes one event every 15 seconds.&lt;/p&gt;
&lt;h3&gt;
  
  
  The project
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;build.gradle.kts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="n"&gt;plugins&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;kotlin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"jvm"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="s2"&gt;"2.2.0"&lt;/span&gt;
    &lt;span class="n"&gt;application&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;repositories&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;mavenCentral&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;implementation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.janzeer:janzeer-sdk-client:0.1.7"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;implementation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;kotlin&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;jvmToolchain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;application&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;mainClass&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"MainKt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The callback API
&lt;/h3&gt;

&lt;p&gt;The SDK's WebSocket client looks like most push clients:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://explorer.janzeer.org"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;subscription&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribeNewBlocks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NewBlocksParams&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// … later&lt;/span&gt;
&lt;span class="n"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;unsubscribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things to manage by hand: the socket, the subscription, and the moment you stop caring.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Flow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coroutines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;channels&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;awaitClose&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coroutines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Flow&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coroutines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;callbackFlow&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coroutines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coroutines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;take&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coroutines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;runBlocking&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coroutines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;withTimeout&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;janzeer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;BlockView&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;janzeer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;janzeer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NewBlocksParams&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="no"&gt;NODE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://explorer.janzeer.org"&lt;/span&gt;

&lt;span class="cm"&gt;/** Every newly committed block as a cold Flow: the socket opens on collect and closes when the collector stops. */&lt;/span&gt;
&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;newBlocks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Flow&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;BlockView&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;callbackFlow&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;subscription&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribeNewBlocks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NewBlocksParams&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;trySend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;awaitClose&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;unsubscribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;runBlocking&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Long&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;
    &lt;span class="nf"&gt;withTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;90_000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;newBlocks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
                &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;gap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1000.0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;timestamp&lt;/span&gt;
                &lt;span class="s2"&gt;"#${block.height}  ${block.hash.take(12)}…  gap=${gap ?: "&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="s2"&gt;"}s"&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;take&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;println&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;./gradlew run&lt;/code&gt; printed this on a real run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#239312  126c6f6b7094…  gap=-s
#239313  c93fbe16e199…  gap=15.012s
#239314  02364077a56f…  gap=14.999s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The two details
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Cleanup belongs in &lt;code&gt;awaitClose&lt;/code&gt;, and nowhere else.&lt;/strong&gt; &lt;code&gt;awaitClose&lt;/code&gt; suspends the builder until the collector goes&lt;br&gt;
away, then runs its block. "Goes away" covers every case at once: &lt;code&gt;take(3)&lt;/code&gt; finished, the collecting coroutine was&lt;br&gt;
cancelled, &lt;code&gt;withTimeout&lt;/code&gt; fired, or an exception came from downstream. Here it unsubscribes first, so the server is told,&lt;br&gt;
and then closes the socket. If you forget &lt;code&gt;awaitClose&lt;/code&gt;, &lt;code&gt;callbackFlow&lt;/code&gt; throws at runtime to tell you so, which is one of&lt;br&gt;
the kinder errors in the coroutines library.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open the resource inside the builder, so the Flow is cold.&lt;/strong&gt; &lt;code&gt;JanzeerRpcWs.connect&lt;/code&gt; is called inside &lt;code&gt;callbackFlow&lt;/code&gt;,&lt;br&gt;
not outside it. Calling &lt;code&gt;newBlocks(NODE)&lt;/code&gt; therefore opens nothing; the socket exists only while somebody collects, and&lt;br&gt;
two collectors get two sockets. If you want one shared socket for many collectors, add &lt;code&gt;shareIn&lt;/code&gt; at the call site, where&lt;br&gt;
the scope that owns the socket is visible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;shared&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;newBlocks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shareIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;SharingStarted&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;WhileSubscribed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5_000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;replay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;WhileSubscribed&lt;/code&gt; closes the socket when the last collector leaves, through the same &lt;code&gt;awaitClose&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;trySend&lt;/code&gt;, not &lt;code&gt;send&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The callback runs on the WebSocket's thread, which is not a coroutine, so it cannot call the suspending &lt;code&gt;send&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;trySend&lt;/code&gt; never blocks that thread. With the default buffer it drops an element only if the collector is 64 events&lt;br&gt;
behind; at one event every 15 seconds that does not happen. For a fast feed, pick the policy on purpose:&lt;br&gt;
&lt;code&gt;.buffer(Channel.CONFLATED)&lt;/code&gt; to keep only the newest, or a larger buffer to keep all.&lt;/p&gt;

&lt;h3&gt;
  
  
  A timeout around the collector
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;withTimeout(90_000)&lt;/code&gt; is there because a push feed can go quiet without closing. Six block intervals without an event&lt;br&gt;
means something is wrong, and a timeout turns "hangs for ever" into an exception you can log. The timeout cancels the&lt;br&gt;
collector, and &lt;code&gt;awaitClose&lt;/code&gt; still runs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where to go next
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The same wrapper works for the address feed: &lt;code&gt;ws.subscribeAddressActivity(listOf(address)) { event -&amp;gt; trySend(event) }&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The SDK is on Maven Central as &lt;code&gt;org.janzeer:janzeer-sdk-client&lt;/code&gt;, Apache-2.0; source and examples:
&lt;a href="https://github.com/janzeerOrg/janzeer-sdk-kotlin" rel="noopener noreferrer"&gt;https://github.com/janzeerOrg/janzeer-sdk-kotlin&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The same feed drawn live in a browser: &lt;a href="https://explorer.janzeer.org/workflow" rel="noopener noreferrer"&gt;https://explorer.janzeer.org/workflow&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kotlin</category>
      <category>coroutines</category>
      <category>flow</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Follow a live blockchain from Python with asyncio and 20 lines of code</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Thu, 12 Nov 2026 21:50:21 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/follow-a-live-blockchain-from-python-with-asyncio-and-20-lines-of-code-390</link>
      <guid>https://dev.to/syriandeveloper/follow-a-live-blockchain-from-python-with-asyncio-and-20-lines-of-code-390</guid>
      <description>&lt;p&gt;Most &lt;code&gt;asyncio&lt;/code&gt; tutorials fake their data source with &lt;code&gt;asyncio.sleep&lt;/code&gt;. This one uses a real feed: a public blockchain&lt;br&gt;
network that produces a block every 15 seconds and pushes each one over a WebSocket. There is no API key, no account&lt;br&gt;
and no rate plan, so everything below runs as written.&lt;/p&gt;

&lt;p&gt;The network is Janzeer, a small Layer-1 chain. You do not need to know anything about it to follow along; treat it as&lt;br&gt;
a server that emits one JSON event every 15 seconds.&lt;/p&gt;
&lt;h3&gt;
  
  
  Set up
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python -m venv .venv &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; . .venv/bin/activate
pip install &lt;span class="s2"&gt;"janzeer-sdk[ws]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Python 3.10 or newer. The &lt;code&gt;[ws]&lt;/code&gt; extra pulls in &lt;code&gt;websockets&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Print every new block
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;deque&lt;/span&gt;

&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;janzeer&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;

&lt;span class="no"&gt;NODE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://explorer.janzeer.org"&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;deque&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;deque&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxlen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;last_ts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;sub&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe_new_blocks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;put_nowait&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;block&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;ts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"timestamp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;last_ts&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ts&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;last_ts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;last_ts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ts&lt;/span&gt;
                &lt;span class="n"&gt;avg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;gaps&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;
                &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"#{block['height']}  {block['hash'][:12]}…  txs={block['transactionsCount']}  avg gap={avg:.1f}s"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;unsubscribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Output from a real run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#239213  4e0054fc98db…  txs=1  avg gap=0.0s
#239214  f92c4915328c…  txs=1  avg gap=15.0s
#239215  4e5cf64b2332…  txs=1  avg gap=15.0s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things in there are worth copying into your own code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A queue as the callback sink.&lt;/strong&gt; &lt;code&gt;subscribe_new_blocks&lt;/code&gt; takes a plain callback. Passing &lt;code&gt;blocks.put_nowait&lt;/code&gt; turns the&lt;br&gt;
push feed into something you can &lt;code&gt;await&lt;/code&gt;, and keeps your processing out of the WebSocket reader. If your handler is&lt;br&gt;
slow, the queue absorbs the burst; the socket keeps being read.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A timeout on every wait.&lt;/strong&gt; &lt;code&gt;asyncio.wait_for(blocks.get(), timeout=60)&lt;/code&gt; is the difference between a script that&lt;br&gt;
reports "the feed went quiet" and one that hangs for ever. Sixty seconds is four block intervals here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;try&lt;/code&gt; / &lt;code&gt;finally&lt;/code&gt; around the subscription.&lt;/strong&gt; The &lt;code&gt;async with&lt;/code&gt; closes the socket, and the &lt;code&gt;finally&lt;/code&gt; unsubscribes&lt;br&gt;
first, so the server is told before the connection drops. On Ctrl-C, &lt;code&gt;asyncio.run&lt;/code&gt; cancels &lt;code&gt;main&lt;/code&gt;, and both still run.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Watch an address
&lt;/h3&gt;

&lt;p&gt;The same feed can filter by address. A validator's wallet is a convenient target because it receives a block reward&lt;br&gt;
every few minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;

&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;janzeer&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;format_jnz&lt;/span&gt;

&lt;span class="no"&gt;NODE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://explorer.janzeer.org"&lt;/span&gt;
&lt;span class="no"&gt;WATCH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"0x038cba8510852bd5ce07166427d16cf81b6fb849"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe_address_activity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;WATCH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;put_nowait&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"transaction"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"block {event['blockHeight']}: {tx['type']} of {format_jnz(tx['amount'])} ({tx['status']})"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;block 239222: reward of 10 JNZ (FINAL)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The status is &lt;code&gt;FINAL&lt;/code&gt; in the very first notification. On this network a committed block cannot be reorganised, so&lt;br&gt;
there is no "wait for six confirmations" loop to write. That removes a whole class of state from the client.&lt;/p&gt;

&lt;p&gt;Amounts arrive as decimal strings and &lt;code&gt;format_jnz&lt;/code&gt; prints them. The SDK never converts money to &lt;code&gt;float&lt;/code&gt;; if you do&lt;br&gt;
arithmetic on amounts, use its helpers or &lt;code&gt;decimal.Decimal&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Run several things in one loop
&lt;/h3&gt;

&lt;p&gt;Because the clients are ordinary &lt;code&gt;asyncio&lt;/code&gt; objects, combining them is &lt;code&gt;asyncio.gather&lt;/code&gt; or a &lt;code&gt;TaskGroup&lt;/code&gt;. This reads the&lt;br&gt;
chain's current height over HTTP while the WebSocket subscription is open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;

&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;janzeer&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;AsyncJanzeerRpc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;

&lt;span class="no"&gt;NODE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://explorer.janzeer.org"&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;AsyncJanzeerRpc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;rpc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;JanzeerRpcWs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;NODE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe_new_blocks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;put_nowait&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;tip&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_tip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"tip over HTTP:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tip&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"height"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"| next block over WebSocket:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"height"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both async HTTP clients accept an &lt;code&gt;http=&lt;/code&gt; argument, so several clients can share one &lt;code&gt;httpx.AsyncClient&lt;/code&gt; and its&lt;br&gt;
connection pool. The SDK's &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-python/blob/master/docs/asyncio.md" rel="noopener noreferrer"&gt;asyncio guide&lt;/a&gt;&lt;br&gt;
covers that, and was written by an outside contributor last week.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens when the connection drops
&lt;/h3&gt;

&lt;p&gt;The WebSocket client reconnects by itself and resumes a block subscription from the last block it delivered, so a&lt;br&gt;
restart of your Wi-Fi does not lose or repeat blocks. If you need the same guarantee across restarts of your own&lt;br&gt;
process, store the last height you handled and pass it back as &lt;code&gt;from_height&lt;/code&gt; when you subscribe; the node replays from&lt;br&gt;
there before following the tip.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where to go next
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Sending a signed transfer and waiting for it to become final is 15 more lines:
&lt;a href="https://github.com/janzeerOrg/janzeer-sdk-python/blob/master/examples/07_async_quickstart_transfer.py" rel="noopener noreferrer"&gt;&lt;code&gt;examples/07_async_quickstart_transfer.py&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The package is on PyPI as &lt;a href="https://pypi.org/project/janzeer-sdk/" rel="noopener noreferrer"&gt;&lt;code&gt;janzeer-sdk&lt;/code&gt;&lt;/a&gt;, typed (&lt;code&gt;py.typed&lt;/code&gt;), Apache-2.0.&lt;/li&gt;
&lt;li&gt;The live view of the same feed, drawn in a browser: &lt;a href="https://explorer.janzeer.org/workflow" rel="noopener noreferrer"&gt;https://explorer.janzeer.org/workflow&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>asyncio</category>
      <category>websockets</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why no staking: validators, the 2,000 JNZ deposit and rotating seats</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Tue, 10 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/why-no-staking-validators-the-2000-jnz-deposit-and-rotating-seats-1mb1</link>
      <guid>https://dev.to/syriandeveloper/why-no-staking-validators-the-2000-jnz-deposit-and-rotating-seats-1mb1</guid>
      <description>&lt;p&gt;&lt;a href="https://janzeer.org/blog/what-is-janzeer" rel="noopener noreferrer"&gt;Yesterday's article&lt;/a&gt; gave the shape of Janzeer: a block every 15 seconds, final in one block, a fixed supply, no staking. Today is about the part people ask about first. If nobody stakes, who validates, why would they, and what stops a thousand fake nodes from taking over?&lt;/p&gt;

&lt;h2&gt;
  
  
  What a stake does, and what it costs
&lt;/h2&gt;

&lt;p&gt;Proof-of-stake solves one problem well: it makes identities expensive. A validator must lock coins, so an attacker needs a large share of the coins to hold a large share of the votes. The side effects are the part I do not like.&lt;/p&gt;

&lt;p&gt;The lock earns yield, so validating becomes an investment product. Weight follows wealth: whoever holds the most coins casts the most votes and earns the most new coins. Smaller holders delegate to pools, and a few pools end up casting most votes on most chains. Unbonding periods, slashing of the stake, and reward-sharing contracts pile on top, and each one is a place where things go wrong.&lt;/p&gt;

&lt;p&gt;Janzeer keeps the useful part, expensive identities, and drops the rest. A validator identity costs 2,000 JNZ, once, and that payment buys exactly one seat with exactly one vote. It earns nothing by itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting in: one transaction
&lt;/h2&gt;

&lt;p&gt;A validator is a node plus one registration transaction. The node syncs the chain, then its operator sends a registration carrying the node's public key, a fixed fee of 3 JNZ, and a deposit of 2,000 JNZ. There is no application, no vote, no approval by anyone. If the transaction is valid, the node is registered.&lt;/p&gt;

&lt;p&gt;The deposit goes to the &lt;a href="https://janzeer.org/transparency" rel="noopener noreferrer"&gt;treasury&lt;/a&gt;, the key-less address that pays block rewards, and it never comes back. Not when the validator leaves, not when the network grows, not on request. That is the whole Sybil guard: a thousand fake validators cost two million JNZ, paid into the pot that rewards the honest ones. I will say plainly that this guard is softer than a large stake or proof-of-work. It is sized for a small network of operators who run nodes because they want to run nodes.&lt;/p&gt;

&lt;p&gt;A registered node joins the validator set at the next epoch boundary. The &lt;a href="https://explorer.janzeer.org/validators" rel="noopener noreferrer"&gt;explorer's validators page&lt;/a&gt; shows it as pending until then.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seats, epochs and rotation
&lt;/h2&gt;

&lt;p&gt;Time on Janzeer is divided into epochs of 17,000 blocks, about three days. At each boundary every node computes the same new validator set from the chain's state, and a special genesis block records it. From then until the next boundary the set is frozen: slot after slot, the right to propose a block goes round the set in a fixed order, and the set votes.&lt;/p&gt;

&lt;p&gt;The set has at most 21 seats. While fewer validators are registered, everyone who is registered and awake has a seat. When more register than there are seats, the longest-registered validators keep their seats and five of the seats rotate, epoch by epoch, through a standby bench of up to a hundred, in registration order. No lottery, no weight, no bidding: the order you joined is the order you serve.&lt;/p&gt;

&lt;p&gt;Two things remove a validator from the set. If it stays silent on its assigned slots for an epoch, it is dropped at the next boundary; it keeps its registration and comes back when its node is healthy. And a validator can leave on purpose with an exit transaction, which takes it out of the schedule at the next boundary instead of degrading the chain for three days. Either way the deposit is gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the validator earns
&lt;/h2&gt;

&lt;p&gt;Every block pays its producer 10 JNZ from the treasury, plus 80 percent of the fees in that block. The other 20 percent of fees returns to the treasury. Nothing is shared with anyone, nothing is claimed later, nothing is paid for merely being registered. Rewards are for work, measured one block at a time.&lt;/p&gt;

&lt;p&gt;The reward halves roughly every year, and the treasury is finite. In the long run a validator lives on fees, which is how it should be on a chain with a fixed supply.&lt;/p&gt;

&lt;p&gt;With seven validators today, each produces one block in seven, about 820 blocks a day. That is the current arithmetic, not a forecast; it changes with every validator that joins, and JNZ has no price to multiply it by.&lt;/p&gt;

&lt;h2&gt;
  
  
  Misbehaviour
&lt;/h2&gt;

&lt;p&gt;The one thing a validator can do to hurt the chain, besides being offline, is to vote twice in the same slot for two different blocks. Every node keeps one vote per validator per slot per voting stage. A second, conflicting vote is itself the proof: any node that sees it wraps it into a slashing transaction, and the chain records the offense. After two proven offenses the key is banned permanently. Whoever reported it receives a 5 JNZ bounty from the treasury.&lt;/p&gt;

&lt;p&gt;There is no slashing of a stake because there is no stake. The penalty is the seat and the 2,000 JNZ that bought it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The launch problem: anchors that phase themselves out
&lt;/h2&gt;

&lt;p&gt;Every new chain faces the same awkward moment: at block one there is nobody to validate but its creator. Janzeer launched with three anchor nodes run by the project, and they are privileged in exactly one way: an anchor cannot be dropped for downtime. The number of privileged anchors is written into every epoch's genesis block, so any node can reconstruct it.&lt;/p&gt;

&lt;p&gt;That privilege is designed to expire. Once enough independent validators have proven themselves, meaning they produced blocks in each of the last two epochs, one anchor loses its privilege per epoch. A demoted anchor is not switched off; it keeps validating like any other registrant and can be dropped like any other registrant. The rule never lets the healthy set fall below four, and if the independent set collapses later, dormant anchors re-engage. The anchors are scaffolding, and the chain takes the scaffolding down on its own schedule.&lt;/p&gt;

&lt;p&gt;Today the project still runs five of the seven validators: the anchors and a fifth node. The other two are a Raspberry Pi 3 in my home and a balenaFin board at a friend's. I want that ratio to turn around, and the mechanism to turn it around is already live.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you want a seat
&lt;/h2&gt;

&lt;p&gt;Running a validator takes a machine with 2 GB of memory and a public port, the node bundle from the &lt;a href="https://janzeer.org/validators" rel="noopener noreferrer"&gt;validators page&lt;/a&gt;, and the 2,003 JNZ for the registration. For the first ten outside operators the project covers that amount through a &lt;a href="https://github.com/janzeerorg/janzeer-node/issues/new?template=validator-grant.yml" rel="noopener noreferrer"&gt;grant&lt;/a&gt;, paid from the ecosystem wallet to the address you name, until the first of January 2027 at the latest. One grant per operator, and the project's own nodes do not count. The &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;operator guide&lt;/a&gt; walks through the whole thing; a &lt;a href="https://janzeer.org/raspberry-pi" rel="noopener noreferrer"&gt;Raspberry Pi has done it&lt;/a&gt;, so a small VPS will.&lt;/p&gt;

&lt;p&gt;Tomorrow: what happens inside those 15 seconds. The two-phase vote, why a committed block is final, and what the chain does when a validator is missing.&lt;/p&gt;

&lt;p&gt;Every number here is from the &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;live chain&lt;/a&gt; and the protocol facts in the &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;public documentation&lt;/a&gt;, and the text is mine. JNZ is the network's unit, it is not listed anywhere, and nothing in this series is financial advice.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>consensus</category>
      <category>validators</category>
    </item>
    <item>
      <title>What is Janzeer? A Layer-1 with no staking, explained in ten minutes</title>
      <dc:creator>Malek</dc:creator>
      <pubDate>Mon, 09 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/syriandeveloper/what-is-janzeer-a-layer-1-with-no-staking-explained-in-ten-minutes-57fg</link>
      <guid>https://dev.to/syriandeveloper/what-is-janzeer-a-layer-1-with-no-staking-explained-in-ten-minutes-57fg</guid>
      <description>&lt;p&gt;I run a small public blockchain called Janzeer. It has been producing a block every fifteen seconds since the first of October, it is on &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;block 221,000&lt;/a&gt; and counting, and seven validators keep it alive, two of them single-board computers in people's homes. This is the first article of a series. Today only the shape of the thing; the next pieces go one layer deeper each day: validators, consensus, running a node, wallets, the SDKs, the money, the incidents, and how it was built.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why another chain
&lt;/h2&gt;

&lt;p&gt;Two things about proof-of-stake never sat right with me.&lt;/p&gt;

&lt;p&gt;The first is the capital gate. On most chains the right to validate is bought with a stake, and the stake earns yield, so the people with the most coins validate the most and earn the most. Delegation makes it worse: a handful of pools end up voting for everyone. The second is the operations burden. Running a validator on the large chains means a serious server, a sync that takes days, and a slashing risk if your box goes offline during a storm.&lt;/p&gt;

&lt;p&gt;I wanted a chain where joining as a validator costs a one-time fee and nothing else, where a seat is a seat regardless of how rich its owner is, and where the node is one file you can run on a Raspberry Pi. And I wanted transactions to be final the moment they are in a block, without "wait for twelve confirmations".&lt;/p&gt;

&lt;p&gt;Janzeer is that attempt. It is not a fork of anything; the node is written from scratch in Kotlin.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape, in six facts
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A block every 15 seconds, final in one block.&lt;/strong&gt; Time is cut into 15-second slots. Each slot belongs to one validator, who proposes a block. The others vote in two rounds, prepare and commit. When more than two thirds agree in the commit round, the block is final. There are no confirmations to count and no reorganisations to wait out. If the owner of a slot is offline, the slot is empty and the next one proceeds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validators register, they do not stake.&lt;/strong&gt; Anyone can become a validator by sending one transaction with a 2,000 JNZ deposit. The deposit goes to the treasury and is not returned, ever, even when the validator leaves. It buys a seat and nothing more: no yield on the deposit, no voting weight, no delegation. Every seat has the same weight. Seats are assigned per epoch of 17,000 blocks, roughly three days, and rotate when there are more registered validators than seats. The cap is 21 seats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A fixed supply that existed on day one.&lt;/strong&gt; There are 100,000,000 JNZ and there will never be more. All of it was created in the genesis block: 77.5 million in a key-less treasury address that pays block rewards, 12 million in an ecosystem pool, 7.5 million for the founder, and 1 million for each of the three anchor nodes that bootstrapped the network. Nothing is minted later. The block reward is 10 JNZ, paid out of the treasury to the block producer, and it halves roughly every year. Twenty percent of every fee flows back to the treasury. When the treasury is empty, rewards are fees only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Non-custodial everywhere.&lt;/strong&gt; The node never sees a private key. Wallets derive keys on the device, sign locally, and send signed transactions. This holds for the mobile wallet, the web wallet in the explorer, the command-line client and every SDK.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One native binary.&lt;/strong&gt; The node is a GraalVM native image, about 260 MB, with no Java runtime to install. The whole mainnet bootstrap, four validators plus PostgreSQL plus a Telegram game, runs on one virtual server with 2 GB of memory and one core. A Raspberry Pi 3 with 1 GB has been a validator since October.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everything is documented in English and Arabic.&lt;/strong&gt; The &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;white paper, the developer guide, the API reference&lt;/a&gt;, the wallet, and every announcement exist in both languages. Arabic is not a translation added later; it is a first-class language of the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it stands today
&lt;/h2&gt;

&lt;p&gt;Numbers from the explorer on 9 November 2026, 40 days after launch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Block 221,056, fourteenth epoch, average block time 15.0 seconds.&lt;/li&gt;
&lt;li&gt;7 active validators: five run by the project (four on the launch server plus a fifth node), one Raspberry Pi 3 in my home, one balenaFin board at a friend's.&lt;/li&gt;
&lt;li&gt;Node version 0.1.11, eleven releases since launch, upgrades roll one validator at a time without a missed block.&lt;/li&gt;
&lt;li&gt;Two incidents, both in late October, both published with their causes on the &lt;a href="https://janzeer.org/incidents" rel="noopener noreferrer"&gt;incidents page&lt;/a&gt;: the chain stood still for about four hours each time while every node was convinced it was synchronised. The fixes shipped within a day each. I will write that story in full later in this series.&lt;/li&gt;
&lt;li&gt;About a quarter of the supply is outside the treasury; the rest sits in the treasury address, which has no key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is small. I would rather say so than let anyone expect a network the size of the ones they know.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is not
&lt;/h2&gt;

&lt;p&gt;JNZ is the unit of the network: fees, deposits and rewards are counted in it. It is not listed on any exchange, it has no price, and nothing in this series is financial advice or a promise of either. There is no token sale, no airdrop campaign, no "join now before it is too late". If you want JNZ today, the ways are to run a validator and earn block rewards, to play the &lt;a href="https://t.me/jpong_bot/jpong" rel="noopener noreferrer"&gt;Telegram game&lt;/a&gt; that pays its winners from a finite budget, or to have someone send you some.&lt;/p&gt;

&lt;p&gt;There is also no public test network yet. The SDKs and the wallet talk to mainnet, which is cheap enough to try with pocket money.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you can do in five minutes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Look at it.&lt;/strong&gt; The &lt;a href="https://explorer.janzeer.org" rel="noopener noreferrer"&gt;explorer&lt;/a&gt; shows blocks, transactions, validators and a live animation of the consensus cycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hold it.&lt;/strong&gt; The &lt;a href="https://janzeer.org/wallet" rel="noopener noreferrer"&gt;wallet&lt;/a&gt; exists for Android, Linux, Windows and macOS, and in the browser inside the explorer. Keys stay on your device.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build on it.&lt;/strong&gt; Official SDKs for &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-ts" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt;, &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-dart" rel="noopener noreferrer"&gt;Dart&lt;/a&gt;, &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-kotlin" rel="noopener noreferrer"&gt;Kotlin&lt;/a&gt;, &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-python" rel="noopener noreferrer"&gt;Python&lt;/a&gt; and &lt;a href="https://github.com/janzeerOrg/janzeer-sdk-go" rel="noopener noreferrer"&gt;Go&lt;/a&gt;, all open source under Apache-2.0, all tested against the same byte-for-byte conformance vectors. A first transaction is about twenty lines in any of them; there is a &lt;a href="https://www.youtube.com/@janzeerorg" rel="noopener noreferrer"&gt;one-minute video&lt;/a&gt; per language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Talk to it from a terminal.&lt;/strong&gt; &lt;a href="https://github.com/janzeerOrg/janzeer-cli" rel="noopener noreferrer"&gt;&lt;code&gt;jz&lt;/code&gt;&lt;/a&gt; is a 38 MB native command-line client: balances, blocks, a local encrypted wallet, sending, watching new blocks live.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run it.&lt;/strong&gt; &lt;a href="https://janzeer.org/validators" rel="noopener noreferrer"&gt;Download the node bundle&lt;/a&gt;, point it at mainnet, and it syncs. Registering as a validator is one command once it is in sync. The first ten outside operators get the 2,000 JNZ deposit covered by a grant.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Links: &lt;a href="https://janzeer.org/docs" rel="noopener noreferrer"&gt;docs&lt;/a&gt; · &lt;a href="https://github.com/janzeerOrg" rel="noopener noreferrer"&gt;source&lt;/a&gt; · &lt;a href="https://t.me/janzeerorg" rel="noopener noreferrer"&gt;Telegram channel&lt;/a&gt; · &lt;a href="https://x.com/janzeerorg" rel="noopener noreferrer"&gt;X&lt;/a&gt; · &lt;a href="https://www.youtube.com/@janzeerorg" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A word on how this was built
&lt;/h2&gt;

&lt;p&gt;I designed Janzeer and I run it, and I wrote large parts of the code and the documentation with an AI coding assistant, Claude Code, reviewing and testing everything: 214 automated tests boot real nodes in every build, every SDK is checked against shared vectors and a 14-step end-to-end flow on a real network before each release, and the chain ran a seven-day acceptance test before launch that produced 37 findings, all fixed first. Every number in this article comes from the live explorer, and the text is mine.&lt;/p&gt;

&lt;p&gt;Tomorrow: why there is no staking, what the 2,000 JNZ deposit really buys, and how seats rotate.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>layer1</category>
      <category>consensus</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
