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

chore(conductor): remove unnecessary block hashes from test mounts #1973

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
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 testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant