MCPcopy Index your code
hub / github.com/devlongs/gean

github.com/devlongs/gean @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
113 symbols 328 edges 10 files 4 documented · 4% updated 5mo ago★ 44
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Gean - Go Lean Ethereum Client

A Go implementation of the Lean Ethereum consensus protocol.

Overview

Gean is the first Go-based Lean Ethereum consensus client, implementing the next-generation Ethereum consensus layer with post-quantum security, fast finality, and enhanced decentralization.

Getting Started

cd cmd/gean
go build
./gean

Philosophy

We follow a lean development approach inspired by ethlambda:

References

Roadmap

Milestone 1: Foundation (Types & Serialization) - COMPLETE

Core type system and SSZ serialization - the bedrock everything else builds on.

  • [x] Core primitive types (Slot, Epoch, Root, ValidatorIndex)
  • [x] Byte array types (Bytes4, Bytes20, Bytes32, Bytes48, Bytes52, Bytes96, Bytes3116)
  • [x] SSZ collections (Bitlist, Bitvector)
  • [x] SSZ serialization and merkleization
  • [x] HashTreeRoot() implementation
  • [x] Slot.IsJustifiableAfter() for 3SF-mini finality rules

Milestone 2: Consensus Containers - COMPLETE

Data structures for blocks, state, and attestations.

  • [x] Checkpoint, Validator containers
  • [x] Attestation, AttestationData, SignedAttestation, AggregatedAttestation
  • [x] BlockHeader, BlockBody, Block, BlockWithAttestation, SignedBlockWithAttestation
  • [x] State container with full validator registry
  • [x] Chain configuration (Config with GenesisTime)
  • [x] HashTreeRoot for all containers

Milestone 3: Clock & Genesis

Time management and chain initialization.

  • [ ] SlotClock with 4-second slots
  • [ ] Interval timing (sub-slot)
  • [ ] Genesis state generation
  • [ ] Genesis block creation
  • [ ] Validator config loading

Milestone 4: Storage & Fork Choice

Persistent storage and chain head selection.

  • [ ] Block and state storage interface
  • [ ] LevelDB/Pebble backend
  • [ ] Fork choice store (LMD-GHOST)
  • [ ] Justification and finalization tracking
  • [ ] Latest message tracking per validator

Milestone 5: P2P Networking

Peer-to-peer communication layer.

  • [ ] libp2p host setup
  • [ ] discv5 peer discovery
  • [ ] Peer manager
  • [ ] GossipSub for blocks and attestations
  • [ ] Request-response protocols (Status, BlocksByRoot, BlocksByRange)

Milestone 6: Synchronization

Chain sync from peers.

  • [ ] Range sync (batch block download)
  • [ ] Head sync (follow chain tip)
  • [ ] Block cache for pending blocks
  • [ ] Peer scoring for sync

Milestone 7: State Transition

Block validation and state processing.

  • [ ] Slot processing
  • [ ] Block header validation
  • [ ] Attestation processing
  • [ ] Epoch boundary processing
  • [ ] Justification and finalization updates

Milestone 8: XMSS Signatures

Post-quantum cryptography.

  • [ ] XMSS signature verification
  • [ ] Signature aggregation
  • [ ] Integration with block/attestation validation

Milestone 9: Validator Client

Block production and attestation duties.

  • [ ] Proposer duty calculation
  • [ ] Attester duty calculation
  • [ ] Block production
  • [ ] Attestation creation and signing

Milestone 10: Full Node

Complete integrated client.

  • [ ] Node orchestrator wiring all services
  • [ ] CLI with run/genesis/keys commands
  • [ ] Prometheus metrics
  • [ ] HTTP API endpoints
  • [ ] Docker support

Current Status

Milestone 1: Foundation - Complete

Milestone 2: Consensus Containers - Complete

All consensus data structures and their SSZ HashTreeRoot implementations are complete. Run go test ./... to verify (35 tests passing).

Next: Milestone 3 - Clock & Genesis

License

MIT

Core symbols most depended-on inside this repo

Shape

Function 76
Struct 15
Method 12
TypeAlias 10

Languages

Go100%

Modules by API surface

common/ssz/ssz.go25 symbols
common/types/types.go16 symbols
common/types/bitfield.go16 symbols
common/types/containers.go13 symbols
common/ssz/containers_test.go13 symbols
common/types/containers_test.go9 symbols
common/ssz/ssz_test.go8 symbols
common/types/types_test.go7 symbols
common/types/bitfield_test.go5 symbols
cmd/gean/main.go1 symbols

For agents

$ claude mcp add gean \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page