Compare commits

...

2 Commits

Author SHA1 Message Date
Omar Abdulla e77962ee66 Attempt to improve the geth tx indexing issue.
We're facing an issue where Geth transaction indexing can sometimes stall
on some of the nodes we're running. The logs show that for all transactions
we always need 1 second of waiting time. However, during certain runs we
sometimes run into an issue with some of the nodes where it seems like
their transaction indexer fails (either at the start or after some amount
of time) which leads us to never get the receipts back from these specific
nodes.

This is not a load issue as it appears like all of the other nodes handle
it just fine. However, it looks like once a node gets into this state it
can not get out of it and its bricked for the entire run.

This commit adds some more command line arguments to the geth command in
hopes of improving this issue.
2025-07-28 17:45:58 +03:00
Omar Abdulla f6aa7c9109 Allow for files to be specified in the corpus file 2025-07-28 17:45:50 +03:00
2 changed files with 42 additions and 21 deletions
+34 -20
View File
@@ -35,33 +35,47 @@ impl Corpus {
/// ///
/// `path` is expected to be a directory. /// `path` is expected to be a directory.
pub fn collect_metadata(path: &Path, tests: &mut Vec<MetadataFile>) { pub fn collect_metadata(path: &Path, tests: &mut Vec<MetadataFile>) {
let dir_entry = match std::fs::read_dir(path) { if path.is_dir() {
Ok(dir_entry) => dir_entry, let dir_entry = match std::fs::read_dir(path) {
Err(error) => { Ok(dir_entry) => dir_entry,
tracing::error!("failed to read dir '{}': {error}", path.display());
return;
}
};
for entry in dir_entry {
let entry = match entry {
Ok(entry) => entry,
Err(error) => { Err(error) => {
tracing::error!("error reading dir entry: {error}"); tracing::error!("failed to read dir '{}': {error}", path.display());
continue; return;
} }
}; };
let path = entry.path(); for entry in dir_entry {
if path.is_dir() { let entry = match entry {
collect_metadata(&path, tests); Ok(entry) => entry,
continue; Err(error) => {
} tracing::error!("error reading dir entry: {error}");
continue;
}
};
if path.is_file() { let path = entry.path();
if let Some(metadata) = MetadataFile::try_from_file(&path) { if path.is_dir() {
collect_metadata(&path, tests);
continue;
}
if path.is_file() {
if let Some(metadata) = MetadataFile::try_from_file(&path) {
tests.push(metadata)
}
}
}
} else {
let Some(extension) = path.extension() else {
tracing::error!("Failed to get file extension");
return;
};
if extension.eq_ignore_ascii_case("sol") || extension.eq_ignore_ascii_case("json") {
if let Some(metadata) = MetadataFile::try_from_file(path) {
tests.push(metadata) tests.push(metadata)
} }
} else {
tracing::error!(?extension, "Unsupported file extension");
} }
} }
} }
+8 -1
View File
@@ -152,6 +152,10 @@ impl Instance {
.arg("--nodiscover") .arg("--nodiscover")
.arg("--maxpeers") .arg("--maxpeers")
.arg("0") .arg("0")
.arg("--txlookuplimit")
.arg("0")
.arg("--cache.blocklogs")
.arg("512")
.stderr(stderr_logs_file.try_clone()?) .stderr(stderr_logs_file.try_clone()?)
.stdout(stdout_logs_file.try_clone()?) .stdout(stdout_logs_file.try_clone()?)
.spawn()? .spawn()?
@@ -294,7 +298,10 @@ impl EthereumNode for Instance {
} }
match provider.get_transaction_receipt(*transaction_hash).await { match provider.get_transaction_receipt(*transaction_hash).await {
Ok(Some(receipt)) => break Ok(receipt), Ok(Some(receipt)) => {
tracing::info!(?total_wait_duration, "Found receipt");
break Ok(receipt);
}
Ok(None) => {} Ok(None) => {}
Err(error) => { Err(error) => {
let error_string = error.to_string(); let error_string = error.to_string();