Repository navigation
Conversation
- CPU: sysinfo `global_cpu_info().name()` is the per-core label ("0"),
not the model, so every miner reported cpu="0". Use `brand()`, with a
`sysctl machdep.cpu.brand_string` fallback on macOS. Without a brand,
Apple chips risk falling through to the generic-ARM rate on the node.
- MACs (macOS): `ifconfig` only shows per-network private/randomized
addresses (en0 private Wi-Fi, awdl0, llw0, utun*), which churn and trip
MAC_MAX_UNIQUE_PER_DAY. Read burned-in addresses from
`networksetup -listallhardwareports`; keep ifconfig as fallback.
Tested on a MacBook Neo (Apple A18 Pro, macOS 26.5): cargo build
--release clean, cargo test 33 passed, --dry-run shows
"CPU: Apple A18 Pro" and "MAC count: 1" (was "CPU: 0", 4 MACs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
| Metric | Value |
|---|---|
| Trust Score | 36/100 |
| Certificate ID | BCOS-f82a73a4 |
| Tier | L1 (not met) |
What does this mean?
The BCOS (Beacon Certified Open Source) engine scans for:
- SPDX license header compliance
- Known CVE vulnerabilities (OSV database)
- Static analysis findings (Semgrep)
- SBOM completeness
- Dependency freshness
- Test infrastructure evidence
- Review attestation tier
BCOS v2 Engine - Free & Open Source (MIT) - Elyan Labs
elvergon8888
reviewed
Nov 5, 2026
elvergon8888
left a comment
There was a problem hiding this comment.
Revisando los cambios, noto lo siguiente:
- Parseo de MAC (validación de hex): Al leer la MAC desde
networksetup -listallhardwareports, solo se valida la longitud de la cadena o el formato superficial, pero no se verifica estrictamente que todos los caracteres sean hexadecimales ([0-9A-Fa-f]), lo que podría permitir strings inválidos. - Fallback a
ifconfig: Si el comando principal falla y cae al fallback, sigue devolviendo MACs aleatorizadas por privacidad (Private Wi-Fi Address) sin lanzar una advertencia clara al usuario de que el fingerprint puede ser incorrecto. - Función
brand()en Linux: Retorna un string vacío si no encuentra el modelo, pero carece de un fallback genérico (ej. "Generic CPU"), lo que puede romper la lógica río abajo. - Nota del autor: Coincido en que el problema del reinicio de la llave Ed25519 (generada en cada start) es crítico para el enrolamiento y debe tratarse en un issue/PR separado.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BCOS Checklist (Required For Non-Doc PRs)
BCOS-L1rustchain-miner/src/hardware.rsonly)What Changed
sysinfoglobal_cpu_info().name()returns the per-core label ("0"), not the model, so the Rust miner reportedcpu = "0"on every platform. It now usesbrand(), with asysctl -n machdep.cpu.brand_stringfallback on macOS. Without a real brand, Apple chips risk being classed as generic ARM byderive_verified_device.ifconfigonly shows private or randomized addresses (en0 private Wi-Fi, awdl0, llw0, utun*). They churn and can tripMAC_MAX_UNIQUE_PER_DAY. The miner now reads burned-in addresses fromnetworksetup -listallhardwareports, and falls back toifconfigif that returns nothing.Testing / Evidence
Built and run on a MacBook Neo (Apple A18 Pro, macOS 26.5, arm64):
Not verified locally: the Linux/Windows build. The
cfg(target_os = "macos")paths are the only new code, and the CPU change (name()→brand()) applies on every platform. Please let CI confirm.Separate issue, not fixed here: the miner generates a new Ed25519 signing key at every start (
miner.rs), so a restart presents a differentpublic_key. This needs checking against the node's enroll/attest key binding.🤖 Generated with Claude Code