Skip to content

fix(ethereum2): receipt-local event indices and legacy proof compatibility - #84

Draft
fengjy73 wants to merge 4 commits into
AntChainOpenLabs:mainfrom
fengjy73:fix/ethereum-receipt-log-index-upstream
Draft

fix(ethereum2): receipt-local event indices and legacy proof compatibility#84
fengjy73 wants to merge 4 commits into
AntChainOpenLabs:mainfrom
fengjy73:fix/ethereum-receipt-log-index-upstream

Conversation

@fengjy73

@fengjy73 fengjy73 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

Ethereum JSON-RPC logIndex is block-global, while the receipt proof authenticates one transaction's logs array. The collector stored the global value and HCDVS indexed the receipt with it, rejecting valid AM messages in later transactions of a block. The filter collector also expanded every matched log into every AM event in its receipt, duplicating/mixing messages.

Fix

  • Both collector modes use one receipt-local locator and emit one message per selected AM event.
  • New ledgers explicitly record receiptLogIndex and a consistent local logIndex while retaining the original RPC log metadata.
  • HCDVS authenticates the original receipt proof against the trusted consensus root, checks transaction index, trusted AM address, full topics/data and decoded message.
  • Explicit local indices are strict: invalid positions never fall back. Legacy messages require a unique full-event match inside the proven receipt and consistent index metadata; ambiguous events fail closed.
  • No proof bypass, RPC fallback, source re-submission, stored-UCP rewriting, or contract changes.

Based on upstream main ec89a28; preserves the existing consensus/light-client fixes. This PR contains only generic Ethereum2 changes, not downstream Ethereum3/regulatory code.

Tests

  • Java 21 targeted tests: 23 passed, including both actual collector methods with mocked RPC, multi-transaction blocks/multiple AM events, real receipt/consensus fixtures, legacy compatibility, explicit-index failures, ambiguity, malformed metadata, and proof/root/message tampering.
  • Java 21 package build passed. Existing generated ABI classes were prepared before compilation; no ABI or contract source changes.

Downstream deployment evidence

The equivalent downstream fix (ICT PR #7) was deployed to the Plugin Server and all four PTC nodes. This is not a claim that the upstream branch artifact was installed.

  • Original ordinary burst: 96/96 completed, including 93 previously blocked messages. All 96 stored raw_message fingerprints unchanged, target payload once, PTC100%.
  • Existing 96 Mychain regulated +32 cross-plugin competition messages revalidated successfully; Dioxide reverse and Ethereum→FISCO SDP V1/V2/V3 samples remained successful.
  • Four newly collected same-block messages (2 ordinary +2 regulated) completed; second-transaction global/local pairs were 2/0 and 4/1. The independent FISCO SDK confirmed both new regulated target receipts succeeded with the exact unwrapped payload once.
  • Final Dioxide coordination journal: 229 unique ISNs, all FINALIZED. Existing finality policy and contracts unchanged.

Runbook: acb-sdk/pluginset/ethereum2/RECEIPT_LOG_INDEX.md. Collector and every committee member's HCDVS should be deployed together with component-specific rollback backups. Unexecuted Mychain ordinary / native Dioxide SDP V2/V3 combinations are not counted as passed.

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