Skip to content

Commit

Permalink
Add local ingestion client to indexer-alt (#19924)
Browse files Browse the repository at this point in the history
## Description 

This PR adds an IngestionClientTrait that abstracts over checkpoint
fetching.
The existing one is moved into RemoteIngestionClient.
Added a new one LocalIngestionClient to read from files.
The retry logic is kept in a top-level struct, which then calls into the
traits. Each trait decides the type of error for various cases.

## Test plan 

Added a test.

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
lxfind authored Oct 21, 2024
1 parent a2eac64 commit 6831e94
Show file tree
Hide file tree
Showing 8 changed files with 517 additions and 346 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/sui-indexer-alt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ sui-types.workspace = true
[dev-dependencies]
rand.workspace = true
wiremock.workspace = true
tempfile.workspace = true

sui-types = { workspace = true, features = ["test-utils"] }
Loading

0 comments on commit 6831e94

Please sign in to comment.