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

✅ Test freeze restrictions on evaluations #306

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

JuaniRios
Copy link
Contributor

@JuaniRios JuaniRios commented May 27, 2024

What?

  • Test what happens when you evaluate with frozen balance, i.e. a hold on a freeze.

Why?

  • To double-check our assumptions about these interactions

How?

  • An evaluator holds ED + an amount frozen.
  • It uses that frozen amount to evaluate
  • The project fails
  • He get's slashed
  • The treasury receives the slashed amount as free balance
  • The evaluator ends up with less free balance than the original freeze restriction (intended)

Testing?

can_evaluate_with_frozen_tokens inside 2_evaluation.rs

Anything Else?

Next PRs will do the same for other participation types

@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch 2 times, most recently from bc5cbad to 0fcd7f2 Compare May 27, 2024 10:30
@JuaniRios JuaniRios changed the title test-freeze-interactions ✅ Test freeze restrictions on evaluations May 27, 2024
@JuaniRios JuaniRios marked this pull request as ready for review May 27, 2024 10:33
@JuaniRios JuaniRios requested review from lrazovic and vstam1 May 27, 2024 10:33
Copy link

graphite-app bot commented May 27, 2024

Graphite Automations

"Auto-assign PRs to author" took an action on this PR • (05/27/24)

1 assignee was added to this PR based on Juan Ignacio Rios's automation.

@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 0fcd7f2 to a00d687 Compare May 27, 2024 10:35
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 10a1837 to 7574c2c Compare May 27, 2024 14:02
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch 2 times, most recently from ecf2c60 to f8b042c Compare May 27, 2024 14:35
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 7574c2c to 576692c Compare May 27, 2024 14:46
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from f8b042c to 4a469c2 Compare May 27, 2024 14:46
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 576692c to ed27dcd Compare May 27, 2024 14:57
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 4a469c2 to d72b49f Compare May 27, 2024 14:57
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from ed27dcd to a3d19e5 Compare May 28, 2024 11:36
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from d72b49f to 2fd204f Compare May 28, 2024 11:36
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from a3d19e5 to 3583f0d Compare May 28, 2024 12:32
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 2fd204f to 1bf52b2 Compare May 28, 2024 12:32
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 3583f0d to f49022b Compare May 28, 2024 13:55
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 1bf52b2 to ca9672e Compare May 28, 2024 13:55
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from f49022b to a31bf79 Compare May 28, 2024 14:35
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from dc706d3 to 9dde294 Compare May 29, 2024 12:27
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 1943662 to 120b60e Compare May 29, 2024 12:42
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 9dde294 to 81fbfc9 Compare May 29, 2024 12:42
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 120b60e to e19e097 Compare May 31, 2024 09:36
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 81fbfc9 to a13bfd2 Compare May 31, 2024 09:36
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from e19e097 to a10f42e Compare June 3, 2024 14:16
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from a13bfd2 to 71923ad Compare June 3, 2024 14:16
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from a10f42e to 4cedfa5 Compare June 3, 2024 14:42
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 71923ad to 1c5a8af Compare June 3, 2024 14:42
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 4cedfa5 to c87ef41 Compare June 4, 2024 09:32
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 1c5a8af to 6fef773 Compare June 4, 2024 09:32
Copy link
Collaborator

@vstam1 vstam1 left a comment

Choose a reason for hiding this comment

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

Think we could simplify this test quite a bit. Let me know what you think

pallets/funding/src/tests/2_evaluation.rs Outdated Show resolved Hide resolved
pallets/funding/src/tests/2_evaluation.rs Outdated Show resolved Hide resolved
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from c87ef41 to faf7c81 Compare June 11, 2024 08:41
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 6fef773 to d15ed73 Compare June 11, 2024 08:41
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from faf7c81 to 46c142d Compare June 11, 2024 09:41
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch 2 times, most recently from 4542022 to 3fbb8de Compare June 11, 2024 10:25
@JuaniRios JuaniRios requested a review from vstam1 June 11, 2024 10:31
@JuaniRios JuaniRios force-pushed the 05-24-comprehensive_settlement_tests branch from 46c142d to 9ae047e Compare June 11, 2024 10:49
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 3fbb8de to 8156ac3 Compare June 11, 2024 10:49
Copy link
Contributor Author

JuaniRios commented Jun 11, 2024

Merge activity

  • Jun 11, 10:37 AM EDT: @JuaniRios started a stack merge that includes this pull request via Graphite.
  • Jun 11, 10:38 AM EDT: Graphite rebased this pull request as part of a merge.
  • Jun 11, 10:39 AM EDT: @JuaniRios merged this pull request with Graphite.

Base automatically changed from 05-24-comprehensive_settlement_tests to main June 11, 2024 14:37
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-interactions branch from 8156ac3 to 6e44825 Compare June 11, 2024 14:37
@JuaniRios JuaniRios merged commit 7bd6901 into main Jun 11, 2024
@JuaniRios JuaniRios deleted the 05-27-test-freeze-interactions branch June 11, 2024 14:39
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.

2 participants