Skip to content

Fix aggregator path in stress test #2421

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

Merged
merged 4 commits into from
Apr 16, 2025
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
10 changes: 10 additions & 0 deletions .github/workflows/aggregator-stress-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ jobs:
run: |
./bin/load-aggregator ${{ steps.prepare.outputs.debug_level }} \
--cardano-cli-path ./mithril-test-lab/mithril-end-to-end/script/mock-cardano-cli \
--temporary-path ./artifacts \
--aggregator-dir ./bin \
--num-signers=${{ inputs.num_signers }} \
--num-clients=${{ inputs.num_clients }}

- name: Upload stress test artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: aggregator-stress-test-artifacts-run_${{ github.run_number }}-attempt_${{ github.run_attempt }}
path: |
./artifacts/*
if-no-files-found: error
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mithril-test-lab/mithril-end-to-end/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-end-to-end"
version = "0.4.79"
version = "0.4.80"
authors = { workspace = true }
edition = { workspace = true }
documentation = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ async fn main() -> StdResult<()> {
// configure a dummy immutable db
let cardano_db = DummyCardanoDbBuilder::new("load-tester")
.with_immutables(&[1, 2, 3])
.with_ledger_files(&["533"])
.append_immutable_trio()
.build();

let _logger_guard = init_logger(&opts);
let aggregator_parameters = AggregatorParameters::new(&opts, cardano_db.get_immutable_dir())?;
let aggregator_parameters = AggregatorParameters::new(&opts, cardano_db.get_dir())?;
let mut current_epoch = Epoch(1);
let protocol_parameters = ProtocolParameters::new(2422, 20973, 0.20);
info!(">> Starting stress test with options: {opts:?}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ pub async fn bootstrap_aggregator(
full_node: &args.full_node,
cardano_cli_path: &args.cardano_cli_path,
work_dir: &args.work_dir,
store_dir: &args.work_dir,
artifacts_dir: &args.work_dir,
store_dir: &args.work_dir.join("aggregator_store"),
artifacts_dir: &args.work_dir.join("aggregator_artifacts"),
bin_dir: &args.bin_dir,
cardano_node_version: "1.2.3",
mithril_run_interval: 1000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,14 @@ pub struct AggregatorParameters {
}

impl AggregatorParameters {
pub fn new(opts: &MainOpts, immutable_db_path: &Path) -> StdResult<Self> {
pub fn new(opts: &MainOpts, db_path: &Path) -> StdResult<Self> {
let full_node = FullNode {
db_path: immutable_db_path.to_path_buf(),
db_path: db_path.to_path_buf(),
socket_path: PathBuf::new(),
};
let tmp_dir = opts
.temporary_path
.as_ref()
.cloned()
.clone()
.unwrap_or_else(|| std::env::temp_dir().join("load-aggregator"));

if tmp_dir.exists() {
Expand All @@ -92,6 +91,8 @@ impl AggregatorParameters {
std::fs::create_dir_all(&tmp_dir)
.with_context(|| format!("Could not create temp directory '{}'.", tmp_dir.display()))?;

let tmp_dir = tmp_dir.canonicalize().unwrap();

let cardano_cli_path = {
if !opts.cardano_cli_path.exists() {
Err(anyhow!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ async fn send_signer_registration_request(

match response.status() {
StatusCode::CREATED => Ok(()),
StatusCode::SERVICE_UNAVAILABLE if try_register_until_registration_round_is_open => {
status if status.as_u16() == 550 && try_register_until_registration_round_is_open => {
let error_message = response.text().await.unwrap();
debug!(
"Error 503 (SERVICE_UNAVAILABLE) for First signer registration, waiting 250ms before trying again";
"Error 550 (REGISTRATION_ROUND_NOT_YET_OPENED) for First signer registration, waiting 250ms before trying again";
"error_message" => &error_message
);
tokio::time::sleep(Duration::from_millis(250)).await;
Expand Down
Loading