Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save color-typea/7c1149bf51ec4a1f77f0aa9f01d57736 to your computer and use it in GitHub Desktop.
Save color-typea/7c1149bf51ec4a1f77f0aa9f01d57736 to your computer and use it in GitHub Desktop.
Oracle startup.
Start healthcheck server for Docker container on port 9010
Start http server with prometheus metrics on port 9000
Initialize multi web3 provider.
Initialize FallbackProviderModule
Modify web3 with custom contract function call.
Initialize consensus client.
Initialize keys api client.
Add metrics middleware for ETH1 requests.
Sanity checks.
Initialize Accounting module.
Fetch chain config.: ChainConfig(slots_per_epoch=32, seconds_per_slot=12, genesis_time=1606824023)
Fetch last finalized BlockStamp.: {'state_root': '0x442cc1bfd1774967992fbcfeff744da495e153199e577639a4c772a7c0c27d6a', 'slot_number': 7027200, 'block_hash': '0xced76aa868a3ff4d96c1e26d757a7333366427d9f64bf36e1cdff4dcb02af747', 'block_number': 17841481, 'block_timestamp': 1691150423}
Execute module.: BlockStamp(state_root='0x442cc1bfd1774967992fbcfeff744da495e153199e577639a4c772a7c0c27d6a', slot_number=7027200, block_hash='0xced76aa868a3ff4d96c1e26d757a7333366427d9f64bf36e1cdff4dcb02af747', block_number=17841481, block_timestamp=1691150423)
Fetch chain config.: ChainConfig(slots_per_epoch=32, seconds_per_slot=12, genesis_time=1606824023)
Fetch frame config.: FrameConfig(initial_epoch=201600, epochs_per_frame=225, fast_lane_length_slots=100)
Fetch current frame.: CurrentFrame(ref_slot=7027199, report_processing_deadline_slot=7034399)
Get Blockstamp for ref slot: 7027199.
Calculate blockstamp for report.: ReferenceBlockStamp(state_root='0xbe99fc19cac3e9a8b04d769637370e5ca9e20692e3ecbb6e98e26531df0fa380', slot_number=7027199, block_hash='0xa24282240e5f03c30734c349d1cea5fe62faf9520f750d729690e0974d5e3998', block_number=17841480, block_timestamp=1691150411, ref_slot=7027199, ref_epoch=219599)
Fetch staking modules.: [ABIDecodedNamedTuple(id=1, stakingModuleAddress='0x55032650b14df07b85bF18A3a3eC8E0Af2e028d5', stakingModuleFee=500, treasuryFee=500, targetShare=10000, status=0, name='curated-onchain-v1', lastDepositAt=1690944839, lastDepositBlock=17824457, exitedValidatorsCount=1870)]
Calculate consensus lido state.: (250245, 7954637661006895)
Fetch chain config.: ChainConfig(slots_per_epoch=32, seconds_per_slot=12, genesis_time=1606824023)
Fetch exit events. Got 479 events.
Calculate stuck validators.: {}
Fetch new lido exited validators by node operator.: {(1, 12): 2082}
Calculate exited validators.: {(1, 12): 2082}
Fetch oracle sanity checks.: OracleReportLimits(churn_validators_per_day_limit=20000, one_off_cl_balance_decrease_bp_limit=500, annual_balance_increase_bp_limit=1000, simulated_share_rate_deviation_bp_limit=50, max_validator_exit_requests_per_report=600, max_accounting_extra_data_list_items_count=2, max_node_operators_per_extra_data_item_count=100, request_timestamp_margin=7680, max_positive_token_rebase=750000)
Calculate extra data.: ExtraData(extra_data=b'\x00\x00\x00\x00\x02\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08"', data_hash=HexBytes('0xaca61b5b5b39cdd823b8f243aacbe20cc133b567ccf9baf5f0f859c0dd63bc68'), format=1, items_count=1)
Fetch frame config.: FrameConfig(initial_epoch=201600, epochs_per_frame=225, fast_lane_length_slots=100)
Accounting last processing ref slot 7019999
Simulate lido rebase for report.: (1691150411, 86400, 250245, 7954637661006895000000000, 334398035798000000000, 249557968347061469946, 0, [], 0)
Fetch simulated lido rebase for report.: [7963061589793416309617837, 7017923308414534651964568, 334398035798000000000, 249557968347061469946]
Simulate lido rebase for report.: (1691150411, 86400, 250245, 7954637661006895000000000, 334398035798000000000, 0, 0, [], 0)
Fetch simulated lido rebase for report.: [7962812031825069248147891, 7017901316317165012235054, 334398035798000000000, 0]
Checking bunker mode
Getting CL rebase for frame
Simulated CL rebase for frame: 679076029203 Gwei
Detecting high midterm slashing penalty
All slashings with impact on midterm penalties: 9
Checking abnormal CL rebase
Get Blockstamp for ref slot: 7019999.
Normal CL rebase: 694613962314 Gwei
Calculate bunker mode.: False
Calculate shares rate.: 1134674923028248948101414453
Calculate last withdrawal id to finalize.: [5944]
Calculate report for accounting module.: ReportData(consensus_version=1, ref_slot=7027199, validators_count=250245, cl_balance_gwei=7954637661006895, staking_module_ids_with_exited_validators=[1], count_exited_validators_by_staking_module=[2218], withdrawal_vault_balance=334398035798000000000, el_rewards_vault_balance=249557968347061469946, shares_requested_to_burn=0, withdrawal_finalization_batches=[5944], finalization_share_rate=1134674923028248948101414453, is_bunker=False, extra_data_format=1, extra_data_hash=HexBytes('0xaca61b5b5b39cdd823b8f243aacbe20cc133b567ccf9baf5f0f859c0dd63bc68'), extra_data_items_count=1)
Build report.: (1, 7027199, 250245, 7954637661006895, [1], [2218], 334398035798000000000, 249557968347061469946, 0, [5944], 1134674923028248948101414453, False, 1, HexBytes('0xaca61b5b5b39cdd823b8f243aacbe20cc133b567ccf9baf5f0f859c0dd63bc68'), 1)
Calculate report hash.: b'cc\xe1N\xa8T\xec\x92\xadR\xedF\xd2\xaax\xee\x8d\xcf]\x1daGgi\xc6g\xc6A\xd7KS\xc4'
Fetch current frame.: CurrentFrame(ref_slot=7027199, report_processing_deadline_slot=7034399)
Fetch frame config.: FrameConfig(initial_epoch=201600, epochs_per_frame=225, fast_lane_length_slots=100)
Send report hash. Consensus version: [1]
No account provided to submit extra data. Dry mode
Quorum is not ready.
Fetch processing state.: AccountingProcessingState(current_frame_ref_slot=7027199, processing_deadline_time=0, main_data_hash=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', main_data_submitted=False, extra_data_hash=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', extra_data_format=0, extra_data_submitted=False, extra_data_items_count=0, extra_data_items_submitted=0)
Extra data can not be submitted.
Cycle end. Sleep for 0 seconds.
ZK-oracle:
slot=7027199, epoch=219599,
allLidoValidators=250245, exitedLidoValidators=2218,
clBalance=7954637661006895 Gwei
Accounting module:
ref_slot=7027199,
validators_count=250245, count_exited_validators_by_staking_module=[2218]
cl_balance_gwei=7954637661006895
7954637661006895
7954637661006895
Reading Beacon chain slot pointers (latest, finalized and justified)
This operation is part of the script setup, and will not happen in actual oracle operations
Head: 7027205, finalized: 7027136, frameRefSlot: 7027199
Reading Beacon chain pointers took 3.8104s
Pulling Beacon State
This operation is part of the script setup, and will not happen in actual oracle operations
Pulling Beacon chain state into the script took 0.0775s
Parsing Beacon State
This operation is part of the script setup, and will not happen in actual oracle operations
Parsing Beacon state SSZ took 100.3442s
Transaction sent: 0x3e9ca3f92243b09adb8a8e3f044645bffd5ec533df0a13a2432d617f43bd6856
Gas price: 60.0 gwei Gas limit: 30000000 Nonce: 10
BeaconBlockHashKeeper.setBeaconBlockHash confirmed Block: 12 Gas used: 44139 (0.15%)
======== Step 1 - run oracle, report accepted ========
Running oracle - this should take a some time
Report submitted and accepted, gas used: 4261017, transaction hash: 0xdfe040c467d08675113ec21e13f64b6d6787af7fb35ec607df0274bae9f4acde
Run oracle took 121.4073s
Oracle run successful, report accepted, proof verifies
Checking the report stored in the contract...
Report matches expected
Expected: OracleReport(slot=7027199, epoch=219599, lidoWithdrawalCredentials=01000...7e293f, allLidoValidators=250245, exitedLidoValidators=2218, clBalance=7954637661006895 Gwei)
Actual : OracleReport(slot=7027199, epoch=219599, lidoWithdrawalCredentials=01000...7e293f, allLidoValidators=250245, exitedLidoValidators=2218, clBalance=7954637661006895 Gwei)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment