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

fix: zkstack failed to run server #98

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ""
Loading