WorksComputer Science
EVM-Anchored Provenance for AI-Assisted Code Evolution: A Smoke-Scale Deployment Report
Abstract
We report a smoke-scale deployment of an EVM-anchored provenance framework for the state stream produced by AI-assisted code generation. The system comprises codebase-state-manager, an open-source Model Context Protocol (MCP) server (MIT, v0.2.1) that exposes codebase state, transition, and reward operations to any MCP-compatible assistant, and CodebaseStateRegistry, a Solidity contract deployed on Base Sepolia that emits per-state commitment events. Payloads are pinned to the InterPlanetary File System (IPFS) and indexed through a rebuildable SQLite mirror that resynchronizes by replaying contract events. We delimit precisely what anchoring does and does not attest (existence, ordering, and non-equivocation by the committer key; never truthfulness or fabrication-prevention) and outline the orthogonal supply-chain controls required to close that gap. Under an author-produced synthetic workload on a local Anvil simulator, the median commit costs 103,282 gas, modeled at US17.9-34.8 per 10,000 states), and simulator latency for the create operation is 539.8 ms (p50) and 725.0 ms (p95) under loopback storage and instant mining. The live deployment holds 14 StateCommitted events verifiable on-chain; the last consumed 98,977 gas at 1 gwei (about US$0.30). All empirical figures are descriptive quantiles from a single author run; no testnet latency is reported, and no claim of superiority is made against any baseline. A receipts-trie consumption mechanism, a BountyEscrow use case, and a FAIR-aligned dataset publication pattern are specified as outlook and are not implemented. A property-by-property comparison against OpenTimestamps, Sigstore Rekor, Centrifuge AnchorRegistry, in-toto/SLSA, Radicle, and Lalli et al. places this work relative to the surrounding provenance landscape.
Introduction
Coding assistants and autonomous software agents are now embedded in daily development workflows. Each interaction produces a transition in the underlying codebase: a prompt maps to an edit, the edit is applied, the new state is validated, a reward may be computed. At scale, this (prompt, diff, reward) stream is a substrate for auditing and, prospectively, training workflows. The Model Context Protocol (MCP) standardizes how assistants discover and invoke external tools [1]. The first artifact of this paper, codebase-state-manager [2], is an open-source MCP server exposing codebase state management (states, transitions, rewards, and compact LLM-oriented context) to any MCP-compatible assistant, with pluggable persistence backends.
Persistence alone does not serve all audit interests. An operator-controlled database yields fast queries, but parties that do not trust the operator cannot independently verify it. Anchoring entire states on a public blockchain would solve verifiability, yet on-chain payload storage scales poorly: small diffs sit near the economic boundary, while larger states become prohibitive on L1 and L2 alike (quantified in § 4-C). The second artifact, and the focus of the evaluation, is an EVM-anchored commitment layer that resolves this trade-off by emitting only canonical commitments on-chain, delegating payloads to IPFS, and indexing queries through a local mirror. It is integrated into codebase-state-manager as an additional persistence mode (db_mode=evm); for the supported lifecycle subset the assistant-facing tool surface is unchanged, and operations outside that subset raise a documented NotImplementedError (§ 3-C).
We delimit the guarantee purchased. Anchoring attests existence at commit time, ordering, and non-equivocation by the committer key: post-hoc rewriting, back-dating, and silent deletion become detectable by any third party. It does not attest truthfulness of the committed content; an operator can fabricate tuples before committing them. § 2.4-A delimits the answerable audit questions and the orthogonal supply-chain controls required beyond them.
Scope and contributions of this paper
This paper reports an engineering deployment at smoke scale. The contributions are two and are stated without inflation: (i) the design and implementation of the MCP server and its commitment layer, deployed on the Base Sepolia testnet with a public artifact (§ 2.4–§ 3); and (ii) a property-level comparison against the surrounding provenance landscape and a single-author, single-run characterization of the deployed layer on a disclosed synthetic workload under one reproducible OP-stack fee model, with explicit threats to validity (§ 4). The contributions are deliberately bounded: no production latency is reported (n=50 simulator states, n=14 testnet commits), no independent re-run is included, and three planned components—the receipts-trie consumption relayer, a BountyEscrow contract, and a DatasetPublisher contract—are specified as outlook (Section VI) and are not implemented. We do not claim novelty of any single primitive in the system; we claim a specific combination (assistantnative MCP capture plus per-state EVM commitments on a public rollup, with a specified same-chain consumption path) that, within the surveyed literature, is not operated elsewhere. Head-to-head quantitative comparison with any baseline is future work.
Related Work
Verifiable Anchoring and Off-Chain Storage
OpenTimestamps [3] anchors arbitrary digests into Bitcoin via aggregated Merkle calendars since 2016; it timestamps but emits no EVM-consumable events and models no development-state transitions. Centrifuge’s AnchorRegistry [4] anchors artifact hashes on Ethereum with lineage, targeting business documents. Lamichhane et al. [5] pursue verifiable permanence for IPFS clusters via W3C DIDs and Verifiable Credentials. Hasan et al. [6] store CCTV footage on private Ethereum with event-listener search front-ends. Lalli et al. [10] measure commit costs on Ethereum Layer-1 for academic certificates (≈0.009 ETH each) and report IPFS retrieval ∼3× slower than HTTPS, gateway single points of failure, and unprevented duplicate issuance as open problems. Status against each open problem: retrieval speed remains open (our fallback reads are loopback-only); the gateway single point of failure is mitigated by design (any IPLD-compatible pinning service is substitutable) but not demonstrated at production scale; duplicate issuance is deliberately permitted, with on-chain duplicate detection instead of prevention (§ 2.4-C).
Supply-Chain and AI Provenance
The software supply-chain community has standardized provenance attestation without blockchains. in-toto [19] records signed, inspectable metadata about each step of a software supply chain; SLSA [20] builds provenance levels on top of it; and Sigstore Rekor [11] adds a free, publicly verifiable transparency log. These systems answer who performed which build or release step on which inputs; they do not model the fine-grained state stream produced during AI-assisted development, nor emit events consumable by smart contracts. Our stream sits upstream of them: in-toto-style attestations over our states are the orthogonal control that would cover the fabrication-before-commit gap of § 2.4-A. Radicle [12] provides peer-to-peer Git replication under cryptographic identities with no central controller.
For AI artifacts, Lüthi et al. [21] implement a graph-based provenance model for AI assets (datasets, models) as a smart contract on a permissionless blockchain, targeting value-chain exchange rather than development events. Wang et al. [7] record dataset licensing and lineage for AI training on Daml-on-Canton. Reilly Jr. [9] standardizes the Sentinel Evidence Package with payload digests and blockchain timestamp anchors. Tomlinson [8] defines the Codex Entry abstraction without specifying how downstream contracts consume commitment events. Velasco et al. [22] study automated, explainable provenance of AI-generated code without blockchain anchoring; their focus on explanation complements our focus on durable, third-party-verifiable recording. The relayer pattern of § 2.4-E descends from authenticated data-feed work such as Town Crier [13].
Property-Level Positioning
A scoped literature search (with snowballing per Wohlin [14], single round, conducted 2026-Q2) grounds this positioning; one snowballing round does not saturate this design space, and the snapshot pre-dates some 2026 work on tamper-evident audit logs for MCP tool calls that we discuss as a gap in § 4-E. Table I places our deployment against the five operated alternatives that bound the design space on three properties the literature flags as load-bearing for provenance systems: (a) contract-consumable on-chain surface—does the system emit events that downstream smart contracts can react to without off-chain trust; (b) per-commit on-chain cost—a per-state economic anchor; and (c) deployment maturity—whether the system has been operated with a non-author trace. The table is descriptive and makes no performance claim; columns are populated from each system’s published artifacts.
The residual differentiator, stated without inflation: ours is the only surveyed system whose per-state commitments are EVM events on a public Layer-2 rollup, attached to an assistant-native capture surface (MCP), with a specified (not yet implemented) same-chain consumption path. For timestamping alone, Rekor or OpenTimestamps are strictly better on cost and maturity; we recommend them for that use case. We claim no “first MCP server”.
System Design
Overview and Threat Model
The codebase-state-manager [2] structures the interaction between a coding assistant and the persistence layer for code evolution. Its domain model comprises States (numbered snapshots recording prompt, diff, content hash, timestamp), Transitions (edges carrying the action and optional reward), and metadata. Thin MCP wrappers call a service layer over pluggable repository backends (SQLite, Neo4j, EVM), failing fast on misconfiguration.
Four adversary classes. (i) The backend operator may back-date, misattribute authorship, or fabricate tuples before committing; anchoring defeats the first two, not the third. (ii) The IPFS provider may serve stale or no payload; pin to services. (iii) The centralized L2 sequencer may
| System | EVM events | Per-commit cost | AI workflow | Non-author trace |
| OpenTimestamps | No | free | No | Yes |
| Sigstore Rekor | No | free | No | Yes |
| AnchorRegistry | Yes | L1 gas | No | Yes |
| in-toto / SLSA | No | free | No | Yes |
| Radicle | No | free | No | Yes |
| Lalli et al. | Yes | ∼0.009 ETH (L1) | No | No |
| This work | Yes | ∼$0.002 (L2) | Yes | No |
Table 1. OPERATED PROVENANCE SYSTEMS BY FIVE PROPERTIES. Non-author trace = A DEPLOYMENT NOT PRODUCED BY THE ORIGINAL AUTHORS; AI workflow = NATIVE SUPPORT FOR AI-ASSISTED DEVELOPMENT EVENTS. NONE OF THE LISTED SYSTEMS HAS A PUBLIC HEAD-TO-HEAD BENCHMARK AGAINST ANY OTHER.
censor without chain rewrite; we assume eventual liveness, with L1 forced inclusion as the recovery path at L1 delay and cost. (iv) Key compromise enables scalable fake provenance; mitigation is a threshold multisig or a committer key held in an HSM/KMS, with rotation through RoleGranted/RoleRevoked (§ 3-B). Three scope decisions. First, confidentiality: public-by-default targets open research and educational artifacts; proprietary codebases require client-side encryption or a private swarm. Second, publication hygiene: payloads are immutably public once pinned, so pre-publish secret-scanning (gitleaks-class) is a required production control; the PoC, operating on author-generated states, does not bundle one. Third, honest Layer-2 consensus with high probability.
What the anchored stream answers. Because fabrication-before-commit is outside the guarantee, we state which audit questions a third party can answer: (Q1) Did the operator rewrite, reorder, or delete history after the fact? Detectable: hashes and the monotonic counter are public and append-only. (Q2) Did a claimed state exist at a specific time? Yes, bounded by block timestamp. (Q3) Which key committed it, and is a retrieved payload the committed content? Yes: non-repudiable up to key compromise, verifiable via on-chain hash and JCS canonicalization. What the stream cannot answer (prompt genuineness, reward correctness, build success) requires controls orthogonal to anchoring: signed capture at the source, in-toto-style attestations [19], or on-chain predicate recomputation. Anchoring converts undetectable tampering into detectable fabrication; we present that conversion, not truth, as the guarantee.
Under these assumptions: G1 (Integrity): any third party can verify that a state existed when the chain committed it (Q1–Q3); G2 (Public Verifiability): commitments and CIDs are public without operator cooperation; G3 (Composable Evidence, design goal): commitments are consumable by downstream systems, off-chain without restriction and, once the mechanism of § 2.4-E is implemented, by same-chain contracts within its stated window. Contracts have no log-reading opcode, so G3 is a claim about that specified mechanism, not a native capability.
Architecture
Figure 1 depicts the three-layer architecture. The on-chain CODEBASESTATEREGISTRY holds only minimal state (total-state counter, latest-state index, per-state payload hash, and IPFS CID) and emits events on change. Payloads live on IPFS via a local kubo daemon (any IPLD-compatible pinning service is substitutable). A local SQLite mirror records each tuple after confirmation and serves read-side queries that are economically inappropriate on-chain. The MCP state service is the sole client of all three layers; it publishes the payload first and only then submits the resulting CID.

Figure 1. Architecture and write path. The client publishes the payload to IPFS, submits (stateNumber, stateHash, cid) to the contract, and upserts the mirror after confirmation; the mirror resynchronizes by replaying contract events.
Canonicalization and Deduplication
Every state is canonicalized through JCS (RFC 8785 [15]) and hashed with keccak256; the digest is stored on-chain as stateHash. The contract keys entries by a strictly increasing stateNumber and reverts on duplicate submission. Canonicalization makes duplicates detectable: identical payloads yield identical hashes. Uniqueness is deliberately not enforced: re-committing identical content is sometimes legitimate (e.g., reverting to a prior state). We claim duplicate detection and state-number uniqueness, not impossibility of duplicate registration.
Data Flow and Mirror Resynchronization
commitState is the sole write path: (i) the client canonicalizes the state; (ii) uploads the payload to IPFS and obtains a CID; (iii) submits (stateNumber, stateHash, cid) to the contract; (iv) the contract emits StateCommitted; (v) after confirmation, the client upserts the mirror. Step (v) opens a divergence window: a crash between confirmation and upsert leaves the mirror behind. The mirror resynchronizes explicitly: it compares totalStates() with its maximum state_number and replays StateCommitted events via eth_getLogs from the last mirrored block, with idempotent upserts. Replay is bounded to blocks at least twelve confirmations deep to tolerate shallow reorganizations. On Base, reorgs are sequencer-level events, not miner races: twelve blocks (≈24 s) cover shallow sequencer reordering and short L1 reorgs propagating through derivation; deep L1 reorgs are exceptional recovery scenarios. The chain is the source of truth; the mirror is a rebuildable cache: misses fall back to a chain view plus an IPFS fetch.
Specified Consumption Path (Not Implemented)
The contract emits six events (StateCommitted, TransitionCommitted, RewardUpdated, StateRevoked, RoleGranted, RoleRevoked). EVM logs are write-only: no opcode lets a contract read another contract’s logs. We specify the standard explicit mechanism: a permissionless relayer observes the event off-chain and submits to a downstream contract the event data, the block header, and a Merkle–Patricia proof of the log’s inclusion in that block’s receipts trie, verified against the receiptsRoot reachable via BLOCKHASH for the most recent 256 blocks. This path is specified but not implemented: no relayer, verifier contract, or gas measurement exists in the deployed artifact, and every statement about it here concerns the specification, not a deployed mechanism. Its cost is estimable: a receipts-trie inclusion proof carries ∼6–10 RLP nodes (≈1–2 kB calldata) plus per-node hashing and RLP decoding, bounding verification at – gas (≈US$0.002–0.02 at Table III prices)—a fee-model estimate, not a measurement. Three scope limits bound every downstream claim here. (a) Window: ≈8.5 minutes on Base (∼2 s blocks); older claims require optimistic attestation with a challenge period, reintroducing a liveness-on-watchers assumption we state openly. (b) Same-chain only. (c) Batching: under Merkle batching (§ 4-C) per-state events cease to exist, so receipts-trie proofs do not apply; batched states would need membership proofs against the anchored root, not specified here. G3 therefore covers only the per-state, event-emitting path. The per-state mode is deployed because per-state events are the substrate G3 consumes: batching is ∼200× cheaper but forfeits that path, and at US$17.9–34.8 per 10,000 states the premium fits audit budgets. Per-state anchoring is the default for G3-dependent deployments; batching serves anchoring-only ones.
| Strategy | Gas | Exec US | US$/10k | |
| per-state (median) | 103,282 | 0.0015 | 0.0018–0.0035 | 17.9–34.8 |
| per-state (warm) | 26,847 | 0.0004 | 0.0006–0.0023 | 6.4–23.4 |
| per-state (cold) | 161,196 | 0.0024 | 0.0027–0.0044 | 26.6–43.5 |
| batch † | 450 | – | 0.08–0.16 |
Table III. Per-commit gas and modeled fee cost under (1); Exec is L2 execution only, Fee adds the modeled L1 data fee.
Implementation
MCP Server
Codebase-state-manager is implemented in Python on FastMCP and runs as a local stdio subprocess under any MCP-compatible assistant, exposing 26 tools in four families (lifecycle and state capture, history inspection, compact context and rewards, runtime recovery). A compact context representation, SCC-E (State Compression Code, Embedding), stores LLM-oriented state summaries so long sessions reconstruct context without replaying full history. Compact queries attach the reward of the earliest producing transition, coupling state, action trail, and reward for future reinforcement-learning workflows; no RL experiment is claimed. A repository layer hides the backend (SQLite, Neo4j, EVM) behind one interface. The test suite spans 568 tests (unit through stress layers), with mypy/bandit clean. Test counts measure activity, not adequacy: we report no coverage or mutation figures, and treat that as a limitation.
Smart Contract and Revocation Semantics
CODEBASESTATEREGISTRY is written in Solidity and built, tested, and gas-profiled with Foundry [16] (optimizer_runs=200, the conventional setting for contracts called at moderate frequency). The interface is the minimal subset required by the repository layer: commitState, getStateHash, getStateCid, getCurrentState, totalStates(), and revokeState(uint64). Revocation sets a flag and emits StateRevoked; it preserves stateHash and CID, so the existence attestation (G1) survives revocation while consumers are signaled that the state is no longer operative; stateNumber is never reused; the mirror applies a tombstone on replay.
Authorization model. A DEFAULT_ADMIN_ROLE grants and revokes the COMMITTER_ROLE that alone may call commitState and revokeState; grants and revocations emit the auditable RoleGranted/RoleRevoked events, making rotation public and Q3 (which key committed it) evaluable against on-chain senders. The Base Sepolia deployment holds both roles on a single author key—acceptable at smoke scale but the weakest live link; production configuration is a threshold multisig admin with an HSM/KMS-backed committer and scheduled rotation (§ 2.4-A). Seven Foundry tests cover happy paths, duplicate rejection, unauthorized access, and basic revocation; extended revocation edge cases are queued, so revocation is specified and partially tested, not fully verified.
EVM Backend Components
Within the repository layer, repositories/evm/ adds the fourth persistence mode. The Python canonical encoder implements RFC 8785 [15] over dictionaries and lists, using pycryptodome for keccak256; it is the single authority on which byte sequence is hashed for any state. Conformance relies on UTF-8 round-trip fixtures; JCS edge cases (number serialization, I-JSON) are not yet exercised against the RFC’s reference vectors (queued task). Since the encoder is the single hashing authority and ships with the artifact, verifiers reproduce our hashes exactly; the risk is divergence from other JCS implementations. The IPFS client targets a local kubo daemon over stdlib HTTP with a localhost allow-list. The contract client uses web3.py, the standard Python library for interacting with EVM nodes over JSON-RPC, with EIP-1559 envelopes. EVMStateRepository implements the create, get_by_number, get_current, and create_next subset of the existing interface; other operations raise a documented NotImplementedError. Misconfiguration fails fast rather than silently downgrading to SQLite; an unreachable RPC aborts startup, and a commit-time failure surfaces as a tool error without updating the mirror.
Tests, Deployment, and Artifact
Seventy-five unit tests (15 encoder, 11 IPFS, 11 contract client, 16 repository, 9 measurement, 3 Anvil, 2 parity) plus the 7 Foundry tests pass. Fuzz and invariant campaigns are future work. The contract is live on Base Sepolia at 0xA326f4A75F00189aa6fCec71289D2c05Bc3D5310 with 14 StateCommitted events; deploy transaction 0x4e0fdc05b1200a38c39996a2ee504be78db472563848c36759578eb24d852fb5; representative commit (state 13) 0xe5c855e8b0e6a32a902d78e364ac1985e24881e1afe9c0a45a2f980963045eb. These events are publicly verifiable by any third party via independent RPC calls; we do not claim independent verification by others. The deployer was funded from the Coinbase Developer Platform faucet [18] (no affiliation). The full artifact (server, EVM backend, contract, tests, and the scripts generating every table, including the fee model) is public [2].
Evaluation
Methodology
S1 (local): 50 synthetic states (35 small (∼2 kB, the empirical median diff size), 12 medium (∼116 kB), 3 large (∼780 kB)) driven against a local Anvil instance (solc 0.8.24) with instant mining, on a Linux x86-64 host (8-core, 32 GB RAM; Python 3.12; kubo). We report end-to-end latency for create, mirror read, and fallback read, and gas from forge test --gas-report. The Table II thresholds are usability thresholds, fixed before measurement (interactive mirror reads; batch-tolerant create); they are not performance targets, and with medians 3–5.5× below them the informative content is the distribution, not the pass. S2 (testnet): 14 commits against the deployment of § 3-D, verified through independent RPC calls. All measurements are author-produced; S1 is synthetic and simulator-based. S2 measured no latency (RPC rate limits and faucet budget capped it at 14 commits); an testnet latency campaign precedes any production latency claim. A direct head-to-head measurement against Sigstore Rekor, OpenTimestamps, or any other baseline is future work; we report no such comparison in this paper.
| Operation | (ms) | (ms) | Threshold (ms) | |
| create | 50 | 539.8 | 725.0 | |
| get_by_number (mirror) | 50 | 3.31 | 4.69 | |
| get_by_number (fallback) | 50 | 514.7 | 563.7 |
Table II. S1 (Anvil simulator) latency vs. usability thresholds; descriptive quantiles, single author run.
Latency
Table II reports for S1 only. These figures capture client- and storage-side overhead, not confirmation, remote pinning, or sequencer behavior; no system-level latency is claimed. With , is a 2–3-sample order statistic; quantiles are descriptive, without confidence intervals. create is dominated by EIP-1559 submission and the IPFS add; the fallback read by the loopback gateway round-trip.
Gas, Cost Model, and Storage Break-Even
The median commit costs 103,282 gas in the isolated-commit micro-benchmark; contract tests span warm (26,847) to cold (161,196) storage. A fee-schedule derivation predicts 53,000–65,000 gas; the empirical median is 1.6–1.9× higher, attributable to cold-storage access and a totalStates++ SSTORE the derivation omitted (a cold zero-to-nonzero SSTORE costs 22,100 gas under EIP-2929, consistent with most of the gap). The last testnet commit consumed 98,977 gas (−4.2% vs. the simulator median), consistent with the cold-to-warm transition expected on a populated contract.
Fee models pricing only L2 execution gas underestimate rollup costs: on OP-stack rollups such as Base, the total fee is [17], and the L1 data fee can dominate in the low-congestion regime quoted. All monetary values below come from a released script implementing the full Ecotone fee function:
where over zero and nonzero tx bytes; we use Base’s posted scalars (, ; both governance-updatable) and two parameter points: low ( gwei, gwei) and high (, ), with
L2 gas price 0.005 gwei and ETH at US$3,000. For a ∼300-byte commit this yields an L1 data fee of US$0.0002–0.0019. The model is linear, so a ±50% move in any input moves the corresponding total proportionally. Figures are modeled, not measured on mainnet Base, and are lower bounds under L1 fee spikes.
Fee ranges and the batch row. The low–high points span the modeled L1 data fee. Gas rows are measured; the batch row is projected: the deployed interface has no batch entry point, and adding one mid-study would invalidate the artifact.
What the fee figures exclude. Table III reports gas and rollup fees only; the full stack adds IPFS pinning (all 50 payloads under 1 GB; single-digit US$/month at redundancy on public pinning services), RPC access (free tiers suffice at PoC scale), and mirror storage—modest at PoC volumes, dominant at high throughput, excluded as provider-dependent.
Storage break-even. Storing the payload itself as calldata costs 21,000 + 16 gas per nonzero byte. Against the median commit, the gas-only break-even payload is ≈5.1 kB: below it, naïve calldata is cheaper in gas but buys no content addressing, deduplication, or uniform retrieval. For the 70% of the workload below break-even (∼2 kB diffs), the justification is not raw gas but the verifiable, content-addressed, uniformly queryable stream, at a quantified premium (US$0.0018–0.0035 per state) over near-zero transparency-log timestamping (Section II-C). For the 30% tail the economics are decisive: 116 kB and 780 kB states would cost ≈1.9 M and ≈12.8 M gas (≈US$0.13 and ≈US$0.85 at the low point), and on Layer 1 ≈US$2.42 and ≈US$576 at 15 gwei.
Live Testnet Evidence
The Base Sepolia deployment currently holds 14 commits (states 0–13). The last commit consumed 98,977 gas at 1 gwei, 200× the projection assumption, pricing it at ≈US$0.30: evidence of executability and the upper bound of the abstract’s modeled range. Testnet prices are unrepresentative of mainnet Base in both directions; the live commit confirms that the contract executes end-to-end under realistic fee conditions, not that the modeled per-commit price is accurate.
Threats to Validity
(i) Self-produced evidence: author-produced measurements against author-set thresholds; independent re-runs precede any production claim; the artifact is released to enable them. (ii) Simulator latency: S1 excludes confirmation, remote pinning, and sequencer paths. (iii) Cost-model risk: monetary rows are modeled, not measured on mainnet Base; the live testnet commit price was the modeled L2 gas price. (iv) Workload realism: the 35/12/3 distribution is synthetic; tighter clustering around small payloads weakens per-state economics toward the break-even. (v) Statistics: quantiles are descriptive, single-run, without confidence intervals. (vi) Availability and finality: pin ; high-value workflows should wait the 12-block confirmation window. (vii) Assisted-path coverage: the EVM backend was exercised through the repository layer and measurement scripts, never by an external MCP assistant. All empirical claims here are backend-level (gas, fees, latency, durability) and independent of the driving client, so the gap weakens no reported number; it blocks assistant-level usability claims, which we do not make. (viii) Literature snapshot: the positioning table of § 2-C reflects a single 2026-Q2 snowballing round; tamper-evident audit logging for MCP tool calls has emerged as an adjacent line of work in 2026 that we do not yet position against in depth.
Property Comparison Against Operated Baselines
The positioning table of § 2-C summarizes five operated baselines. We restate the residual differentiator without inflation: ours is the only surveyed system whose per-state commitments are EVM events on a public Layer-2 rollup, attached to an assistant-native capture surface (MCP), with a specified (not yet implemented) same-chain consumption path. For timestamping alone, Rekor or OpenTimestamps are strictly better on cost and maturity; we recommend them for that use case. A measured head-to-head comparison on the same workload and hardware is future work and is the principal missing evaluation in this paper.
Outlook
Three components are specified below and are not implemented in the deployed artifact. We claim no contribution from them beyond the specification itself; each is the principal missing evaluation or implementation in this paper and is the priority next step before any production claim.
Programmable Bug Bounties
A sponsor instantiates BountyEscrow.sol, an ERC-20 escrow locking USDC against a declared bug class and reward predicate. A claimant calls claim(stateNumber, rewardData, header, proof), with proof a receipts-trie inclusion proof verified against the receiptsRoot of a header inside the 256-block window; the escrow checks the predicate and releases USDC. The window is severe ( minutes); the practical path is optimistic claims with a 24 h challenge period, bonded challenges, and slashing, all specified but not implemented. The chain attests existence and ordering, not reward correctness; distrusting sponsors can require on-chain predicate recomputation or disputes.
FAIR-Aligned Dataset Publication
A curator commits a Merkle root over a window of rewarded transitions onto a DatasetPublisher.sol contract and publishes the payloads to a public mirror. Consumers query the registry for each stateHash and rebuild the root locally; per-state proofs allow spot-checks. The pattern is aligned with the FAIR principles, not certified; no formal assessment was applied.
Deployment Constraints
Diffs and prompts may embed personal data, and payloads pinned to public IPFS are effectively unerasable, in tension with erasure rights (Brazil’s LGPD, Art. 16; EU GDPR, Art. 17). Production use therefore requires data minimization at capture, pre-publish secret-scanning, client-side encryption or a private swarm, and a documented legal basis. The PoC processes only author-generated states and claims no compliance.
Conclusion
We presented codebase-state-manager, an open-source MCP server for structured provenance of AI-assisted code evolution, and CodebaseStateRegistry, its EVM-anchored commitment layer, live on Base Sepolia. This is an engineering deployment report at smoke scale: the contributions are a working design and deployment, a property-level comparison against the surrounding provenance landscape, and a single-author, single-run characterization of the deployed layer under one reproducible OP-stack fee model. We delimited the guarantee precisely (existence, ordering, non-equivocation; never truthfulness) and positioned the system as complementary to supply-chain frameworks and free transparency logs, which remain the right choice for timestamping alone. Priority future work: (i) implementation of the receipts-trie relayer with one end-to-end BountyEscrow claim, turning G3 from design goal into a measured property; (ii) a direct head-to-head measurement against Sigstore Rekor and OpenTimestamps on the same workload and hardware; (iii) an testnet latency campaign, the only path to defensible production latency claims; (iv) a non-author trace reproducing the deployed contract on a developer-owned AI-assisted coding session; and (v) RFC 8785 reference-vector conformance, revocation edge-case tests, and fuzz/invariant campaigns on the contract.
References
- [1]Anthropic, “Model context protocol (MCP) specification,” 2024. [Online]. Available: https://modelcontextprotocol.io/
- [2]E. C. Santos, “codebase-state-manager: An MCP server for AI-assisted codebase state management,” GitHub repository, MIT license, v0.2.1, 2026. [Online]. Available: https://github.com/aposan/codebase_state_manager_mcp
- [3]P. Todd, “OpenTimestamps: Scalable, trustless, distributed timestamping with Bitcoin,” 2016. [Online]. Available: https://opentimestamps.org/
- [4]Centrifuge, “AnchorRegistry: On-chain anchoring of document and artifact hashes,” Ethereum contract, 2019. [Online]. Available: https://github.com/centrifuge/centrifuge-ethereum-contracts
- [5]S. Lamichhane et al., “Verifiable decentralized IPFS clusters (VDICs),” 2024, arXiv:2408.07023.
- [6]M. M. Hasan, M. N. U. Khan, S. K. J. Rizvi, and S. J. Hossain, “Towards blockchain-based IPFS cloud storage for smart city CCTV and dashboard camera footage,” Electronics, vol. 12, no. 7, p. 1545, 2023.
- [7]Q. Wang, G. Yu, Y. Sai, H. M. N. D. Bandara, and S. Chen, “Is your AI truly yours? Leveraging blockchain for copyrights, provenance, and lineage,” IEEE Trans. Services Comput., vol. 18, no. 5, pp. 2960–2975, 2025.arxiv.org/abs/2404.06077
- [8]S. Tomlinson, “Lockb0x protocol,” IETF Internet-Draft, draft-tomlinson-lockb0x-01, Mar. 2026. [Online]. Available: https://datatracker.ietf.org/doc/html/draft-tomlinson-lockb0x-01
- [9]L. J. Reilly Jr., “Reilly sentinel protocol (RSP): Blockchain-anchored integrity for AI datasets, training, fine-tuning, and inference provenance,” IETF Internet-Draft, draft-reilly-sentinel-protocol-00, Sep. 2025. [Online]. Available: https://datatracker.ietf.org/doc/draft-reilly-sentinel-protocol/00/
- [10]A. Lalli, L. R. Maciel, and A. Olmsted, “Immortal certificates on Ethereum blockchain with off-chain IPFS storage,” IJICR, vol. 15, no. 1, pp. 1242–1254, 2024.DOI
- [11]Z. Newman, J. S. Meyers, and S. Torres-Arias, “Sigstore: Software signing for everybody,” in Proc. ACM SIGSAC Conf. Comput. Commun. Secur. (CCS), 2022, pp. 2353–2367.
- [12]Radicle, “Radicle: Peer-to-peer code collaboration stack built on Git,” 2024. [Online]. Available: https://radicle.dev/
- [13]F. Zhang, E. Cecchetti, K. Croman, A. Juels, and E. Shi, “Town Crier: An authenticated data feed for smart contracts,” in Proc. ACM SIGSAC Conf. Comput. Commun. Secur. (CCS), 2016, pp. 270–282.
- [14]C. Wohlin, “Guidelines for snowballing in systematic literature studies and a replication in software engineering,” in Proc. EASE, 2014.DOI
- [15]A. Rundgren, B. Jordan, and S. Erdtman, “JSON Canonicalization Scheme (JCS),” IETF RFC 8785, 2020.DOI
- [16]Foundry team, “Foundry: A portable, modular toolkit for Ethereum application development,” 2024. [Online]. Available: https://book.getfoundry.sh/
- [17]OP Stack, “Transaction fees: L2 execution fee and L1 data fee (EoE-tone),” Optimism docs, 2024. [Online]. Available: https://docs.optimism.io/op-stack/transactions/fees
- [18]Coinbase Developer Platform, “Base Sepolia testnet documentation,” 2024. [Online]. Available: https://docs.cdp.coinbase.com/
- [19]S. Torres-Arias, H. Afzali, T. K. Kuppusamy, R. Curtmola, and J. Cappos, “Providing farm-to-table guarantees for bits and bytes,” in Proc. USENIX Secur. Symp., 2019, pp. 1393–1410.
- [20]SLSA community, “Supply-chain levels for software artifacts (SLSA),” 2024. [Online]. Available: https://slsa.dev/
- [21]P. Lüthi et al., “Distributed ledger for provenance tracking of artificial intelligence assets,” 2020, arXiv:2022.011000.
- [22]A. Velasco et al., “On automated and explainable provenance of AI-generated code,” in Proc. ICSME (NIER Track), 2026.arxiv.org/abs/2608.02329