Skip to content

Conversation

@uri-99
Copy link
Contributor

@uri-99 uri-99 commented Nov 27, 2024

Important

Contents of this PR are included in this pr
Leaving this PR as draft so we can visualize the diff, and the comments

Remove proofs from queue only after createNewTask succeeded

Description

This PR removes the sent proofs from the batcher queue only after the submition to eth was succesful.

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

@MarcosNicolau MarcosNicolau mentioned this pull request Nov 27, 2024
14 tasks
Copy link
Member

@MarcosNicolau MarcosNicolau left a comment

Choose a reason for hiding this comment

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

Work as expected, great job! 🚀

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.

LGTM

Copy link
Member

@MarcosNicolau MarcosNicolau left a comment

Choose a reason for hiding this comment

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

Still works fine with newest changes!

batch_state_lock.update_user_proof_count(addr, *proof_count)?;
batch_state_lock.update_user_max_fee_limit(addr, *max_fee_limit)?;
batch_state_lock.update_user_total_fees_in_queue(addr, *total_fees_in_queue)?;
batch_state_lock
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this process leave a consistent state?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@uri-99 uri-99 marked this pull request as draft November 28, 2024 16:02
@JuArce
Copy link
Collaborator

JuArce commented Nov 28, 2024

Supersedes by #1512

@JuArce JuArce closed this Nov 28, 2024
@JuArce JuArce deleted the 1505-refactor-batcher-shouldnt-remove-submitted-proofs-from-queue-until-they-are-accepted-on-chain branch November 28, 2024 17:53
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.

refactor: batcher shouldn't remove submitted proofs from queue until they are accepted on-chain

7 participants