Skip to content

duty-tracker: actually persist deposit setup duties on time #222

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

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

ProofOfKeags
Copy link
Collaborator

turns out this code would never persist contract state after deposit setup processing. This means that we would lose this state if a node went down.

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency Update

Notes to Reviewers

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added (where necessary) tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

turns out this code would *never* persist contract state after
deposit setup processing. This means that we would lose this state
if a node went down.
@ProofOfKeags ProofOfKeags requested a review from Zk2u July 18, 2025 18:25
@ProofOfKeags ProofOfKeags self-assigned this Jul 18, 2025
@ProofOfKeags ProofOfKeags added bugfix Something isn't working P1 - Blocks Release labels Jul 18, 2025
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 52.15%. Comparing base (9e015df) to head (c451921).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/duty-tracker/src/contract_manager.rs 0.00% 8 Missing ⚠️
@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   52.24%   52.15%   -0.10%     
==========================================
  Files         152      152              
  Lines       22247    22244       -3     
==========================================
- Hits        11624    11601      -23     
- Misses      10623    10643      +20     
Files with missing lines Coverage Δ
crates/duty-tracker/src/contract_manager.rs 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@barakshani
Copy link
Contributor

What are the implications of this? I'm pretty sure we have done withdrawals after a restart on our envs (and I'm very hopeful that it was tested locally before making the restart PRs).

Copy link
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

ACK c451921

We cannot call empty() on an Iterator, hence this is not a 1-liner like I said.

@Rajil1213
Copy link
Collaborator

I'm pretty sure we have done withdrawals after a restart on our envs (and I'm very hopeful that it was tested locally before making the restart PRs).

@barakshani with self-nagging, even without persisting this state, it isn't exactly an issue. So, it should not cause any observable effects on the system.

Copy link
Collaborator

@Rajil1213 Rajil1213 left a comment

Choose a reason for hiding this comment

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

Nice catch.

@Rajil1213 Rajil1213 added this pull request to the merge queue Jul 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 22, 2025
@storopoli storopoli added this pull request to the merge queue Jul 22, 2025
Merged via the queue into main with commit 7e493e9 Jul 22, 2025
24 of 28 checks passed
@storopoli storopoli deleted the misc-bugfixes branch July 22, 2025 08:45
@ProofOfKeags
Copy link
Collaborator Author

Yeah @barakshani this is just to cover an edge case where we can lose state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Something isn't working P1 - Blocks Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants