Skip to content

Conversation

@lrazovic
Copy link
Member

@lrazovic lrazovic commented May 8, 2025

This pull request refactors the evaluation logic in the funding pallet, transitioning from using USD-based calculations to PLMC-based calculations in the evaluation round. The changes streamline the handling of evaluation bonds, improve consistency, and update related tests and utilities to align with the new approach.

Core Refactoring: Transition to PLMC-based Calculations

  • Replaced usd_amount with plmc_bond in the do_evaluate function and related methods, ensuring all evaluation logic now operates using PLMC values. (pallets/funding/src/functions/2_evaluation.rs: [1] [2] [3]
  • Updated the EvaluationParams struct to use plmc_amount instead of usd_amount, reflecting the shift to PLMC-based evaluations. (pallets/funding/src/instantiator/types.rs: pallets/funding/src/instantiator/types.rsL100-R126)

Utility and Helper Updates

Tests and Mock Adjustments

  • Refactored tests to use PLMC values directly instead of USD, ensuring test cases align with the new evaluation logic. (pallets/funding/src/tests/2_evaluation.rs: [1] [2]
  • Removed unused constants like HOURS from the mock configuration to clean up the codebase. (pallets/funding/src/mock.rs: pallets/funding/src/mock.rsL282-L283)

Miscellaneous Improvements

@lrazovic lrazovic changed the base branch from 05-08-feat_macros_update_and_documentation to graphite-base/484 May 9, 2025 15:11
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from a1105c5 to 3fe6433 Compare May 9, 2025 15:11
@lrazovic lrazovic changed the base branch from graphite-base/484 to 05-09-feat_simplify_the_acceptable_assets May 9, 2025 15:11
@lrazovic lrazovic force-pushed the 05-09-feat_simplify_the_acceptable_assets branch from 359ca8a to 15d088b Compare May 9, 2025 15:42
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch 2 times, most recently from 8520fc9 to 27f9807 Compare May 9, 2025 15:44
@lrazovic lrazovic force-pushed the 05-09-feat_simplify_the_acceptable_assets branch from 15d088b to 67962d0 Compare May 9, 2025 15:44
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 27f9807 to fd6baea Compare May 9, 2025 16:52
@lrazovic lrazovic changed the base branch from 05-09-feat_simplify_the_acceptable_assets to graphite-base/484 May 9, 2025 20:20
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from fd6baea to 01f9671 Compare May 9, 2025 20:20
@lrazovic lrazovic changed the base branch from graphite-base/484 to 05-09-chore_remove_useless_clone May 9, 2025 20:20
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 01f9671 to 324253e Compare May 9, 2025 20:33
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch from a514ee5 to 1e5802c Compare May 12, 2025 08:47
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 324253e to 8f88296 Compare May 12, 2025 08:47
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch from 1e5802c to a4afbb3 Compare May 12, 2025 08:49
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch 2 times, most recently from 20c73fc to 67b7d3f Compare May 12, 2025 08:58
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch from a4afbb3 to f6c04d2 Compare May 12, 2025 08:58
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch 2 times, most recently from 33189e7 to 94a27e5 Compare May 12, 2025 09:46
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch from f6c04d2 to 7e9c5ce Compare May 12, 2025 11:36
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch 2 times, most recently from aa724ab to fce9db1 Compare May 12, 2025 11:43
@lrazovic lrazovic marked this pull request as ready for review May 16, 2025 14:44
Copy link
Contributor

@dastansam dastansam left a comment

Choose a reason for hiding this comment

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

looks ok, but no integration tests (?)

@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from fce9db1 to f9cceec Compare May 19, 2025 06:15
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch 2 times, most recently from 8b86a93 to b244067 Compare May 19, 2025 06:48
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from f9cceec to 2ffd8f6 Compare May 19, 2025 06:48
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch from b244067 to e9c508f Compare May 20, 2025 06:21
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 2ffd8f6 to 0c2cd35 Compare May 20, 2025 06:21
@dastansam dastansam force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 0c2cd35 to 8c809b8 Compare May 23, 2025 11:43
@dastansam dastansam force-pushed the 05-09-chore_remove_useless_clone branch from e9c508f to 1e2f49d Compare May 23, 2025 11:43
@dastansam dastansam mentioned this pull request May 23, 2025
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 8c809b8 to 7714174 Compare May 28, 2025 13:35
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch 2 times, most recently from 093bd7c to bda4556 Compare May 28, 2025 13:38
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 7714174 to 909a092 Compare May 28, 2025 13:38
@dastansam dastansam force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 909a092 to ac45b29 Compare July 9, 2025 06:38
@dastansam dastansam force-pushed the 05-09-chore_remove_useless_clone branch from bda4556 to 18ad867 Compare July 9, 2025 06:38
@lrazovic lrazovic force-pushed the 05-09-chore_remove_useless_clone branch from 18ad867 to f6c2185 Compare July 25, 2025 14:19
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from ac45b29 to 5559689 Compare July 25, 2025 14:19
@dastansam dastansam force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 5559689 to ac45b29 Compare July 25, 2025 21:21
@dastansam dastansam force-pushed the 05-09-chore_remove_useless_clone branch from f6c2185 to 18ad867 Compare July 25, 2025 21:21
@lrazovic lrazovic changed the base branch from 05-09-chore_remove_useless_clone to graphite-base/484 August 4, 2025 07:56
@lrazovic lrazovic force-pushed the graphite-base/484 branch from 18ad867 to 25a8367 Compare August 4, 2025 07:59
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from ac45b29 to 7ba84ad Compare August 4, 2025 07:59
@graphite-app graphite-app bot changed the base branch from graphite-base/484 to main August 4, 2025 07:59
@lrazovic lrazovic force-pushed the 05-08-draft_use_plmc_amount_in_evaluation branch from 7ba84ad to 8f206da Compare August 4, 2025 07:59
@lrazovic lrazovic closed this Aug 26, 2025
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