Skip to main content

· 5 min read
Samantha Holstine

Joining the Midnight team as a Developer Relations Engineer has been an exciting transition, but also an eye-opening one. While I anticipated a learning curve stepping into the Web3 space, I didn't expect just how fundamentally different it would be from my experiences in Web2. Web3 isn't simply a new tech stack—it's a shift in how we think about data, trust, and ownership.

As I began onboarding with Midnight, I quickly realized that to fully understand the value and capabilities of the platform, I first needed to ground myself in the core principles of blockchain and decentralized technologies. I started learning the basics with Cardano Academy as a first pass, and it has been a great resource for getting up to speed on the foundations of Web3.

So, if you're also new to Web3 or blockchain and feeling a bit overwhelmed, you're not alone. And if you're a seasoned pro, consider this a little refresher on some foundational topics I’ve started diving into. Here are the core concepts I've been exploring this week as I embark on my journey into the world of decentralized technology.

Core Concepts of Blockchain

Decentralization

At its heart, blockchain is about decentralization. Instead of relying on a single authority, such as a bank or server, blockchain distributes control across a network of independent nodes. This makes the system more resilient—there is no single point of failure—and ensures that no single entity can unilaterally change the rules.

Decentralization also lays the groundwork for trustless systems, where participants can interact and transact without needing to trust a central authority.

Consensus Algorithms

But how do all these independent nodes agree on what's true? That's where consensus algorithms come in. They enable a decentralized network to reach a consensus, even when some nodes are offline or acting maliciously.

This idea actually solves a famous problem in distributed systems known as the Byzantine Generals Problem—how to coordinate among parties that can't fully trust each other. Different blockchains address this issue in various ways, which we'll explore shortly.

Blockchain Structure

The term "blockchain" is literal: it's a chain of blocks, each containing data. Every block links to the previous one using a cryptographic hash. This structure makes the data immutable—once it's recorded, you can't change it without altering every block that came after it, which is extremely difficult.

This immutability, combined with transparency, is what gives blockchain its auditability and security.

Consensus Mechanisms

Now that we've discussed consensus in theory, here's a breakdown of how it works in practice. Different blockchains employ various mechanisms to achieve consensus, each with its strengths, trade-offs, and specific use cases.

Proof of Work (PoW)

  • What it uses: Computational power.
  • How it works: Miners compete to solve complex math problems. The first one to solve one gets to add the next block to the chain.
  • Pros: Secure and well-tested (used by Bitcoin).
  • Cons: Extremely energy-intensive and not very scalable.

Proof of Stake (PoS)

  • What it uses: Stake in the network (native tokens). How it works**: Validators are chosen to create new blocks based on how much they've staked.
  • Pros: Much more energy-efficient than PoW, faster transactions.
  • Cons: Can raise concerns around wealth concentration and governance.

Practical Byzantine Fault Tolerance (PBFT)

  • What it uses: Agreement among a known group of nodes.
  • How it works: Nodes exchange messages to confirm transactions, even if some are faulty.
  • Pros: Fast finality, great for permissioned blockchains.
  • Cons: It doesn't scale well for large public networks. It is often used in smaller, permissioned networks because it requires many messages between nodes to agree, which makes it impractical for large public blockchains.

Other Consensus Models

Numerous niche, experimental, and hybrid models are available. Here are a few that caught my attention:

  • Proof of Authority (PoA): Uses validator identity/reputation and is typically used in permissioned chains.
  • Proof of Activity (PoAc): A hybrid of PoW and PoS where miners start the process, and validators stake to complete it.
  • Proof of Burn/Capacity/Contribution: Novel methods using resources, effort, or behavior.
  • Proof of Elapsed Time (PoET): Uses secure hardware to ensure fairness.

Conclusion

This is just the beginning of my journey, but already, I can see how powerful and complex this space is. Understanding blockchain and consensus mechanisms is like learning the grammar of a new language. It's the foundation for understanding platforms like Midnight and the kinds of problems it's designed to solve.

So far, everything I’ve shared has come from one resource: Cardano Academy. It’s been a helpful starting point, but it’s just that – a starting point. I plan to explore many more resources to continue building my knowledge, and I recommend that you do the same. Cardano Academy is a great place to start, but supplementing it with your own research and delving into the Midnight documentation and Dev Diaries can provide a much more well-rounded understanding of Web3.

If you're also diving into Web3 for the first time, I hope this helped give you some structure to start your learning. And if you're already immersed in the space, I'd love to hear what helped you connect the dots when you were starting out—please drop a comment or share your favorite learning resources with me!

More concepts to come as I dig deeper into Midnight and the wider Web3 world – and I’ll be sharing additional resources along the way as I continue learning. Stay tuned!

· 4 min read
Stevan Lohja

Midnight leverages the Kachina protocol for privacy-preserving smart contracts using Universal Composition (UC) model to enable secure, decentralized computations with zero-konwledge proofs, splitting contracts state into public (on-chain) and private (off-chain) components for scalable privacy.

Kachina employs non-interactive zero-knowledge proofs (NIZK), specifically ZK-SNARKs, to allow users to prove valid state transitions (public state updates) without revealing private data. Users generate proofs that a public state transition is consistent with a private state and input, verified efficiently by the network, ensuring privacy and concurrency through state oracle transcripts that minimize conflicts.

Midnight currently uses ZK-SNARKs based on the Kachina framework with the Pluto-Eris cryptographic curves for its proving system, ensuring privacy-preserving smart contracts. As part of the upcoming Testnet upgrade, Midnight plans to switch to the BLS12-381 curve to improve efficiency and security, leveraging BLS12-381’s pairing-based properties to enhance performance in transactions.

Why Midnight is switching to BLS

Pluto-ErisBLS12-381
Trusted SetupNeeds ceremonyExisting
CryptographyNon-standardStandard
Transaction timeSlowerFaster
Transaction size6 kb / proof5 kb / proof
Tx verification time12 ms / proof6 ms / proof
Architectural complexityHighLow
MaintainabilityHardFeasible
Cost of recursive stepSmaller circuits / higher CPU costLarger circuits / lower CPU cost

Moving away from trusted setup ceremony

One of the most compelling reasons to adopt BLS12-381 is its use of an existing, standardized trusted setup. Pluto-Eris, by contrast, requires a bespoke ceremony. With BLS12-381, we leverage a pre-established setup that has already been widely vetted and accepted in the cryptographic community.

Embracing standardized cryptography

Pluto-Eris relies on non-standard cryptography, which, while innovative, poses risks in terms of interoperability and long-term support. BLS12-381, however, is built on standard cryptographic primitives that are well-understood, extensively tested, and broadly adopted. Standardization reduces the likelihood of vulnerabilities and ensures compatibility with other systems, making BLS12-381 a more future-proof choice.

Boosting transaction performance

Performance is a critical factor in any cryptographic system, and BLS12-381 outshines Pluto Eris across several key metrics. Transactions on BLS12-381 are faster, with verification times slashed from 12 milliseconds per proof in Pluto Eris to just 6 milliseconds. Additionally, transaction sizes are more compact, dropping from 6 kilobytes per proof to 5 kilobytes, allowing for more efficient use of bandwidth and storage. These improvements translate to a smoother, more scalable user experience across the Midnight platform.

Simplifying architecture and maintenance

Architectural complexity is another area where BLS12-381 has a clear edge. Pluto Eris is burdened by a high level of complexity, making it harder to maintain.

Balancing cost and efficiency in recursion

Recursive proofs are a cornerstone of advanced cryptographic applications, and the two systems handle them differently. Pluto Eris delivers smaller circuits but at a higher CPU cost, which can strain computational resources as usage scales. BLS12-381 flips this tradeoff, opting for larger circuits with a lower CPU cost.

In short, BLS12-381 offers a compelling blend of performance, simplicity, and reliability than Pluto Eris.

💥 Impact on Developers

The transition to BLS12-381 is set for April 28, 2025, as part of the Testnet upgrade. This change is not backward compatible, requiring developers to adopt BLS-compatible components for the BLS era of Testnet. These components include:

  • midnight.js
  • wallet
  • examples
  • proof-server

Meanwhile, existing Compact code should remain functional but will require recompilation and redeployment to align with the new BLS12-381 standard. While the transition to BLS12-381 requires some effort, we believe it will pave the way for a significantly more performant developer experience with faster transactions.

👉 Please stay tuned across Midnight channels and Midnight Discord for more updates and guidance as we approach the Testnet upgrade!

Sources:

  1. https://iohk.io/en/research/library/papers/kachina-foundations-of-private-smart-contracts/
  2. https://github.com/daira/pluto-eris
  3. https://midnight.network/blog/upcoming-testnet-02-upgrade-all-you-need-to-know
  4. https://github.com/zkcrypto/bls12_381

· 3 min read
Stevan Lohja

Date: April 10, 2025
Time: 12:00 PM EDT
Topic: Midnight Testnet Upgrade (Partner-Chains 1.5, BLS, Ledger Support)

Agenda

  1. Midnight Testnet Upgrade Overview
  2. Impact on Stake Pool Operators (SPOs)
  3. Impact on Developers
  4. Estimated Timeline
  5. Q&A

Meeting Notes

Midnight Testnet Upgrade Overview

Impact on Stake Pool Operators (SPOs)

  • SPOs are required to re-register for the upgrade.
  • Improved user experience (UX) for registration:
    • No dependency on Kupo.
    • No need for pc-contracts-cli.
    • Support for extended keys.
    • Enhanced performance for midnight-node.

Impact on Developers

  • Developers will be expected to update all Midnight components, including:
    • Midnight JS
    • Wallet
    • Faucet
  • The proving system will transition from Pluto-Eris to BLS, requiring BLS-compatible components.
  • Compact contracts should remain functional but will need:
    • Recompilation with BLS support using the proof-server.
    • Redeployment.

Estimated Timeline

  • ETA: Around May 2025 (potentially late April or early May).
  • A precise maintenance window will be communicated proactively.
  • Stakeholders are advised to monitor for updates on the exact ETA.

Q&A Session

Q: Is it possible to eliminate the need for db-sync in the future?

  • Feedback about db-sync has been noted and shared with partner-chains.
  • For Partner-Chains v1.5 (the version targeted for this upgrade), Kupo has been eliminated.

Q: Where is SPO registration stored if it’s not on-chain, and what happens if the database is removed?

  • Registrations are stored on the Cardano preview testnet within Midnight’s partner-chain contract.
  • Due to the reset, re-registration will be required.
  • Suggested upgrade sequence:
    1. Re-register.
    2. Update to the latest midnight-node version.
    3. Delete the old midnight-node database.
    4. Run midnight-node in validator mode.

Q: Will Midnight Core Calls be recurring?

  • Yes, scheduled for the second Thursday of every month.
  • Additional calls may be organized based on need.

Q: Is there a benchmark for transactions in the Battleship game? (Brick Towers offered to test)

  • No specific benchmarks have been established yet.
  • Game rounds are expected to be significantly faster.

Q: When will the upgrade roll out?

  • Target is near May 2025, potentially late April or early May.
  • A precise maintenance window will be communicated soon.

Action Items

  • MN Team: Will share precise maintenance window and ETA for the upgrade.
  • SPOs: Prepare for re-registration and update to Partner-Chains v1.5.
  • Developers: Will be expected to update Midnight components and recompile/deploy contracts with BLS support.
  • All: Join the Block-Producers channel on Discord to engage in deeper conversations with fellow SPOs.

· 2 min read
DevRel

We’re excited to announce the release of the new Midnight Indexer — a modular, high-performance indexing service designed to optimize how blockchain data flows from a Midnight node to end-user applications. It retrieves block history, processes data, and makes it available through a flexible GraphQL API supporting queries, mutations, and real-time subscriptions.