Skip to content

fix: use calculated end_block for native_transfer_block_fetch#368

Open
outerlook wants to merge 2 commits intojoshstevens19:masterfrom
outerlook:fix/native-transfer-historical-blocking
Open

fix: use calculated end_block for native_transfer_block_fetch#368
outerlook wants to merge 2 commits intojoshstevens19:masterfrom
outerlook:fix/native-transfer-historical-blocking

Conversation

@outerlook
Copy link
Copy Markdown

Summary

Pass the calculated end_block from get_start_end_block() instead of network_details.end_block to native_transfer_block_fetch().

Problem

When end_block is not set in the manifest, network_details.end_block is None, causing native_transfer_block_fetch to loop forever waiting for new blocks. This blocks try_join_all in start_indexing, preventing:

  • Historical indexing from completing
  • Live indexing from ever starting
  • All contract events from being indexed

Fix

Use the calculated end_block (which defaults to latest_block when not specified in manifest) instead of the raw manifest value. This aligns native transfer behavior with contract events.

Fixes #367

Pass the calculated `end_block` from `get_start_end_block()` instead of
`network_details.end_block` to `native_transfer_block_fetch()`.

When `end_block` is not set in the manifest, `network_details.end_block`
is `None`, causing `native_transfer_block_fetch` to loop forever waiting
for new blocks. This blocks `try_join_all` in `start_indexing`, preventing
historical indexing from completing and live indexing from ever starting.

The calculated `end_block` defaults to `latest_block` when not specified,
allowing the trace indexer to complete historical sync properly.

Fixes joshstevens19#367
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 3, 2026

@outerlook is attempting to deploy a commit to the joshaavecom's projects Team on Vercel.

A member of the Team first needs to authorize it.

When the block fetcher completes historical indexing and drops the
sender, `recv_many` returns 0 to signal channel closed. Previously,
the block processor would sleep and retry forever instead of exiting.

Now it properly detects channel closure (recv == 0 when buffer was
empty) and exits, allowing historical indexing to complete.
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rindexer-documentation Ready Ready Preview, Comment Feb 3, 2026 4:18pm

@jaggad
Copy link
Copy Markdown
Contributor

jaggad commented Feb 4, 2026

@outerlook

When end_block is not set in the manifest, network_details.end_block is None, causing native_transfer_block_fetch to loop forever waiting for new blocks. This blocks try_join_all in start_indexing, preventing:

Can you please confirm by sharing logs or that it was validated in testing that the following conditions hold true with the current changes:

When start block is defined:

  1. start_block: N defined for all contracts and native transfer indexing (as such historical indexing will be needed here)
  2. it completes historical indexing up to current head block
  3. Then. Does it still continue indexing native transfers "live" in this setup? <--- this point to be confirmed

When start block is not defined:

  1. No start block defined
  2. Historical indexing process should skip or finish quickly
  3. Live indexing does in fact index native transfers <--- this point to be confirmed

@joshstevens19
Copy link
Copy Markdown
Owner

@outerlook

When end_block is not set in the manifest, network_details.end_block is None, causing native_transfer_block_fetch to loop forever waiting for new blocks. This blocks try_join_all in start_indexing, preventing:

Can you please confirm by sharing logs or that it was validated in testing that the following conditions hold true with the current changes:

When start block is defined:

  1. start_block: N defined for all contracts and native transfer indexing (as such historical indexing will be needed here)
  2. it completes historical indexing up to current head block
  3. Then. Does it still continue indexing native transfers "live" in this setup? <--- this point to be confirmed

When start block is not defined:

  1. No start block defined
  2. Historical indexing process should skip or finish quickly
  3. Live indexing does in fact index native transfers <--- this point to be confirmed

@outerlook did you manage to do this?

@outerlook
Copy link
Copy Markdown
Author

outerlook commented Feb 9, 2026

Hey Josh! I want to do this next week... There's something at work with a deadline nearby (as everyone I imagine 😆)

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.

native_transfer_block_fetch loops forever when end_block not set in manifest, blocking live indexing

3 participants