Skip to content

Commit 1ec3c40

Browse files
authored
Revert "feat: add option to avoid denying senders" (#618)
This reverts commit d0731e3.
1 parent 9c1eab2 commit 1ec3c40

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

crates/config/src/config.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,6 @@ pub struct TapConfig {
382382
pub sender_timeout_secs: Duration,
383383

384384
pub sender_aggregator_endpoints: HashMap<Address, Url>,
385-
/// Set of sender addresses that will not be added to the denylist
386-
#[serde(default)]
387-
pub trusted_senders: Vec<Address>,
388385
}
389386

390387
#[derive(Debug, Deserialize)]

crates/tap-agent/src/agent/sender_account.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,6 @@ pub struct SenderAccountConfig {
329329
pub max_amount_willing_to_lose_grt: u128,
330330
/// What value triggers a new Rav request
331331
pub trigger_value: u128,
332-
/// Set of sender addresses that will not be added to the denylist
333-
pub trusted_senders: HashSet<Address>,
334332

335333
// allocation config
336334
/// Timeout config for rav requests
@@ -357,7 +355,6 @@ impl SenderAccountConfig {
357355
escrow_polling_interval: config.subgraphs.escrow.config.syncing_interval_secs,
358356
max_amount_willing_to_lose_grt: config.tap.max_amount_willing_to_lose_grt.get_value(),
359357
trigger_value: config.tap.get_trigger_value(),
360-
trusted_senders: config.tap.trusted_senders.iter().copied().collect(),
361358
rav_request_timeout: config.tap.rav_request.request_timeout_secs,
362359
tap_sender_timeout: config.tap.sender_timeout_secs,
363360
}
@@ -552,17 +549,6 @@ impl State {
552549

553550
/// Will update [`State::denied`], as well as the denylist table in the database.
554551
async fn add_to_denylist(&mut self) {
555-
if self.config.trusted_senders.contains(&self.sender) {
556-
tracing::warn!(
557-
fee_tracker = self.sender_fee_tracker.get_total_fee(),
558-
rav_tracker = self.rav_tracker.get_total_fee(),
559-
max_amount_willing_to_lose = self.config.max_amount_willing_to_lose_grt,
560-
sender_balance = self.sender_balance.to_u128(),
561-
"Trusted sender would be denied."
562-
);
563-
return;
564-
}
565-
566552
tracing::warn!(
567553
fee_tracker = self.sender_fee_tracker.get_total_fee(),
568554
rav_tracker = self.rav_tracker.get_total_fee(),

crates/tap-agent/src/test.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ pub fn get_sender_account_config() -> &'static SenderAccountConfig {
8888
rav_request_buffer: RAV_REQUEST_BUFFER,
8989
max_amount_willing_to_lose_grt: TRIGGER_VALUE + 100,
9090
trigger_value: TRIGGER_VALUE,
91-
trusted_senders: Default::default(),
9291
rav_request_timeout: Duration::from_secs(30),
9392
rav_request_receipt_limit: 1000,
9493
indexer_address: INDEXER.1,
@@ -118,7 +117,6 @@ pub async fn create_sender_account(
118117
rav_request_buffer: BUFFER_DURATION,
119118
max_amount_willing_to_lose_grt,
120119
trigger_value: rav_request_trigger_value,
121-
trusted_senders: Default::default(),
122120
rav_request_timeout: RAV_REQUEST_TIMEOUT,
123121
rav_request_receipt_limit,
124122
indexer_address: INDEXER.1,

crates/tap-agent/tests/tap_agent_test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ pub async fn start_agent(
8282
rav_request_buffer: Duration::from_millis(500),
8383
max_amount_willing_to_lose_grt: 50,
8484
trigger_value: 150,
85-
trusted_senders: Default::default(),
8685
rav_request_timeout: Duration::from_secs(60),
8786
rav_request_receipt_limit: 10,
8887
indexer_address: INDEXER_ADDRESS,

0 commit comments

Comments
 (0)