Skip to content

Conversation

@ethanoroshiba
Copy link
Contributor

@ethanoroshiba ethanoroshiba commented Feb 14, 2025

Summary

Removes unnecessary block hashes from test mounts by maintaining current block hashes in TestConductor.

Background

Conductor tests have gotten unruly with the number and specificity of mounts needed to make them function properly. This is meant to make the tests more readable, simpler, and easier to write.

Changes

  • Added TestRollupState to TestConductor, which keeps track of the current block hash initializers (the repeated number in our test hashes) as well as the current firm block number (in case soft is updated but not firm).
  • Removed block hashes from all mounts which used them.
  • Split mount_update_commitment_state into soft and firm variants for readability.

Testing

All tests are passing.

Changelogs

No updates requried.

Related Issues

part of #1927

@ethanoroshiba ethanoroshiba added conductor pertaining to the astria-conductor crate code-quality testing labels Feb 14, 2025
}

#[macro_export]
macro_rules! mount_firm_update_commitment_state {
Copy link
Contributor Author

@ethanoroshiba ethanoroshiba Feb 14, 2025

Choose a reason for hiding this comment

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

I split this up for readability in tests, but I'm not sure if this makes it too opaque to a reader without context. Happy to change this back if needed.

@ethanoroshiba ethanoroshiba changed the title chore(conductor): remove unnecessary information from test mounts chore(conductor): remove unnecessary block hashes from test mounts Feb 14, 2025
@ethanoroshiba ethanoroshiba marked this pull request as ready for review February 14, 2025 16:16
@joroshiba
Copy link
Member

This PR is stale because it has been open 45 days with no activity. Remove stale label or this PR will be
closed in 7 days.

@joroshiba joroshiba added the stale label Apr 1, 2025
@ethanoroshiba ethanoroshiba added ignore-stale Override for issues or PRs which should not be removed if stale. and removed stale labels Apr 1, 2025
@ethanoroshiba
Copy link
Contributor Author

Marking as ignore-stale since this significantly eases writing of conductor tests

@joroshiba
Copy link
Member

Conflicts on stale PR, is it still relevant and need updated or now obsolete?

@ethanoroshiba
Copy link
Contributor Author

@joroshiba would still be nice to have, but will take a bit of adjustment with the v2 changes. Will try to get conflicts addressed ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality conductor pertaining to the astria-conductor crate ignore-stale Override for issues or PRs which should not be removed if stale. testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants