Union is a hyper-efficient zero-knowledge infrastructure layer for cross-chain interoperability, implementing IBC (Inter-Blockchain Communication) with light clients for Cosmos, Ethereum, Sui, StarkNet, Gno, and many other chains. The system comprises a Cosmos SDK blockchain (uniond), a zero-knowledge prover (galoisd) for Groth16 proofs, a modular relayer (voyager) with plugin-based architecture, CosmWasm smart contracts for IBC and asset transfers (UCS03), EVM Solidity contracts, and a TypeScript SDK for programmatic interaction. The frontend is a Svelte 5 application (app2) providing a transfer interface, explorer, dashboard, and staking UI, while documentation is served via an Astro site. The architecture is a multi-language monorepo with Rust as the dominant language for core libraries and relayer modules, Go for the Cosmos SDK chain and prover, TypeScript for SDKs and frontend, and Solidity/Move for smart contracts. Key design patterns include a trait-based light client interface (IbcClient), a plugin system for relayer modules (voyager_sdk), functional effect management in TypeScript (Effect-TS), and derive macros for encoding (model, ssz, ethabi). The codebase demonstrates high craftsmanship in its type-safe encoding primitives, storage abstractions (depolama), and persistent queue (pg-queue), though it suffers from some code duplication across SDK versions and generated protobuf drift risks.
This repository is a production-grade Go library implementing a Bitcoin light client based on BIP 157/158 compact block filters (Neutrino). It is designed for mobile Lightning Network wallets and provides SPV (Simplified Payment Verification) without requiring a full node. The core architecture revolves around a ChainService that orchestrates peer connections, block header sync, filter header sync, UTXO queries, transaction broadcasting, and chain rescanning. The library stores headers in flat files with bbolt-backed indices, and filters in a boltdb database. It includes a sophisticated peer query management system with retry, timeout, and banning logic, as well as caching layers for blocks and filters. The codebase is well-structured into subpackages with clear responsibilities, many of which are reusable in other Go projects. It is actively maintained by Lightning Labs and used in production by lnd (Lightning Network Daemon).