Skip to content

Conversation

@PastaPastaPasta
Copy link
Member

Issue being fixed or feature implemented

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

ogabrielides
ogabrielides previously approved these changes Mar 28, 2023
Copy link

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

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

hmmm... I think you need to add bias to IsExpired calls in UpdatedBlockTip and StartQuorumDataRecoveryThread too then. OR maybe keep it 0 on the requesting side (revert changes in RequestQuorumData) and relax conditions (add negative bias) on the receiving side (in ProcessMessage).

Might also need to fix tests.

Copy link

Choose a reason for hiding this comment

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

Suggested change
bool IsExpired(int bias=0) const { return (GetTime() - nTime) >= (EXPIRATION_TIMEOUT + bias); }
bool IsExpired(int bias = 0) const { return (GetTime() - nTime) >= (EXPIRATION_TIMEOUT + bias); }

… nodeA thinks it's been 300 seconds but nodeB only thinks it's been 295 for some reason
@PastaPastaPasta
Copy link
Member Author

See latest

Copy link

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

LGTM

@PastaPastaPasta
Copy link
Member Author

Merging so we can move forward with an RC. Please post merge review @UdjinM6

@UdjinM6
Copy link

UdjinM6 commented Mar 30, 2023

Might also need to fix tests.

#5281 should help

PastaPastaPasta pushed a commit that referenced this pull request Mar 30, 2023
…quorum_data.py` (#5281)

## Issue being fixed or feature implemented
fix `p2p_quorum_data.py` test broken by #5276


## What was done?
adjust data request expiration timeout in tests

## How Has This Been Tested?
`./test/functional/test_runner.py p2p_quorum_data.py`

## Breaking Changes
n/a

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Mar 30, 2023
…quorum_data.py` (dashpay#5281)

## Issue being fixed or feature implemented
fix `p2p_quorum_data.py` test broken by dashpay#5276


## What was done?
adjust data request expiration timeout in tests

## How Has This Been Tested?
`./test/functional/test_runner.py p2p_quorum_data.py`

## Breaking Changes
n/a

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Mar 30, 2023
… nodeA thinks it's been 300 seconds but nodeB only thinks it's been 295 for some reason (dashpay#5276)

## Issue being fixed or feature implemented
add a bias to IsExpired to avoid potential timing issues where nodeA thinks it's been 300 seconds but nodeB only thinks it's been 295 for some reason

## What was done?


## How Has This Been Tested?


## Breaking Changes


## Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
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.

3 participants