Skip to content

Fulu support for mev-boost #805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open
10 changes: 10 additions & 0 deletions common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ import (

const (
SlotTimeSecMainnet = 12
// FieldElementsPerBlob is the number of field elements needed to represent a blob.
FieldElementsPerBlob = 4096
// BlobExpansionFactor is the factor by which we extend a blob for PeerDAS.
BlobExpansionFactor = 2
// FieldElementsPerCell is the number of field elements in a cell.
FieldElementsPerCell = 64
// FieldElementsPerExtBlob is the number of field elements needed to represent an extended blob.
FieldElementsPerExtBlob = FieldElementsPerBlob * BlobExpansionFactor
// CellsPerExtBlob is the number of cells in an extended blob.
CellsPerExtBlob = FieldElementsPerExtBlob / FieldElementsPerCell
)

func GetEnv(key, defaultValue string) string {
Expand Down
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ require (
github.com/bits-and-blooms/bitset v1.22.0 // indirect
github.com/consensys/bavard v0.1.30 // indirect
github.com/consensys/gnark-crypto v0.17.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/emicklei/dot v1.8.0 // indirect
github.com/ethereum/c-kzg-4844 v1.0.3 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.0.1 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/goccy/go-yaml v1.17.1 // indirect
github.com/gofrs/flock v0.12.1 // indirect
Expand All @@ -37,7 +37,7 @@ require (

require (
github.com/attestantio/go-builder-client v0.6.1
github.com/attestantio/go-eth2-client v0.25.0
github.com/attestantio/go-eth2-client v0.25.1-0.20250603135601-6ac0bfda7fda
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/ferranbt/fastssz v0.1.4 // indirect
Expand All @@ -60,3 +60,6 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/attestantio/go-builder-client => github.com/jtraglia/go-builder-client v0.4.6-0.20250410195459-42a3ff7f1546
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to maintain this for the long term @jtraglia ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. We will remove this when attestant adds support. I don't think we have to block merging this PR on that though.

replace github.com/ethereum/go-ethereum => github.com/MariusVanDerWijden/go-ethereum v0.0.0-20250401090816-5ab5127f5408
18 changes: 10 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
github.com/MariusVanDerWijden/go-ethereum v0.0.0-20250401090816-5ab5127f5408 h1:0H1RpU0pilwhz2sItGYkA1z8+i4MJSf0u/kH5vQloTk=
github.com/MariusVanDerWijden/go-ethereum v0.0.0-20250401090816-5ab5127f5408/go.mod h1:huOmsndLTH6QOh8JLawPM5qPrQbdQ5QlD2wd5AN9VTI=
github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI=
github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI=
github.com/attestantio/go-builder-client v0.6.1 h1:fn6PC8aDWx2YbptstR1JKP8NyakiNJJTiOE5f9N0z5Q=
github.com/attestantio/go-builder-client v0.6.1/go.mod h1:f8wi3HzuPxfJoi2PirpJK3yZhte4SavDgKJbRrKoB1Q=
github.com/attestantio/go-eth2-client v0.25.0 h1:wLQxoteGCbTE/vKCMASx1ze+Zm9rcqtltRnblaLJup4=
github.com/attestantio/go-eth2-client v0.25.0/go.mod h1:fvULSL9WtNskkOB4i+Yyr6BKpNHXvmpGZj9969fCrfY=
github.com/attestantio/go-eth2-client v0.25.1-0.20250603135601-6ac0bfda7fda h1:Wc7YGICtTWKNZvMjpIN/l6HKTj9POEU9N67NIWWWOk0=
github.com/attestantio/go-eth2-client v0.25.1-0.20250603135601-6ac0bfda7fda/go.mod h1:fvULSL9WtNskkOB4i+Yyr6BKpNHXvmpGZj9969fCrfY=
github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4=
github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
Expand All @@ -12,6 +12,8 @@ github.com/consensys/bavard v0.1.30 h1:wwAj9lSnMLFXjEclKwyhf7Oslg8EoaFz9u1QGgt0b
github.com/consensys/bavard v0.1.30/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs=
github.com/consensys/gnark-crypto v0.17.0 h1:vKDhZMOrySbpZDCvGMOELrHFv/A9mJ7+9I8HEfRZSkI=
github.com/consensys/gnark-crypto v0.17.0/go.mod h1:A2URlMHUT81ifJ0UlLzSlm7TmnE3t7VxEThApdMukJw=
github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI=
github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI=
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg=
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM=
github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4=
Expand All @@ -25,10 +27,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvw
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40=
github.com/emicklei/dot v1.8.0 h1:HnD60yAKFAevNeT+TPYr9pb8VB9bqdeSo0nzwIW6IOI=
github.com/emicklei/dot v1.8.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
github.com/ethereum/c-kzg-4844 v1.0.3 h1:IEnbOHwjixW2cTvKRUlAAUOeleV7nNM/umJR+qy4WDs=
github.com/ethereum/c-kzg-4844 v1.0.3/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.15.9 h1:bRra1zi+/q+qyXZ6fylZOrlaF8kDdnlTtzNTmNHfX+g=
github.com/ethereum/go-ethereum v1.15.9/go.mod h1:+S9k+jFzlyVTNcYGvqFhzN/SFhI6vA+aOY4T5tLSPL0=
github.com/ethereum/c-kzg-4844/v2 v2.0.1 h1:NuErvd0Ha5gLvvZ1m9Id9UZ11kcqMBUUXsbm7yXcAYI=
github.com/ethereum/c-kzg-4844/v2 v2.0.1/go.mod h1:urP+cLBtKCW4BS5bnA2IXYs1PRGPpXmdotqpBuU6/5s=
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY=
Expand Down Expand Up @@ -59,6 +59,8 @@ github.com/huandu/go-clone v1.7.2 h1:3+Aq0Ed8XK+zKkLjE2dfHg0XrpIfcohBE1K+c8Usxoo
github.com/huandu/go-clone v1.7.2/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE=
github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U=
github.com/huandu/go-clone/generic v1.6.0/go.mod h1:xgd9ZebcMsBWWcBx5mVMCoqMX24gLWr5lQicr+nVXNs=
github.com/jtraglia/go-builder-client v0.4.6-0.20250410195459-42a3ff7f1546 h1:UnMUnbUz6fiJ1Ox7hNMkAS6T+Vcdy2qjo9q2D3q8zqg=
github.com/jtraglia/go-builder-client v0.4.6-0.20250410195459-42a3ff7f1546/go.mod h1:3Z2KfjbuX2EmJajEmDb3I/JdDqzlm4WsojnCugO0oM0=
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
Expand Down
1 change: 1 addition & 0 deletions server/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ const (
EthConsensusVersionCapella = "capella"
EthConsensusVersionDeneb = "deneb"
EthConsensusVersionElectra = "electra"
EthConsensusVersionFulu = "fulu"
)
7 changes: 7 additions & 0 deletions server/get_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ func decodeBid(respBytes []byte, respContentType, ethConsensusVersion string, bi
bid.Version = spec.DataVersionElectra
bid.Electra = new(builderApiElectra.SignedBuilderBid)
return bid.Electra.UnmarshalSSZ(respBytes)
case EthConsensusVersionFulu:
bid.Version = spec.DataVersionFulu
bid.Fulu = new(builderApiElectra.SignedBuilderBid)
return bid.Fulu.UnmarshalSSZ(respBytes)
default:
return errInvalidForkVersion
}
Expand Down Expand Up @@ -322,6 +326,9 @@ func (m *BoostService) respondGetHeaderSSZ(w http.ResponseWriter, result *bidRes
case spec.DataVersionElectra:
w.Header().Set(HeaderEthConsensusVersion, EthConsensusVersionElectra)
sszData, err = result.response.Electra.MarshalSSZ()
case spec.DataVersionFulu:
w.Header().Set(HeaderEthConsensusVersion, EthConsensusVersionFulu)
sszData, err = result.response.Fulu.MarshalSSZ()
case spec.DataVersionUnknown, spec.DataVersionPhase0, spec.DataVersionAltair:
err = errInvalidForkVersion
}
Expand Down
Loading
Loading