avm-effectproof
Application-effect proofs for Algorand and Voi. Read what a transaction
actually did — inner transactions, logs, global and local state changes — out
of a SignedTxnInBlock you have already proven into a block.
One implementation covers both chains: Algorand and Voi share the AVM block and transaction encoding.
Why this exists
A State Proof commits to block headers. A block header commits to a transaction
Merkle tree. In go-algorand (data/bookkeeping/txn_merkle.go) that tree is "a
cryptographic commitment to the transactions in the block, along with their
ApplyData" — and ApplyData carries the EvalDelta:
| Field | Meaning |
|---|---|
gd |
global state changes |
ld |
local state changes |
lg |
emitted logs |
itx |
inner transactions, each with its own ApplyData |
So once a transaction is proven into a block, its effects are proven with it.
This library reads those effects. It does not authenticate anything: feed it
a STIB that avm-proofpack has
already proven, or the effects are just claims.
Install
pip install avm-effectproof
Use
from avm_effectproof import decode_stib, VOI_MAINNET, has_log, has_inner, has_global_state
effects = decode_stib(stib_bytes, chain=VOI_MAINNET) # STIB you already proved
effects.app_id # 5211
[entry.hex() for entry in effects.logs]
len(effects.all_inner()) # inner txns at every depth
has_log(effects, prefix=b"\x80U")
has_inner(effects, txn_type="pay")
has_global_state(effects, key=b"total_transactions")
decode_stib searches inner transactions recursively; effects.all_inner() is
flat and ordered parents-before-children.
CLI
avm-effectproof stib.bin --chain voi --describe
avm-effectproof stib.bin --chain algorand --inner-type pay
avm-effectproof stib.bin --global-key pendingCost --global-value 36000
Exit codes: 0 pass, 1 a check failed, 2 input error.
State change encoding (do not guess this)
ValueDelta is {"at": action, "bs": <str>, "ui": <uint>} and the action enum
is 1-based (data/basics/teal.go):
at |
action |
|---|---|
| 1 | set bytes (bs) |
| 2 | set uint (ui) |
| 3 | delete |
0 is not valid, and bs/ui are omitted when empty — a set-uint of 0
arrives as {"at": 2}. The decoder raises on anything else rather than guessing.
Binary fields arrive as bytes on one chain and as surrogate-escaped str on
the other; both are round-tripped to the original bytes with surrogateescape.
Verified against real chain data
Both fixtures are real blocks, committed to the test suite:
| Chain | Round | Contents |
|---|---|---|
| Algorand mainnet | 63605124 | app 1439234347, 2 global writes, 3 inner (incl. a 1000 µAlgo payment) |
| Voi mainnet | 181248 | app 5211, 2 logs, 5 inner (incl. a 100000 µVoi payment) |
Every structural test runs against both chains.
What this does not do
- It does not prove inclusion. Pair it with
avm-proofpack. - It does not resolve local-state delta account indices;
ldkeys are exposed as the raw indices used byEvalDelta. - It does not decode application arguments, boxes or asset holdings.
Licence
Apache-2.0.
Metadata
Release files for avm-effectproof 0.1.1
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 |
|---|---|---|---|---|
| avm_effectproof-0.1.1.tar.gz | 16.4 kB | Without provenance | Details for avm_effectproof-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| avm_effectproof-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for avm_effectproof-0.1.1-py3-none-any.whl |
Total release size: 31.1 kB
Release files / avm_effectproof-0.1.1.tar.gz
| Download URL | avm_effectproof-0.1.1.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adf5062e8834f4b401cfece358bfbb4c88d036ce43f8fe85836affac6d0358ca
|
|
BLAKE2b-256 checksum How to use checksums |
fd27da798c412c6845c53fb4a04b5f15d08a358ed1f493fedc478b28457dedfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / avm_effectproof-0.1.1-py3-none-any.whl
| Download URL | avm_effectproof-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ca06d93115fe7dfbb9982d76920082bfcc1ab5111ec47371944bd600cb5bd0b
|
|
BLAKE2b-256 checksum How to use checksums |
2b61f6ef45f97c075e1b288241d6d8f0ddaae3a425c44e8c16d3b5286fc2f487
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for avm-effectproof 0.1.1
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.