Skip to content

Commit

Permalink
changed all constants to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddy J committed Nov 20, 2023
1 parent 94c68a0 commit f79513a
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 73 deletions.
Binary file modified ProofGeneration
Binary file not shown.
70 changes: 35 additions & 35 deletions beacon_constants.go
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
package main

var VALIDATOR_REGISTRY_LIMIT = uint64(1099511627776)
var SLOTS_PER_HISTORICAL_ROOT = uint64(8192)
var validatorRegistryLimit = uint64(1099511627776)
var slotsPerHistoricalRoot = uint64(8192)

// Maximum number of withdrawals in an execution payload
var MAX_WITHDRAWALS_PER_PAYLOAD = uint64(16)
var maxWithdrawalsPerPayload = uint64(16)

// **************Indexes of relevant containers**************
var BLOCK_ROOTS_INDEX = uint64(5)
var blockRootsIndex = uint64(5)

// Index of the historical summaries in the beacon state
var HISTORICAL_SUMMARY_INDEX = uint64(27)
var historicalSummaryIndex = uint64(27)

// Index of validator list in beacon state
var VALIDATOR_LIST_INDEX = uint64(11)
var BALANCE_LIST_INDEX = uint64(12)
var validatorListIndex = uint64(11)
var balanceListIndex = uint64(12)

var BEACON_STATE_SLOT_INDEX = uint64(2)
var beaconStateSlotIndex = uint64(2)

var LATEST_BLOCK_HEADER_INDEX = uint64(4)
var latestBlockHeaderIndex = uint64(4)

// Index of the beacon body root inside the beacon body header
var BEACON_BLOCK_BODY_ROOT_INDEX = uint64(4)
var beaconBlockBodyRootIndex = uint64(4)

// Index of the execution payload in the BeaconBlockBody container
var EXECUTION_PAYLOAD_INDEX = uint64(9)
var executionPayloadIndex = uint64(9)

// Index of the block number inside the execution payload
var BLOCK_NUMBER_INDEX = uint64(6)
var blockNumberIndex = uint64(6)

// Index of the timestamp inside the execution payload
var TIMESTAMP_INDEX = uint64(9)
var timestampIndex = uint64(9)

// Index of the withdrawals inside the execution payload
var WITHDRAWALS_INDEX = uint64(14)
var withdrawalsIndex = uint64(14)

// Index of the slot in the beacon block header
var SLOT_INDEX = uint64(0)
var STATE_ROOT_INDEX = uint64(3)
var slotIndex = uint64(0)
var stateRootIndex = uint64(3)

var VALIDATORS_INDEX = uint64(11)
var validatorsIndex = uint64(11)

var WITHDRAWAL_CREDENTIALS_INDEX = uint64(1)
var withdrawalCredentialsIndex = uint64(1)

// in the historical summary coontainer, the block root summary is at index 0
var BLOCK_SUMMARY_ROOT_INDEX = uint64(0)
// in the historical summary container, the block root summary is at index 0
var blockSummaryRootIndex = uint64(0)

//
//
Expand All @@ -53,36 +53,36 @@ var BLOCK_SUMMARY_ROOT_INDEX = uint64(0)
//

// Number of layers for various merkle subtrees
var BLOCK_HEADER_MERKLE_SUBTREE_NUM_LAYERS = uint64(3)
var blockHeaderMerkleSubtreeNumLayers = uint64(3)

var BLOCK_BODY_MERKLE_SUBTREE_NUM_LAYERS = uint64(4)
var blockBodyMerkleSubtreeNumLayers = uint64(4)

// Number of layers for the merkelization of the Execution Payload
var EXECUTION_PAYLOAD_MERKLE_SUBTREE_NUM_LAYERS = uint64(4)
var executionPayloadMerkleSubtreeNumLayers = uint64(4)

// Number of layers for the merkleization of the Validator container
var VALIDATOR_MERKLE_SUBTREE_NUM_LAYERS = uint64(3)
var validatorMerkleSubtreeNumLayers = uint64(3)

// Number of layers for the merkleixation of the Validator List in the Beacon State
var VALIDATOR_LIST_MERKLE_SUBTREE_NUM_LAYERS = uint64(40)
var validatorListMerkleSubtreeNumLayers = uint64(40)

// Number of layers for the merkleixation of the Historical Summary List in the Beacon State
var HISTORICAL_SUMMARY_LIST_MERKLE_SUBTREE_NUM_LAYERS = uint64(24)
var historicalSummaryListMerkleSubtreeNumLayers = uint64(24)

// Number of layers for the merkleixation of the Balance List in the Beacon State
var BALANCE_LIST_MERKLE_SUBTREE_NUM_LAYERS = uint64(40)
var balanceListMerkleSubtreeNumLayers = uint64(40)

// Number of layers for the merkleization of the Withdrawal List in the Exection Payload
var WITHDRAWAL_LIST_MERKLE_SUBTREE_NUM_LAYERS = uint64(4)
// Number of layers for the merkleization of the Withdrawal List in the Execution Payload
var withdrawalListMerkleSubtreeNumLayers = uint64(4)

// Number of layers for the merkleization of the Beacon State
var BEACON_STATE_MERKLE_SUBTREE_NUM_LAYERS = uint64(5)
var beaconStateMerkleSubtreeNumLayers = uint64(5)

// Number of layers for the merkleization of the Block Roots in the Beacon State
var BLOCK_ROOTS_MERKLE_SUBTREE_NUM_LAYERS = uint64(13)
var blockRootsMerkleSubtreeNumLayers = uint64(13)

// **************Number of fields of various containers**************
var BEACON_STATE_NUM_FIELDS = uint64(28)
var BEACON_BLOCK_HEADER_NUM_FIELDS = uint64(5)
var BEACON_BLOCK_BODY_NUM_FIELDS = uint64(11)
var EXECUTION_PAYLOAD_NUM_FIELDS = uint64(15)
var beaconStateNumFields = uint64(28)
var beaconBlockHeaderNumFields = uint64(5)
var beaconBlockBodyNumFields = uint64(11)
var executionPayloadNumFields = uint64(15)
2 changes: 1 addition & 1 deletion eigen_pod_proofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (epp *EigenPodProofs) ComputeValidatorTree(slot uint64, validators []*phase
}

// compute the validator tree
validatorTree, err := ComputeMerkleTreeFromLeaves(validatorLeaves, VALIDATOR_LIST_MERKLE_SUBTREE_NUM_LAYERS)
validatorTree, err := ComputeMerkleTreeFromLeaves(validatorLeaves, validatorListMerkleSubtreeNumLayers)
if err != nil {
return nil, err
}
Expand Down
30 changes: 15 additions & 15 deletions merkle_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func setupSuite() {

executionPayload = *block.Body.ExecutionPayload

blockHeaderIndex = uint64(blockHeader.Slot) % SLOTS_PER_HISTORICAL_ROOT
blockHeaderIndex = uint64(blockHeader.Slot) % slotsPerHistoricalRoot

epp, err = NewEigenPodProofs(GOERLI_CHAIN_ID, 1000)
if err != nil {
Expand Down Expand Up @@ -119,7 +119,7 @@ func TestGenerateWithdrawalCredentialsProof(t *testing.T) {
fmt.Println("error with hash tree root of beacon state")
}

index := VALIDATOR_LIST_INDEX<<(VALIDATOR_LIST_MERKLE_SUBTREE_NUM_LAYERS+1) | uint64(validatorIndex)
index := validatorListIndex<<(validatorListMerkleSubtreeNumLayers+1) | uint64(validatorIndex)

flag := ValidateProof(root, proof, leaf, index)
if flag != true {
Expand Down Expand Up @@ -163,7 +163,7 @@ func TestProveBeaconTopLevelRootAgainstBeaconState(t *testing.T) {
}

// compute the Merkle proof for the inclusion of Validators Root as a leaf
validatorsRootProof, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, VALIDATOR_LIST_INDEX)
validatorsRootProof, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, validatorListIndex)
if err != nil {
fmt.Println("error")
}
Expand All @@ -177,7 +177,7 @@ func TestProveBeaconTopLevelRootAgainstBeaconState(t *testing.T) {
// validation of the proof
// get the leaf denoting the validatorsRoot in the BeaconStateRoot Merkle tree
leaf := beaconStateTopLevelRoots.ValidatorsRoot
flag := ValidateProof(beaconStateRoot, validatorsRootProof, *leaf, VALIDATOR_LIST_INDEX)
flag := ValidateProof(beaconStateRoot, validatorsRootProof, *leaf, validatorListIndex)
if flag != true {
fmt.Println("error")
}
Expand Down Expand Up @@ -252,9 +252,9 @@ func TestGetHistoricalSummariesBlockRootsProofProof(t *testing.T) {

currentBeaconStateRoot, _ := currentBeaconState.HashTreeRoot()

historicalBlockHeaderIndex := HISTORICAL_SUMMARY_INDEX<<((HISTORICAL_SUMMARY_LIST_MERKLE_SUBTREE_NUM_LAYERS+1)+1+(BLOCK_ROOTS_MERKLE_SUBTREE_NUM_LAYERS)) |
historicalSummaryIndex<<(1+BLOCK_ROOTS_MERKLE_SUBTREE_NUM_LAYERS) |
BLOCK_SUMMARY_ROOT_INDEX<<(BLOCK_ROOTS_MERKLE_SUBTREE_NUM_LAYERS) | beaconBlockHeaderToVerifyIndex
historicalBlockHeaderIndex := historicalSummaryIndex<<((historicalSummaryListMerkleSubtreeNumLayers+1)+1+(blockRootsMerkleSubtreeNumLayers)) |
historicalSummaryIndex<<(1+blockRootsMerkleSubtreeNumLayers) |
blockSummaryRootIndex<<(blockRootsMerkleSubtreeNumLayers) | beaconBlockHeaderToVerifyIndex

flag := ValidateProof(currentBeaconStateRoot, historicalSummaryBlockHeaderProof, beaconBlockHeaderToVerify, historicalBlockHeaderIndex)
if flag != true {
Expand Down Expand Up @@ -324,7 +324,7 @@ func TestComputeBlockSlotProof(t *testing.T) {
}

// calling the proof verification function
flag := ValidateProof(beaconBlockHeaderRoot, blockHeaderSlotProof, slotHashRoot, SLOT_INDEX)
flag := ValidateProof(beaconBlockHeaderRoot, blockHeaderSlotProof, slotHashRoot, slotIndex)
if flag != true {
fmt.Println("error")
}
Expand Down Expand Up @@ -354,7 +354,7 @@ func TestProveBlockBodyAgainstBlockHeader(t *testing.T) {
}

// calling the proof verification function
flag := ValidateProof(beaconBlockHeaderRoot, blockHeaderBlockBodyProof, blockBodyHashRoot, BEACON_BLOCK_BODY_ROOT_INDEX)
flag := ValidateProof(beaconBlockHeaderRoot, blockHeaderBlockBodyProof, blockBodyHashRoot, beaconBlockBodyRootIndex)
if flag != true {
fmt.Println("error")
}
Expand Down Expand Up @@ -387,7 +387,7 @@ func TestComputeExecutionPayloadHeader(t *testing.T) {
blockHeaderBodyRoot := blockHeader.BodyRoot

// calling the proof verification function
flag := ValidateProof(blockHeaderBodyRoot, beaconBlockBodyProof, executionPayloadHashRoot, EXECUTION_PAYLOAD_INDEX)
flag := ValidateProof(blockHeaderBodyRoot, beaconBlockBodyProof, executionPayloadHashRoot, executionPayloadIndex)
if flag != true {
fmt.Println("error")
}
Expand Down Expand Up @@ -459,7 +459,7 @@ func TestGetExecutionPayloadProof(t *testing.T) {
// get the body root in the beacon block header - will be used as the Merkle root
root, _ := blockHeader.HashTreeRoot()

index := BEACON_BLOCK_BODY_ROOT_INDEX<<(BLOCK_BODY_MERKLE_SUBTREE_NUM_LAYERS) | EXECUTION_PAYLOAD_INDEX
index := beaconBlockBodyRootIndex<<(blockBodyMerkleSubtreeNumLayers) | executionPayloadIndex

// calling the proof verification function
flag := ValidateProof(root, exectionPayloadProof, executionPayloadHashRoot, index)
Expand Down Expand Up @@ -504,7 +504,7 @@ func TestComputeWithdrawalsListProof(t *testing.T) {
}
copy(executionPayloadHashRoot[:], hh.Hash())
}
flag := ValidateProof(executionPayloadHashRoot, withdrawalsListProof, withdrawalsHashRoot, WITHDRAWALS_INDEX)
flag := ValidateProof(executionPayloadHashRoot, withdrawalsListProof, withdrawalsHashRoot, withdrawalsIndex)
if flag != true {
fmt.Println("error")
}
Expand Down Expand Up @@ -577,7 +577,7 @@ func TestGetWithdrawalProof(t *testing.T) {
}
// withdrawalIndex = BEACON_BLOCK_BODY_ROOT_INDEX<<( BLOCK_BODY_MERKLE_SUBTREE_NUM_LAYERS+ EXECUTION_PAYLOAD_MERKLE_SUBTREE_NUM_LAYERS+( WITHDRAWAL_LIST_MERKLE_SUBTREE_NUM_LAYERS+1)) | EXECUTION_PAYLOAD_INDEX<<( EXECUTION_PAYLOAD_MERKLE_SUBTREE_NUM_LAYERS+( WITHDRAWAL_LIST_MERKLE_SUBTREE_NUM_LAYERS+1)) | WITHDRAWALS_INDEX<<( WITHDRAWAL_LIST_MERKLE_SUBTREE_NUM_LAYERS+1) | withdrawalIndex

withdrawalRelativeToELPayloadIndex := WITHDRAWALS_INDEX<<(WITHDRAWAL_LIST_MERKLE_SUBTREE_NUM_LAYERS+1) | uint64(withdrawalIndex)
withdrawalRelativeToELPayloadIndex := withdrawalsIndex<<(withdrawalListMerkleSubtreeNumLayers+1) | uint64(withdrawalIndex)

// calling the proof verification func
flag := ValidateProof(executionPayloadRoot, withdrawalProof, leaf, withdrawalRelativeToELPayloadIndex)
Expand Down Expand Up @@ -609,7 +609,7 @@ func TestGetTimestampProof(t *testing.T) {
}

// calling the proof verification func
flag := ValidateProof(root, timestampProof, leaf, TIMESTAMP_INDEX)
flag := ValidateProof(root, timestampProof, leaf, timestampIndex)
if flag != true {
fmt.Println("proof failed")
}
Expand Down Expand Up @@ -638,7 +638,7 @@ func TestGetValidatorProof(t *testing.T) {
// calling the proof verification func
beaconRoot, _ := b.HashTreeRoot()

validatorIndex = VALIDATOR_LIST_INDEX<<(VALIDATOR_LIST_MERKLE_SUBTREE_NUM_LAYERS+1) | uint64(validatorIndex)
validatorIndex = validatorIndex<<(validatorListMerkleSubtreeNumLayers+1) | uint64(validatorIndex)

flag := ValidateProof(beaconRoot, validatorProof, leaf, validatorIndex)
if flag != true {
Expand Down
26 changes: 13 additions & 13 deletions proofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type BeaconStateTopLevelRoots struct {

func ProveBlockRootAgainstBeaconStateViaHistoricalSummaries(beaconStateTopLevelRoots *BeaconStateTopLevelRoots, historicalSummaries []*capella.HistoricalSummary, historicalBlockRoots []phase0.Root, historicalSummaryIndex uint64, blockRootIndex uint64) ([][32]byte, error) {
// prove the historical summaries against the beacon state
historicalSummariesListAgainstBeaconState, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, HISTORICAL_SUMMARY_INDEX)
historicalSummariesListAgainstBeaconState, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, historicalSummaryIndex)

if err != nil {
return nil, err
Expand Down Expand Up @@ -122,7 +122,7 @@ func ProveWithdrawalAgainstExecutionPayload(
}

func ProveBlockRootAgainstBlockRootsList(blockRoots []phase0.Root, blockRootIndex uint64) (Proof, error) {
proof, err := GetProof(blockRoots, blockRootIndex, BLOCK_ROOTS_MERKLE_SUBTREE_NUM_LAYERS)
proof, err := GetProof(blockRoots, blockRootIndex, blockRootsMerkleSubtreeNumLayers)
if err != nil {
return nil, err
}
Expand All @@ -143,7 +143,7 @@ func ProveBeaconTopLevelRootAgainstBeaconState(beaconTopLevelRoots *BeaconStateT
roots[i] = v.(phase0.Root)
}

return GetProof(roots, index, BEACON_STATE_MERKLE_SUBTREE_NUM_LAYERS)
return GetProof(roots, index, beaconStateMerkleSubtreeNumLayers)
}

func ProveWithdrawalAgainstWithdrawalList(withdrawals []*capella.Withdrawal, withdrawalIndex uint8) (Proof, error) {
Expand All @@ -156,7 +156,7 @@ func ProveWithdrawalAgainstWithdrawalList(withdrawals []*capella.Withdrawal, wit
withdrawalNodeList[i] = phase0.Root(withdrawalRoot)
}

proof, err := GetProof(withdrawalNodeList, uint64(withdrawalIndex), WITHDRAWAL_LIST_MERKLE_SUBTREE_NUM_LAYERS)
proof, err := GetProof(withdrawalNodeList, uint64(withdrawalIndex), withdrawalListMerkleSubtreeNumLayers)
if err != nil {
return nil, err
}
Expand All @@ -179,7 +179,7 @@ func ProveHistoricalSummaryAgainstHistoricalSummariesList(historicalSummaries []
historicalSummaryNodeList[i] = phase0.Root(historicalSummaryRoot)
}

proof, err := GetProof(historicalSummaryNodeList, historicalSummaryIndex, HISTORICAL_SUMMARY_LIST_MERKLE_SUBTREE_NUM_LAYERS)
proof, err := GetProof(historicalSummaryNodeList, historicalSummaryIndex, historicalSummaryListMerkleSubtreeNumLayers)

if err != nil {
return nil, err
Expand Down Expand Up @@ -273,7 +273,7 @@ func ProveSlotAgainstBlockHeader(blockHeader *phase0.BeaconBlockHeader) (Proof,
return nil, err
}

return GetProof(blockHeaderContainerRoots, SLOT_INDEX, BLOCK_HEADER_MERKLE_SUBTREE_NUM_LAYERS)
return GetProof(blockHeaderContainerRoots, slotIndex, blockHeaderMerkleSubtreeNumLayers)
}

func ProveBlockBodyAgainstBlockHeader(blockHeader *phase0.BeaconBlockHeader) (Proof, error) {
Expand All @@ -283,7 +283,7 @@ func ProveBlockBodyAgainstBlockHeader(blockHeader *phase0.BeaconBlockHeader) (Pr
return nil, err
}

return GetProof(blockHeaderContainerRoots, BEACON_BLOCK_BODY_ROOT_INDEX, BLOCK_HEADER_MERKLE_SUBTREE_NUM_LAYERS)
return GetProof(blockHeaderContainerRoots, beaconBlockBodyRootIndex, blockHeaderMerkleSubtreeNumLayers)
}

func ProveWithdrawalListAgainstExecutionPayload(executionPayloadFields *capella.ExecutionPayload) (Proof, error) {
Expand All @@ -293,7 +293,7 @@ func ProveWithdrawalListAgainstExecutionPayload(executionPayloadFields *capella.
return nil, err
}

return GetProof(executionPayloadFieldRoots, WITHDRAWALS_INDEX, EXECUTION_PAYLOAD_MERKLE_SUBTREE_NUM_LAYERS)
return GetProof(executionPayloadFieldRoots, withdrawalsIndex, executionPayloadMerkleSubtreeNumLayers)
}

func ProveTimestampAgainstExecutionPayload(executionPayloadFields *capella.ExecutionPayload) (Proof, error) {
Expand All @@ -302,7 +302,7 @@ func ProveTimestampAgainstExecutionPayload(executionPayloadFields *capella.Execu
return nil, err
}

return GetProof(executionPayloadFieldRoots, TIMESTAMP_INDEX, EXECUTION_PAYLOAD_MERKLE_SUBTREE_NUM_LAYERS)
return GetProof(executionPayloadFieldRoots, timestampIndex, executionPayloadMerkleSubtreeNumLayers)
}

// Refer to beaconblockbody.go in go-eth2-client
Expand Down Expand Up @@ -454,9 +454,9 @@ func ProveExecutionPayloadAgainstBlockBody(beaconBlockBody *capella.BeaconBlockB
hh.Reset()
}

proof, err := GetProof(beaconBlockBodyContainerRoots, EXECUTION_PAYLOAD_INDEX, BLOCK_BODY_MERKLE_SUBTREE_NUM_LAYERS)
proof, err := GetProof(beaconBlockBodyContainerRoots, executionPayloadIndex, blockBodyMerkleSubtreeNumLayers)

return proof, beaconBlockBodyContainerRoots[EXECUTION_PAYLOAD_INDEX], err
return proof, beaconBlockBodyContainerRoots[executionPayloadIndex], err
}

// refer to this: https://github.com/attestantio/go-eth2-client/blob/654ac05b4c534d96562329f988655e49e5743ff5/spec/phase0/beaconblockheader_encoding.go
Expand Down Expand Up @@ -490,7 +490,7 @@ func ProveStateRootAgainstBlockHeader(b *phase0.BeaconBlockHeader) (Proof, error
copy(beaconBlockHeaderContainerRoots[4][:], hh.Hash())
hh.Reset()

return GetProof(beaconBlockHeaderContainerRoots, STATE_ROOT_INDEX, BLOCK_HEADER_MERKLE_SUBTREE_NUM_LAYERS)
return GetProof(beaconBlockHeaderContainerRoots, stateRootIndex, blockHeaderMerkleSubtreeNumLayers)
}

// taken from https://github.com/attestantio/go-eth2-client/blob/654ac05b4c534d96562329f988655e49e5743ff5/spec/capella/beaconstate_ssz.go#L639
Expand Down Expand Up @@ -1031,7 +1031,7 @@ func GetExecutionPayloadFieldRoots(executionPayloadFields *capella.ExecutionPayl
}

func GetBlockHeaderFieldRoots(blockHeader *phase0.BeaconBlockHeader) ([]phase0.Root, error) {
blockHeaderContainerRoots := make([]phase0.Root, BEACON_BLOCK_HEADER_NUM_FIELDS)
blockHeaderContainerRoots := make([]phase0.Root, beaconBlockHeaderNumFields)

hh := ssz.NewHasher()

Expand Down
6 changes: 3 additions & 3 deletions prove_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (epp *EigenPodProofs) ProveValidatorBalanceAgainstBalanceRoot(oracleBeaconS
}

// prove the validator balance list root against the beacon state
beaconStateProof, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, BALANCE_LIST_INDEX)
beaconStateProof, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, balanceListIndex)
if err != nil {
return nil, err
}
Expand All @@ -159,7 +159,7 @@ func (epp *EigenPodProofs) ProveValidatorBalanceAgainstBalanceRoot(oracleBeaconS

func (epp *EigenPodProofs) ProveValidatorAgainstBeaconState(oracleBeaconState *capella.BeaconState, beaconStateTopLevelRoots *BeaconStateTopLevelRoots, validatorIndex uint64) (Proof, error) {
// prove the validator list against the beacon state
validatorListProof, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, VALIDATOR_LIST_INDEX)
validatorListProof, err := ProveBeaconTopLevelRootAgainstBeaconState(beaconStateTopLevelRoots, validatorListIndex)
if err != nil {
return nil, err
}
Expand All @@ -181,7 +181,7 @@ func (epp *EigenPodProofs) ProveValidatorAgainstValidatorList(slot uint64, valid
return nil, err
}

proof, err := ComputeMerkleProofFromTree(validatorTree, validatorIndex, VALIDATOR_LIST_MERKLE_SUBTREE_NUM_LAYERS)
proof, err := ComputeMerkleProofFromTree(validatorTree, validatorIndex, validatorListMerkleSubtreeNumLayers)
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit f79513a

Please sign in to comment.