<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged opensouce</title>
<link>https://coderlegion.com/tag/opensouce</link>
<description>Powered by Question2Answer</description>
<item>
<title>From a Real-World Kefir Handover to an On-Chain Commitment with Node.js, SHA-256 and Base</title>
<link>https://coderlegion.com/27490/from-a-real-world-kefir-handover-to-an-on-chain-commitment-with-node-js-sha-256-and-base</link>
<description>&lt;p&gt;From a Real-World Kefir Handover to an On-Chain Commitment with Node.js, SHA-256 and Base&lt;/p&gt;
&lt;p&gt;Most blockchain demos begin with a smart contract.&lt;/p&gt;
&lt;p&gt;This one began with a real person handing kefir culture to another person.&lt;/p&gt;
&lt;p&gt;While building MyZubster, I wanted to test a practical question:&lt;/p&gt;
&lt;p&gt;How can we connect a real-world event to public blockchain evidence without storing personal data on-chain — and without pretending that blockchain proves the physical event itself?&lt;/p&gt;
&lt;p&gt;We now have a working end-to-end experiment.&lt;/p&gt;
&lt;p&gt;The architecture&lt;/p&gt;
&lt;p&gt;The flow is intentionally simple:&lt;/p&gt;
&lt;p&gt;Physical handover&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MarketplaceHandover&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;RECORDED&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Canonical payload&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;SHA-256&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Blockchain commitment&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Base Sepolia&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Transaction verification&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Blockchain receipt stored in MyZubster&lt;/p&gt;
&lt;p&gt;The important part is that the blockchain is not the database.&lt;/p&gt;
&lt;p&gt;MongoDB maintains the application state and structured evidence. The public blockchain provides an independent timestamped commitment.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Creating the handover record&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The physical kefir exchange progressed through explicit application states:&lt;/p&gt;
&lt;p&gt;ACCEPTED&lt;br&gt;
   ↓&lt;br&gt;
HANDED_OVER&lt;br&gt;
   ↓&lt;br&gt;
RECEIVED&lt;br&gt;
   ↓&lt;br&gt;
RECORDED&lt;/p&gt;
&lt;p&gt;Only after reaching RECORDED do we allow preparation of the blockchain commitment.&lt;/p&gt;
&lt;p&gt;That distinction matters.&lt;/p&gt;
&lt;p&gt;Creating a hash does not mean something has been anchored.&lt;/p&gt;
&lt;p&gt;Preparing a transaction does not mean it has been confirmed.&lt;/p&gt;
&lt;p&gt;And storing a transaction ID does not automatically mean the expected commitment actually exists on-chain.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Building the commitment&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the first implementation we defined:&lt;/p&gt;
&lt;p&gt;myzubster.marketplace-handover.v1&lt;/p&gt;
&lt;p&gt;The committed payload contains the identifiers, handover method, state and relevant event timestamps.&lt;/p&gt;
&lt;p&gt;From its deterministic representation we calculate a SHA-256 digest.&lt;/p&gt;
&lt;p&gt;For this real handover:&lt;/p&gt;
&lt;p&gt;ba9973f08ce86d16a3611c3cccbb9cc2cc779b9ea1cb6fd87a2e5864e557b6b9&lt;/p&gt;
&lt;p&gt;Instead of publishing the original record, the transaction contains:&lt;/p&gt;
&lt;p&gt;MZ-HANDOVER-V1:&lt;br&gt;
ba9973f08ce86d16a3611c3cccbb9cc2cc779b9ea1cb6fd87a2e5864e557b6b9&lt;/p&gt;
&lt;p&gt;This means the public chain receives the cryptographic commitment, not the participant's personal information.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Anchoring it on Base Sepolia&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We then performed the actual transaction.&lt;/p&gt;
&lt;p&gt;Network: Base Sepolia&lt;br&gt;
Chain ID: 84532&lt;br&gt;
Value: 0 ETH&lt;br&gt;
Block: 46933575&lt;br&gt;
Gas used: 24160&lt;br&gt;
Status: CONFIRMED&lt;br&gt;
Confirmed: 2026-09-17T08:57:18.000Z&lt;/p&gt;
&lt;p&gt;Transaction:&lt;/p&gt;
&lt;p&gt;0x998a98b1733312e248f74a1387319dae30aab8123a6115c517e4ffe0ef9584bf&lt;/p&gt;
&lt;p&gt;You don't have to trust this article.&lt;/p&gt;
&lt;p&gt;You can inspect the transaction yourself:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://sepolia.basescan.org/tx/0x998a98b1733312e248f74a1387319dae30aab8123a6115c517e4ffe0ef9584bf&quot;&gt;https://sepolia.basescan.org/tx/0x998a98b1733312e248f74a1387319dae30aab8123a6115c517e4ffe0ef9584bf&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verifying before trusting&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Before writing the blockchain receipt back into MyZubster, we verified the transaction against the chain.&lt;/p&gt;
&lt;p&gt;The verification included the expected chain ID, transaction, block, calldata commitment and confirmation.&lt;/p&gt;
&lt;p&gt;Only after those checks did MyZubster persist the blockchain metadata.&lt;/p&gt;
&lt;p&gt;The resulting state is conceptually:&lt;/p&gt;
&lt;p&gt;{&lt;br&gt;
  state: &quot;RECORDED&quot;,&lt;/p&gt;
&lt;p&gt;  blockchainCommitment: {&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;schema: &quot;myzubster.marketplace-handover.v1&quot;,
algorithm: &quot;SHA-256&quot;,
hash: &quot;ba9973f08ce86d16a3611c3cccbb9cc2cc779b9ea1cb6fd87a2e5864e557b6b9&quot;,
network: &quot;base-sepolia&quot;,
txId: &quot;0x998a98b1733312e248f74a1387319dae30aab8123a6115c517e4ffe0ef9584bf&quot;,
confirmedAt: &quot;2026-09-17T08:57:18.000Z&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  }&lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;And the application derives:&lt;/p&gt;
&lt;p&gt;const onchainRecorded = Boolean(&lt;br&gt;
  commitment.network &amp;amp;&amp;amp;&lt;br&gt;
  commitment.txId &amp;amp;&amp;amp;&lt;br&gt;
  commitment.confirmedAt&lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;So we deliberately keep these concepts separate:&lt;/p&gt;
&lt;p&gt;state = RECORDED&lt;/p&gt;
&lt;p&gt;onchainRecorded = true&lt;/p&gt;
&lt;p&gt;ONCHAIN_RECORDED does not replace the domain state.&lt;/p&gt;
&lt;p&gt;It adds another evidence layer.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Moving the experiment into reusable code&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A one-off transaction isn't enough.&lt;/p&gt;
&lt;p&gt;We therefore added blockchain commitment metadata to the MarketplaceHandover model and implemented an authenticated endpoint:&lt;/p&gt;
&lt;p&gt;POST /:handoverId/prepare-blockchain-commitment&lt;/p&gt;
&lt;p&gt;The model can now represent:&lt;/p&gt;
&lt;p&gt;blockchainCommitment: {&lt;br&gt;
  schema,&lt;br&gt;
  algorithm,&lt;br&gt;
  hash,&lt;br&gt;
  preparedAt,&lt;br&gt;
  network,&lt;br&gt;
  txId,&lt;br&gt;
  anchoredAt,&lt;br&gt;
  confirmedAt&lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;The endpoint requires an eligible RECORDED handover and checks participant authorization before generating the commitment.&lt;/p&gt;
&lt;p&gt;The implementation is public here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MyZubster-Ecosystem/myzubster/pull/1230&quot;&gt;https://github.com/MyZubster-Ecosystem/myzubster/pull/1230&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Main MyZubster repository:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MyZubster-Ecosystem/myzubster&quot;&gt;https://github.com/MyZubster-Ecosystem/myzubster&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Testing it&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After installing the repository's declared dependencies, we ran the relevant marketplace test suites:&lt;/p&gt;
&lt;p&gt;PASS tests/marketplaceFlow.test.js&lt;br&gt;
PASS tests/marketplaceEvidence.test.js&lt;/p&gt;
&lt;p&gt;Test Suites: 2 passed, 2 total&lt;br&gt;
Tests:       4 passed, 4 total&lt;br&gt;
TEST_EXIT=0&lt;/p&gt;
&lt;p&gt;The point wasn't simply to get a transaction onto a block explorer.&lt;/p&gt;
&lt;p&gt;The blockchain representation also needed to fit the existing marketplace/evidence architecture without breaking the application flow.&lt;/p&gt;
&lt;p&gt;What does the blockchain actually prove?&lt;/p&gt;
&lt;p&gt;This is the most important part.&lt;/p&gt;
&lt;p&gt;The transaction does not prove that the kefir was safe.&lt;/p&gt;
&lt;p&gt;It does not provide microbiological validation.&lt;/p&gt;
&lt;p&gt;It does not independently prove that the physical handover occurred exactly as described.&lt;/p&gt;
&lt;p&gt;And it certainly doesn't turn an observation into scientific evidence.&lt;/p&gt;
&lt;p&gt;What it gives us is much narrower:&lt;/p&gt;
&lt;p&gt;A public, timestamped cryptographic commitment that can later be compared with the corresponding digital record.&lt;/p&gt;
&lt;p&gt;That's useful because it allows us to ask a precise technical question:&lt;/p&gt;
&lt;p&gt;Does the record I have now produce the same commitment that was publicly anchored at that point in time?&lt;/p&gt;
&lt;p&gt;Why I like this architecture&lt;/p&gt;
&lt;p&gt;Instead of asking blockchain to become the source of all truth, we can separate responsibilities:&lt;/p&gt;
&lt;p&gt;Human action&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Application evidence&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Structured representation&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cryptographic commitment&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Public timestamp / receipt&lt;/p&gt;
&lt;p&gt;Each layer proves something different.&lt;/p&gt;
&lt;p&gt;That's a much more useful model for provenance than simply putting a &quot;verified on blockchain&quot; badge on an application.&lt;/p&gt;
&lt;p&gt;Next step: independent verification&lt;/p&gt;
&lt;p&gt;The natural next step is a verifier that can reproduce the process independently:&lt;/p&gt;
&lt;p&gt;record&lt;br&gt;
  → canonicalize()&lt;br&gt;
  → sha256()&lt;br&gt;
  → expectedCommitment&lt;br&gt;
  → fetchTransaction()&lt;br&gt;
  → decodeCalldata()&lt;br&gt;
  → compare()&lt;br&gt;
  → MATCH | NO_MATCH&lt;/p&gt;
&lt;p&gt;Eventually, I'd like verification to require as little trust in the MyZubster application itself as practical.&lt;/p&gt;
&lt;p&gt;Project links&lt;/p&gt;
&lt;p&gt;MyZubster:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.myzubster.com&quot;&gt;https://www.myzubster.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Main source code:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MyZubster-Ecosystem/myzubster&quot;&gt;https://github.com/MyZubster-Ecosystem/myzubster&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;MyZubster GitHub organization:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MyZubster-Ecosystem&quot;&gt;https://github.com/MyZubster-Ecosystem&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On-chain handover integration — PR #1230:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MyZubster-Ecosystem/myzubster/pull/1230&quot;&gt;https://github.com/MyZubster-Ecosystem/myzubster/pull/1230&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kefir / fermentation knowledge repository:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/DanielIoni-creator/Myzubster-fermentation-kefir&quot;&gt;https://github.com/DanielIoni-creator/Myzubster-fermentation-kefir&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;MyZubster Marketplace:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/DanielIoni-creator/MyZubster-Marketplace&quot;&gt;https://github.com/DanielIoni-creator/MyZubster-Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Base Sepolia transaction:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://sepolia.basescan.org/tx/0x998a98b1733312e248f74a1387319dae30aab8123a6115c517e4ffe0ef9584bf&quot;&gt;https://sepolia.basescan.org/tx/0x998a98b1733312e248f74a1387319dae30aab8123a6115c517e4ffe0ef9584bf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What started as one person sharing kefir culture with another became a useful test of how physical events, application state, cryptographic evidence and public blockchain infrastructure can coexist without confusing one for another.&lt;/p&gt;
&lt;p&gt;There is still a lot to build, particularly around canonicalization, independent verification, batching and evidence schemas.&lt;/p&gt;
&lt;p&gt;But now we have something much more valuable than a diagram:&lt;/p&gt;
&lt;p&gt;a real event, a real application record, real code, a reproducible SHA-256 commitment and a real confirmed public transaction.&lt;/p&gt;
&lt;p&gt;And every layer can be inspected.&lt;/p&gt;
&lt;p&gt;MyZubster — Share → Try → Observe → Improve → Share again.&lt;/p&gt;
&lt;h2 id=&quot;nodejs-blockchain-web3-opensource-mongodb-sha256-base-cryptography-softwarearchitecture-provenance&quot;&gt;nodejs #blockchain #web3 #opensource #mongodb #sha256 #base #cryptography #softwarearchitecture #provenance&lt;/h2&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/27490/from-a-real-world-kefir-handover-to-an-on-chain-commitment-with-node-js-sha-256-and-base</guid>
<pubDate>Thu, 17 Sep 2026 09:09:36 +0000</pubDate>
</item>
<item>
<title>🚀 **Building MyZubster Circular Hygiene: Evidence Before Claims</title>
<link>https://coderlegion.com/26206/building-myzubster-circular-hygiene-evidence-before-claims</link>
<description>&lt;p&gt;🚀 &lt;strong&gt;Building MyZubster Circular Hygiene: Evidence Before Claims&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We’ve just designed a new MyZubster pilot for the circular economy of diapers, sanitary products and other absorbent hygiene products.&lt;/p&gt;
&lt;p&gt;The idea is simple:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;don’t start with the environmental claim — start with the evidence.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Our proposed pipeline:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Collection → Weighing → Digital Lot → Transport → Treatment → Recovered Materials → Evidence → Verification&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Each lot can generate a structured evidence package containing provenance, timestamps, chain of custody, input/output weights, recovered-material data and integrity hashes.&lt;/p&gt;
&lt;p&gt;But we’re keeping one critical rule in the architecture:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SHA-256 integrity ≠ physical/scientific verification.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So the trust model becomes:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;COLLECTED → DOCUMENTED → HASH_VERIFIED → MEASURED → EXTERNALLY_VERIFIED&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We’re proposing a staged pilot:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;50 t → 100 t → 500 t&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The first 50-ton gate should require:&lt;/p&gt;
&lt;p&gt;✅ ≥95% evidence completeness&lt;br&gt;
✅ verifiable mass balance&lt;br&gt;
✅ defined MRV methodology&lt;br&gt;
✅ external review&lt;/p&gt;
&lt;p&gt;We’ve now prepared the technical pilot material and started outreach to relevant European and Japanese organizations, including &lt;strong&gt;CSMT/LIFE contacts, Unicharm, Kao and P&amp;amp;G/Pampers&lt;/strong&gt;, to explore technical feedback and possible interoperability.&lt;/p&gt;
&lt;p&gt;These are exploratory discussions — &lt;strong&gt;not announced partnerships&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The bigger vision is an open digital layer connecting:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;waste operators + municipalities + manufacturers + recycling plants + recovered materials + MRV + marketplace&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If it works, the same evidence architecture could eventually be applied far beyond hygiene products.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MyZubster principle:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Build → Measure → Evidence → Verify → Replicate&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No evidence → no material claim.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;myzubster-opensource-circulareconomy-mrv-cleantech-wastetech-sustainability-softwareengineering-buildinpublic-innovation&quot;&gt;MyZubster #OpenSource #CircularEconomy #MRV #CleanTech #WasteTech #Sustainability #SoftwareEngineering #BuildInPublic #Innovation&lt;/h2&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26206/building-myzubster-circular-hygiene-evidence-before-claims</guid>
<pubDate>Fri, 04 Sep 2026 12:51:13 +0000</pubDate>
</item>
</channel>
</rss>