-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
AdaPot implementation #192
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 tasks
…dded a debug log to output the deregistered stake address query, improving traceability.
Added support for processing transactions without collateral return in UtxoProcessor. Refactored tests to update the handling of spent and unspent UTXOs, including new test cases for scenarios with no collateral return.
Reorganize slot comparison conditions to prioritize `tx_index` over `cert_index` within stake registration queries. This ensures correct ordering and retrieval of stake registration data based on transaction and certificate indices.
Extended the JSON dataset with epochs 496 through 506. This update includes detailed financial data such as treasury, reserves, fees, deposits, and UTXO for each added epoch.
Added instructions to rollback to the last block of an epoch to ensure that stake address balance is calculated correctly. Updated SQL script to truncate and insert into `account_config` table accordingly.
Introduced reward calculation jobs related entities, services, and storage. Updated AdaPotProcessor to handle reward calculation on epoch transition and added SQL migrations for new tables.
…ssing Removed deprecated SQL scripts related to reward calculation jobs. Refactored `RewardCalcJobEntity` to include detailed timing breakdowns and implemented retry logic in `RewardCalcJobManager`. Added `NetworkConfigService` for fetching network-specific configurations and updated to the latest `cf-rewards-calculation` library version.
Introduced a new configuration property to enable or disable address balance processing. The logic for saving address balances and cleaning up history is now conditionally executed based on this property. Updated the AutoConfiguration classes to support this new property.
Introduced rollback handling for reward and instant reward records with rollback events. Enhanced reward storage by integrating DSLContext for batch insertion to improve performance and maintain consistency. Removed unused methods and services to streamline the codebase, and added a new table `reward_calc_jobs` in database schemas.
Refactored AdaPot management with simplification and cleanup of handling deposits, fees, and UTXOs. Removed obsolete methods and fields from AdaPot-related classes and updated SQL schema accordingly.
Introduced a batching mechanism for updating rewards in the `EpochRewardCalculationService` to improve performance. Added new configuration properties and annotations to relevant classes to support this functionality.
Refactor RewardCalcJob related classes to AdaPotJob to generalize job management. Updated domain, storage, and service layers accordingly. Renamed `deposits` field in `AdaPot` to reflect new stake, drep, and proposal deposits.
This commit removes multiple unused or deprecated classes and cleans up the codebase for better maintainability. Removed classes include DelegatorStake, PoolDelegators, PoolStake, RewardAccount, RewardCalculation, SnapshotService, and others. Comments and temporary code were also cleaned up across various files.
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Sotatek-HuyLe3a
approved these changes
Nov 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#101
Capture following balances
Related tasks
reward
table toreward
(for member, leader, refund) andinstant_reward
(other rewards)adapot
table toadapot
(to keep adapot at epoch boundary) andadapot_history
(for real-time data like deposits, utxos etc)getSharedPoolRewardAddressesWithoutReward
methodPreEpochTransitionEvent
when prevEpoch = null