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

STR-734: OPERATOR REASSIGNMENT #557

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

Conversation

voidash
Copy link
Contributor

@voidash voidash commented Dec 23, 2024

Description

Functional test where we make deposits, then trigger the withdrawal. client associated with assigned operator id is stopped. We produce l1 blocks so that the dispatch assignment duration is over, and later check if new operator is being assigned or not

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 tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

STR-734

@voidash voidash requested review from a team as code owners December 23, 2024 07:27
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

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

Project coverage is 56.55%. Comparing base (d64bbe2) to head (af28e0e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...n/bridge-client/src/modes/operator/task_manager.rs 0.00% 16 Missing ⚠️
bin/bridge-client/src/modes/operator/bootstrap.rs 0.00% 8 Missing ⚠️
crates/bridge-exec/src/handler.rs 0.00% 8 Missing ⚠️
crates/chaintsn/src/transition.rs 0.00% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main     #557      +/-   ##
==========================================
- Coverage   56.64%   56.55%   -0.09%     
==========================================
  Files         314      314              
  Lines       31896    31940      +44     
==========================================
- Hits        18066    18063       -3     
- Misses      13830    13877      +47     
Files with missing lines Coverage Δ
bin/bridge-client/src/args.rs 0.00% <ø> (ø)
crates/chaintsn/src/transition.rs 82.86% <0.00%> (ø)
bin/bridge-client/src/modes/operator/bootstrap.rs 0.00% <0.00%> (ø)
crates/bridge-exec/src/handler.rs 0.00% <0.00%> (ø)
...n/bridge-client/src/modes/operator/task_manager.rs 0.00% <0.00%> (ø)

... and 8 files with indirect coverage changes

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.

Maybe we should create a proper parent class for tests that needs withdrawal/deposits that can have all the yet-to-move utils.py functions that I commented below in the NITs.

Then all the DRT, get balances, withdraw etc functionality is encapsulated in it and we can create proper concrete classes for the other tests that inherit from this parent class.

Sorry to push all this refactoring into your plate.
Since you're already editing these files it is convenient.
However, feel free to reject and open a ticket for this so that we can do it later.

functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_withdraw_happy.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_withdraw_happy.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_withdraw_happy.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
@delbonis
Copy link
Contributor

I think it's reasonable to include the fix for this ticket in this PR too, since it's all related.

@voidash voidash requested review from a team as code owners December 24, 2024 10:50
bin/bridge-client/src/modes/operator/task_manager.rs Outdated Show resolved Hide resolved
crates/bridge-exec/src/handler.rs Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
bin/bridge-client/src/constants.rs Outdated Show resolved Hide resolved
crates/chaintsn/src/transition.rs Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Show resolved Hide resolved
Copy link
Contributor

@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.

Some final nits and a question.

bin/bridge-client/src/args.rs Outdated Show resolved Hide resolved
functional-tests/fn_bridge_reassignment.py Outdated Show resolved Hide resolved
functional-tests/testenv.py Show resolved Hide resolved
storopoli
storopoli previously approved these changes Dec 26, 2024
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 5eeff36

@voidash voidash requested a review from Rajil1213 December 26, 2024 15:04
bin/bridge-client/src/modes/operator/bootstrap.rs Outdated Show resolved Hide resolved
bin/bridge-client/src/constants.rs Outdated Show resolved Hide resolved
crates/bridge-exec/src/handler.rs Outdated Show resolved Hide resolved
func-test: add bridge withdraw reassignment

bridge-client: add timeout for duties

bridge-client: add duty_timeout_duration

chaintsn: STR-781 fix reassignment bug

func-test: add new BridgeTestBase for bridge related tests

resolve comments
functional-tests/logs Outdated Show resolved Hide resolved
bin/bridge-client/src/modes/operator/task_manager.rs Outdated Show resolved Hide resolved
crates/bridge-exec/src/handler.rs Outdated Show resolved Hide resolved
functional-tests/testenv.py Show resolved Hide resolved
@voidash voidash requested a review from delbonis December 31, 2024 19:11
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.

5 participants