Skip to content

Conversation

@Sneh1999
Copy link

@Sneh1999 Sneh1999 commented Jan 7, 2026

Description

This PR adds support for range namespace queries in streamer

Additional things

  • Commented out hotshot listener because we are not using that code, might use it in future
  • Also removed multi node client

@Sneh1999 Sneh1999 changed the title Add Namespace Range enpoint to streamer Add Namespace Range endpoint to streamer Jan 7, 2026
@Sneh1999 Sneh1999 marked this pull request as ready for review January 7, 2026 20:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for range-based namespace queries in the Espresso streamer to improve performance by fetching multiple blocks at once instead of querying block-by-block. The PR also simplifies the client configuration by migrating from multiple HotShot URLs to a single URL.

Key Changes

  • Implemented FetchNamespaceTransactionsInRange endpoint to query transactions across a range of blocks (up to 100 blocks at a time)
  • Refactored from HotShotUrls (array) to HotShotUrl (single string) throughout the codebase
  • Commented out hotshot listener code that is not currently in use

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
espressostreamer/espresso_streamer.go Added range-based fetching logic with HOTSHOT_RANGE_LIMIT constant; modified fetchNextHotshotBlock to process multiple blocks
espressostreamer/espresso_streamer_test.go Added FetchNamespaceTransactionsInRange mock implementation and new stream methods
arbnode/batch_poster.go Changed HotShotUrls array to single HotShotUrl string; simplified client initialization
arbnode/espresso_caff_node.go Changed HotShotUrls to HotShotUrl; replaced NewMultipleNodesClient with NewClient
system_tests/caff_node_test.go Updated test configurations to use single HotShotUrl
system_tests/espresso_setup_test.go Updated test to use single HotShotUrl
system_tests/espresso/chain/*.go Added new interface methods to mock implementations
system_tests/hotshot_listener_test.go Commented out entire test file
espresso/hotshot-listener/hotshot_listener.go Commented out entire implementation
system_tests/espresso-e2e/docker-compose.yaml Updated Espresso Docker image version
go.mod, go.sum Updated espresso-network SDK dependency from v0.3.0 to v0.3.3

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@ImJeremyHe ImJeremyHe left a comment

Choose a reason for hiding this comment

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

Overall it's good. Just a few comments.

@@ -1,268 +1,268 @@
package hotshot_listener
Copy link
Member

Choose a reason for hiding this comment

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

Why did we need this? Since it becomes useless, can we just remove it?

Copy link
Author

Choose a reason for hiding this comment

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

I am commenting this out because we will need this code for Decentralized sequencing, dont want to delete it

@@ -348,16 +350,43 @@
Copy link
Member

Choose a reason for hiding this comment

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

We should also rename this function

}
// If the hotshot URL is non-empty, create the Espresso client.
if hotShotUrl != "" {
hotShotClient := hotshotClient.NewClient(hotShotUrl)
Copy link
Member

Choose a reason for hiding this comment

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

Can't this function potentially throw an error?

Copy link
Author

Choose a reason for hiding this comment

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

no error is returned here!

}

fromBlock := nextHotshotBlockNum
toBlock := latestBlockHeight

Choose a reason for hiding this comment

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

i might need to switch onto the branch to take a closer look, but lets say latest is block 150, and next was 100. will that mean for every nitro block in the 50 hotshot block range will all be set to hot shot block 150?

Copy link
Author

Choose a reason for hiding this comment

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

no thats not how it works, it basically to fetches hotshot block is range 100 to 150. Then we can extract nitro blocks for all the hotshot blocks between hotshot block 100 and 150

@Sneh1999 Sneh1999 merged commit 20e1206 into integration Jan 9, 2026
10 checks passed
@Sneh1999 Sneh1999 deleted the range-endpoint-for-streamer branch January 9, 2026 19:51
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Backport failed for celestia-integration, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin celestia-integration
git worktree add -d .worktree/backport-901-to-celestia-integration origin/celestia-integration
cd .worktree/backport-901-to-celestia-integration
git switch --create backport-901-to-celestia-integration
git cherry-pick -x 20e1206faad7056cb19d8a2626c780cafb8721bc

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Backport failed for integration-v3.5.6, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin integration-v3.5.6
git worktree add -d .worktree/backport-901-to-integration-v3.5.6 origin/integration-v3.5.6
cd .worktree/backport-901-to-integration-v3.5.6
git switch --create backport-901-to-integration-v3.5.6
git cherry-pick -x 20e1206faad7056cb19d8a2626c780cafb8721bc

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Backport failed for celestia-v3.5.6, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin celestia-v3.5.6
git worktree add -d .worktree/backport-901-to-celestia-v3.5.6 origin/celestia-v3.5.6
cd .worktree/backport-901-to-celestia-v3.5.6
git switch --create backport-901-to-celestia-v3.5.6
git cherry-pick -x 20e1206faad7056cb19d8a2626c780cafb8721bc

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Backport failed for integration-v3.8.0, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin integration-v3.8.0
git worktree add -d .worktree/backport-901-to-integration-v3.8.0 origin/integration-v3.8.0
cd .worktree/backport-901-to-integration-v3.8.0
git switch --create backport-901-to-integration-v3.8.0
git cherry-pick -x 20e1206faad7056cb19d8a2626c780cafb8721bc

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Backport failed for integration-v3.9.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin integration-v3.9.2
git worktree add -d .worktree/backport-901-to-integration-v3.9.2 origin/integration-v3.9.2
cd .worktree/backport-901-to-integration-v3.9.2
git switch --create backport-901-to-integration-v3.9.2
git cherry-pick -x 20e1206faad7056cb19d8a2626c780cafb8721bc

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Backport failed for celestia-v3.9.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin celestia-v3.9.2
git worktree add -d .worktree/backport-901-to-celestia-v3.9.2 origin/celestia-v3.9.2
cd .worktree/backport-901-to-celestia-v3.9.2
git switch --create backport-901-to-celestia-v3.9.2
git cherry-pick -x 20e1206faad7056cb19d8a2626c780cafb8721bc

Sneh1999 added a commit that referenced this pull request Jan 9, 2026
* Add Namespace Range enpoint to streamer

* fix tests

* fix lint

* fix comment

* address bot comments

* fix lint

(cherry picked from commit 20e1206)
Sneh1999 added a commit that referenced this pull request Jan 9, 2026
* Add Namespace Range enpoint to streamer

* fix tests

* fix lint

* fix comment

* address bot comments

* fix lint

(cherry picked from commit 20e1206)
Sneh1999 added a commit that referenced this pull request Jan 9, 2026
* Add Namespace Range enpoint to streamer

* fix tests

* fix lint

* fix comment

* address bot comments

* fix lint

(cherry picked from commit 20e1206)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants