-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
ArkivClient.send_transaction (and helpers like create_entities / update_entities) crash on the current golembase-op-geth storage contract with web3.exceptions.Web3ValueError: Could not find any event with matching topic. The transaction is accepted by the node, but the SDK cannot decode the logs because the ABI bundled with the SDK does not include the new ArkivEntity* events emitted on-chain.
Environment
- SDK:
arkiv-sdk-python(vendored inArkiv-Network/ctf-ideas, current HEAD) - Node: golembase-op-geth Docker Compose stack from that repo
- Python: 3.11.13
- Platform: macOS arm64 host (Docker Desktop)
Reproduction
- Clone
https://github.com/Arkiv-Network/ctf-ideas. - Set up the virtualenv and install deps:
python3.11 -m venv .venv source .venv/bin/activate pip install -U pip pip install -r challenges/the-lockbox/server/requirements.txt pip install -r challenges/the-lockbox/scripts/requirements.txt - Boot the local node and fund a wallet (password
secret):cd golembase-op-geth docker compose up -d export WALLET_PASSWORD=secret docker compose exec -T op-geth golembase account import --privatekey 0x9e0e50eaab436bc147c947960224895674d6c9c6303cb9ba941ed04e87188576 docker compose exec -T op-geth golembase account fund --node-url http://localhost:8545 --value 100 docker compose exec -T op-geth golembase account balance --node-url http://localhost:8545 cd ..
- Export the connection variables:
export ARKIV_RPC_URL=http://localhost:8545 export ARKIV_WS_URL=ws://localhost:8545 export ARKIV_PRIVATE_KEY=0x9e0e50eaab436bc147c947960224895674d6c9c6303cb9ba941ed04e87188576
- Save the script below as
scripts/repro_update_entities_failure.pyand run it:Command:#!/usr/bin/env python3 """Trigger ArkivClient.update_entities failure without local fallbacks.""" import asyncio import json import os from arkiv_sdk import Annotation, ArkivClient, ArkivCreate, ArkivUpdate async def main() -> None: rpc = os.environ["ARKIV_RPC_URL"] ws = os.environ["ARKIV_WS_URL"] pk = bytes.fromhex(os.environ["ARKIV_PRIVATE_KEY"][2:]) client = await ArkivClient.create_rw_client(rpc_url=rpc, ws_url=ws, private_key=pk) payload = json.dumps({"status": "Locked", "last_attempt": "None", "correct_digits": 0}).encode() receipt = await client.create_entities( [ ArkivCreate( payload, 10_000, [Annotation("ctf", "the-lockbox"), Annotation("team", "sdk-repro")], [], ) ] ) lockbox_key = receipt[0].entity_key attempt_payloads = [ ("111", 0), ("222", 1), ("333", 1), ("444", 2), ] for combo, correct in attempt_payloads: body = json.dumps( { "status": "Unlocked!" if correct == 3 else "Locked", "last_attempt": combo, "correct_digits": correct, } ).encode() receipt = await client.update_entities( [ ArkivUpdate( lockbox_key, body, 10_000, [Annotation("ctf", "the-lockbox"), Annotation("team", "sdk-repro")], [], ) ] ) print("update receipt", receipt) await client.disconnect() if __name__ == "__main__": asyncio.run(main())
python scripts/repro_update_entities_failure.py
Expected
Both create_entities and subsequent update_entities calls should return receipts without raising.
Actual
The very first create_entities call raises:
web3.exceptions.Web3ValueError: Could not find any event with matching topic
The stack trace points to ArkivClient._process_arkiv_log_receipt, which cannot resolve the emitted topic 0x73dc52f9… (the hash of ArkivEntityCreated(uint256,address,uint256,uint256)) because the SDK ABI only lists the legacy GolemBaseStorage* events. The transaction itself lands on-chain—querying storage immediately after shows the entity exists—which confirms the failure is in SDK-side log decoding.
Impact
All CTF challenge servers currently have to bypass the SDK by crafting raw ArkivTransactions (with manual gas bumps) just to keep basic create/update flows working. Please expand the bundled ABI to include the new ArkivEntity* events and adjust the receipt parsing logic accordingly so ArkivClient.update_entities works out of the box.