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: Add caching to HttpForkSource #114

Merged
merged 14 commits into from
Sep 18, 2023
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ etc/**/*.zbin
!.vscode/launch.json
!.vscode/tasks.json

*.log
*.log
.cache
21 changes: 21 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ ethabi = "16.0.0"
itertools = "0.10.5"
log = "0.4.20"
simplelog = "0.12.1"
rustc-hash = "1.1.0"

[dev-dependencies]
httptest = "0.15.4"
tempdir = "0.3.7"
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ Additionally, the file path can be provided via the `--log-file-path` option (de
era_test_node --log=error --log-file-path=run.log run
```

## πŸ“ƒ Caching

The node will cache certain network request by default to disk in the `.cache` directory. Alternatively the caching can be disabled or set to in-memory only
via the `--cache=none|memory|disk` parameter.

```bash
era_test_node --cache=none run
```

```bash
era_test_node --cache=memory run
```

Additionally when using `--cache=disk`, the cache directory may be specified via `--cache-dir` and the cache may
be reset on startup via `--reset-cache` parameters.
```bash
era_test_node --cache=disk --cache-dir=/tmp/foo --reset-cache run
```

## 🌐 Network Details

- L2 RPC: http://localhost:8011
Expand Down
Loading