Bloom cascade
To install, run:
pip install bloom_cascade
To use it, first import it like this:
from bloom_cascade import Cascade
Creating a cascade
Example of building a cascade:
cascade = Cascade()
R = set()
S = set()
for i in range(100):
R.add(str(i))
for i in range(100,400):
S.add(str(i))
cascade.build_cascade_blob(R, S)
Recreate a cascade from BLOB data
An example retriving a bloom cascade from a blob transaction on Holesky testnet, using the blobscan API:
import requests
import json
import hexbytes
from bloom_cascade import Cascade
clean_tx = '0x8fd37f5db4ab0e4c0b8dad166842d0ac7c3aeb86303a3bce3d5b19656dd65c2c'
tx_url = f"https://api.holesky.blobscan.com/transactions/{clean_tx}"
print(f" Requesting: {tx_url}")
# Get transaction details
response = requests.get(tx_url)
if response.status_code != 200:
print(f" Transaction not found: HTTP {response.status_code}")
print(f"Response: {response.text}")
tx_data = response.json()
print(f" Transaction found: {tx_data.get('hash', 'Unknown')}")
print(f" Block: {tx_data.get('blockNumber', 'Unknown')}")
if not tx_data.get('blobs'):
print(" No blob versioned hashes found in transaction")
blob_hash = tx_data['blobs'][0]['versionedHash']
print(f" Found {len(blob_hash)} blob hash(es): {blob_hash}")
blobs_url = f"https://api.holesky.blobscan.com/blobs/{blob_hash}/data"
blobs_response = requests.get(blobs_url)
if blobs_response.status_code != 200:
print(f" Could not retrieve blobs: HTTP {blobs_response.status_code}")
blobs_data = blobs_response.json()
blobs_data_bytes = bytes.fromhex(blobs_data[2:])
csd = Cascade()
# USE THE DEDICATED FUNCTION FOR PROCCESING BLOBS
csd.deserialize_cascade_blob(blobs_data_bytes)
for i in range(100):
if csd.is_revoked(str(i)):
print('d'+ str(i))
for i in range(100,200):
if not csd.is_revoked(str(i)):
print('R' + str(i))
Metadata
Release files for bloom-cascade 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bloom_cascade-1.0.5.tar.gz | 4.3 kB | Without provenance | Details for bloom_cascade-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bloom_cascade-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for bloom_cascade-1.0.5-py3-none-any.whl |
Total release size: 8.9 kB
Release files / bloom_cascade-1.0.5.tar.gz
| Download URL | bloom_cascade-1.0.5.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e633f8c6b1fa976afc2b2758303f87fd117fdc7fc5e659c300520bb8650bfed
|
|
BLAKE2b-256 checksum How to use checksums |
c51185b328f8e82dd93734f69b4b76981533abb0146cf0b76e37542215895946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / bloom_cascade-1.0.5-py3-none-any.whl
| Download URL | bloom_cascade-1.0.5-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a5c27bc28729dd6baba0666b76c7492aaed51036da1995ad410fb37d48225f0
|
|
BLAKE2b-256 checksum How to use checksums |
e6eb75a46a93fcfde309f79ecac1d2580c55c77a701cc83731299e1620b217b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for bloom-cascade 1.0.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.