Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(provider): LRUCache Layer #954

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
0d56877
in-memory cache implementation
yash-atreya Jun 21, 2024
df7d861
load and dump cache from fs
yash-atreya Jun 24, 2024
cc8b11d
use RwLock
yash-atreya Jun 24, 2024
8a1e353
doc nits
yash-atreya Jun 24, 2024
03c50c5
feat: CacheConfig, load/save at specific paths
yash-atreya Jun 24, 2024
0fc93a1
RequestType enum
yash-atreya Jun 24, 2024
9b95833
params hash
yash-atreya Jun 24, 2024
f79a128
clone and arc `CacheProvider`
yash-atreya Jun 24, 2024
e6da7f7
add: get_block_by_hash
yash-atreya Jun 24, 2024
902a24b
todos
yash-atreya Jun 24, 2024
863c868
Merge branch 'main' into yash/provider-cache
yash-atreya Jul 29, 2024
bb05544
refactor: port to transport layer
yash-atreya Aug 1, 2024
5fa27f4
rm provider cache layer
yash-atreya Aug 1, 2024
12a76c3
use parking_lot::RwLock + tracing nits
yash-atreya Aug 6, 2024
64343b0
cleanup nits
yash-atreya Aug 6, 2024
9fee441
nit
yash-atreya Aug 6, 2024
cb1c1b5
move cache instance to layer
yash-atreya Aug 7, 2024
6e9c7f4
Merge branch 'main' into yash/provider-cache
yash-atreya Aug 21, 2024
47ee0c6
resolve conflicts
yash-atreya Sep 19, 2024
5eb4af2
Revert "refactor: port to transport layer"
yash-atreya Sep 20, 2024
3e9538e
use provider cache
yash-atreya Sep 20, 2024
efa027a
use macro
yash-atreya Sep 20, 2024
ab44b80
cached get_proof
yash-atreya Sep 20, 2024
ae9e123
nit
yash-atreya Sep 20, 2024
9f646b2
nit
yash-atreya Sep 20, 2024
c25371a
Merge branch 'main' into yash/provider-cache
yash-atreya Sep 24, 2024
947bd91
use parking_lot
yash-atreya Sep 24, 2024
5653119
Merge branch 'main' into yash/provider-cache
yash-atreya Sep 27, 2024
c82901c
make params hash independent of client
yash-atreya Sep 27, 2024
32a7beb
fix
yash-atreya Sep 27, 2024
0478ded
cache_rpc_call_with_block!
yash-atreya Sep 27, 2024
fa8346c
fix: request type
yash-atreya Sep 27, 2024
6e0c676
redirect reqs with block tags to rpc
yash-atreya Sep 27, 2024
70bc5e1
nits
yash-atreya Sep 27, 2024
f8d1ab6
get_accounts
yash-atreya Sep 27, 2024
d8d4094
chain_id
yash-atreya Sep 27, 2024
d67142c
cfg gate wasm
yash-atreya Sep 30, 2024
8d0e89a
Merge branch 'main' into yash/provider-cache
yash-atreya Oct 4, 2024
2545bb0
rm get_accounts and get_chain_id
yash-atreya Oct 4, 2024
3214f63
rm related tests
yash-atreya Oct 4, 2024
dcfc38a
tests: run_with_temp_dir
yash-atreya Oct 4, 2024
0c88fe9
feat: SharedCache
yash-atreya Oct 4, 2024
d1c5e09
make CacheProvider generic over Network
yash-atreya Oct 4, 2024
cc0c1eb
add more methods
yash-atreya Oct 4, 2024
ce08a88
fmt
yash-atreya Oct 4, 2024
ccb67c1
docs
yash-atreya Oct 4, 2024
55fe2ff
docs
yash-atreya Oct 4, 2024
93d139d
nit
yash-atreya Oct 4, 2024
dcc4481
fix
yash-atreya Oct 4, 2024
60bd432
clippy
yash-atreya Oct 4, 2024
b77279f
mv SharedCache
yash-atreya Oct 5, 2024
8facd6f
use schnellru
yash-atreya Oct 5, 2024
62cfbeb
feat: get_derialized
yash-atreya Oct 5, 2024
6716c93
nits
yash-atreya Oct 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ semver = "1.0"
thiserror = "1.0"
thiserror-no-std = "2.0.2"
url = "2.5"
schnellru = "0.2.3"
lru = "0.12"
yash-atreya marked this conversation as resolved.
Show resolved Hide resolved
parking_lot = "0.12.3"
derive_more = { version = "1.0.0", default-features = false }
strum = { version = "0.26", default-features = false }
http = "1.1.0"
Expand Down
7 changes: 5 additions & 2 deletions crates/provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ auto_impl.workspace = true
dashmap = "6.0"
futures-utils-wasm.workspace = true
futures.workspace = true
lru = "0.12"
schnellru.workspace = true
lru.workspace = true
pin-project.workspace = true
reqwest = { workspace = true, optional = true }
serde_json.workspace = true
Expand All @@ -61,6 +62,8 @@ tokio = { workspace = true, features = ["sync", "macros"] }
tracing.workspace = true
url = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
parking_lot.workspace = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasmtimer.workspace = true

Expand All @@ -77,7 +80,7 @@ alloy-transport-http = { workspace = true, features = ["reqwest", "jwt-auth"] }

itertools.workspace = true
reqwest.workspace = true
tokio = { workspace = true, features = ["macros"] }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tracing-subscriber = { workspace = true, features = ["fmt"] }
tempfile.workspace = true
tower.workspace = true
Expand Down
Loading