Skip to content

test: redistribution upgrade #1410

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 9 commits into from
May 30, 2025

Conversation

ypatil12
Copy link
Collaborator

@ypatil12 ypatil12 commented May 27, 2025

Motivation:

We need to sanity test that slashes completed prior to redistribution can be burned after redistribution.

Modifications:

  • Add redistribution upgrade test which tests:
  1. A slash prior to redistribution can have its shares burned after the upgrade
  2. A slash prior to redistribution can have its shares burned prior to upgrade & storage is cleared
  • Remove all User_m2/m1 functionality

Result:

Basic upgrade test.

@ypatil12 ypatil12 force-pushed the feat/redistibution-upgrade-test branch from 02658c6 to 452537c Compare May 27, 2025 16:37
@ypatil12 ypatil12 changed the title test: redistribution upgrade test test: redistribution upgrade integration May 27, 2025
@ypatil12 ypatil12 force-pushed the feat/redistibution-upgrade-test branch from 452537c to 9ba5f3d Compare May 27, 2025 16:39
@@ -462,44 +462,6 @@ contract SlashEscrowFactoryUnitTests_setStrategyEscrowDelay is SlashEscrowFactor
}
}

contract SlashEscrowFactoryUnitTests_getBurnOrRedistributionDelay is SlashEscrowFactoryUnitTests {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Redundant test: SlashEscrowFactoryUnitTests_getEscrowDelay

@ypatil12 ypatil12 changed the title test: redistribution upgrade integration test: redistribution upgrade May 27, 2025
@ypatil12 ypatil12 force-pushed the feat/redistibution-upgrade-test branch from d0ae1e7 to ba469b5 Compare May 27, 2025 21:32
@0xClandestine 0xClandestine force-pushed the release-dev/redistribution branch from 7e82d53 to d88ee4f Compare May 27, 2025 21:57
@ypatil12 ypatil12 force-pushed the feat/redistibution-upgrade-test branch from ba469b5 to a88a807 Compare May 28, 2025 21:59
ypatil12 added 6 commits May 30, 2025 13:43
test: increase burnable shares

chore: add tests

feat: simplify escrow delay

chore: format

chore: clarify natspec

chore: fix typos

feat: add convenience view functions (#1407)

chore: remove commented code

chore: format

chore: format

chore: add regression

chore: naming

chore: naming

fix: build

fix: slaky test

chore: format

chore: push

chore: push

test: passing redistribution upgrade test
@ypatil12 ypatil12 force-pushed the feat/redistibution-upgrade-test branch from a88a807 to 15a2bce Compare May 30, 2025 17:55
@0xClandestine 0xClandestine self-requested a review May 30, 2025 18:33
* @dev The interface remains the exact same, except `SlashOperator` does not return the slashID or shares
* @dev This interface is the minimal possibl interface needed for the redistribution upgrade test
*/
interface IAllocationManager_PreRedistribution {
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed given only return values were changed?

Copy link
Member

Choose a reason for hiding this comment

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

Main issue lies with existing return values changing, since contracts calling wold attempt to copy returndata that doesn't exist or is misplaced.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would assume it's not needed, but for some reason I'm reverting...

@0xClandestine 0xClandestine self-requested a review May 30, 2025 20:04
@ypatil12 ypatil12 merged commit 1feea71 into release-dev/redistribution May 30, 2025
14 checks passed
@ypatil12 ypatil12 deleted the feat/redistibution-upgrade-test branch May 30, 2025 20:05
0xClandestine pushed a commit that referenced this pull request May 30, 2025
**Motivation:**

We need to sanity test that slashes completed prior to redistribution
can be burned after redistribution.

**Modifications:**

- Add redistribution upgrade test which tests:
1. A slash prior to redistribution can have its shares burned after the
upgrade
2. A slash prior to redistribution can have its shares burned prior to
upgrade & storage is cleared
- Remove all User_m2/m1 functionality 

**Result:**

Basic upgrade test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants