Repository Analysis

linera-io/linera-protocol

Main repository for the Linera protocol

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-05-30
Last Push
32,118
Stars
Rust
Language
380,715
Lines of Code
1212
Files
541
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 22LOW 518

Pattern Findings

541 matches across 9 categories. Click a row to expand file-level details.

Over-Commented Block474 hits · 442 pts
SeverityFileLineSnippet
LOWspellcheck-cfg.toml1# cargo-spellcheck config
LOWspellcheck-cfg.toml21# This must be in a directory in which hunspell looks for dictionaries.
LOWspellcheck-cfg.toml41# Transforms words that are provided by the tokenizer
LOWspellcheck-cfg.toml61[NlpRules]
LOW…2e/tests/burn_completion_requires_on_chain_evidence.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-bridge/tests/e2e/tests/multi_tx_burn_chunking.rs1// Copyright (c) Zefchain Labs, Inc.
LOW…e/tests/multiple_burns_same_recipient_across_blocks.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-bridge/tests/e2e/tests/burns_per_evm_tx.rs41const MAX_SEARCH_N: u32 = 1000;
LOWlinera-bridge/tests/e2e/tests/auto_deposit_scan.rs1// Copyright (c) Zefchain Labs, Inc.
LOW…ra-bridge/tests/e2e/tests/multiple_burns_same_block.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-bridge/src/main.rs81 /// evm-bridge Linera ApplicationId (hex).
LOWlinera-bridge/src/abi.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-bridge/src/abi.rs41 ///
LOWlinera-bridge/src/proof/gen.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-bridge/src/proof/gen.rs41/// All data needed to submit a `ProcessDeposit` operation to the evm-bridge app.
LOWlinera-bridge/src/proof/mod.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-bridge/src/proof/mod.rs21//! 3. **`decode_receipt_logs`** — Decode the receipt's RLP to extract its event logs.
LOWlinera-bridge/src/proof/mod.rs41//! // 1. Decode the block header to get the receipts root.
LOWlinera-bridge/src/monitor/db.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-bridge/src/monitor/mod.rs61///
LOWlinera-bridge/src/monitor/mod.rs121/// `Ord` is keyed solely on `height`, so a `BTreeSet<PendingBurnsAtHeight>`
LOWlinera-bridge/src/relay/mod.rs1// Copyright (c) Zefchain Labs, Inc.
LOWdocker/docker-compose.bridge-mainnet.yml1# Long-running linera-bridge relayer.
LOWdocker/docker-compose.bridge-mainnet.yml21# 4. Ensure the tmpfs cache dir exists, owned root and mode 0700:
LOWdocker/docker-compose.alloy.yml1# Docker Compose override file to enable Grafana Alloy for central observability
LOWlinera-base/src/data_types.rs41};
LOWlinera-base/src/data_types.rs161
LOWlinera-base/src/data_types.rs181
LOWlinera-base/src/data_types.rs581 /// A number of blobs to publish.
LOWlinera-base/src/data_types.rs601#[derive(Clone, Debug, Deserialize, Serialize, WitLoad, WitType)]
LOWlinera-base/src/data_types.rs1221 pub mandatory_applications: Vec<ApplicationId>,
LOWlinera-base/src/data_types.rs1881 /// A collection of applications: If `Some`, only bundles with at least one message by any
LOWlinera-base/src/identifiers.rs261 Data,
LOWlinera-base/src/identifiers.rs521#[derive(Debug, WitLoad, WitStore, WitType, Allocative)]
LOWlinera-base/src/identifiers.rs1461 }
LOWlinera-base/src/identifiers.rs1481 // * BCS body (32 raw bytes for [u8; 32])
LOWlinera-base/src/lib.rs61///
LOWlinera-base/src/lib.rs81/// Formats a byte sequence as a hexadecimal string, and elides bytes in the middle if it is longer
LOWlinera-base/src/lib.rs101/// };
LOWlinera-base/src/lib.rs121 f,
LOWlinera-base/src/lib.rs141/// byte_vecs: Vec<Vec<u8>>,
LOWlinera-base/src/task.rs21///
LOWlinera-base/src/unit_tests.rs21#[test_case(&AccountPublicKey::test_key(255); "of_public_key")]
LOWlinera-base/src/task_processor.rs1// Copyright (c) Facebook, Inc. and its affiliates.
LOWlinera-base/src/task_processor.rs21/// processTaskOutcome(outcome: TaskOutcome!)
LOWlinera-base/src/crypto/mod.rs81 /// Ed25519 signature.
LOWweb/@linera/client/src/client.rs21/// The full client API, exposed to the wallet implementation. Calls
LOWweb/@linera/client/src/client.rs101 /// nothing.
LOWweb/@linera/client/src/client.rs141 }
LOWweb/@linera/client/src/faucet.rs21
LOWweb/@linera/client/src/lock.rs1// Copyright (c) Zefchain Labs, Inc.
LOWweb/@linera/client/src/lock.rs41/// An exclusive lock on a named resource, backed by the Web Locks API.
LOWweb/@linera/client/src/lock.rs61 /// This uses the Web Locks API with the `ifAvailable` option, meaning it will
LOWweb/@linera/client/src/chain/mod.rs101 /// # Errors
LOWweb/@linera/client/src/chain/application.rs21pub struct QueryOptions {
LOWlinera-indexer/graphql-client/src/indexer.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-indexer/graphql-client/src/operations.rs1// Copyright (c) Zefchain Labs, Inc.
LOWlinera-indexer/lib/src/rocks_db.rs21#[derive(clap::Parser, Clone, Debug)]
LOWlinera-storage-service/src/client.rs41 RequestWriteBatchExtended, Statement,
LOWlinera-storage-service/src/lib.rs1// Copyright (c) Zefchain Labs, Inc.
414 more matches not shown…
Verbosity Indicators25 hits · 43 pts
SeverityFileLineSnippet
LOWlinera-faucet/server/src/tests.rs684 // Step 1: Daily claim should fail before initial claim.
LOWlinera-faucet/server/src/tests.rs691 // Step 2: Do the initial claim to create a chain.
LOWlinera-faucet/server/src/tests.rs699 // Step 3: Daily claim should fail in period 0 (same period as initial claim).
LOWlinera-faucet/server/src/tests.rs706 // Step 4: Advance clock by 25 hours to enter period 1.
LOWlinera-faucet/server/src/tests.rs710 // Step 5: Daily claim should now succeed.
LOWlinera-faucet/server/src/tests.rs719 // Step 6: Second daily claim in the same period should fail.
LOWlinera-faucet/server/src/tests.rs726 // Step 7: Advance clock by another 24 hours to enter period 2.
LOWexamples/bridge-demo/index.html550 // Step 1: Approve + Deposit on EVM
LOWexamples/bridge-demo/index.html562 // Step 3: Wait for relay to auto-detect and process the deposit
LOWexamples/bridge-demo/index.html596 // Step 1: Transfer wrapped tokens to bridge chain with Address20 owner
LOWexamples/bridge-demo/index.html612 // Step 2: Wait for relay to forward block
LOWexamples/bridge-demo/index.html615 // Step 3: Poll EVM balance
LOWlinera-core/src/unit_tests/worker_tests.rs4575 // Step 1: Create two transfer certificates from chain_1 to chain_2.
LOWlinera-core/src/unit_tests/worker_tests.rs4597 // Step 2: Process both certs on chain_1 (adds heights 0, 1 to outbox for chain_2).
LOWlinera-core/src/unit_tests/worker_tests.rs4605 // Step 3: Deliver height 0 to chain_2 and confirm it on chain_1.
LOWlinera-core/src/unit_tests/worker_tests.rs4616 // Step 4: Send a spurious ConfirmUpdatedRecipient that claims chain_2 already
LOWlinera-core/src/unit_tests/worker_tests.rs4637 // Step 5: Create cert_2 from chain_1 (height 2), process it on chain_1, and
LOWlinera-core/src/unit_tests/worker_tests.rs4682 // Step 7: Verify recovery — chain_2 received all three heights.
LOWlinera-core/src/unit_tests/worker_tests.rs4733 // Step 1: Create and fully process block 0 (transfer from chain to target).
LOWlinera-core/src/unit_tests/worker_tests.rs4757 // Step 2: Plant a confirmed vote in the chain manager. After the reset, it must
LOWlinera-core/src/unit_tests/worker_tests.rs4768 // Step 3: Corrupt `previous_message_blocks` in storage. This directly affects
LOWlinera-core/src/unit_tests/worker_tests.rs4783 // Step 3: Create block 1 certificate.
LOWlinera-core/src/unit_tests/worker_tests.rs4795 // Step 4: Verify that WITHOUT recovery, processing fails with CorruptedChainState.
LOWlinera-core/src/unit_tests/worker_tests.rs4855 // Step 5: Now create a worker WITH recovery enabled and a whitelist that
LOWlinera-core/src/unit_tests/worker_tests.rs4899 // Step 6: Verify recovery — chain should be at height 2 with correct state.
Decorative Section Separators14 hits · 42 pts
SeverityFileLineSnippet
MEDIUMlinera-bridge/tests/e2e/tests/auto_deposit_scan.rs356 // ══════════════════════════════════════════════════════════════════
MEDIUMlinera-bridge/tests/e2e/tests/auto_deposit_scan.rs358 // ══════════════════════════════════════════════════════════════════
MEDIUMlinera-bridge/tests/e2e/tests/auto_deposit_scan.rs447 // ══════════════════════════════════════════════════════════════════
MEDIUMlinera-bridge/tests/e2e/tests/auto_deposit_scan.rs449 // ══════════════════════════════════════════════════════════════════
MEDIUMlinera-bridge/tests/e2e/tests/evm_to_linera_bridge.rs43// ── Solidity interfaces for EVM calls ───────────────────────────────────────
MEDIUMscripts/deploy-validator.sh52# -----------------------------------------------------------------------------
MEDIUMscripts/deploy-validator.sh54# -----------------------------------------------------------------------------
MEDIUMscripts/deploy-validator.sh80# -----------------------------------------------------------------------------
MEDIUMscripts/deploy-validator.sh82# -----------------------------------------------------------------------------
MEDIUMscripts/deploy-validator.sh745# -----------------------------------------------------------------------------
MEDIUMscripts/deploy-validator.sh747# -----------------------------------------------------------------------------
MEDIUM.github/scripts/format-bench-results.sh28# ── Formatting helpers ───────────────────────────────────────────────────────
MEDIUM.github/scripts/format-bench-results.sh86# ── Read benchmark data from JSON files ──────────────────────────────────────
MEDIUM.github/scripts/format-bench-results.sh159# ── Markdown output ──────────────────────────────────────────────────────────
Redundant / Tautological Comments13 hits · 20 pts
SeverityFileLineSnippet
LOWdocker/compose-scylla-setup.sh25# Check if running with sufficient privileges
LOWdocker/compose-scylla-setup.sh243 # Check if config already exists
LOWscripts/deploy-validator.sh217# Check if a command exists
LOWscripts/deploy-validator.sh222# Check if Docker Compose plugin is installed
LOWscripts/deploy-validator.sh394 # Check if we should skip genesis download
LOWscripts/deploy-validator.sh431 # Check if wget is available
LOWscripts/deploy-validator.sh459 # Check if genesis configuration already exists
LOWscripts/deploy-validator.sh637 # Check if path exists
LOWscripts/deploy-validator.sh644 # Check if path is mounted
LOWscripts/deploy-validator.sh912 # Check if XFS is configured (optional - just for information)
LOWscripts/check_chain_loads.sh3# Check if there aren't any unexpected chain load operations
LOWscripts/backup-validator-keys.sh29 # Check if container exists and is running
LOWscripts/backup-validator-keys.sh40 # Check if path exists in container
AI Slop Vocabulary4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMdocker/compose-scylla-setup.sh69# Based on ScyllaDB documentation and best practices
MEDIUMlinera-service/src/cli/validator_benchmark/tip_lag.rs52 // chain, so this is the robust source. NOTE: it is the genesis committee;
MEDIUMlinera-core/src/chain_worker/state.rs670 // Verify the certificate. Returns a catch-all error to make client code more robust.
MEDIUMlinera-core/src/chain_worker/state.rs764 // Verify the certificate. Returns a catch-all error to make client code more robust.
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMdocker/compose-scylla-setup.sh304# Create a flag file to indicate setup is complete
MEDIUMscripts/deploy-validator.sh1065# This file is the source of truth for Docker Compose configuration
MEDIUMscripts/fix-validator-env.sh61# This file is now the source of truth for Docker Compose configuration
Example Usage Blocks5 hits · 8 pts
SeverityFileLineSnippet
LOWdocker/docker-compose.alloy.yml3# Usage:
LOWexamples/bridge-demo/setup.sh8# Usage:
LOWexamples/bridge-demo/spawn-relayer.sh9# Usage:
LOWscripts/test_publish.sh10# Usage:
LOWscripts/memleak_translate.sh9# Usage:
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHlinera-views/src/batch.rs37/// A write operation as requested by a view when it needs to persist staged changes.
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippet
LOWlinera-execution/build.rs17 // If you change this, don't forget to update `WasmRuntime` and
MEDIUMexamples/counter-no-graphql/src/service.rs44 // Check that they are equal (for demonstration purposes)