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

block_builder tests: fix and use new infrastructure #79

Closed
plafer opened this issue Dec 1, 2023 · 4 comments · Fixed by #253
Closed

block_builder tests: fix and use new infrastructure #79

plafer opened this issue Dec 1, 2023 · 4 comments · Fixed by #253
Assignees
Labels
block-producer Related to the block producer component test Test related issue
Milestone

Comments

@plafer
Copy link
Contributor

plafer commented Dec 1, 2023

#77 introduced a new infrastructure useful especially for the block_builder tests. It is currently incomplete, and needs to be fixed before every block_builder test can be updated to use it. Specifically

  • MockStoreSuccessBuilder and build_expected_block() need to compute the correct notes root
  • MockStoreSuccessBuilder: new() needs to be replaced with a few different constructors (including from_batches()) which allow it to know the initial account IDs and state.

Once this is done, use this new test code everywhere, and remove the obsolete DummyProvenTxGenerator.

@plafer plafer mentioned this issue Dec 1, 2023
3 tasks
@plafer plafer mentioned this issue Dec 11, 2023
@bobbinth bobbinth added block-producer Related to the block producer component test Test related issue labels Dec 24, 2023
@bobbinth bobbinth added this to the v0.2 milestone Jan 11, 2024
@hackaugusto hackaugusto self-assigned this Feb 14, 2024
@hackaugusto
Copy link
Contributor

@plafer could you add more context on what needs to be done? What should be achieved by this issue?

@plafer
Copy link
Contributor Author

plafer commented Feb 14, 2024

The ultimate goal is to get rid of DummyProvenTxGenerator.

The objects that I started creating to replace/enhance its functionality are:

These are already used in some tests (except for TransactionBatchConstructor) - all other tests should be written using those. You'll probably need to adapt them too. Feel free to redesign them too if you prefer - again, as long as we get rid of DummyProvenTxGenerator.

@hackaugusto
Copy link
Contributor

Thanks for the update.

The ultimate goal is to get rid of DummyProvenTxGenerator.

And why do we want to get rid of it? What features is it lacking that are introduced by the other mocks?

@plafer
Copy link
Contributor Author

plafer commented Feb 14, 2024

It was a hack at the time before we had StarkProof::new_dummy(). The only way to create a StarkProof object was by running the winterfell prover on a bogus problem (i.e. all this). Running this makes tests slower, and just isn't clean.

With the other mocks, I also took this change as an opportunity to create objects that make tests more readable and reduce the amount of copy/paste. It's still a WIP though (and hence this issue).

@hackaugusto hackaugusto removed their assignment Feb 19, 2024
@polydez polydez self-assigned this Feb 19, 2024
@polydez polydez moved this from Todo to In Progress in Builder's testnet Feb 22, 2024
@polydez polydez moved this from In Progress to Done in Builder's testnet Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block-producer Related to the block producer component test Test related issue
Projects
Status: Done
4 participants