Skip to content

Commit ef84c83

Browse files
authored
Merge pull request #983 from jshufro/jms/v11-update-node-fee
fix adder/fee handling for v11, remove redundant variable
2 parents e7e4cd3 + d37e78f commit ef84c83

File tree

7 files changed

+47
-56
lines changed

7 files changed

+47
-56
lines changed

bindings/settings/protocol/network.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const (
2727
TargetNodeFeeSettingPath string = "network.node.fee.target"
2828
MaximumNodeFeeSettingPath string = "network.node.fee.maximum"
2929
NodeFeeDemandRangeSettingPath string = "network.node.fee.demand.range"
30-
NodeComissionShareSecurityCouncilAdder string = "network.node.commission.share.security.council.adder"
3130
TargetRethCollateralRateSettingPath string = "network.reth.collateral.target"
3231
NetworkPenaltyThresholdSettingPath string = "network.penalty.threshold"
3332
NetworkPenaltyPerRateSettingPath string = "network.penalty.per.rate"

bindings/settings/security/network.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ func EstimateProposeSubmitRewardsEnabledGas(rp *rocketpool.RocketPool, value boo
3333
}
3434

3535
func ProposeNodeComissionShareSecurityCouncilAdder(rp *rocketpool.RocketPool, value *big.Int, opts *bind.TransactOpts) (uint64, common.Hash, error) {
36-
return security.ProposeSetUint(rp, fmt.Sprintf("set %s", psettings.NodeComissionShareSecurityCouncilAdder), networkNamespace, psettings.NodeComissionShareSecurityCouncilAdder, value, opts)
36+
return security.ProposeSetUint(rp, fmt.Sprintf("set %s", psettings.NetworkNodeCommissionShareSecurityCouncilAdderPath), networkNamespace, psettings.NetworkNodeCommissionShareSecurityCouncilAdderPath, value, opts)
3737
}
3838
func EstimateProposeNodeComissionShareSecurityCouncilAdder(rp *rocketpool.RocketPool, value *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error) {
39-
return security.EstimateProposeSetUintGas(rp, fmt.Sprintf("set %s", psettings.NodeComissionShareSecurityCouncilAdder), networkNamespace, psettings.NodeComissionShareSecurityCouncilAdder, value, opts)
39+
return security.EstimateProposeSetUintGas(rp, fmt.Sprintf("set %s", psettings.NetworkNodeCommissionShareSecurityCouncilAdderPath), networkNamespace, psettings.NetworkNodeCommissionShareSecurityCouncilAdderPath, value, opts)
4040
}

rocketpool-cli/security/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) {
385385
{
386386
Name: "node-commission-share-council-adder",
387387
Aliases: []string{"ncsca"},
388-
Usage: fmt.Sprintf("Propose updating the %s setting; %s", protocol.NodeComissionShareSecurityCouncilAdder, percentUsage),
388+
Usage: fmt.Sprintf("Propose updating the %s setting; %s", protocol.NetworkNodeCommissionShareSecurityCouncilAdderPath, percentUsage),
389389
UsageText: "rocketpool security propose setting network node-commission-share-council-adder",
390390
Flags: []cli.Flag{
391391
cli.BoolFlag{

rocketpool-cli/security/propose-settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func proposeSettingNodeAreVacantMinipoolsEnabled(c *cli.Context, value bool) err
8080

8181
func proposeSettingNodeComissionShareSecurityCouncilAdder(c *cli.Context, value *big.Int) error {
8282
trueValue := fmt.Sprint(value)
83-
return proposeSetting(c, protocol.NetworkSettingsContractName, protocol.NodeComissionShareSecurityCouncilAdder, trueValue)
83+
return proposeSetting(c, protocol.NetworkSettingsContractName, protocol.NetworkNodeCommissionShareSecurityCouncilAdderPath, trueValue)
8484
}
8585

8686
// Master general proposal function

rocketpool/api/security/propose-settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func canProposeSetting(c *cli.Context, contractName string, settingName string,
143143
return nil, fmt.Errorf("error estimating gas for proposing SubmitRewardsEnabled: %w", err)
144144
}
145145

146-
case protocol.NodeComissionShareSecurityCouncilAdder:
146+
case protocol.NetworkNodeCommissionShareSecurityCouncilAdderPath:
147147
newValue, err := cliutils.ValidateBigInt(valueName, value)
148148
if err != nil {
149149
return nil, err
@@ -352,7 +352,7 @@ func proposeSetting(c *cli.Context, contractName string, settingName string, val
352352
return nil, fmt.Errorf("error proposing SubmitRewardsEnabled: %w", err)
353353
}
354354

355-
case protocol.NodeComissionShareSecurityCouncilAdder:
355+
case protocol.NetworkNodeCommissionShareSecurityCouncilAdderPath:
356356
newValue, err := cliutils.ValidateBigInt(valueName, value)
357357
if err != nil {
358358
return nil, err

shared/services/rewards/generator-impl-v11.go

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,9 @@ func (r *treeGeneratorImpl_v11) calculateEthRewards(checkBeaconPerformance bool)
578578
details := r.networkState.MegapoolDetails[megapool.Address]
579579
bond := details.GetMegapoolBondNormalized()
580580
nodeFee := r.networkState.NetworkDetails.MegapoolRevenueSplitTimeWeightedAverages.NodeShare
581-
nodeFeeAdder := r.networkState.NetworkDetails.MegapoolRevenueSplitSettings.NodeOperatorCommissionAdder
582581
voterFee := r.networkState.NetworkDetails.MegapoolRevenueSplitTimeWeightedAverages.VoterShare
583582
pdaoFee := r.networkState.NetworkDetails.MegapoolRevenueSplitTimeWeightedAverages.PdaoShare
584583

585-
effectiveNodeFee := big.NewInt(0).Add(nodeFee, nodeFeeAdder)
586-
effectiveVoterFee := big.NewInt(0).Sub(voterFee, nodeFeeAdder)
587-
588584
// The megapool score is given by:
589585
// (bond + effectiveNodeFee*(32-bond)) / 32
590586
// However, when multiplying eth values, we need to normalize the wei to eth
@@ -593,10 +589,10 @@ func (r *treeGeneratorImpl_v11) calculateEthRewards(checkBeaconPerformance bool)
593589
// integer math inaccuracy, and when we divide by 32 it is removed.
594590
//
595591
// (b*1 + 32f - f*b) / 32
596-
megapoolScore := big.NewInt(0).Mul(oneEth, bond) // b*1
597-
megapoolScore.Add(megapoolScore, big.NewInt(0).Mul(thirtyTwoEth, effectiveNodeFee)) // b*1 + 32f
598-
megapoolScore.Sub(megapoolScore, big.NewInt(0).Mul(effectiveNodeFee, bond)) // b*1 + 32f - f*b
599-
megapoolScore.Div(megapoolScore, thirtyTwoEth) // (b*1 + 32f - f*b) / 32
592+
megapoolScore := big.NewInt(0).Mul(oneEth, bond) // b*1
593+
megapoolScore.Add(megapoolScore, big.NewInt(0).Mul(thirtyTwoEth, nodeFee)) // b*1 + 32f
594+
megapoolScore.Sub(megapoolScore, big.NewInt(0).Mul(nodeFee, bond)) // b*1 + 32f - f*b
595+
megapoolScore.Div(megapoolScore, thirtyTwoEth) // (b*1 + 32f - f*b) / 32
600596

601597
// Add it to the megapool's score and the total score
602598
validator.AttestationScore.Add(&validator.AttestationScore.Int, megapoolScore)
@@ -605,8 +601,8 @@ func (r *treeGeneratorImpl_v11) calculateEthRewards(checkBeaconPerformance bool)
605601
// Calculate the voter share
606602
// This is simply (effectiveVoterFee * (32 - bond)) / 32
607603
// Simplify to (32f - f*b) / 32
608-
voterScore := big.NewInt(0).Mul(thirtyTwoEth, effectiveVoterFee)
609-
voterScore.Sub(voterScore, big.NewInt(0).Mul(effectiveVoterFee, bond))
604+
voterScore := big.NewInt(0).Mul(thirtyTwoEth, voterFee)
605+
voterScore.Sub(voterScore, big.NewInt(0).Mul(voterFee, bond))
610606
voterScore.Div(voterScore, thirtyTwoEth)
611607
r.totalVoterScore.Add(r.totalVoterScore, voterScore)
612608

@@ -1283,13 +1279,9 @@ func (r *treeGeneratorImpl_v11) checkAttestations(attestations []beacon.Attestat
12831279
details := r.networkState.MegapoolDetails[megapool.Info.Address]
12841280
bond := details.GetMegapoolBondNormalized()
12851281
nodeFee := r.networkState.NetworkDetails.MegapoolRevenueSplitTimeWeightedAverages.NodeShare
1286-
// The node fee adder is added to nodeFee and deducted from voter fee
1287-
nodeFeeAdder := r.networkState.NetworkDetails.MegapoolRevenueSplitSettings.NodeOperatorCommissionAdder
12881282
voterFee := r.networkState.NetworkDetails.MegapoolRevenueSplitTimeWeightedAverages.VoterShare
12891283
pdaoFee := r.networkState.NetworkDetails.MegapoolRevenueSplitTimeWeightedAverages.PdaoShare
12901284

1291-
effectiveNodeFee := big.NewInt(0).Add(nodeFee, nodeFeeAdder)
1292-
effectiveVoterFee := big.NewInt(0).Sub(voterFee, nodeFeeAdder)
12931285
// The megapool score is given by:
12941286
// (bond + effectiveNodeFee*(32-bond)) / 32
12951287
// However, when multiplying eth values, we need to normalize the wei to eth
@@ -1298,10 +1290,10 @@ func (r *treeGeneratorImpl_v11) checkAttestations(attestations []beacon.Attestat
12981290
// integer math inaccuracy, and when we divide by 32 it is removed.
12991291
//
13001292
// (b*1 + 32f - f*b) / 32
1301-
megapoolScore := big.NewInt(0).Mul(oneEth, bond) // b*1
1302-
megapoolScore.Add(megapoolScore, big.NewInt(0).Mul(thirtyTwoEth, effectiveNodeFee)) // b*1 + 32f
1303-
megapoolScore.Sub(megapoolScore, big.NewInt(0).Mul(effectiveNodeFee, bond)) // b*1 + 32f - f*b
1304-
megapoolScore.Div(megapoolScore, thirtyTwoEth) // (b*1 + 32f - f*b) / 32
1293+
megapoolScore := big.NewInt(0).Mul(oneEth, bond) // b*1
1294+
megapoolScore.Add(megapoolScore, big.NewInt(0).Mul(thirtyTwoEth, nodeFee)) // b*1 + 32f
1295+
megapoolScore.Sub(megapoolScore, big.NewInt(0).Mul(nodeFee, bond)) // b*1 + 32f - f*b
1296+
megapoolScore.Div(megapoolScore, thirtyTwoEth) // (b*1 + 32f - f*b) / 32
13051297

13061298
// Add it to the megapool's score and the total score
13071299
validator.AttestationScore.Add(&validator.AttestationScore.Int, megapoolScore)
@@ -1310,8 +1302,8 @@ func (r *treeGeneratorImpl_v11) checkAttestations(attestations []beacon.Attestat
13101302
// Calculate the voter share
13111303
// This is simply (effectiveVoterFee * (32 - bond)) / 32
13121304
// Simplify to (32f - f*b) / 32
1313-
voterScore := big.NewInt(0).Mul(thirtyTwoEth, effectiveVoterFee)
1314-
voterScore.Sub(voterScore, big.NewInt(0).Mul(effectiveVoterFee, bond))
1305+
voterScore := big.NewInt(0).Mul(thirtyTwoEth, voterFee)
1306+
voterScore.Sub(voterScore, big.NewInt(0).Mul(voterFee, bond))
13151307
voterScore.Div(voterScore, thirtyTwoEth)
13161308
r.totalVoterScore.Add(r.totalVoterScore, voterScore)
13171309

shared/services/rewards/mock_v11_test.go

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
501501
}
502502

503503
// Make sure it got ETH
504-
expectedEthAmount, _ := big.NewInt(0).SetString("858194864048338368", 10)
504+
expectedEthAmount, _ := big.NewInt(0).SetString("813695871097683786", 10)
505505
ethAmount := rewardsFile.GetNodeSmoothingPoolEth(node.Address)
506506
if ethAmount.Cmp(expectedEthAmount) != 0 {
507507
t.Fatalf("ETH amount does not match expected value for node %s: %s != %s", node.Notes, ethAmount.String(), expectedEthAmount.String())
@@ -529,7 +529,7 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
529529
}
530530

531531
// Make sure it got ETH
532-
expectedEthAmount, _ := big.NewInt(0).SetString("3824794394091977170", 10)
532+
expectedEthAmount, _ := big.NewInt(0).SetString("3780295401141322588", 10)
533533
ethAmount := rewardsFile.GetNodeSmoothingPoolEth(node.Address)
534534
if ethAmount.Cmp(expectedEthAmount) != 0 {
535535
t.Fatalf("ETH amount does not match expected value for node %s: %s != %s", node.Notes, ethAmount.String(), expectedEthAmount.String())
@@ -558,7 +558,7 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
558558
}
559559

560560
// Make sure it got ETH
561-
expectedEthAmount, _ := big.NewInt(0).SetString("3873307989258140312", 10)
561+
expectedEthAmount, _ := big.NewInt(0).SetString("3828808996307485730", 10)
562562
ethAmount := rewardsFile.GetNodeSmoothingPoolEth(node.Address)
563563
if ethAmount.Cmp(expectedEthAmount) != 0 {
564564
t.Fatalf("ETH amount does not match expected value for node %s: %s != %s", node.Notes, ethAmount.String(), expectedEthAmount.String())
@@ -602,14 +602,14 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
602602
}
603603

604604
// Make sure it got voter share ETH
605-
exepectedVoterShareEthAmount, _ := big.NewInt(0).SetString("944580815709969788", 10)
605+
expectedVoterShareEthAmount, _ := big.NewInt(0).SetString("966830312185297079", 10)
606606
// Multiply by i+1 since the number of validators scales with i+1
607-
exepectedVoterShareEthAmount.Mul(exepectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
607+
expectedVoterShareEthAmount.Mul(expectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
608608
voterShareEthAmount := rewardsFile.GetNodeVoterShareEth(node.Address)
609-
diff := new(big.Int).Sub(voterShareEthAmount, exepectedVoterShareEthAmount)
609+
diff := new(big.Int).Sub(voterShareEthAmount, expectedVoterShareEthAmount)
610610
diff.Abs(diff)
611611
if diff.Cmp(big.NewInt(1)) > 0 { // allow off by one wei
612-
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), exepectedVoterShareEthAmount.String())
612+
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), expectedVoterShareEthAmount.String())
613613
}
614614
}
615615

@@ -638,12 +638,12 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
638638
}
639639

640640
// Make sure it got voter share ETH
641-
exepectedVoterShareEthAmount, _ := big.NewInt(0).SetString("944580815709969788", 10)
641+
expectedVoterShareEthAmount, _ := big.NewInt(0).SetString("966830312185297079", 10)
642642
// Multiply by i+1 since the number of validators scales with i+1
643-
exepectedVoterShareEthAmount.Mul(exepectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
643+
expectedVoterShareEthAmount.Mul(expectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
644644
voterShareEthAmount := rewardsFile.GetNodeVoterShareEth(node.Address)
645-
if voterShareEthAmount.Cmp(exepectedVoterShareEthAmount) != 0 {
646-
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), exepectedVoterShareEthAmount.String())
645+
if voterShareEthAmount.Cmp(expectedVoterShareEthAmount) != 0 {
646+
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), expectedVoterShareEthAmount.String())
647647
}
648648
}
649649

@@ -675,14 +675,14 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
675675
}
676676

677677
// Make sure it got voter share ETH
678-
exepectedVoterShareEthAmount, _ := big.NewInt(0).SetString("944580815709969788", 10)
678+
expectedVoterShareEthAmount, _ := big.NewInt(0).SetString("966830312185297080", 10)
679679
// Multiply by i+1 since the number of validators scales with i+1
680-
exepectedVoterShareEthAmount.Mul(exepectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
680+
expectedVoterShareEthAmount.Mul(expectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
681681
voterShareEthAmount := rewardsFile.GetNodeVoterShareEth(node.Address)
682-
diff := new(big.Int).Sub(voterShareEthAmount, exepectedVoterShareEthAmount)
682+
diff := new(big.Int).Sub(voterShareEthAmount, expectedVoterShareEthAmount)
683683
diff.Abs(diff)
684684
if diff.Cmp(big.NewInt(1)) > 0 { // allow off by one wei
685-
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), exepectedVoterShareEthAmount.String())
685+
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), expectedVoterShareEthAmount.String())
686686
}
687687
}
688688

@@ -699,7 +699,7 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
699699
}
700700

701701
// Make sure it got ETH
702-
expectedEthAmount, _ := big.NewInt(0).SetString("286064954682779456", 10)
702+
expectedEthAmount, _ := big.NewInt(0).SetString("271231957032561262", 10)
703703
// Multiply by i+1 since the number of validators scales with i+1
704704
expectedEthAmount.Mul(expectedEthAmount, big.NewInt(int64(validatorCount)))
705705
ethAmount := rewardsFile.GetNodeSmoothingPoolEth(node.Address)
@@ -714,14 +714,14 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
714714
}
715715

716716
// Make sure it got voter share ETH
717-
exepectedVoterShareEthAmount, _ := big.NewInt(0).SetString("944580815709969788", 10)
717+
expectedVoterShareEthAmount, _ := big.NewInt(0).SetString("966830312185297079", 10)
718718
// Multiply by i+1 since the number of validators scales with i+1
719-
exepectedVoterShareEthAmount.Mul(exepectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
719+
expectedVoterShareEthAmount.Mul(expectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
720720
voterShareEthAmount := rewardsFile.GetNodeVoterShareEth(node.Address)
721-
diff := new(big.Int).Sub(voterShareEthAmount, exepectedVoterShareEthAmount)
721+
diff := new(big.Int).Sub(voterShareEthAmount, expectedVoterShareEthAmount)
722722
diff.Abs(diff)
723723
if diff.Cmp(big.NewInt(1)) > 0 { // allow off by one wei
724-
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), exepectedVoterShareEthAmount.String())
724+
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), expectedVoterShareEthAmount.String())
725725
}
726726
}
727727

@@ -738,7 +738,7 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
738738
}
739739

740740
// Make sure it got ETH
741-
expectedEthAmount, _ := big.NewInt(0).SetString("3252664484726418258", 10)
741+
expectedEthAmount, _ := big.NewInt(0).SetString("3237831487076200064", 10)
742742
// Multiply by i+1 since the number of validators scales with i+1
743743
expectedEthAmount.Mul(expectedEthAmount, big.NewInt(int64(validatorCount)))
744744
ethAmount := rewardsFile.GetNodeSmoothingPoolEth(node.Address)
@@ -753,7 +753,7 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
753753
}
754754

755755
// Make sure it got voter share ETH
756-
exepectedVoterShareEthAmount, _ := big.NewInt(0).SetString("944580815709969788", 10)
756+
exepectedVoterShareEthAmount, _ := big.NewInt(0).SetString("966830312185297079", 10)
757757
// Multiply by i+1 since the number of validators scales with i+1
758758
exepectedVoterShareEthAmount.Mul(exepectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
759759
voterShareEthAmount := rewardsFile.GetNodeVoterShareEth(node.Address)
@@ -779,7 +779,7 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
779779

780780
// Make sure it got ETH
781781
minipoolEthAmount, _ := big.NewInt(0).SetString("2698353474320241690", 10)
782-
expectedEthAmount, _ := big.NewInt(0).SetString("444444780127559583", 10)
782+
expectedEthAmount, _ := big.NewInt(0).SetString("429611782477341389", 10)
783783
ethAmount := rewardsFile.GetNodeSmoothingPoolEth(node.Address)
784784
// Multiply by i+1 since the number of validators scales with i+1
785785
expectedEthAmount.Mul(expectedEthAmount, big.NewInt(int64(validatorCount)))
@@ -798,26 +798,26 @@ func TestMockIntervalDefaultsTreegenv11(tt *testing.T) {
798798
}
799799

800800
// Make sure it got voter share ETH
801-
exepectedVoterShareEthAmount, _ := big.NewInt(0).SetString("944580815709969789", 10)
801+
expectedVoterShareEthAmount, _ := big.NewInt(0).SetString("966830312185297080", 10)
802802
// Multiply by i+1 since the number of validators scales with i+1
803-
exepectedVoterShareEthAmount.Mul(exepectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
803+
expectedVoterShareEthAmount.Mul(expectedVoterShareEthAmount, big.NewInt(int64(validatorCount)))
804804
voterShareEthAmount := rewardsFile.GetNodeVoterShareEth(node.Address)
805-
diff = new(big.Int).Sub(voterShareEthAmount, exepectedVoterShareEthAmount)
805+
diff = new(big.Int).Sub(voterShareEthAmount, expectedVoterShareEthAmount)
806806
diff.Abs(diff)
807807
if diff.Cmp(big.NewInt(1)) > 0 { // allow off by one wei
808-
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), exepectedVoterShareEthAmount.String())
808+
t.Fatalf("Voter share ETH amount does not match expected value for node %s: %s != %s", node.Notes, voterShareEthAmount.String(), expectedVoterShareEthAmount.String())
809809
}
810810
}
811811
// Validate merkle root
812812
v11MerkleRoot := v11Artifacts.RewardsFile.GetMerkleRoot()
813813

814814
// Expected merkle root:
815-
// 0x45c2300d804f26dd032623948da6696c27ba4c02d3a52c4b44b64c87d68a3ac7
815+
// 0x069f9bc9acc83fe4f809dac3c16534861a0324839293cc003324ce0dc5460cfc
816816
//
817817
// If this does not match, it implies either you updated the set of default mock nodes,
818818
// or you introduced a regression in treegen.
819819
// DO NOT update this value unless you know what you are doing.
820-
expectedMerkleRoot := "0x45c2300d804f26dd032623948da6696c27ba4c02d3a52c4b44b64c87d68a3ac7"
820+
expectedMerkleRoot := "0x069f9bc9acc83fe4f809dac3c16534861a0324839293cc003324ce0dc5460cfc"
821821
if !strings.EqualFold(v11MerkleRoot, expectedMerkleRoot) {
822822
t.Fatalf("Merkle root does not match expected value %s != %s", v11MerkleRoot, expectedMerkleRoot)
823823
} else {

0 commit comments

Comments
 (0)