Skip to content

Commit

Permalink
fixed index
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidu28 committed Jan 19, 2024
1 parent 577b4ad commit db912dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion beacon_constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const blockHeaderMerkleSubtreeNumLayers = uint64(3)
const blockBodyMerkleSubtreeNumLayers = uint64(4)

// Number of layers for the merkelization of the Execution Payload
const executionPayloadMerkleSubtreeNumLayers = uint64(4)
const executionPayloadMerkleSubtreeNumLayers = uint64(5)

// Number of layers for the merkleixation of the Validator List in the Beacon State
const validatorListMerkleSubtreeNumLayers = uint64(40)
Expand Down
10 changes: 5 additions & 5 deletions merkle_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ func TestComputeWithdrawalsListProof(t *testing.T) {

withdrawalsListProof, err := ProveWithdrawalListAgainstExecutionPayload(block.Body.ExecutionPayload)
if err != nil {
fmt.Println("error", err)
fmt.Println("error!", err)
}

var withdrawalsHashRoot phase0.Root
Expand All @@ -471,11 +471,11 @@ func TestComputeWithdrawalsListProof(t *testing.T) {
num := uint64(len(block.Body.ExecutionPayload.Withdrawals))
if num > 16 {
err := ssz.ErrIncorrectListSize
fmt.Println("error", err)
fmt.Println("error!", err)
}
for _, elem := range block.Body.ExecutionPayload.Withdrawals {
if err = elem.HashTreeRootWith(hh); err != nil {
fmt.Println("error", err)
fmt.Println("error 4", err)
}
}
hh.MerkleizeWithMixin(subIndx, num, 16)
Expand All @@ -486,13 +486,13 @@ func TestComputeWithdrawalsListProof(t *testing.T) {
var executionPayloadHashRoot phase0.Root
{
if err = block.Body.ExecutionPayload.HashTreeRootWith(hh); err != nil {
fmt.Println("error", err)
fmt.Println("error hel", err)
}
copy(executionPayloadHashRoot[:], hh.Hash())
}
flag := ValidateProof(executionPayloadHashRoot, withdrawalsListProof, withdrawalsHashRoot, withdrawalsIndex)
if flag != true {
fmt.Println("error")
fmt.Println("Proof Failed")
}
assert.True(t, flag, "Proof %v failed\n")

Expand Down

0 comments on commit db912dc

Please sign in to comment.