Skip to content

Commit

Permalink
feat(indexer-service): Sender denylist (#109)
Browse files Browse the repository at this point in the history
* feat(indexer-service): Sender denylist

indexer-service will reject all paid queries from denied senders.
Denylist DB table updates are watched through PG notifications.

Signed-off-by: Alexis Asseman <[email protected]>

* refactor: cleaner sender_denylist_watcher shutdown

Signed-off-by: Alexis Asseman <[email protected]>

* refactor: remove unnecessary Arc on CancellationToken

Signed-off-by: Alexis Asseman <[email protected]>

* fix: proper signers support after #110

Signed-off-by: Alexis Asseman <[email protected]>

---------

Signed-off-by: Alexis Asseman <[email protected]>
  • Loading branch information
aasseman authored Jan 23, 2024
1 parent 36a73a9 commit be4ad96
Show file tree
Hide file tree
Showing 9 changed files with 329 additions and 23 deletions.

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

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

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

5 changes: 3 additions & 2 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 common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ autometrics = { version = "0.6.0", features = ["prometheus-exporter"] }
tracing = "0.1.40"
tower = "0.4.13"
tower_governor = "0.1.0"
tokio-util = "0.7.10"

[dev-dependencies]
env_logger = "0.9.0"
Expand Down
3 changes: 2 additions & 1 deletion common/src/indexer_service/http/indexer_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ impl IndexerService {
chain_id: options.config.scalar.chain_id,
verifying_contract: options.config.scalar.receipts_verifier_address,
},
);
)
.await;

let state = Arc::new(IndexerServiceState {
config: options.config.clone(),
Expand Down
Loading

0 comments on commit be4ad96

Please sign in to comment.