Skip to content

Commit

Permalink
feat: Implement Block Height Stream (#776)
Browse files Browse the repository at this point in the history
I've implemented a struct which is capable of returning an async stream
which yields block heights matching a particular contract filter
starting from a specified block height. This should serve as a
replacement for the existing method of getting block heights by querying
Delta Lake through the Delta Lake Client.

Some differences between Delta Lake and this new stream is that it
yields a SINGLE block height rather than all block heights. In addition,
we now query the bitmap indexer's tables for block heights for one day,
instead of for all days. This should improve time to get a block as well
as reduce the memory footprint.
  • Loading branch information
darunrs committed Jun 14, 2024
1 parent 48ae457 commit 609b7df
Show file tree
Hide file tree
Showing 7 changed files with 840 additions and 222 deletions.
2 changes: 2 additions & 0 deletions block-streamer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion block-streamer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ edition = "2021"
[dependencies]
actix-web = "4.5.1"
anyhow = "1.0.57"
async-stream = "0.3.5"
async-trait = "0.1.74"
aws-config = { version = "1.1.3", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1.13.0"
base64 = "0.22.1"
borsh = "0.10.2"
cached = "0.49.3"
chrono = "0.4.25"
Expand All @@ -20,6 +22,7 @@ near-lake-framework = "0.7.8"
prometheus = "0.13.3"
prost = "0.12.3"
redis = { version = "0.21.5", features = ["tokio-comp", "connection-manager"] }
regex = "1.10.4"
reqwest = { version = "^0.11.0", features = ["json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1.0.55"
Expand All @@ -33,7 +36,6 @@ tonic = "0.10.2"
wildmatch = "2.1.1"

registry-types = { path = "../registry/types" }
base64 = "0.22.1"

[build-dependencies]
tonic-build = "0.10"
Expand Down
Loading

0 comments on commit 609b7df

Please sign in to comment.