@@ -6,34 +6,49 @@ export const PrepareLidoCore = command.cli({
66 vesting : Params . string ( {
77 description : "Vesting LDO amount" ,
88 default : "820000000000000000000000" ,
9- required : false
9+ required : false ,
1010 } ) ,
1111 voteDuration : Params . integer ( {
1212 description : "Voting duration" ,
1313 default : 60 ,
14- required : false
14+ required : false ,
1515 } ) ,
1616 objectionPhaseDuration : Params . integer ( {
1717 description : "Objection phase duration" ,
1818 default : 5 ,
19- required : false
19+ required : false ,
2020 } ) ,
2121 } ,
2222 async handler ( {
2323 dre,
2424 params : { voteDuration, objectionPhaseDuration, vesting } ,
2525 } ) {
2626 const { state, services } = dre ;
27- const { lidoCore } = services ;
27+ const { lidoCore, oracle } = services ;
2828 const { constants } = lidoCore . config ;
2929 const { deployer, secondDeployer } = await state . getNamedWallet ( ) ;
30-
30+
3131 const filePath = constants . NETWORK_STATE_DEFAULTS_FILE ;
3232 const networkStateDefaults = await lidoCore . readJson ( filePath ) ;
3333
34- const { vestingParams, daoInitialSettings } = networkStateDefaults ;
34+ const {
35+ vestingParams,
36+ daoInitialSettings,
37+ oracleDaemonConfig,
38+ hashConsensusForAccountingOracle,
39+ hashConsensusForValidatorsExitBusOracle,
40+ } = networkStateDefaults ;
3541 assert ( vestingParams ?. holders , "Missing vestingParams.holders" ) ;
3642 assert ( daoInitialSettings ?. voting , "Missing daoInitialSettings.voting" ) ;
43+ assert ( oracleDaemonConfig , "Missing oracleDaemonConfig" ) ;
44+ assert (
45+ hashConsensusForAccountingOracle ,
46+ "Missing hashConsensusForAccountingOracle" ,
47+ ) ;
48+ assert (
49+ hashConsensusForValidatorsExitBusOracle ,
50+ "Missing hashConsensusForValidatorsExitBusOracle" ,
51+ ) ;
3752
3853 Object . assign ( vestingParams . holders , {
3954 [ deployer . publicKey ] : vesting ,
@@ -45,6 +60,39 @@ export const PrepareLidoCore = command.cli({
4560 objectionPhaseDuration,
4661 } ) ;
4762
63+ Object . assign ( oracleDaemonConfig , {
64+ deployParameters : {
65+ NORMALIZED_CL_REWARD_PER_EPOCH : 64 ,
66+ NORMALIZED_CL_REWARD_MISTAKE_RATE_BP : 1000 ,
67+ REBASE_CHECK_NEAREST_EPOCH_DISTANCE : 1 ,
68+ REBASE_CHECK_DISTANT_EPOCH_DISTANCE : 2 ,
69+ VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS : 7200 ,
70+ VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS : 28_800 ,
71+ NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP : 100 ,
72+ PREDICTION_DURATION_IN_SLOTS : 50_400 ,
73+ FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT : 1350 ,
74+ } ,
75+ } ) ;
76+
77+ const {
78+ HASH_CONSENSUS_AO_EPOCHS_PER_FRAME ,
79+ HASH_CONSENSUS_VEBO_EPOCHS_PER_FRAME ,
80+ } = oracle . config . constants ;
81+
82+ Object . assign ( hashConsensusForAccountingOracle , {
83+ deployParameters : {
84+ fastLaneLengthSlots : 10 ,
85+ epochsPerFrame : HASH_CONSENSUS_AO_EPOCHS_PER_FRAME ,
86+ } ,
87+ } ) ;
88+
89+ Object . assign ( hashConsensusForValidatorsExitBusOracle , {
90+ deployParameters : {
91+ fastLaneLengthSlots : 10 ,
92+ epochsPerFrame : HASH_CONSENSUS_VEBO_EPOCHS_PER_FRAME ,
93+ } ,
94+ } ) ;
95+
4896 await lidoCore . writeJson ( filePath , networkStateDefaults , true ) ;
4997 } ,
5098} ) ;
0 commit comments