Skip to content

feat: synth logs node indexing#1471

Open
mrq1911 wants to merge 51 commits into
masterfrom
feat/synth-logs-node-indexing
Open

feat: synth logs node indexing#1471
mrq1911 wants to merge 51 commits into
masterfrom
feat/synth-logs-node-indexing

Conversation

@mrq1911

@mrq1911 mrq1911 commented Jun 2, 2026

Copy link
Copy Markdown
Member

Surfaces substrate token activity as EVM logs over eth_getLogs, off-chain in the node (replaces the on-chain approach in #1436):

  • synthetic ERC-20 Transfer / uniswap-v2 Swap logs over eth_getLogs — no on-chain synthetic txs or pallet
  • client-side translation from System::Events → no runtime-API dependency, works against any runtime version (archive node for full history)
  • full balance-movement coverage (transfer / mint / burn / reserve / lock) → transferable balance reconstructable from Transfer events alone (reserved + frozen sentinels)
  • internal Executor::call EVM logs included, per-log deduped against real eth-tx receipts
  • canonical block hashes preserved: the override leaves headers untouched; a custom eth_getLogs (synthetic_logs::eth_filter) keeps log.blockHash canonical (round-trips via eth_getBlockByHash) while a synth-aware bloom keeps synth-only blocks from being skipped. Caveat: the stateful eth_newFilter/getFilterChanges path still uses fc-rpc's canonical-bloom prefilter, so it won't surface synth-only blocks under address filters — eth_getLogs is the fixed path.
  • verified end-to-end on a full mainnet archive sync: no double-counting, a plain ERC-20 indexer reconstructs exact on-chain balances

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Crate versions that have been updated:

  • runtime-integration-tests: v1.88.0 -> v1.88.1
  • hydradx: v15.0.2 -> v15.1.5
  • hydradx-runtime: v422.0.0 -> v425.0.0

Runtime version has been increased.

This comment was marked as outdated.

mrq1911 added 8 commits June 2, 2026 19:14
…e-indexing

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	integration-tests/Cargo.toml
#	node/Cargo.toml
#	pallets/omnipool/Cargo.toml
#	pallets/stableswap/Cargo.toml
#	pallets/transaction-multi-payment/Cargo.toml
#	runtime/hydradx/Cargo.toml
#	runtime/hydradx/src/lib.rs
@mrq1911 mrq1911 force-pushed the feat/synth-logs-node-indexing branch from 978be33 to 4a19d59 Compare June 2, 2026 17:17
@mrq1911 mrq1911 requested a review from enthusiastmartin June 3, 2026 12:17
…e-indexing

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	integration-tests/Cargo.toml
#	pallets/staking/Cargo.toml
#	runtime/hydradx/Cargo.toml
#	runtime/hydradx/src/lib.rs
@mrq1911 mrq1911 force-pushed the feat/synth-logs-node-indexing branch from f51aff2 to 1576ad8 Compare June 3, 2026 12:48
@mrq1911 mrq1911 requested a review from iamyxsh June 3, 2026 13:38
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Quick benchmark at commit d1d7aa5 has been executed successfully.
View results

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Weight Diff Report

⚠️ 2 pallet(s) have changes exceeding ±10% threshold

22 extrinsic(s) changed across 2 pallet(s). New: 1. Removed: 0.

pallet_omnipool

Extrinsic RefTime Proof Size Reads Writes
add_token +0.1% (203.8M → 203.9M)
add_liquidity -0.3% (349.3M → 348.2M)
remove_liquidity -0.2% (370.2M → 369.6M)
add_all_liquidity -0.2% (356.7M → 355.9M)
remove_all_liquidity -0.5% (371.9M → 370.1M)
sell ⚠️ +10.3% (539.8M → 595.5M) ⚠️ +15.7% (16488 → 19071) 53 → 58 (+5) 24 → 28 (+4)
buy ⚠️ +10.3% (541.4M → 597.1M) ⚠️ +15.7% (16488 → 19071) 53 → 58 (+5) 24 → 28 (+4)
set_asset_tradable_state +0.2% (35.3M → 35.4M)
refund_refused_asset +0.8% (142.6M → 143.8M)
sacrifice_position -1.0% (80.5M → 79.7M)
set_asset_weight_cap -1.3% (35.9M → 35.4M)
set_slip_fee +0.8% (18.8M → 18.9M)
withdraw_protocol_liquidity +0.8% (194.2M → 195.8M)
remove_token +0.6% (195.9M → 197.0M)
router_execution_sell ⚠️ -17.7% (73.1M → 60.1M)
router_execution_buy -2.2% (505.6M → 494.7M) 50 → 49 (-1) 22 → 21 (-1)
calculate_spot_price_with_fee -2.7% (74.5M → 72.5M)

pallet_referrals

Extrinsic RefTime Proof Size Reads Writes
register_code -3.0% (87.0M → 84.4M) 7 → 8 (+1)
link_code -1.5% (20.5M → 20.2M)
convert ⚠️ +47.3% (407.8M → 600.8M) ⚠️ +88.9% (8790 → 16608) 36 → 46 (+10) 15 → 18 (+3)
claim_rewards -1.5% (106.2M → 104.6M) 10 → 11 (+1)
set_reward_percentage -0.3% (15.0M → 15.0M) -0.1% (3514 → 3510)
New extrinsics (1)
Pallet Extrinsic RefTime Proof Reads Writes
pallet_fee_processor convert 760.4M 14005 40 17

Threshold: ±10%. Base Weight::from_parts(ref_time, proof_size) compared; per-unit components ignored.

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.

2 participants