Code bases and reviews
- date: 2023-02-04
- last updated: 2023-02-04
Overview
Disclaimer: The content in this section are notes I took doing research and design work, primarily around bridging and consensus. Some are incomplete and they lack structure. I have included them here for completeness.Functionality
In this section we list codebases that implement cryptographic functions. We organize by functional areas such as signing, hashing, primitives and consensus. Where possible we provide a link to the algorithms/specifications being implemented followed by reference codebases.
We have summarized the functionality in three areas
Reference Codebases
Blockchains
- Binance (go)
- Avalanche (go)
- Ethereum roadmap upgrading ethereum consensus-specs
- Consensus Clients (Beacon Chain)
- Execution Clients (Execution Chain)
- geth (go)
- nethermind (c#)
- Erigon (go)
- Besu (java)
- Light Client
- helios (rust): article
- near rainbow bridge eth2-client (rust)
- succinctlabs (solidity)
- Harmony
- Near
- Polkadot
- Polygon
- peppermint (go) fork of tendermint
- heimdall (go)
- Tendermint
Bridging and Light Clients
-
Light Clients
-
Bridging
- Harmony Horizon Bridge: Detailed code review
- Horizon: javascript, solidity
- Near Rainbow Bridge: Detailed code review
- Near Rainbow Bridge: rust, go, solidity, javascript
- Near Rainbow Token Connector: soldity
- SDK
- Near Rainbow Bridge Client: typescript
- Frontend
- Nomad monprepo: Nomad is a cross-chain communication protocol. This repo contains the following: Smart contracts for the core Nomad protocol, Smart contracts for the Nomad token bridge SDKs for Nomad's core protocol, bridge, and governance systems, Tooling for local environment simulation and Smart contract deployment tooling.
- Nomad rust: Nomad is a cross-chain communication standard that supports passing messages between blockchains easily and inexpensively. Like IBC light clients and similar systems, Nomad establishes message-passing channels between chains. Once a channel is established, any application on that chain can use it to send messages to others chains.
- Nomad gelato-sdk: This crate reimplements Gelato's Relay SDK in Rust. It simply wraps Gelato Relay requests and responses to/from Gelato endpoints with Rust types and methods.
- Succinct labs: Deep dive on Succinct labs Proof of Consensus for Ethreum.
- Proof of Consensus for Ethereum: contains both the zkSNARK circuits as well as the smart contracts needed for our succinct light client implementation, as well as prototype message passing contracts and bridge contracts.
- Datachain lcpA proxy for light client verification executed in TEE.
- Cosmos ibc-go: allows blockchains to talk to each other. This end-to-end, connection-oriented, stateful protocol provides reliable, ordered, and authenticated communication between heterogeneous blockchains.
- Cosmos ibc: ibc specification
- Cosmos gravity bridge: Cosmos and Ethereum bridge designed to run on the Cosmos Hub focused on maximum design simplicity and efficiency.
- Axelar: based on the Cosmos SDK is the main application of the axelar network. whitepaper docs
- Celer cBridge-node: Celer cBridge relay node implementation in Golang. (docs)
- Celer cBridge-contracts: Contracts for cBridge, cross-chain liquidity solution powered by Hashed-Timelock Transfers
- Celer cBridge-cowa: CosmWasm Rust smart contracts for cbridge
- Wormhole: the reference implementation of the Wormhole protocol. (docs)
- LayerZero Labs LayerZero: contains the smart contracts for LayerZero Endpoints. (docs)
- Multichain CrossChain-Bridge: Cross-Chain bridge based on Anyswap MPC network. (docs)
- Synapse Protocol: a universal interoperability protocol that enables secure cross-chain communication.( docs)
- synapse-contracts: smart contracts for Synapse Protocol.
- Hop Protocol contracts: Hop is a scalable rollup-to-rollup general token bridge. Heare are the smart contracts that power the Hop Exchange. (whitepaper, docs).
- Router Protocol: (whitepaper, docs)
- Parity Bridges Common: a collection of components for building bridges.
- Snowfork snowbridge: A trustless bridge between Polkadot and Ethereum. (docs)
- Harmony Horizon Bridge: Detailed code review
Zero Knowledge
- Foundational
- halo2 (rust)
- halo2 privacy-scaling-explorations (rust) fork
- junyu0312 (rust) fork
- Circom a novel domain-specific language for defining arithmetic circuits that can be used to generate zero-knowledge proofs
- Arkworks (rust)
- noir (rust)
- StarkWare's Poseidon Hash
- halo2 (rust)
- Applications
- halo2ecc-s (rust): ecc circuits with halo2
- DarkForest zkSNARK space warfare
- Awesome List
- Proof of Consensus/Bridging
- succinctlabs (circom)