@@ -14,7 +14,7 @@ import (
1414 "github.com/ethereum/go-ethereum/accounts/abi/bind"
1515 "github.com/ethereum/go-ethereum/common"
1616 "github.com/ethereum/go-ethereum/crypto"
17- ssz "github.com/ferranbt/fastssz "
17+ "github.com/pk910/dynamic-ssz/treeproof "
1818 "github.com/urfave/cli/v3"
1919 "golang.org/x/sync/errgroup"
2020
@@ -165,7 +165,7 @@ func GetWithdrawableEpochProof(c *cli.Command, wallet *wallet.Wallet, eth2Config
165165 return api.ValidatorWithdrawableEpochProof {}, err
166166 }
167167
168- beaconState , err := eth2 .NewBeaconState (beaconStateResponse .Data , beaconStateResponse .Fork )
168+ beaconState , err := eth2 .NewBeaconState (beaconStateResponse .Data , beaconStateResponse .Size , beaconStateResponse . Fork )
169169 if err != nil {
170170 return api.ValidatorWithdrawableEpochProof {}, err
171171 }
@@ -722,7 +722,7 @@ func GetWithdrawalProofForSlot(c *cli.Command, slot uint64, validatorIndex uint6
722722 return megapool.FinalBalanceProof {}, 0 , nil , err
723723 }
724724
725- beaconState , err := eth2 .NewBeaconState (stateResponse .Data , stateResponse .Fork )
725+ beaconState , err := eth2 .NewBeaconState (stateResponse .Data , stateResponse .Size , stateResponse . Fork )
726726 if err != nil {
727727 return megapool.FinalBalanceProof {}, 0 , nil , err
728728 }
@@ -768,7 +768,7 @@ func GetWithdrawalProofForSlot(c *cli.Command, slot uint64, validatorIndex uint6
768768 if err != nil {
769769 return megapool.FinalBalanceProof {}, 0 , nil , err
770770 }
771- blockRootsState , err := eth2 .NewBeaconState (blockRootsStateResponse .Data , blockRootsStateResponse .Fork )
771+ blockRootsState , err := eth2 .NewBeaconState (blockRootsStateResponse .Data , blockRootsStateResponse .Size , blockRootsStateResponse . Fork )
772772 if err != nil {
773773 return megapool.FinalBalanceProof {}, 0 , nil , err
774774 }
@@ -778,8 +778,8 @@ func GetWithdrawalProofForSlot(c *cli.Command, slot uint64, validatorIndex uint6
778778 }
779779
780780 // Get historical summary proof
781- var tree * ssz .Node
782- tree , err = fuluState . GetTree ()
781+ var tree * treeproof .Node
782+ tree , err = generic . SSZ . GetTree (fuluState )
783783 if err != nil {
784784 return megapool.FinalBalanceProof {}, 0 , nil , fmt .Errorf ("could not get state tree: %w" , err )
785785 }
@@ -863,7 +863,7 @@ func FindWithdrawalBlockAndArrayPosition(slot uint64, validatorIndex uint64, bc
863863 }
864864 notFounds = 0
865865
866- beaconBlock , err := eth2 .NewSignedBeaconBlock (blockResponse .Data , blockResponse .Fork )
866+ beaconBlock , err := eth2 .NewSignedBeaconBlock (blockResponse .Data , blockResponse .Size , blockResponse . Fork )
867867 if err != nil {
868868 return 0 , nil , 0 , nil , nil , err
869869 }
0 commit comments