Skip to main content

flashblocks

Chainlink price updates on Base as they land: the new answer decoded from the transmit transaction and confirmed from the block's logs_bloom, with no receipt round-trip.

Rust library, command-line tool and Python module (pip install flashblocks).

flashblocks-tail decoding live Chainlink updates on Base

Base after Denim (0.2)

On Nov 5, 2026 Base activated Denim: a complete canonical block every 200 ms, and Flashblocks were retired (wss://mainnet.flashblocks.base.org/ws still accepts connections but streams nothing). Since 0.2 this crate reads 200 ms blocks from any WebSocket RPC with subscriptions:

  • Header first. eth_subscribe("newHeads") delivers every block header with its logsBloom. A block is read only if the bloom holds the AnswerUpdated topic and one of the watched aggregators; blooms have no false negatives, so nothing is missed and almost no block is read for nothing (in a live test: one block read in four minutes, the one with the update).
  • No dropped blocks. Public WebSocket endpoints drop headers under load (on the day after Denim one public stream delivered 59% of the blocks). The listener remembers the last block it saw and reads every skipped one by number over the same connection, including the blocks of a reconnect.
  • Same events. The block's transactions are decoded exactly as Flashblocks slices were: forward(aggregator, transmit(report)) through a forwarder or a direct transmit(report), the new answer is the median of the report's observations (as the OCR2 aggregator computes it), and AnswerUpdated(aggregator, answer) in the block's bloom confirms it. index is now the transaction index in the block.

A Flashblocks stream can still be decoded (Listener, parse, --url) for chains or nodes that serve one.

Command line

cargo install flashblocks
flashblocks-tail --feed 0x71e021bc2e8a709b72ac7b6036e5b2bf30f263d0   # cbETH/USD aggregator on Base
{"block":54360494,"index":7,"aggregator":"0x92f88cca9d3c846be7e8163e4c32bb07772cd245","answer":"7587667500230","confirmed":true,"tx":"0xf9f9…","latency_ms":165.67}

--feed is the aggregator address (what EACAggregatorProxy.aggregator() returns), not the proxy; pass it as many times as you like. --rpc wss://… sets the WebSocket RPC (default: the public wss://base-rpc.publicnode.com); for anything serious use your own node or a provider from Base's Builder Stack. latency_ms is the time from the header's arrival to the printed line, which includes reading the block over the RPC (~150 ms on a public endpoint). One JSON line per update goes to stdout; when the chain is quiet, connection statistics (blocks read, skipped blocks filled) go to stderr.

Rust

use flashblocks::{BlockListener, Watch};

let watch = Watch { aggregators: vec![cb_eth_usd] };
let listener = BlockListener::start("wss://base-rpc.publicnode.com".into(), watch);
for update in listener.receiver.lock().unwrap().iter() {
    let f = update.update;
    println!("block {} tx {} feed 0x{} confirmed {:?} after {:.2} ms",
             f.block, f.index, hex::encode(f.aggregator), f.confirmed,
             update.received.elapsed().as_secs_f64() * 1000.0);
}

Without the listener: flashblocks::blocks::may_have_update(&header, &watch) checks a header's bloom and flashblocks::blocks::block_updates(&block, &watch) decodes a full block (eth_getBlockByNumber(n, true)), both on serde_json::Value. BlockListener.watch can be swapped at runtime.

Python

pip install flashblocks
import flashblocks

listener = flashblocks.BlockListener("wss://base-rpc.publicnode.com",
                                     aggregators=["0x71e021bc2e8a709b72ac7b6036e5b2bf30f263d0"])
while True:
    got = listener.next(1000)  # (aggregator, answer, block, tx_index, age_ms, tx_hash, confirmed) or None
    if got:
        print(got)

flashblocks.block_updates(block_json, aggregators) decodes a block you fetched yourself. Decoding and waiting run with the GIL released. flashblocks.Listener and flashblocks.parse still read a Flashblocks stream.

Testing

cargo test --release decodes a recorded Base mainnet block with a cbETH/USD update (block 53935243, confirmed from its bloom), checks the header prefilter, and replays tests/fixtures/base_sample.ndjson (135 Flashblocks messages from October 2026) against an independent Python decoder. Selectors are derived from the function signatures in a test, so a typo cannot silently break decoding.

License

MIT.

Metadata

Release files for flashblocks 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flashblocks 0.2.0
File Size Uploaded Provenance Actions
flashblocks-0.2.0.tar.gz 790.7 kB With provenance Details for flashblocks-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for flashblocks 0.2.0
File Actions
flashblocks-0.2.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for flashblocks-0.2.0-cp312-abi3-win_amd64.whl
flashblocks-0.2.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for flashblocks-0.2.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
flashblocks-0.2.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for flashblocks-0.2.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
flashblocks-0.2.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for flashblocks-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
flashblocks-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for flashblocks-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 6.9 MB

Release files / flashblocks-0.2.0.tar.gz

Download URL flashblocks-0.2.0.tar.gz
Size 790.7 kB
Tags Source
SHA-256 checksum
How to use checksums
13be745e265e04baddc4bf738b372502233f46e50c3488f60471646c386ce802
BLAKE2b-256 checksum
How to use checksums
68b55169b9ba8f6edda10097174a1842929354f16e820de4feb915026a7a8bb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / flashblocks-0.2.0-cp312-abi3-win_amd64.whl

Download URL flashblocks-0.2.0-cp312-abi3-win_amd64.whl
Size 1.1 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6e230febff90bfc8370593938736c4bd65aa4484cbb0ed550d69bcab465bf01c
BLAKE2b-256 checksum
How to use checksums
015131ea9313781051356c4d090bd8b11bc8151ac78cec6307aadb2d6f9587c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / flashblocks-0.2.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL flashblocks-0.2.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.3 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
5c051543eae92b9e7d76d384df82c7bbeee4fcd8543e690e623c905798913ad6
BLAKE2b-256 checksum
How to use checksums
f926a17b61da36588a3dd4a0f542623b82f90b65724ad203f396162d03b9d6e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / flashblocks-0.2.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL flashblocks-0.2.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.3 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
d2a00ab564ebe98bf701ebee2e33e7281e2043bdcdb8f3b765f29814c7ad7cf2
BLAKE2b-256 checksum
How to use checksums
e6068a7f71488b152c18c53f2b6a8535393cdc4fbc139eab91d30ed24890005e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / flashblocks-0.2.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL flashblocks-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d5616e9d957a9c9fb225842c1e59dbc569b06ad8ccf546fd3e337249ffb301bb
BLAKE2b-256 checksum
How to use checksums
b0fffde95dcff8580fc427f4abca5fd30a9aa9cc2929ea6383101e3e39d13957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / flashblocks-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL flashblocks-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e036213dbcab0da2d7dc347df3d0b85288018d85e78166037f6da507906e9505
BLAKE2b-256 checksum
How to use checksums
37fc35aebf32806d8f1f33818257fd9ae456df13c46b439e60c9227c3024fefa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for flashblocks 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for flashblocks-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page