Skip to content

Commit

Permalink
Merge branch 'master' into pk910/validators-in-db
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Dec 19, 2024
2 parents e45411c + 948bf7b commit 0196c0d
Show file tree
Hide file tree
Showing 9 changed files with 296 additions and 515 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/mashingan/smapping v0.1.19
github.com/mitchellh/mapstructure v1.5.0
github.com/pk910/dynamic-ssz v0.0.5
github.com/pressly/goose/v3 v3.23.0
github.com/pressly/goose/v3 v3.23.1
github.com/protolambda/bls12-381-util v0.1.0
github.com/protolambda/zrnt v0.32.3
github.com/protolambda/ztyp v0.2.2
Expand All @@ -34,7 +34,7 @@ require (
github.com/tdewolff/minify v2.3.6+incompatible
github.com/timandy/routine v1.1.4
github.com/urfave/negroni v1.0.0
golang.org/x/crypto v0.30.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
golang.org/x/text v0.21.0
golang.org/x/time v0.8.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.23.0 h1:57hqKos8izGek4v6D5+OXBa+Y4Rq8MU//+MmnevdpVA=
github.com/pressly/goose/v3 v3.23.0/go.mod h1:rpx+D9GX/+stXmzKa+uh1DkjPnNVMdiOCV9iLdle4N8=
github.com/pressly/goose/v3 v3.23.1 h1:bwjOXvep4HtuiiIqtrXmCkQu0IW9O9JAqA6UQNY9ntk=
github.com/pressly/goose/v3 v3.23.1/go.mod h1:0oK0zcK7cmNqJSVwMIOiUUW0ox2nDIz+UfPMSOaw2zY=
github.com/prometheus/client_golang v1.20.0 h1:jBzTZ7B099Rg24tny+qngoynol8LtVYlA2bqx3vEloI=
github.com/prometheus/client_golang v1.20.0/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
Expand Down Expand Up @@ -503,8 +503,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY=
golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI=
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
Expand Down
13 changes: 12 additions & 1 deletion indexer/beacon/duties/duties.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,18 @@ func UintToBytes(data any) []byte {
}

func BytesToUint(data []byte) uint64 {
return binary.LittleEndian.Uint64(data)
switch len(data) {
case 1:
return uint64(data[0])
case 2:
return uint64(binary.LittleEndian.Uint16(data))
case 4:
return uint64(binary.LittleEndian.Uint32(data))
case 8:
return binary.LittleEndian.Uint64(data)
default:
return 0
}
}

func SplitOffset(listSize, chunks, index uint64) uint64 {
Expand Down
2 changes: 1 addition & 1 deletion indexer/execution/consolidation_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/ethpandaops/dora/utils"
)

const ConsolidationContractAddr = "0x01aBEa29659e5e97C95107F20bb753cD3e09bBBb"
const ConsolidationContractAddr = "0x00431F263cE400f4455c2dCf564e53007Ca4bbBb"

// ConsolidationIndexer is the indexer for the eip-7251 consolidation system contract
type ConsolidationIndexer struct {
Expand Down
2 changes: 1 addition & 1 deletion indexer/execution/withdrawal_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/ethpandaops/dora/utils"
)

const WithdrawalContractAddr = "0x09Fc772D0857550724b07B850a4323f39112aAaA"
const WithdrawalContractAddr = "0x0c15F14308530b7CDB8460094BbB9cC28b9AaaAA"

// WithdrawalIndexer is the indexer for the eip-7002 consolidation system contract
type WithdrawalIndexer struct {
Expand Down
Loading

0 comments on commit 0196c0d

Please sign in to comment.