Skip to content

feat(paper3): E1 censorship-resistance failover experiment (N=50, Sepolia testnet)#26

Closed
jhfnetboy wants to merge 1 commit into
mainfrom
feat/paper3-e1-censorship-simulation
Closed

feat(paper3): E1 censorship-resistance failover experiment (N=50, Sepolia testnet)#26
jhfnetboy wants to merge 1 commit into
mainfrom
feat/paper3-e1-censorship-simulation

Conversation

@jhfnetboy
Copy link
Copy Markdown
Member

Summary

Adds the reproducible E1 failover experiment for Paper3 §5.1 (SuperPaymaster AOA decentralization validation).

  • Script: packages/analytics/scripts/paper3_failover_simulation.mjs
  • Data: packages/analytics/data/paper3_failover_results_2026-05-22T07-42-13.csv + _summary_*.json
  • Config template: .env.example (no real keys committed)

Experiment Design

Network Ethereum Sepolia (ERC-4337 v0.7)
EntryPoint 0x0000000071727De22E5E9d8BAf0edAc6f37da032
Relayer A (hostile) Pimlico with invalid API key → 401/403 Forbidden
Relayer B (cooperative) Candide public bundler (permissionless, no API key)
N 50 independent trials

Results

  • 49/50 success (98%) — Trial 30 failed due to transient Sepolia base-fee spike (network event, unrelated to censorship property)
  • Mean Relayer A rejection latency: 1,215 ms (failover overhead)
  • New paymaster-server signatures required: 0
  • On-chain anchor: block 10,895,210, txHash 0x1afff9d0...a0aa

AOA Property Validated

A hostile bundler at the inclusion layer cannot prevent execution of a valid UserOperation. The same signed UserOp is accepted by any permissionless bundler without requiring a new paymaster-server signature, because eligibility is determined by on-chain account state only.

Reproduction

cp .env.example .env.sepolia
# fill in PRIVATE_KEY and SEPOLIA_RPC_URL
source .env.sepolia
node packages/analytics/scripts/paper3_failover_simulation.mjs

Test plan

  • Verify .env.example contains no real credentials
  • Verify CSV and JSON data files match claimed results (49/50, mean 1215ms)
  • Confirm script runs to completion with valid env vars on Sepolia

… Sepolia)

Paper3 §5.1 E1 reproducible experiment: demonstrates that a hostile bundler
(Relayer A, invalid API key → 401/403) cannot prevent a valid UserOperation
from executing when an alternative permissionless bundler (Relayer B, Candide
public) is available. AOA property verified: no new paymaster-server signature
required after failover — eligibility is determined by on-chain state only.

Results (Ethereum Sepolia, ERC-4337 v0.7, N=50):
  - 49/50 success (98%); 1 failure due to transient base-fee spike (Trial 30)
  - Mean Relayer A rejection latency: 1,215 ms
  - New paymaster signatures required: 0
  - Representative on-chain anchor: block 10,895,210

Files:
  - packages/analytics/scripts/paper3_failover_simulation.mjs  (experiment script)
  - packages/analytics/data/paper3_failover_results_2026-05-22T07-42-13.csv
  - packages/analytics/data/paper3_failover_summary_2026-05-22T07-42-13.json
  - .env.example  (template — no real keys)
@jhfnetboy jhfnetboy requested a review from fanhousanbu as a code owner May 22, 2026 07:54
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7969ad97f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +150 to +151
const rows = records.map(r =>
Object.values(r).map(v => JSON.stringify(String(v))).join(',')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Serialize CSV fields with CSV escaping rules

The CSV writer uses JSON.stringify for cell encoding, but JSON escaping (\") is not valid CSV escaping for embedded quotes. As soon as a field contains quotes or commas (for example relayerA_error with a JSON error payload), parsers split the row into extra columns and shift subsequent fields, corrupting experiment outputs and any downstream metrics derived from the CSV.

Useful? React with 👍 / 👎.

Comment on lines +269 to +273
if (resB.ok) {
userOpHash = resB.result; // eth_sendUserOperation returns UserOperationHash
success = true;
successCount++;
totalFailoverMs += latA;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Count success only after UserOperation receipt appears

A trial is marked successful immediately after eth_sendUserOperation returns, before confirming inclusion via eth_getUserOperationReceipt. This inflates successCount and meanFailoverLatencyMs when a bundler accepts into mempool but the operation is dropped, replaced, or never mined within the polling window, which can materially misstate the censorship-resistance result.

Useful? React with 👍 / 👎.

@jhfnetboy
Copy link
Copy Markdown
Member Author

Closing: the E1 bundler-failover experiment has been removed from Paper3 §5.1. The failover property is generic ERC-4337 (not AOA-specific); P1 evidence is now based on code structural analysis of validatePaymasterUserOp. The failover simulation script and data files in this branch are no longer referenced in the paper.

@jhfnetboy jhfnetboy closed this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant