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(l1): made the tx-spammer work with our node #1027

Merged
merged 9 commits into from
Oct 31, 2024
5 changes: 2 additions & 3 deletions crates/networking/rpc/eth/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ impl RpcHandler for GetTransactionCountRequest {
);

let Some(block_number) = self.block.resolve_block_number(&storage)? else {
return Err(RpcErr::Internal(
"Could not resolve block number".to_owned(),
)); // Should we return Null here?
return serde_json::to_value("0x0")
.map_err(|error| RpcErr::Internal(error.to_string()));
};

let nonce = storage
Expand Down
10 changes: 9 additions & 1 deletion crates/networking/rpc/types/block_identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ impl BlockIdentifier {
BlockTag::Finalized => storage.get_finalized_block_number(),
BlockTag::Safe => storage.get_safe_block_number(),
BlockTag::Latest => storage.get_latest_block_number(),
BlockTag::Pending => storage.get_pending_block_number(),
BlockTag::Pending => {
storage
.get_pending_block_number()
// If there are no pending blocks, we return the latest block number
.and_then(|pending_block_number| match pending_block_number {
Some(block_number) => Ok(Some(block_number)),
None => storage.get_latest_block_number(),
})
}
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion test_data/el-stability-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tasks:

- name: run_task_matrix
title: "Check block proposals from all client pairs"
timeout: 2m
timeout: 3m
configVars:
matrixValues: "validatorPairNames"
config:
Expand Down
4 changes: 3 additions & 1 deletion test_data/network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ assertoor_params:
run_block_proposal_check: false
run_blob_transaction_test: true
tests:
- 'https://raw.githubusercontent.com/lambdaclass/lambda_ethereum_rust/refs/heads/main/test_data/el-stability-check.yml'
- 'https://raw.githubusercontent.com/lambdaclass/lambda_ethereum_rust/refs/heads/main/test_data/el-stability-check.yml'
tx_spammer_params:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these parameters are based on our current capabilities?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, this is mostly to be able to track the execution instead of having hundreds of transactions (Which by the way we still need to check why we just add one as shown in the image). Most of the initial issues regarding the node being unable to propose weren't related to concurrency as I initially thought but to the errors mentioned in the PR description.

tx_spammer_extra_args: ["--accounts=10", --txcount=10]
Loading