diff --git a/src/modules/submodules/consensus.py b/src/modules/submodules/consensus.py index 093c09798..00ed876bb 100644 --- a/src/modules/submodules/consensus.py +++ b/src/modules/submodules/consensus.py @@ -199,10 +199,8 @@ def get_blockstamp_for_report(self, last_finalized_blockstamp: BlockStamp) -> Re """ latest_blockstamp = self._get_latest_blockstamp() - force_report = variables.FORCE_REPORTING - # Check if contract is currently reportable - if not self.is_contract_reportable(latest_blockstamp) and not force_report: + if not self.is_contract_reportable(latest_blockstamp): logger.info({'msg': 'Contract is not reportable.'}) return None diff --git a/src/providers/execution/contracts/accounting.py b/src/providers/execution/contracts/accounting.py index c22b2714c..bec624296 100644 --- a/src/providers/execution/contracts/accounting.py +++ b/src/providers/execution/contracts/accounting.py @@ -24,6 +24,8 @@ def handle_oracle_report( Updates accounting stats, collects EL rewards and distributes collected rewards if beacon balance increased, performs withdrawal requests finalization periodically called by the AccountingOracle contract + + NB: see `simulate_oracle_report` for simulation details. """ report = ( @@ -61,6 +63,10 @@ def simulate_oracle_report( ) -> CalculatedReportResults: """ Simulates the effects of the `handleOracleReport` function without actually updating the contract state. + + NB: should be calculated off-chain by calling the simulateOracleReport function with the same arguments as the + handleOracleReport function, while keeping `_withdrawalFinalizationBatches` empty ([]) and `_simulatedShareRate` == 0, + plugging the returned values to the following formula: `_simulatedShareRate = (postTotalPooledEther * 1e27) / postTotalShares` """ report = ( diff --git a/src/variables.py b/src/variables.py index 70ed7b205..ec13ae368 100644 --- a/src/variables.py +++ b/src/variables.py @@ -15,8 +15,6 @@ GW3_SECRET_KEY: Final = from_file_or_env('GW3_SECRET_KEY') PINATA_JWT: Final = from_file_or_env('PINATA_JWT') -CHAIN_ID: Final = int(os.getenv('CHAIN_ID', 1)) - # - Account - ACCOUNT = None MEMBER_PRIV_KEY = from_file_or_env('MEMBER_PRIV_KEY') @@ -58,8 +56,6 @@ SUBMIT_DATA_DELAY_IN_SLOTS = 0 CYCLE_SLEEP_IN_SECONDS = 0 -FORCE_REPORTING: Final = os.getenv('FORCE_REPORTING', 'False').lower() == 'true' - # HTTP variables HTTP_REQUEST_TIMEOUT_EXECUTION: Final = int(os.getenv('HTTP_REQUEST_TIMEOUT_EXECUTION', 2 * 60))