Skip to content

Commit

Permalink
fix zkstack failed to run server
Browse files Browse the repository at this point in the history
  • Loading branch information
JayT106 committed Nov 12, 2024
1 parent 63535ef commit f90a385
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/lib/config/src/configs/tx_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ pub struct TxSinkConfig {

impl TxSinkConfig {
pub fn deny_list(&self) -> Option<HashSet<Address>> {
// Return deny list is not set or empty
if self.deny_list.is_none() || self.deny_list.as_ref().unwrap().is_empty() {
return None;
}

// Parse deny list from a string and return it as a set of addresses
// Example: "0x1,0x2,0x3" -> { Address::from_str("0x1").unwrap(), Address::from_str("0x2").unwrap(), Address::from_str("0x3").unwrap() }
// Note: This assumes that the addresses are separated by commas and are in valid format.
self.deny_list.as_ref().map(|list| {
list.split(',')
.map(|element| Address::from_str(element).unwrap())
Expand Down
3 changes: 3 additions & 0 deletions etc/env/file_based/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ eth:
max_aggregated_tx_gas: 15000000
max_acceptable_priority_fee_in_gwei: 100000000000
pubdata_sending_mode: BLOBS
signing_mode: PRIVATE_KEY
max_acceptable_base_fee_in_wei: 100000000000
gas_adjuster:
default_priority_fee_per_gas: 1000000000
Expand Down Expand Up @@ -383,3 +384,5 @@ consensus:
public_addr: "127.0.0.1:3054"
max_payload_size: 2500000
gossip_dynamic_inbound_limit: 100
tx_sink:
deny_list: ""

0 comments on commit f90a385

Please sign in to comment.