Dependencies
This document provides an overview of the external dependencies used in the EigenLayer-AVS system.
This document provides an overview of the external dependencies used in the EigenLayer-AVS system. It covers key libraries, frameworks, and tools that the codebase relies on, categorizing them by their purpose and functionality. Understanding these dependencies is crucial for developers who need to maintain, extend, or troubleshoot the system.
Core Dependencies#
The EigenLayer-AVS system is built on several critical foundational dependencies that provide essential functionality for its operation.
Go Version#
The project uses Go 1.24, which provides modern language features and performance improvements.
go 1.24
Sources:
EigenSDK#
The eigensdk-go
library is a critical dependency providing EigenLayer integration functionality, including BLS cryptography, operator management, AVS registration interfaces, and staking mechanisms.
github.com/Layr-Labs/eigensdk-go v0.2.0-beta.1
The codebase uses this library for cryptographic operations, particularly BLS signatures for operator verification and aggregation:
Sources:
Cerberus API#
The system integrates with the Cerberus API, which provides security and monitoring services for AVS operations.
github.com/Layr-Labs/cerberus-api v0.0.0-20241016214048-d52f5ddc5559
Sources:
Diagram: Core Dependencies Relationship#
Sources:
Storage and Caching#
The system uses multiple storage solutions for different purposes, from persistent storage to in-memory caching.
BadgerDB#
BadgerDB serves as the primary persistent storage engine for the system, storing task definitions, execution results, and operational state.
github.com/dgraph-io/badger/v4 v4.2.0
Sources:
BigCache#
BigCache provides in-memory caching for high-performance data access, reducing database load for frequently accessed data.
github.com/allegro/bigcache/v3 v3.1.0
Sources:
Ethereum Integration#
Go-Ethereum#
The system relies heavily on the Ethereum Go client library for blockchain interaction, smart contract operations, and transaction management.
github.com/ethereum/go-ethereum v1.14.0
This dependency provides core functionality like ABI encoding, which is used to encode task responses for cryptographic signing:
Sources:
API and Communication#
gRPC and Protocol Buffers#
The system uses gRPC for high-performance RPC communication between components and with operators.
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
Sources:
REST API Framework#
Echo is used to provide REST API endpoints for client interactions and system management.
github.com/labstack/echo/v4 v4.12.0
Sources:
HTTP Client#
Resty provides a fluent API for making HTTP requests to external services.
github.com/go-resty/resty/v2 v2.16.2
Sources:
Diagram: Communication Dependencies#
Sources:
Task Execution and Processing#
The system includes several libraries for task definition, execution, and processing.
JavaScript Engine#
Goja provides a JavaScript runtime in pure Go, allowing execution of JavaScript code within tasks.
github.com/dop251/goja v0.0.0-20241024094426-79f3a7efcdbd
Sources:
Expression Evaluation#
The expr library allows evaluation of dynamic expressions within task definitions.
github.com/expr-lang/expr v1.16.9
Sources:
Scheduling#
GoCron provides scheduling capabilities for time-based task triggers.
github.com/go-co-op/gocron/v2 v2.11.0
Sources:
Utility Libraries#
Validation#
The validator library provides struct validation using tags.
github.com/go-playground/validator/v10 v10.22.1
Sources:
Unique Identifiers#
ULID (Universally Unique Lexicographically Sortable Identifier) is used for task and execution identifiers.
github.com/oklog/ulid/v2 v2.1.1-0.20240413180941-96c4edf226ef
Sources:
Functional Programming#
Lo provides functional programming utilities for Go.
github.com/samber/lo v1.47.0
Sources:
Decimal Arithmetic#
Decimal provides arbitrary-precision decimal arithmetic for financial calculations.
github.com/shopspring/decimal v1.4.0
Sources:
Struct Mapping#
Mapstructure provides flexible conversion between different types, particularly maps to structs.
github.com/mitchellh/mapstructure v1.5.0
Sources:
CLI and Configuration#
Command Line Interface#
Cobra provides a robust CLI framework for application commands and flags.
github.com/spf13/cobra v1.8.0
Sources:
Configuration Parsing#
YAML parsing is used for configuration files.
gopkg.in/yaml.v2 v2.4.0
Sources:
Monitoring and Security#
Metrics#
Prometheus client library provides metrics collection and exposure.
github.com/prometheus/client_golang v1.20.5
Sources:
Cryptography#
Extended cryptographic capabilities beyond standard library.
golang.org/x/crypto v0.26.0
Sources:
JWT Authentication#
JWT implementation for secure API authentication.
github.com/golang-jwt/jwt/v5 v5.2.1
Sources:
Diagram: Functional Component Dependencies#
Sources:
Dependency Version Management#
The EigenLayer-AVS system manages dependencies through Go modules. The go.mod
file lists direct dependencies with specific version constraints, while the go.sum
file ensures reproducible builds by verifying the checksums of all direct and indirect dependencies.
The project uses a combination of:
- Semantic versioning for stable dependencies (e.g.,
v1.4.0
) - Git commit hashes for dependencies without official releases (e.g.,
v0.0.0-20241016214048-d52f5ddc5559
) - Version ranges for flexible compatibility
When updating dependencies, developers should:
- Test thoroughly to ensure compatibility
- Update the
go.mod
file with new versions - Regenerate the
go.sum
file - Document any breaking changes or required code modifications
Summary of Key Dependencies#
Category | Dependency | Version | Purpose |
---|---|---|---|
Core | eigensdk-go | v0.2.0-beta.1 | EigenLayer integration |
Core | cerberus-api | v0.0.0-* | Security services |
Blockchain | go-ethereum | v1.14.0 | Ethereum interaction |
Storage | badger/v4 | v4.2.0 | Persistent storage |
Storage | bigcache/v3 | v3.1.0 | In-memory caching |
Communication | grpc | v1.67.1 | RPC framework |
Communication | echo/v4 | v4.12.0 | REST API framework |
Processing | goja | v0.0.0-* | JavaScript VM |
Processing | expr | v1.16.9 | Expression evaluation |
Scheduling | gocron/v2 | v2.11.0 | Task scheduling |
Utility | validator/v10 | v10.22.1 | Data validation |
Utility | ulid/v2 | v2.1.1-* | ID generation |
CLI | cobra | v1.8.0 | Command interface |
Security | jwt/v5 | v5.2.1 | Authentication |
Monitoring | client_golang | v1.20.5 | Metrics |
Sources:
This comprehensive dependency ecosystem enables the EigenLayer-AVS system to provide a robust, secure, and high-performance platform for decentralized task automation with EigenLayer integration.
Feature this wiki to auto refresh weekly
Try DeepWiki on your private codebase with Devin