Mining firmware for ESP32-S and ESP8266 microcontrollers.
Connects to pot.rpc.gateway.tribewarez.com to fetch PoT-O challenges, execute tensor operations on-device, and submit proofs.
- Releases (binaries): github.com/TribeWarez/esp-pot-o-miner/releases
- Repository: github.com/TribeWarez/esp-pot-o-miner
- PoT-O gateway: pot.rpc.gateway.tribewarez.com
| Device | Max Tensor | Working Memory | Supported Ops |
|---|---|---|---|
| ESP32-S | 64×64 | 320 KB | matrix_multiply, convolution, relu, sigmoid, dot_product, normalize |
| ESP8266 | 32×32 | 80 KB | relu, sigmoid, dot_product, normalize |
- PlatformIO
- USB cable connected to ESP device
Edit include/pot_o_config.h:
#define WIFI_SSID "YOUR_SSID"
#define WIFI_PASS "YOUR_PASS"Or pass via build flags:
pio run -e esp32s -t upload --build-flag="-DWIFI_SSID='\"MySSID\"' -DWIFI_PASS='\"MyPass\"'"# ESP32-S
pio run -e esp32s -t upload
# ESP8266 (NodeMCU v2)
pio run -e esp8266 -t upload
# Monitor serial output
pio device monitor -b 115200- Boot → Connect WiFi → Register device with RPC
- Loop:
POST /challenge→ get tensor challenge- Execute tensor operation (matrix multiply, convolution, activation, etc.)
- Compute MML score (entropy-based approximation of DEFLATE ratio)
- Search nonces for neural path match within Hamming distance tolerance
POST /submit→ submit proof for on-chain verification
- Progress (recommended):
POST /devices/progresswithchallenge_id,hash, anddevice_idevery few seconds while mining so the status dashboard shows live activity. - Heartbeat every 30s via
GET /health
For full CLI and ESP integration details (curl examples, device_id on submit, progress reporting), see the validator root CLI_AND_ESP_GUIDE.md.
To keep devices up to date, you can perform a lightweight self-check against the status gateway when the ESP boots:
- Base URL:
https://status.rpc.gateway.tribewarez.com - Endpoint:
/api/device/self-check - Query parameters:
device_type:esp32oresp8266channel: e.g.testnetkind:firmwarecurrent_version: firmware version string compiled into the binary (e.g.POT_O_VERSION)
Example HTTP request:
GET https://status.rpc.gateway.tribewarez.com/api/device/self-check?device_type=esp32&channel=testnet&kind=firmware¤t_version=1.0.0
If the response reports update_required or update_recommended and includes an artifact.download_url, you can:
- Download the new firmware image with a small HTTPS client.
- Verify the
checksum(if present). - Flash the new image according to your OTA update strategy for the device.
The exact OTA mechanism depends on your hardware and bootloader, but this endpoint gives you a single, canonical source of truth for which firmware version to run per device type and channel.
- Core library (reusable across firmware repos):
lib/pot_o_firmware_core/- Tensor ops (base + ESP32 tiled matmul, optional ESP-DSP), neural path, SHA-256, MML score.
- See
lib/pot_o_firmware_core/README.mdfor API and optional build flags (USE_ESP_DSP,USE_FAST_ACTIVATIONS,USE_SIN_LUT).
- App:
src/main.cpp— setup, mining loop, HTTP client, proof assembly. Includespot_o/*.hfrom the core lib. - Legacy redirects:
include/*.hredirect topot_o/*.hfor backward compatibility.
Hardware SHA on ESP32 is enabled via sdkconfig.defaults (CONFIG_MBEDTLS_HARDWARE_SHA=y).
Default: https://pot.rpc.gateway.tribewarez.com
Override in platformio.ini build flags:
build_flags =
-DPOT_RPC_HOST=\"your-host.example.com\"
-DPOT_RPC_PORT=8900
-DPOT_RPC_TLS=0