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 WS provider URL #2264

Merged
merged 2 commits into from
Nov 7, 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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ESPRESSO_SEQUENCER_GENESIS_FILE=/genesis/demo.toml
ESPRESSO_SEQUENCER_L1_PORT=8545
ESPRESSO_SEQUENCER_L1_WS_PORT=8546
ESPRESSO_SEQUENCER_L1_PROVIDER=http://demo-l1-network:${ESPRESSO_SEQUENCER_L1_PORT}
ESPRESSO_SEQUENCER_L1_WS_PROVIDER=http://demo-l1-network:${ESPRESSO_SEQUENCER_L1_WS_PORT}
ESPRESSO_SEQUENCER_L1_WS_PROVIDER=ws://demo-l1-network:${ESPRESSO_SEQUENCER_L1_WS_PORT}
ESPRESSO_NODE_VALIDATOR_PORT=9000

# Only allow 1 block to be processed for events at a time, simulating a very bad L1 provider.
Expand Down
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[files]
extend-exclude = [
".env",
"*.json",
"doc/*.svg",
"contracts/lib",
Expand Down
9 changes: 4 additions & 5 deletions sequencer/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ impl Genesis {
.context("connecting L1 client")?;

if let Some(fee_contract_address) = self.chain_config.fee_contract {
tracing::info!("validating fee contract at {fee_contract_address:x}");

if !is_proxy_contract(l1.provider(), fee_contract_address)
.await
.context("checking if fee contract is a proxy")?
{
anyhow::bail!("Fee contract's address is not a proxy");
anyhow::bail!("Fee contract address {fee_contract_address:x} is not a proxy");
}
}

Expand Down Expand Up @@ -597,10 +599,7 @@ mod test {

// check if the result from the validation is an error
if let Err(e) = result {
// assert that the error message contains "Fee contract's address is not a proxy"
assert!(e
.to_string()
.contains("Fee contract's address is not a proxy"));
assert!(e.to_string().contains("is not a proxy"));
} else {
panic!("Expected the fee contract to not be a proxy, but the validation succeeded");
}
Expand Down
Loading