Skip to content

Conversation

@JulianVentura
Copy link
Contributor

@JulianVentura JulianVentura commented Nov 27, 2024

Add simulation to create new task

Description

This PR adds a simulation to create a new task from the batcher.

How to test

Test the happy path

  1. Get all services up
  2. Send transactions
  3. See the batches being processed sucesfully and the batcher logging "Simulating task for: "

Test the error case

  1. Add the following line to the createNewTask function inside the BatcherPaymentService.sol contract
96         revert NoProofSubmitters();
  1. Compile the contracts for anvil with make anvil_deploy_aligned_contracts
  2. Run anvil
  3. Run the batcher
  4. Start sending proofs
  5. You should see the simulation being run and failing because of the revert

Type of change

Please delete options that are not relevant.

  • New feature
  • Bug fix
  • Optimization
  • Refactor

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@JulianVentura JulianVentura changed the title (WIP) feat: add simulate_create_new_task feat: add simulate_create_new_task Nov 27, 2024
@PatStiles
Copy link
Contributor

Tested on local devnet and observed the reverted error from during simulation Simulated transaction reverted Bytes(0xc43ac290)

Copy link
Contributor

@avilagaston9 avilagaston9 left a comment

Choose a reason for hiding this comment

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

Works in my machine!

Copy link
Contributor

@Oppen Oppen left a comment

Choose a reason for hiding this comment

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

LGTM

@JuArce JuArce added this pull request to the merge queue Nov 28, 2024
Merged via the queue into staging with commit 5a24c5e Nov 28, 2024
3 checks passed
@JuArce JuArce deleted the feat/batcher-simulate-create-new-task branch November 28, 2024 18:14
avilagaston9 added a commit that referenced this pull request Nov 29, 2024
Co-authored-by: Julian Ventura <[email protected]>
Co-authored-by: Marcos Nicolau <[email protected]>
Co-authored-by: Avila Gastón <[email protected]>
Co-authored-by: avilagaston9 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants