Tags: graphprotocol/graph-node
Tags
fix: extract file path from IPC URL in Transport::new_ipc (#6443)
Optimize log filter matching and trigger allocation (#6419) * chain/ethereum: Use O(1) edge lookup in EthereumLogFilter Replace all_edges() linear scan with contains_edge() and edge_weight() in matches() and requires_transaction_receipt(). * chain/ethereum: Pre-allocate triggers Vec in parse_log_triggers Replace flat_map(...).collect() with explicit loops and a pre-sized Vec to avoid repeated reallocations.
chain/ethereum: Pre-allocate Vec in parse_log_triggers to avoid repea… …ted memmove Replace flat_map(...).collect() with explicit loops and a pre-allocated Vec. FlatMap size_hint returns (0, None), so collect() starts with a small buffer and doubles repeatedly, triggering memmove to copy the growing buffer on each reallocation. For high-activity blocks with thousands of logs, this caused __memmove_avx_unaligned_erms to consume ~17% of total CPU time. Pre-counting logs and using Vec::with_capacity eliminates all reallocations.
Serve typed blocks from recent block cache to avoid repeated deserial… …ization (#6400) * graph, chain/ethereum: Move json_patch and json_block modules to graph crate Move EthereumJsonBlock and JSON patching utilities from chain/ethereum to graph/src/components/ethereum/ so they can be used by the store layer without circular dependencies. This prepares for typed block caching where CachedBlock::from_json() needs access to these utilities. * graph: Add CachedBlock enum and typed block cache * graph, chain/ethereum, store: Address review feedback - Return Arc<LightEthereumBlock> from into_light_block() to avoid deep clone - Move cache_block_to_block_ptr_ext into CacheBlock::to_extended_block_ptr()
chain/ethereum, graph: Replace AnyNetwork with AnyNetworkBare to remo… …ve WithOtherFields overhead (#6398) AnyNetwork wraps every RPC response (block, transaction, receipt) in WithOtherFields<T>, which uses #[serde(flatten)] to capture unknown JSON keys into a BTreeMap. This forces serde to buffer entire JSON objects into intermediate Value maps and re-serialize them to diff keys on every block and every transaction. graph-node never reads these extra fields. Define AnyNetworkBare, a custom Network impl that uses the same AnyTxEnvelope/AnyReceiptEnvelope types (for L2/sidechain tx support) but without the WithOtherFields wrapper on response types. This eliminates the flatten buffering, BTreeMap allocation, and re-serialization from the deserialization hot path.
PreviousNext