linera-io/linera-protocol
Main repository for the Linera protocol
Healthy across the board
Permissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit today
- ✓9 active contributors
- ✓Distributed ownership (top contributor 26% of recent commits)
- ✓Apache-2.0 licensed
- ✓CI configured
- ✓Tests present
Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/linera-io/linera-protocol)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card
This card auto-renders when someone shares https://repopilot.app/r/linera-io/linera-protocol on X, Slack, or LinkedIn.
Ask AI about linera-io/linera-protocol
Grounded in the actual source code. Pick a starter question or write your own.
Onboarding doc
Onboarding: linera-io/linera-protocol
Generated by RepoPilot · 2026-06-24 · Source
🎯Verdict
GO — Healthy across the board
- Last commit today
- 9 active contributors
- Distributed ownership (top contributor 26% of recent commits)
- Apache-2.0 licensed
- CI configured
- Tests present
<sub>Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests</sub>
⚡TL;DR
Linera is a decentralized blockchain protocol engineered for high scalability, low latency, and secure Web3 applications through a sharded architecture. The protocol implements persistent data structures (via linera-views), cross-chain messaging (linera-chain), application execution (linera-execution), and distributed consensus (linera-core), all written in Rust with optional Solidity smart contract integration via linera-bridge. Monorepo of 32 Rust crates organized by responsibility layer: foundation (linera-base, linera-views), persistence (linera-chain, linera-execution, linera-storage), core protocol (linera-core, linera-rpc), and application tools (linera-sdk, linera-service, linera-client, linera-wallet-json). Supporting services include indexer (linera-indexer), metrics (linera-metrics), explorer UI (linera-explorer), and Web frontend (web/@linera/client).
👥Who it's for
Blockchain protocol developers and infrastructure engineers building scalable decentralized applications, plus Linera application developers using the SDK (linera-sdk) to create chain-native applications. Contributors may include protocol researchers, Rust systems engineers, and Web3 framework developers.
🌱Maturity & risk
Actively developed and architected for production use (v0.16.0), with comprehensive CI pipelines (.github/workflows contains 20+ test and build workflows), Docker/Kubernetes deployment configs, and extensive unit/integration test coverage. The project has a full team behind it (contact@linera.io), but the v0.x version number indicates the protocol may still undergo breaking changes.
The monorepo contains 32+ interdependent crates with complex dependency chains (linera-core depends on linera-storage, linera-chain, linera-execution, etc.), increasing coordination complexity. Bridge testing requires Solidity tooling and runs separately from main CI, and the Ethereum integration (linera-ethereum, linera-bridge) adds external dependency risk. No obvious maintenance red flags given active CI, but protocol maturity remains pre-1.0.
Active areas of work
Active development across multiple tracks: benchmarking workflows (benchmark-test.yml, instruction-count-benchmarks.yml, performance_summary.yml), Ethereum bridge integration testing (bridge-e2e.yml, forge-deploy-scripts.yml), indexer/GraphQL infrastructure (indexer.yml), and documentation/book generation (book.yml). Recent additions include ScyllaDB testing (scylladb.yml), DynamoDB support (dynamodb.yml), and long-running faucet chain tests.
🚀Get running
Clone and prepare the workspace: git clone https://github.com/linera-io/linera-protocol.git && cd linera-protocol. Install Rust (required for 7M+ lines of Rust code). Copy .env.example to .env and configure as needed. Use cargo build to compile the workspace, or make (Makefile present) for standard tasks. For Docker: docker-compose configs are in .github/workflows/docker-compose.yml and configuration/compose/.
Daily commands:
Build all: cargo build --release. Run tests: cargo test --workspace (note: linera-bridge skipped in default tests due to Solidity dependency—run separately). Run service: Depends on deployment mode (local client via linera-client, or full node via linera-service). Docker: Use .github/workflows/docker-compose.yml templates or configuration/compose/ configs. Local dev: See INSTALL.md and CLI.md for linera CLI setup.
🗺️Map of the codebase
- Cargo.toml: Workspace root declaring all 32 member crates and shared dependency versions (v0.16.0)
- linera-base/src/lib.rs: Foundation crate defining cryptography primitives, message types, and core data structures all other crates depend on
- linera-chain/src/lib.rs: Chain data model and consensus message handling; critical to understanding block, certificate, and cross-chain message flow
- linera-execution/src/lib.rs: Application execution runtime and bytecode VM integration; defines how user applications run on chains
- linera-core/src/lib.rs: Main protocol implementation including client, server, node synchronization, and consensus coordination
- linera-views/src/lib.rs: View abstraction mapping complex data structures to key-value stores; used pervasively for state management
- linera-rpc/src/lib.rs: RPC definitions and network communication layer between nodes and clients
- linera-sdk/src/lib.rs: Public SDK for application developers; entry point for building Linera applications
- .github/workflows/rust.yml: Main CI pipeline running clippy, tests, and linting on every commit—shows test expectations
- CONTRIBUTING.md: Contribution guidelines specific to the Linera protocol project
🛠️How to make changes
Protocol changes: Edit crates in dependency order (linera-base → linera-chain → linera-core). Storage changes: Modify linera-storage/ and linera-storage-service/ with new storage backend implementations. RPC/Service changes: Update linera-rpc/ protos and linera-service/ service layer. SDK/App changes: Add to linera-sdk/ or create example apps in examples/. Testing: Add integration tests in the respective crate's tests/ directory; bridge tests go in linera-bridge/tests/e2e/.
🪤Traps & gotchas
- Solc requirement: linera-bridge tests require Solidity compiler; install via .github/actions/get-solc/ or system solc. 2. Proto compilation: linera-rpc requires protoc; install via .github/actions/install-protoc/ or
apt-get install protobuf-compiler. 3. Environment config: .env.example has indexer-specific vars (.env.indexer-test); missing setup may fail storage/indexer tests. 4. Storage backend coupling: Tests may expect RocksDB, ScyllaDB, or DynamoDB; CI runs separate workflows for each—local dev typically defaults to RocksDB. 5. Witty language: linera-witty is a custom language for writing Linera apps—documentation may be sparse; see linera-witty/test-modules for examples. 6. Breaking changes: v0.x version means wire protocols and APIs change; check Cargo.lock compatibility across releases.
💡Concepts to learn
- Sharded Blockchain Architecture — Linera's core design splits state and execution across multiple chains to achieve parallelism; understanding sharding is essential for grasping how the protocol scales.
- Cross-Chain Messaging — Linera applications on separate chains communicate via authenticated cross-chain messages; this is the key mechanism for atomic multi-chain operations and state synchronization.
- View Abstraction & Key-Value Store Mapping — linera-views maps complex nested data structures (maps, trees, queues) onto a flat key-value store via procedural macros; critical for understanding state persistence without knowing the underlying storage backend.
- Byzantine Fault Tolerant Consensus — linera-core implements BFT consensus for block finality; understanding quorum certificates and validator rotation is necessary for modifying core protocol logic.
- Bytecode Execution & Runtime — linera-execution runs application bytecode (compiled Witty or user code) in a sandboxed runtime; relevant for application developers and those modifying execution semantics.
- Event Sourcing for State Management — Linera chains store immutable blocks as events; replaying blocks reconstructs state, enabling auditability and deterministic execution across nodes.
- Witty Domain-Specific Language — linera-witty is a custom language for writing Linera applications with special syntax for cross-chain calls; learning Witty syntax is necessary for some development workflows beyond the standard SDK.
🔗Related repos
near/nearcore— Similar sharded blockchain protocol in Rust; comparable architecture for scalability but uses different consensus modelaptos-labs/aptos-core— Parallel execution engine for blockchain with similar Move VM approach; reference for high-throughput execution patternssolana-labs/solana— Single-leader proof-of-stake blockchain in Rust achieving high throughput; different sharding strategy but similar performance goalslinera-io/linera-sdk-examples— Official example applications demonstrating how to use linera-sdk; essential companion repo for learning application developmentlinera-io/linera-documentation— Companion repo hosting developer documentation and tutorials referenced from the main protocol code
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add missing CI workflow for linera-bridge integration tests
The linera-bridge crate is explicitly excluded from default cargo test in Cargo.toml with a comment stating it 'requires solc; runs separately in CI', but there is no dedicated CI workflow file for bridge tests beyond the general rust.yml. The repo has bridge-e2e.yml and forge-deploy-scripts.yml, but no focused workflow for linera-bridge unit and integration tests. This would ensure bridge changes don't regress and clarify the testing story for contributors.
- [ ] Create .github/workflows/bridge-tests.yml with solc installation (via existing .github/actions/get-solc/action.yml)
- [ ] Configure workflow to run
cargo test -p linera-bridgewith appropriate features - [ ] Add caching for solc downloads to improve CI performance
- [ ] Reference this new workflow in CONTRIBUTING.md under the testing section
Add comprehensive E2E test documentation and examples for linera-indexer plugins
The workspace includes linera-indexer/plugins and linera-indexer/example, but there is no dedicated documentation file (e.g., linera-indexer/PLUGIN_DEVELOPMENT.md) explaining how to write, test, and deploy custom indexer plugins. Given the complexity of the GraphQL client, runtime, and plugin architecture, this would significantly reduce friction for contributors building on the indexer.
- [ ] Create linera-indexer/PLUGIN_DEVELOPMENT.md documenting the plugin architecture
- [ ] Add code examples showing how to implement a simple custom plugin (e.g., in linera-indexer/example)
- [ ] Document the test setup required (referencing .env.indexer-test and docker/README.indexer-test.md)
- [ ] Link the new guide from the main README.md in a new 'Indexer' or 'Extensions' section
Add missing integration tests for linera-ethereum bridge configuration and deployment
The linera-ethereum crate exists in the workspace and there are Dockerfile.bridge and forge-deploy-scripts.yml files, but there are no visible unit or integration tests specifically validating Ethereum bridge configuration serialization, RPC client behavior, or contract interaction mocking. This is critical infrastructure that needs test coverage to prevent mainnet integration issues.
- [ ] Create linera-ethereum/tests/integration/ directory for end-to-end bridge tests
- [ ] Add unit tests in linera-ethereum/src/ for configuration parsing and validation (similar patterns to linera-storage tests)
- [ ] Add mock tests for Ethereum RPC interactions using a mock HTTP server or ethers-rs testing utilities
- [ ] Integrate these tests into the rust.yml CI workflow to run on all PRs touching linera-ethereum
🌿Good first issues
- Add unit tests for linera-views-derive macro edge cases (union types, nested generics). The derive procedural macros in linera-views-derive lack comprehensive test coverage for complex schema compositions—starting point: linera-views-derive/src/lib.rs.
- Document the cross-chain messaging API with runnable examples in examples/. The linera-chain cross-chain message routing is powerful but underdocumented for SDK users—create a tutorial example showing how to send/receive messages between chains.
- Implement missing storage backend trait for a third-party DB (e.g., PostgreSQL adapter for linera-storage). Currently only RocksDB, ScyllaDB, and DynamoDB are supported; adding a new StorageBackend implementation would help diverse deployments and solidify the abstraction.
⭐Top contributors
Click to expand
Top contributors
- @MathieuDutSik — 26 commits
- @afck — 25 commits
- @ndr-ds — 24 commits
- @deuszx — 15 commits
- @bart-linera — 3 commits
📝Recent commits
Click to expand
Recent commits
654486d— Main bridge backports (#6259) (deuszx)91a6d79— Tighten URI validation in extract_grpc_method_name. (#6234) (ndr-ds)2b843ac— Mergeconfirmed_logandpreprocessed_blocksintoblock_hashes(#6163) (afck)b835ec6— Remove the per-chain committee map. (#6236) (afck)300a887— Add checkpointing functions to historically hashable views (#6242) (afck)14678b6— Address issues with default chains. (#6079) (MathieuDutSik)4d3b31d— Drop redundantexecution_state_hashfield fromChainStateView(#6240) (afck)b407efa— docker_image workflow: replace '/' in branch name with '-' for image tag (#6250) (ndr-ds)2d6373b— Widen load_view_latency histogram cap from 10ms to 1s (#6239) (ndr-ds)9b0a903— Split QueueView and BucketQueueView into separate gungraun benchmark groups (#6233) (ndr-ds)
🔒Security observations
The Linera Protocol codebase demonstrates generally good security practices with proper use of Cargo workspaces, standard CI/CD
- Medium · Environment Configuration Template Exposed —
.env.example. .env.example file contains template variables for sensitive configuration including GCS_BUCKET, URL_MAP, and WALLET_DIR paths. While marked as example, this provides attackers with insight into the deployment structure and expected environment variables. Fix: Ensure .env.example does not contain actual values, only placeholder names. Document sensitive configuration in a separate, non-committed security guide. Add .env* to .gitignore if not already present. - Medium · Multiple Docker Compose Configurations with Potential Secrets —
docker/.env.* files. Multiple docker-compose YAML files exist (.env.local, .env.indexer-test, .env.production.template) which may contain sensitive credentials. The .env.production.template file suggests production secrets are managed through environment files. Fix: Use secret management systems (Docker secrets, Kubernetes secrets, or HashiCorp Vault) instead of .env files for production. Ensure all .env files are in .gitignore. Never commit production .env files to version control. - Medium · Exposed Monitoring and Dashboard Configuration —
docker/prometheus.yml, docker/dashboards/linera-general.json. prometheus.yml and Grafana dashboard JSON files are committed to the repository, which may expose internal infrastructure details, service endpoints, and monitoring scope to potential attackers. Fix: Move monitoring configurations to a separate, non-public repository or use configuration management that doesn't expose infrastructure details. Consider templating sensitive values and injecting them at runtime. - Low · Docker Build Scripts with Potential Security Implications —
docker/make-all-*.sh, docker/ci-compose.sh, docker/compose-scylla-setup.sh. Multiple shell scripts for Docker building and composition (make-all-build.sh, make-all-up.sh, ci-compose.sh) are committed. These could potentially execute arbitrary commands if not properly validated. Fix: Audit shell scripts for command injection vulnerabilities. Use shellcheck for static analysis. Ensure scripts validate all inputs and use proper quoting. Consider moving to safer alternatives like dedicated CI/CD platforms. - Low · Git Configuration for Blame Ignore —
.git-blame-ignore-revs. .git-blame-ignore-revs file is present, which could potentially mask security-relevant commits if misused during refactoring or large-scale changes. Fix: Regularly audit .git-blame-ignore-revs to ensure security-critical commits are not masked. Document the purpose of each ignored revision. Use blame ignore sparingly and only for legitimate formatting/refactoring changes. - Low · Workspace Contains Bridge Component with External Dependencies —
Cargo.toml (linera-bridge member), .github/workflows/bridge-e2e.yml. The linera-bridge component appears to require solc (Solidity compiler) and is handled separately in CI. External tool dependencies can introduce supply chain risks if not properly validated. Fix: Verify solc is downloaded from official sources with integrity checking. Pin specific versions. Use hash verification for downloaded binaries. Document all external tool dependencies and their security requirements. - Low · Sensitive Workflow Files in Public Repository —
.github/workflows/, .github/actions/gcp-auth/. GitHub Actions workflow files for cloud infrastructure (GCP auth, Kubernetes, remote-net-test) are publicly visible, potentially revealing deployment strategies and infrastructure setup. Fix: Avoid committing sensitive details in workflow files. Use GitHub Secrets for credentials and sensitive configuration. Review workflow files to ensure they don't expose infrastructure architecture or operational procedures. - Low · Public GraphQL and Indexer Components —
linera-explorer/, linera-indexer/, linera-service-graphql-client/. The codebase includes public-facing components (explorer, indexer, GraphQL endpoints). These may be subject to API abuse, data scraping, or DoS attacks if not properly protected. Fix: Implement rate limiting, authentication, and authorization for GraphQL endpoints. Add request validation and size limits. Consider implementing API throttling and monitoring for unusual access patterns.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/linera-io/linera-protocol shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live linera-io/linera-protocol
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/linera-io/linera-protocol.
What it runs against: a local clone of linera-io/linera-protocol — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in linera-io/linera-protocol | Confirms the artifact applies here, not a fork |
| 2 | License is still Apache-2.0 | Catches relicense before you depend on it |
| 3 | Default branch main exists | Catches branch renames |
| 4 | Last commit ≤ 30 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of linera-io/linera-protocol. If you don't
# have one yet, run these first:
#
# git clone https://github.com/linera-io/linera-protocol.git
# cd linera-protocol
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of linera-io/linera-protocol and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "linera-io/linera-protocol(\\.git)?\\b" \\
&& ok "origin remote is linera-io/linera-protocol" \\
|| miss "origin remote is not linera-io/linera-protocol (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(Apache-2\\.0)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"Apache-2\\.0\"" package.json 2>/dev/null) \\
&& ok "license is Apache-2.0" \\
|| miss "license drift — was Apache-2.0 at generation time"
# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
&& ok "default branch main exists" \\
|| miss "default branch main no longer exists"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 30 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~0d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/linera-io/linera-protocol"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.
Embed this chat in your README →
Drop this iframe anywhere — the widget runs against the same live analysis cache as the main app.
<iframe src="https://repopilot.app/embed/linera-io/linera-protocol" width="100%" height="500" style="border:1px solid #d0d7de; border-radius:8px;" allow="microphone" loading="lazy" ></iframe>